RealtimeToolChoice class sealed
Tool choice for realtime sessions.
Determines how the model selects which tool (if any) to use.
Example
// Let the model decide
final choice = RealtimeToolChoice.auto();
// Disable tool use
final choice = RealtimeToolChoice.none();
// Require a specific function
final choice = RealtimeToolChoice.function('get_weather');
Constructors
- RealtimeToolChoice.auto()
-
Auto - let the model decide.
constfactory
- RealtimeToolChoice.fromJson(Object json)
-
Creates from JSON.
factory
- RealtimeToolChoice.function(String name)
-
Function - require a specific function.
constfactory
- RealtimeToolChoice.none()
-
None - disable tool use.
constfactory
- RealtimeToolChoice.required()
-
Required - force tool use.
constfactory
Properties
- 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
-
toJson(
) → Object - Converts to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited