VoiceAgentLiveClientConnectOptions interface
Settings for one GPT Live connection. Live does not use transport or agentSessionId. The complete structuredInputs value is sent in the WebSocket URL query in every environment, including Node.js. Do not include sensitive values: proxy and server access logs can retain URLs.
- Extends
-
Omit<VoiceAgentRealtimeClientConnectOptions, "transport" | "agentSessionId" | "foundryFeatures">
Properties
| on |
Receives events from startup onward, before connect() returns. An iterator started later receives subsequent events. Synchronous callback exceptions are logged without interrupting the connection. |
| session |
Overrides the timeout for the service's session.started event, in milliseconds. |
Inherited Properties
| abort |
Cancels the connection attempt. |
| agent |
Selects a specific immutable agent version. |
| connection |
Overrides the client connection timeout in milliseconds. |
| on |
Receives connection-state transitions. |
| on |
A function to be called each time a response is received from the server while performing the requested operation. May be called multiple times. |
| query | Custom URL query parameters. Values are URL-encoded; undefined removes a parameter. Realtime connections accept an explicit structured_inputs JSON-object string instead of structuredInputs. Other SDK/authentication, structured-input, and h-* keys are reserved. Never include sensitive values; URLs may be logged. |
| request |
Options used when creating and sending HTTP requests for this operation. |
| store | Overrides whether the conversation created by this session is persisted. |
| structured |
Prompt-variable values captured when connect() is called. Realtime connections use a header in Node.js and the URL query in browsers. GPT Live uses the URL query. For explicit Realtime URL transport, use query.structured_inputs instead. Do not put sensitive data in URL-carried inputs. |
| tracing |
Options used when tracing is enabled. |
Property Details
onEvent
Receives events from startup onward, before connect() returns. An iterator started later receives subsequent events. Synchronous callback exceptions are logged without interrupting the connection.
onEvent?: (event: VoiceAgentLiveEvent) => void
Property Value
(event: VoiceAgentLiveEvent) => void
sessionTimeoutInMs
Overrides the timeout for the service's session.started event, in milliseconds.
sessionTimeoutInMs?: number
Property Value
number
Inherited Property Details
abortSignal
Cancels the connection attempt.
abortSignal?: AbortSignalLike
Property Value
Inherited From Omit.abortSignal
agentVersionOverride
Selects a specific immutable agent version.
agentVersionOverride?: string
Property Value
string
Inherited From Omit.agentVersionOverride
connectionTimeoutInMs
Overrides the client connection timeout in milliseconds.
connectionTimeoutInMs?: number
Property Value
number
Inherited From Omit.connectionTimeoutInMs
onConnectionStateChange
Receives connection-state transitions.
onConnectionStateChange?: VoiceAgentConnectionStateChangedHandler
Property Value
Inherited From Omit.onConnectionStateChange
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 Omit.onResponse
query
Custom URL query parameters. Values are URL-encoded; undefined removes a parameter. Realtime connections accept an explicit structured_inputs JSON-object string instead of structuredInputs. Other SDK/authentication, structured-input, and h-* keys are reserved. Never include sensitive values; URLs may be logged.
query?: Readonly<Record<string, string | number | boolean | undefined>>
Property Value
Readonly<Record<string, string | number | boolean | undefined>>
Inherited From Omit.query
requestOptions
Options used when creating and sending HTTP requests for this operation.
requestOptions?: OperationRequestOptions
Property Value
Inherited From Omit.requestOptions
store
Overrides whether the conversation created by this session is persisted.
store?: boolean
Property Value
boolean
Inherited From Omit.store
structuredInputs
Prompt-variable values captured when connect() is called. Realtime connections use a header in Node.js and the URL query in browsers. GPT Live uses the URL query. For explicit Realtime URL transport, use query.structured_inputs instead. Do not put sensitive data in URL-carried inputs.
structuredInputs?: Record<string, unknown>
Property Value
Record<string, unknown>
Inherited From Omit.structuredInputs
tracingOptions
Options used when tracing is enabled.
tracingOptions?: OperationTracingOptions
Property Value
Inherited From Omit.tracingOptions