AnyToolChoice class
Model can use any tool, but it must use at least one. This is useful when you want to force the model to use tools.
Maps to:
- OpenAI:
{"type": "required"}
- Anthropic:
"any"
or{"type": "any", "disable_parallel_tool_use": true}
- xAI:
{"type": "required"}
- Inheritance
-
- Object
- ToolChoice
- AnyToolChoice
Constructors
- AnyToolChoice.new({bool? disableParallelToolUse})
-
const
Properties
- disableParallelToolUse → bool?
-
Whether to disable parallel tool use (Anthropic only)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toAnthropicJson(
) → String -
Convert to Anthropic format
override
-
toJson(
) → Map< String, dynamic> -
override
-
toOpenAIJson(
) → Map< String, dynamic> -
Convert to OpenAI format
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toXAIJson(
) → Map< String, dynamic> -
Convert to xAI format (OpenAI-compatible)
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited