RealtimeSessionOptions
type RealtimeSessionOptions<TContext> = object;
Type Parameters
Section titled “Type Parameters”Type Parameter | Default type |
---|---|
|
|
Properties
Section titled “Properties”apiKey
Section titled “apiKey”apiKey: ApiKey;
The API key to use for the connection. Pass a function to lazily load the API key
config?
Section titled “config?”optional config: Partial<RealtimeSessionConfig>;
Additional session config options. Overrides default client options.
context?
Section titled “context?”optional context: TContext;
Additional context to pass to the agent
groupId?
Section titled “groupId?”optional groupId: string;
A group identifier to use for tracing, to link multiple traces together. For example, if you want to connect your RealtimeSession traces with those of a backend text-based agent run.
historyStoreAudio?
Section titled “historyStoreAudio?”optional historyStoreAudio: boolean;
Whether the history copy should include a local copy of the audio data. By default it is not included in the history to save runtime memory on the client. If you wish to keep this data you can enable this option.
model?
Section titled “model?”optional model: | OpenAIRealtimeModels | string & object;
The model to use.
outputGuardrails?
Section titled “outputGuardrails?”optional outputGuardrails: RealtimeOutputGuardrail[];
Any output guardrails to apply to agent output in parallel
outputGuardrailSettings?
Section titled “outputGuardrailSettings?”optional outputGuardrailSettings: RealtimeOutputGuardrailSettings;
Configure the behavior of your guardrails
traceMetadata?
Section titled “traceMetadata?”optional traceMetadata: Record<string, any>;
An optional dictionary of additional metadata to include with the trace.
tracingDisabled?
Section titled “tracingDisabled?”optional tracingDisabled: boolean;
Whether tracing is disabled for this session. If disabled, we will not trace the agent run.
transport
Section titled “transport”transport: | "webrtc" | "websocket" | RealtimeTransportLayer;
The transport layer to use.
workflowName?
Section titled “workflowName?”optional workflowName: string;
The workflow name to use for tracing.