pub struct BaseAgent<C: LLMClient> {
pub id: String,
pub conversation_id: Uuid,
pub core: Core<C>,
pub state: AgentState,
pub system_prompt: Option<String>,
pub user_prompt: Option<String>,
pub messages: Vec<Message>,
pub tool_choice: ToolChoice,
}Expand description
Base agent implementation with common functionality
Fields§
§id: String§conversation_id: Uuid§core: Core<C>§state: AgentState§system_prompt: Option<String>§user_prompt: Option<String>§messages: Vec<Message>§tool_choice: ToolChoiceImplementations§
Trait Implementations§
Source§impl<C: LLMClient + Send + Sync> Agent for BaseAgent<C>
impl<C: LLMClient + Send + Sync> Agent for BaseAgent<C>
Source§fn state(&self) -> &AgentState
fn state(&self) -> &AgentState
Returns immutable reference to the agent’s current state.
Source§fn state_mut(&mut self) -> &mut AgentState
fn state_mut(&mut self) -> &mut AgentState
Returns mutable reference to the agent’s current state.
Auto Trait Implementations§
impl<C> Freeze for BaseAgent<C>where
C: Freeze,
impl<C> !RefUnwindSafe for BaseAgent<C>
impl<C> Send for BaseAgent<C>
impl<C> Sync for BaseAgent<C>
impl<C> Unpin for BaseAgent<C>where
C: Unpin,
impl<C> !UnwindSafe for BaseAgent<C>
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