ToolChoice class

How the model may use registered tools during a generation.

Constructors

ToolChoice.forced(String name)
Require a call to exactly this tool.
factory

Properties

forcedName String?
Tool name pinned by ToolChoice.forced.
final
hashCode int
The hash code for this object.
no setterinherited
mode ToolChoiceMode
Generated choice policy.
final
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
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

auto → const ToolChoice
Let the model decide whether to call a tool.
none → const ToolChoice
Forbid tool calls for this generation.
required → const ToolChoice
Require at least one tool call.