pub type BoxAgent<'a> = Agent<CompletionModelHandle<'a>>;Aliased Type§
pub struct BoxAgent<'a> {
pub model: CompletionModelHandle<'a>,
pub preamble: 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: Vec<(usize, Box<dyn VectorStoreIndexDyn>)>,
pub dynamic_tools: Vec<(usize, Box<dyn VectorStoreIndexDyn>)>,
pub tools: ToolSet,
}Fields§
§model: CompletionModelHandle<'a>Completion model (e.g.: OpenAI’s gpt-3.5-turbo-1106, Cohere’s command-r)
preamble: StringSystem 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: Vec<(usize, Box<dyn VectorStoreIndexDyn>)>List of vector store, with the sample number
dynamic_tools: Vec<(usize, Box<dyn VectorStoreIndexDyn>)>Dynamic tools
tools: ToolSetActual tool implementations