pub struct Agent { /* private fields */ }Implementations§
Source§impl Agent
impl Agent
pub fn builder() -> AgentBuilder
pub fn config(&self) -> &AgentConfig
pub fn llm(&self) -> &Arc<dyn LlmProvider>
pub fn create_session(&self) -> Session
pub async fn chat(&self, session: &Session, message: &str) -> Result<String>
pub async fn process( &self, session: &Session, message: &str, ) -> Result<AgentResponse>
pub fn chat_stream( &self, session: &Session, message: &str, ) -> impl Stream<Item = AgentEvent> + Send
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