pub struct ToolChoiceAllowedTools {
pub mode: ToolChoiceAllowedToolsMode,
pub tools: Map<String, Value>,
}
Fields§
§mode: ToolChoiceAllowedToolsMode
Constrains the tools available to the model to a pre-defined set.
auto
allows the model to pick from among the allowed tools and generate a message.required
requires the model to call one or more of the allowed tools.
tools: 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§fn clone(&self) -> ToolChoiceAllowedTools
fn clone(&self) -> ToolChoiceAllowedTools
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ToolChoiceAllowedTools
impl Debug for ToolChoiceAllowedTools
Auto Trait Implementations§
impl Freeze for ToolChoiceAllowedTools
impl RefUnwindSafe for ToolChoiceAllowedTools
impl Send for ToolChoiceAllowedTools
impl Sync for ToolChoiceAllowedTools
impl Unpin 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