RealtimeEvent.sessionUpdate constructor
- @FreezedUnionValue('session.update')
- @JsonKey(name: 'event_id', includeIfNull: false) String? eventId,
- @Default(RealtimeEventType.sessionUpdate) RealtimeEventType type,
- required SessionConfig session,
Send this event to update the session's default configuration. The client may send this event at any
time to update the session configuration, and any field may be updated at any time, except for
"voice". The server will respond with a session.updated
event that shows the full effective
configuration. Only fields that are present are updated, thus the correct way to clear a field like
"instructions" is to pass an empty string.
Implementation
@FreezedUnionValue('session.update')
const factory RealtimeEvent.sessionUpdate({
/// Optional client-generated ID used to identify this event.
@JsonKey(name: 'event_id', includeIfNull: false) String? eventId,
/// The type of the event.
@Default(RealtimeEventType.sessionUpdate) RealtimeEventType type,
/// Session configuration to update.
required SessionConfig session,
}) = RealtimeEventSessionUpdate;