pub struct ToolChoice {
pub type: Option<ToolTypes>,
pub function: Box<FunctionName>,
}Expand description
ToolChoice : Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. any or required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.
Fields§
§type: Option<ToolTypes>§function: Box<FunctionName>Implementations§
Source§impl ToolChoice
impl ToolChoice
Sourcepub fn new(function: FunctionName) -> ToolChoice
pub fn new(function: FunctionName) -> ToolChoice
Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. any or required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.
Trait Implementations§
Source§impl Clone for ToolChoice
impl Clone for ToolChoice
Source§fn clone(&self) -> ToolChoice
fn clone(&self) -> ToolChoice
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more