pub struct AgentRunner { /* private fields */ }Expand description
Agent runner that executes agents based on ceylon.toml configuration
Implementations§
Source§impl AgentRunner
impl AgentRunner
Sourcepub fn new<P: AsRef<Path>>(config_path: P) -> Result<Self>
pub fn new<P: AsRef<Path>>(config_path: P) -> Result<Self>
Create a new AgentRunner from a configuration file
Sourcepub fn from_current_dir() -> Result<Self>
pub fn from_current_dir() -> Result<Self>
Create a new AgentRunner from the current directory
Sourcepub fn from_dir<P: AsRef<Path>>(dir: P) -> Result<Self>
pub fn from_dir<P: AsRef<Path>>(dir: P) -> Result<Self>
Create a new AgentRunner from a specific directory
Sourcepub async fn run(&mut self, prompt: &str) -> Result<()>
pub async fn run(&mut self, prompt: &str) -> Result<()>
Run the agent with a single prompt and exit
Sourcepub async fn run_interactive(&mut self) -> Result<()>
pub async fn run_interactive(&mut self) -> Result<()>
Run the agent in interactive mode
Sourcepub fn config(&self) -> &CeylonConfig
pub fn config(&self) -> &CeylonConfig
Get the configuration
Auto Trait Implementations§
impl Freeze for AgentRunner
impl RefUnwindSafe for AgentRunner
impl Send for AgentRunner
impl Sync for AgentRunner
impl Unpin for AgentRunner
impl UnwindSafe for AgentRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more