pub struct ToolChoiceAllowedTools {
pub mode: ToolChoiceAllowedToolsMode,
pub tools: Vec<Map<String, Value>>,
}Fields§
§mode: ToolChoiceAllowedToolsModeConstrains the tools available to the model to a pre-defined set.
autoallows the model to pick from among the allowed tools and generate a message.requiredrequires the model to call one or more of the allowed tools.
tools: Vec<Map<String, Value>>A list of tool definitions that the model should be allowed to call.
For the Chat Completions API, the list of tool definitions might look like:
[
{ "type": "function", "function": { "name": "get_weather" } },
{ "type": "function", "function": { "name": "get_time" } }
]Trait Implementations§
Source§impl Clone for ToolChoiceAllowedTools
impl Clone for ToolChoiceAllowedTools
Source§impl Debug for ToolChoiceAllowedTools
impl Debug for ToolChoiceAllowedTools
Source§impl<'de> Deserialize<'de> for ToolChoiceAllowedTools
impl<'de> Deserialize<'de> for ToolChoiceAllowedTools
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ToolChoiceAllowedTools
impl RefUnwindSafe for ToolChoiceAllowedTools
impl Send for ToolChoiceAllowedTools
impl Sync for ToolChoiceAllowedTools
impl Unpin for ToolChoiceAllowedTools
impl UnsafeUnpin for ToolChoiceAllowedTools
impl UnwindSafe for ToolChoiceAllowedTools
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