pub type BoxAgent<'a> = Agent<CompletionModelHandle<'a>>;Aliased Type§
pub struct BoxAgent<'a> {
pub name: Option<String>,
pub description: Option<String>,
pub model: Arc<CompletionModelHandle<'a>>,
pub preamble: Option<String>,
pub static_context: Vec<Document>,
pub temperature: Option<f64>,
pub max_tokens: Option<u64>,
pub additional_params: Option<Value>,
pub tool_server_handle: ToolServerHandle,
pub dynamic_context: Arc<RwLock<Vec<(usize, Box<dyn VectorStoreIndexDyn + Send + Sync>)>>>,
pub tool_choice: Option<ToolChoice>,
}Fields§
§name: Option<String>Name of the agent used for logging and debugging
description: Option<String>Agent description. Primarily useful when using sub-agents as part of an agent workflow and converting agents to other formats.
model: Arc<CompletionModelHandle<'a>>Completion model (e.g.: OpenAI’s gpt-3.5-turbo-1106, Cohere’s command-r)
preamble: Option<String>System prompt
static_context: Vec<Document>Context documents always available to the agent
temperature: Option<f64>Temperature of the model
max_tokens: Option<u64>Maximum number of tokens for the completion
additional_params: Option<Value>Additional parameters to be passed to the model
tool_server_handle: ToolServerHandle§dynamic_context: Arc<RwLock<Vec<(usize, Box<dyn VectorStoreIndexDyn + Send + Sync>)>>>List of vector store, with the sample number
tool_choice: Option<ToolChoice>Whether or not the underlying LLM should be forced to use a tool before providing a response.