Realtime
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
Client events
复制页面
conversation.item.create
开发中
wss://api.openai.com/v1/realtime
Send this event when adding an item to the conversation.
请求参数
Query 参数
生成代码
event_id
string
可选
Optional client-generated ID used to identify this event.
示例值:
event_345
type
string
可选
The event type, must be "conversation.item.create".
示例值:
conversation.item.create
previous_item_id
string
可选
The ID of the preceding item after which the new item will be inserted.
示例值:
null
item
string
可选
这是一个object,The item to add to the conversation.
id
string
可选
The unique ID of the item.
type1
string
可选
这个参数是type,The type of the item ("message", "function_call", "function_call_output").The status of the item ("completed", "in_progress", "incomplete").
status
string
可选
The status of the item ("completed", "in_progress", "incomplete").
role
string
可选
The role of the message sender ("user", "assistant", "system").
content
array
[string]
可选
The content of the message.
示例值:
["type","text","audio","transcript"]
call_id
string
可选
The ID of the function call (for "function_call" items).
name
string
可选
The name of the function being called (for "function_call" items).
arguments
string
可选
The arguments of the function call (for "function_call" items).
output
string
可选
The output of the function call (for "function_call_output" items).
Header 参数
生成代码
Authorization
string
可选
示例值:
Bearer YOUR_API_KEY
OpenAI-Beta
string
可选
示例值:
realtime=v1
修改于
2024-10-14 23:56:45
上一页
input_audio_buffer.clear
下一页
conversation.item.truncate