pub type BoxAgent<'a> = Agent<CompletionModelHandle<'a>>;Aliased Type§
pub struct BoxAgent<'a> {
pub name: Option<String>,
pub model: Arc<CompletionModelHandle<'a>>,
pub preamble: Option<String>,
pub static_context: Vec<Document>,
pub static_tools: Vec<String>,
pub temperature: Option<f64>,
pub max_tokens: Option<u64>,
pub additional_params: Option<Value>,
pub dynamic_context: Arc<Vec<(usize, Box<dyn VectorStoreIndexDyn>)>>,
pub dynamic_tools: Arc<Vec<(usize, Box<dyn VectorStoreIndexDyn>)>>,
pub tools: Arc<ToolSet>,
}Fields§
§name: Option<String>Name of the agent used for logging and debugging
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
static_tools: Vec<String>Tools that are always available to the agent (identified by their name)
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
dynamic_context: Arc<Vec<(usize, Box<dyn VectorStoreIndexDyn>)>>List of vector store, with the sample number
dynamic_tools: Arc<Vec<(usize, Box<dyn VectorStoreIndexDyn>)>>Dynamic tools
tools: Arc<ToolSet>Actual tool implementations