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
(Default). The Model automatically decides if a tool should be called or whether to generate text instead.
ToolChoiceAnyDict
¶
Bases: TypedDict
Attributes¶
any
instance-attribute
¶
any: AnyToolChoice | AnyToolChoiceDict
The model must request at least one tool (no text is generated).