pub struct ToolChoiceAllowed {
pub mode: ToolChoiceAllowedMode,
pub tools: Vec<Value>,
}Fields§
§mode: ToolChoiceAllowedModeConstrains 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: Vec<Value>A list of tool definitions that the model should be allowed to call.
For the Responses API, the list of tool definitions might look like:
[
{ "type": "function", "name": "get_weather" },
{ "type": "mcp", "server_label": "deepwiki" },
{ "type": "image_generation" }
]Trait Implementations§
Source§impl Clone for ToolChoiceAllowed
impl Clone for ToolChoiceAllowed
Source§fn clone(&self) -> ToolChoiceAllowed
fn clone(&self) -> ToolChoiceAllowed
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ToolChoiceAllowed
impl Debug for ToolChoiceAllowed
Source§impl<'de> Deserialize<'de> for ToolChoiceAllowed
impl<'de> Deserialize<'de> for ToolChoiceAllowed
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolChoiceAllowed, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolChoiceAllowed, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ToolChoiceAllowed
impl PartialEq for ToolChoiceAllowed
Source§impl Serialize for ToolChoiceAllowed
impl Serialize for ToolChoiceAllowed
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ToolChoiceAllowed
Auto Trait Implementations§
impl Freeze for ToolChoiceAllowed
impl RefUnwindSafe for ToolChoiceAllowed
impl Send for ToolChoiceAllowed
impl Sync for ToolChoiceAllowed
impl Unpin for ToolChoiceAllowed
impl UnsafeUnpin for ToolChoiceAllowed
impl UnwindSafe for ToolChoiceAllowed
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