pub struct Agent { /* private fields */ }Implementations§
Source§impl Agent
impl Agent
pub async fn new(name: impl Into<String>, config: Config) -> Result<Self>
pub fn builder(name: impl Into<String>) -> AgentBuilder
pub fn name(&self) -> &str
pub fn set_system_prompt(&mut self, prompt: impl Into<String>)
pub fn register_tool(&mut self, tool: Box<dyn Tool>)
pub fn tool_registry(&self) -> &ToolRegistry
pub fn tool_registry_mut(&mut self) -> &mut ToolRegistry
pub fn chat_session(&self) -> &ChatSession
pub fn chat_session_mut(&mut self) -> &mut ChatSession
pub fn clear_history(&mut self)
pub async fn send_message( &mut self, message: impl Into<String>, ) -> Result<String>
pub async fn chat(&mut self, message: impl Into<String>) -> Result<String>
pub fn set_max_iterations(&mut self, max: usize)
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