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');
Implementers

Constructors

RealtimeToolChoice.auto()
Auto - let the model decide.
const
factory
RealtimeToolChoice.fromJson(Object json)
Creates from JSON.
factory
RealtimeToolChoice.function(String name)
Function - require a specific function.
const
factory
RealtimeToolChoice.none()
None - disable tool use.
const
factory
RealtimeToolChoice.required()
Required - force tool use.
const
factory

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