# Functions

NewInfinity creates a new IntOrInf representing infinity.
NewIntOrInf creates a new IntOrInf with the given value.
NewManager creates a new session manager with the given client.
NewSession creates a new Session with default values.
NewSessionRequest creates a new session request with the given options.
WithInputAudioFormat sets the input audio format for the session.
WithInputAudioTranscription sets the input audio transcription configuration for the session.
WithInstructions sets the instructions for the session.
WithMaxResponseOutputTokens sets the maximum number of tokens for the response output.
WithModalities sets the modalities for the session.
WithModel sets the model for the session.
WithOutputAudioFormat sets the output audio format for the session.
WithTemperature sets the temperature for the session.
WithToolChoice sets the tool choice for the session.
WithTools sets the tools for the session.
WithTurnDetection sets the turn detection configuration for the session.
WithVoice sets the voice for the session.

# Constants

AudioFormatG711ALaw is the G.711 A-law audio format.
AudioFormatG711ULaw is the G.711 μ-law audio format.
AudioFormatPCM16 is the PCM 16-bit audio format.
DefaultMaxResponseOutputTokens is the default value for max_response_output_tokens if specified.
GPT4oMiniRealtimePreview is the base GPT-4o mini realtime preview model.
GPT4oMiniRealtimePreview20241217 is the December 2024 version of GPT-4o mini realtime.
GPT4oRealtimePreview is the base GPT-4o realtime preview model.
GPT4oRealtimePreview20241001 is the October 2024 version of GPT-4o realtime.
GPT4oRealtimePreview20241217 is the December 2024 version of GPT-4o realtime.
Inf is the maximum value for an IntOrInf.
ModalityAudio represents audio input/output capability.
ModalityText represents text input/output capability.
SessionEventTypeCreated indicates a session was created.
SessionEventTypeExpired indicates a session has expired.
SessionEventTypeUpdated indicates a session was updated.
ToolChoiceAuto lets the model decide when to use tools.
ToolChoiceFunction specifies a particular function to use.
ToolChoiceNone prevents the model from using tools.
ToolChoiceRequired forces the model to use a tool.
TranscriptionModelWhisper1 is the Whisper-1 transcription model.
TurnDetectionTypeServerVad use server-side VAD to detect turn.
VoiceAlloy is a neutral voice with a slight British accent.
VoiceAsh is a warm, clear voice with an American accent.
VoiceBallad is a soft, melodic voice with an American accent.
VoiceCoral is a warm, friendly voice with an American accent.
VoiceEcho is a baritone voice with an American accent.
VoiceSage is a gentle, thoughtful voice with an American accent.
VoiceShimmer is a bright, enthusiastic voice with an American accent.
VoiceVerse is a deep, resonant voice with an American accent.

# Structs

ClientSecret contains authentication information for client-side connections.
ClientSecretInfo is a wrapper for ClientSecret Deprecated: This type is no longer used as the API directly returns the ClientSecret structure without this additional nesting level.
CreateRequest represents a request to create a new session.
CreateResponse represents the response from creating a new session.
DefaultManager implements the Manager interface using the OpenAI API.
FunctionChoice specifies a particular function to use.
FunctionDefinition defines a function that the model can call Deprecated: This struct is no longer used as the API expects a flattened structure.
InputAudioTranscription represents configuration for audio transcription.
Session represents a complete session with the OpenAI Realtime API.
SessionEvent represents an event related to a session.
SessionRequest represents both create and update requests All fields are pointers to make them optional.
Tool represents a function that the model can call.
ToolChoiceObj represents tool selection configuration.
TurnDetection represents turn detection configuration.
UpdateRequest represents a request to update an existing session.
UpdateResponse represents the response from updating a session.

# Interfaces

Manager provides methods for managing sessions with the OpenAI Realtime API.
SessionClient defines the interface for session-related API operations.

# Type aliases

AudioFormat represents the supported audio formats.
ConfigOption is a function that configures a SessionRequest.
IntOrInf is a type that can be either an int or "inf".
Modality represents the supported modalities.
Model represents available OpenAI models.
SessionEventType represents the type of session event.
ToolChoice represents how the model should choose tools.
TranscriptionModel represents the model used for audio transcription.
TurnDetectionType represents the type of turn detection.
Voice represents the available voice options.