RealtimeSessionCreateResponse class
Response from creating a realtime session via HTTP.
Contains the session configuration and an ephemeral client secret for authenticating WebSocket connections.
- Annotations
-
- @immutable
Constructors
-
RealtimeSessionCreateResponse({required String id, required String object, required String model, ClientSecret? clientSecret, List<
String> ? modalities, String? instructions, RealtimeVoice? voice, RealtimeAudioFormat? inputAudioFormat, RealtimeAudioFormat? outputAudioFormat, InputAudioTranscription? inputAudioTranscription, TurnDetection? turnDetection, NoiseReductionConfig? inputAudioNoiseReduction, List<RealtimeTool> ? tools, RealtimeToolChoice? toolChoice, double? temperature, InfOrInt? maxResponseOutputTokens}) -
Creates a RealtimeSessionCreateResponse.
const
-
RealtimeSessionCreateResponse.fromJson(Map<
String, dynamic> json) -
Creates a RealtimeSessionCreateResponse from JSON.
factory
Properties
- clientSecret → ClientSecret?
-
The ephemeral client secret for WebSocket authentication.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
The session identifier.
final
- inputAudioFormat → RealtimeAudioFormat?
-
Input audio format.
final
- inputAudioNoiseReduction → NoiseReductionConfig?
-
Input audio noise reduction configuration.
final
- inputAudioTranscription → InputAudioTranscription?
-
Configuration for input audio transcription.
final
- instructions → String?
-
System instructions for the model.
final
- maxResponseOutputTokens → InfOrInt?
-
Maximum output tokens ("inf" or a specific integer).
final
-
modalities
→ List<
String> ? -
The modalities enabled (e.g.,
"text", "audio").final - model → String
-
The model to use.
final
- object → String
-
The object type (always "realtime.session").
final
- outputAudioFormat → RealtimeAudioFormat?
-
Output audio format.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- temperature → double?
-
Sampling temperature.
final
- toolChoice → RealtimeToolChoice?
-
Tool choice setting.
final
-
tools
→ List<
RealtimeTool> ? -
Tools available to the model.
final
- turnDetection → TurnDetection?
-
Turn detection configuration.
final
- voice → RealtimeVoice?
-
The voice to use for audio output.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override