pub struct Agent<C: ChatProvide, M: Memory> {
pub config: AgentConfig,
pub llm: C,
pub model: String,
pub memory: M,
pub context_builder: ContextBuilder,
pub kit: AgentKit,
}Fields§
§config: AgentConfig§llm: C§model: String§memory: M§context_builder: ContextBuilder§kit: AgentKitImplementations§
Source§impl<C: ChatProvide, M: Memory> Agent<C, M>
impl<C: ChatProvide, M: Memory> Agent<C, M>
pub fn tool_list(&self) -> &[ToolDefinition]
pub fn system_prompt(&self) -> &str
pub async fn run(&mut self, query: &str) -> AgentResult<String>
pub async fn chat(&mut self, query: &str) -> AgentResult<String>
Auto Trait Implementations§
impl<C, M> Freeze for Agent<C, M>
impl<C, M> !RefUnwindSafe for Agent<C, M>
impl<C, M> Send for Agent<C, M>
impl<C, M> Sync for Agent<C, M>
impl<C, M> Unpin for Agent<C, M>
impl<C, M> UnsafeUnpin for Agent<C, M>where
C: UnsafeUnpin,
M: UnsafeUnpin,
impl<C, M> !UnwindSafe for Agent<C, M>
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