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

response.create

开发中
wss://api.openai.com/v1/realtime
Send this event to trigger a response generation.

请求参数

Query 参数
event_id
string 
可选
Optional client-generated ID used to identify this event
示例值:
event_234
type
string 
可选
The event type, must be "response.create".
示例值:
response.create
response
string 
可选
object类型,以下参数为其中参数。Configuration for the response.
modalities
string 
可选
The modalities for the response.
示例值:
["text", "audio"]
instructions
string 
可选
Instructions for the model.
示例值:
Please assist the user.
voice
string 
可选
The voice the model uses to respond - one of alloy, echo, or shimmer.
示例值:
alloy
output_audio_format
string 
可选
The format of output audio.
示例值:
pcm16
tools
array[string]
可选
Tools (functions) available to the model.
示例值:
["type","name","description","parameters"]
tool_choice
string 
可选
How the model chooses tools.
示例值:
auto
temperature
number 
可选
Sampling temperature.
示例值:
0.7
max_output_tokens
integer 
可选
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".
示例值:
150
Header 参数
Authorization
string 
可选
示例值:
Bearer YOUR_API_KEY
OpenAI-Beta
string 
可选
示例值:
realtime=v1
上一页
conversation.item.delete
下一页
response.cancel
Built with