pub struct Agent { /* private fields */ }Implementations§
Source§impl Agent
impl Agent
pub fn new(config: AgentConfig) -> Result<Self, AgentError>
pub fn with_llm(llm: Arc<dyn LlmClient>, config: AgentConfig) -> Self
pub fn with_tracer(self, tracer: Arc<dyn Tracer>) -> Self
pub fn set_tracer(&mut self, tracer: Arc<dyn Tracer>)
pub fn register_tool<T>(&mut self, tool: T)where
T: Tool + 'static,
pub fn register_tool_boxed(&mut self, tool: Box<dyn Tool>)
pub fn tool_registry_mut(&mut self) -> &mut ToolRegistry
pub async fn invoke(&self, user_prompt: &str) -> Result<AgentResult, AgentError>
Auto Trait Implementations§
impl Freeze for Agent
impl !RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl !UnwindSafe for Agent
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