VoiceAgentRealtimeClientConnectOptions interface

Options for connecting the realtime client to a voice agent.

Extends

Properties

abortSignal

Cancels the connection attempt.

agentSessionId

Identifier used to correlate the voice session.

agentVersionOverride

Selects a specific immutable agent version.

connectionTimeoutInMs

Overrides the client connection timeout in milliseconds.

onConnectionStateChange

Receives connection-state transitions.

store

Overrides whether the conversation created by this session is persisted.

structuredInputs

Values used to render the agent's structured prompt inputs.

Inherited Properties

onResponse

A function to be called each time a response is received from the server while performing the requested operation. May be called multiple times.

requestOptions

Options used when creating and sending HTTP requests for this operation.

tracingOptions

Options used when tracing is enabled.

Property Details

abortSignal

Cancels the connection attempt.

abortSignal?: AbortSignalLike

Property Value

agentSessionId

Identifier used to correlate the voice session.

agentSessionId?: string

Property Value

string

agentVersionOverride

Selects a specific immutable agent version.

agentVersionOverride?: string

Property Value

string

connectionTimeoutInMs

Overrides the client connection timeout in milliseconds.

connectionTimeoutInMs?: number

Property Value

number

onConnectionStateChange

Receives connection-state transitions.

onConnectionStateChange?: VoiceAgentConnectionStateChangedHandler

Property Value

store

Overrides whether the conversation created by this session is persisted.

store?: boolean

Property Value

boolean

structuredInputs

Values used to render the agent's structured prompt inputs.

structuredInputs?: Record<string, unknown>

Property Value

Record<string, unknown>

Inherited Property Details

onResponse

A function to be called each time a response is received from the server while performing the requested operation. May be called multiple times.

onResponse?: RawResponseCallback

Property Value

Inherited From OperationOptions.onResponse

requestOptions

Options used when creating and sending HTTP requests for this operation.

requestOptions?: OperationRequestOptions

Property Value

Inherited From OperationOptions.requestOptions

tracingOptions

Options used when tracing is enabled.

tracingOptions?: OperationTracingOptions

Property Value

Inherited From OperationOptions.tracingOptions