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
automaticallyTriggerResponseForMcpToolCalls?
Section titled “automaticallyTriggerResponseForMcpToolCalls?”automaticallyTriggerResponseForMcpToolCalls?: boolean;Whether to automatically trigger a response for MCP tool calls.
config?
Section titled “config?”config?: Partial<RealtimeSessionConfig>;Additional session config options. Overrides default client options.
context?
Section titled “context?”context?: TContext;Additional context to pass to the agent
groupId?
Section titled “groupId?”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?”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?”model?: | OpenAIRealtimeModels | string & object;The model to use.
outputGuardrails?
Section titled “outputGuardrails?”outputGuardrails?: RealtimeOutputGuardrail[];Any output guardrails to apply to agent output in parallel
outputGuardrailSettings?
Section titled “outputGuardrailSettings?”outputGuardrailSettings?: RealtimeOutputGuardrailSettings;Configure the behavior of your guardrails
toolErrorFormatter?
Section titled “toolErrorFormatter?”toolErrorFormatter?: ToolErrorFormatter<RealtimeContextData<TContext>>;Formats tool error messages that are returned to the model.
Returning undefined falls back to the SDK default message.
toolExecution?
Section titled “toolExecution?”toolExecution?: RealtimeToolExecutionConfig;SDK-side execution settings for local realtime tool calls.
traceMetadata?
Section titled “traceMetadata?”traceMetadata?: Record<string, any>;An optional dictionary of additional metadata to include with the trace.
tracingDisabled?
Section titled “tracingDisabled?”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?”workflowName?: string;The workflow name to use for tracing.