Skip to content

ToolChoiceDict

Union Type

ToolChoiceDict module-attribute

Dictionary form of ToolChoice, setting exactly one variant.

Union Member Types

ToolChoiceAutoDict

Bases: TypedDict

Attributes

auto instance-attribute

Defines tools. The model automatically decides whether to call a tool or to generate text instead.

ToolChoiceAnyDict

Bases: TypedDict

Attributes

any instance-attribute

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.

ToolChoiceToolDict

Bases: TypedDict

Attributes

tool instance-attribute

Defines a specific tool that the model must request. No text is generated but the results of tool use are sent back to the model to help generate a response.