Realtime
  1. Client events
Realtime
  • Realtime Websocket
    • Client events
      • session.update
      • input_audio_buffer.append
      • input_audio_buffer.commit
      • input_audio_buffer.clear
      • conversation.item.create
      • conversation.item.truncate
      • conversation.item.delete
      • response.create
      • response.cancel
    • Server events
      • error
      • conversation.item.input_audio_transcription.completed
      • conversation.item.input_audio_transcription.failed
      • conversation.item.truncated
      • conversation.item.deleted
      • input_audio_buffer.committed
      • input_audio_buffer.cleared
      • input_audio_buffer.speech_started
      • input_audio_buffer.speech_stopped
      • response.created
      • response.done
      • response.output_item.added
      • response.output_item.done
      • response.content_part.added
      • response.content_part.done
      • response.text.delta
      • response.text.done
      • response.audio_transcript.delta
      • response.audio_transcript.done
      • response.audio.delta
      • response.audio.done
      • response.function_call_arguments.delta
      • response.function_call_arguments.done
      • rate_limits.updated
      • conversation.created
      • conversation.item.created
      • session.created
      • session.updated
  1. Client events

session.update

开发中
wss://api.openai.com/v1/realtime
Send this event to update the session’s default configuration.

请求参数

Query 参数
event_id
string 
可选
Optional client-generated ID used to identify this event.
示例值:
event_123
type
string 
可选
The event type, must be "session.update".
示例值:
session.update
session
string 
可选
object类型,以下参数为其中参数。Session configuration to update.
modalities
array[string]
可选
The set of modalities the model can respond with. To disable audio, set this to ["text"].
示例值:
[" [\"text\", \"audio\"]"]
instructions
string 
可选
The default system instructions prepended to model calls.
示例值:
Your knowledge cutoff is 2023-10. You are a helpful assistant.
voice
string 
可选
The voice the model uses to respond - one of alloy, echo, or shimmer. Cannot be changed once the model has responded with audio at least once.
示例值:
alloy
input_audio_format
string 
可选
The format of input audio. Options are "pcm16", "g711_ulaw", or "g711_alaw".
示例值:
pcm16
output_audio_format
string 
可选
The format of output audio. Options are "pcm16", "g711_ulaw", or "g711_alaw".
示例值:
pcm16
input_audio_transcription
string 
可选
object类型,以下model为其中参数。
model
string 
可选
The model to use for transcription (e.g., "whisper-1").
示例值:
whisper-1
turn_detection
string 
可选
object类型,以下type、threshold、prefix_padding_ms、silence_duration_ms为其中参数。
type1
string 
可选
为type,Type of turn detection, only "server_vad" is currently supported.
示例值:
server_vad
threshold
number 
可选
Activation threshold for VAD (0.0 to 1.0).
示例值:
0.5
prefix_padding_ms
integer 
可选
Amount of audio to include before speech starts (in milliseconds).
示例值:
300
silence_duration_ms
integer 
可选
Duration of silence to detect speech stop (in milliseconds).
示例值:
200
tools
array[string]
可选
Tools (functions) available to the model.
示例值:
["type","name","description","parameters",""]
tool_choice
string 
可选
How the model chooses tools. Options are "auto", "none", "required", or specify a function.
示例值:
auto
temperature
string 
可选
Sampling temperature for the model.
示例值:
0.8
max_output_tokens
string 
可选
Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or "inf" for the maximum available tokens for a given model. Defaults to "inf".
示例值:
null
Header 参数
Authorization
string 
可选
示例值:
Bearer YOUR_API_KEY
OpenAI-Beta
string 
可选
示例值:
realtime=v1
下一页
input_audio_buffer.append
Built with