RealtimeSessionCreateRequest constructor

const RealtimeSessionCreateRequest({
  1. required String model,
  2. String? type,
  3. RealtimeAudioConfig? audio,
  4. List<String>? outputModalities,
  5. String? instructions,
  6. List<RealtimeTool>? tools,
  7. RealtimeToolChoice? toolChoice,
  8. InfOrInt? maxOutputTokens,
  9. bool? parallelToolCalls,
  10. RealtimeReasoning? reasoning,
  11. RealtimeTracingConfig? tracing,
  12. RealtimeTruncation? truncation,
  13. List<String>? include,
})

Creates a RealtimeSessionCreateRequest.

The type field is the session-type discriminator ('realtime' for realtime sessions). Set this when the API needs to distinguish between realtime and transcription sessions, such as when creating client secrets.

Implementation

const RealtimeSessionCreateRequest({
  required this.model,
  this.type,
  this.audio,
  this.outputModalities,
  this.instructions,
  this.tools,
  this.toolChoice,
  this.maxOutputTokens,
  this.parallelToolCalls,
  this.reasoning,
  this.tracing,
  this.truncation,
  this.include,
});