ToolChoiceDict¶
Union Type¶
ToolChoiceDict
module-attribute
¶
ToolChoiceDict = Union[ToolChoiceAutoDict | ToolChoiceAnyDict | ToolChoiceToolDict]
Dictionary form of ToolChoice, setting exactly one variant.
Union Member Types¶
ToolChoiceAutoDict
¶
Bases: TypedDict
Attributes¶
auto
instance-attribute
¶
auto: AutoToolChoice | AutoToolChoiceDict
Defines tools. The model automatically decides whether to call a tool or to generate text instead.
ToolChoiceAnyDict
¶
Bases: TypedDict
Attributes¶
any
instance-attribute
¶
any: AnyToolChoice | AnyToolChoiceDict
Defines tools, at least one of which must be requested by the model. No text is generated but the results of tool use are sent back to the model to help generate a response.