pub struct ResponsesFunctionToolChoice {
pub tool_type: FunctionToolChoiceTag,
pub name: String,
}Expand description
Canonical payload for the Responses API Function tool-choice variant.
Serializes as the spec-flat shape {"type": "function", "name": "..."}.
Deserialization accepts both wire shapes for backward compatibility
with smg clients written against the pre-split shared ToolChoice type
(which used the Chat-style nested {"function": {"name": "..."}} layout
on the Responses endpoint):
- Canonical flat:
{"type": "function", "name": "..."} - Legacy nested:
{"type": "function", "function": {"name": "..."}}
Either shape normalizes to name: String at deserialize time so the rest
of the gateway only ever sees the canonical form.
Fields§
§tool_type: FunctionToolChoiceTag§name: StringTrait Implementations§
Source§impl Clone for ResponsesFunctionToolChoice
impl Clone for ResponsesFunctionToolChoice
Source§fn clone(&self) -> ResponsesFunctionToolChoice
fn clone(&self) -> ResponsesFunctionToolChoice
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 ResponsesFunctionToolChoice
impl Debug for ResponsesFunctionToolChoice
Source§impl<'de> Deserialize<'de> for ResponsesFunctionToolChoice
impl<'de> Deserialize<'de> for ResponsesFunctionToolChoice
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
Source§impl JsonSchema for ResponsesFunctionToolChoice
impl JsonSchema for ResponsesFunctionToolChoice
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ResponsesFunctionToolChoice
impl RefUnwindSafe for ResponsesFunctionToolChoice
impl Send for ResponsesFunctionToolChoice
impl Sync for ResponsesFunctionToolChoice
impl Unpin for ResponsesFunctionToolChoice
impl UnsafeUnpin for ResponsesFunctionToolChoice
impl UnwindSafe for ResponsesFunctionToolChoice
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