リアルタイム (Qwen-Omni-Realtime) をご参照ください。
error
サーバーエラーのメッセージを示します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_RoUu4T8yExPMI37GKwaOC",
"type": "error",
"error": {
"type": "invalid_request_error",
"code": "invalid_value",
"message": "Invalid modalities: ['audio']. Supported combinations are: ['text'] and ['audio', 'text'].",
"param": "session.modalities"
}
}
|
|
type string
イベントタイプです。この値は常に error です。
|
|
error object
エラーの詳細情報です。
Properties
message string
エラーメッセージです。
param string
エラーに関連するパラメーターです(例:session.modalities)。
|
session.created
クライアントが接続した後、サーバーはこのイベントを返します。このイベントには、セッションのデフォルト構成が含まれます。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_RdvlSpbBb2ssyBjYrDHjt",
"type": "session.created",
"session": {
"object": "realtime.session",
"model": "qwen3-omni-flash-realtime",
"modalities": [
"text",
"audio"
],
"voice": "Cherry",
"input_audio_format": "pcm",
"output_audio_format": "pcm",
"input_audio_transcription": {
"model": "qwen3-asr-flash-realtime"
},
"turn_detection": {
// The value can be server_vad or semantic_vad (only supported by qwen3.5-omni-realtime).
"type": "server_vad",
"threshold": 0.5,
"prefix_padding_ms": 300,
"silence_duration_ms": 800,
"create_response": true,
"interrupt_response": true
},
"enable_search": false,
"search_options": {},
"tools": [],
"temperature": 0.8,
"id": "sess_Ov7GOXoNXhNjlxXtOGKQS"
}
}
|
|
type string
イベントタイプです。この値は常に session.created です。
|
|
session object
セッションの構成です。
Properties
object string
この値は常に realtime.session です。
modalities array
モデルの出力モダリティです。
voice string
モデル生成オーディオの音声です。
input_audio_format string
入力オーディオフォーマットです。この値は常に pcm です。
output_audio_format string
出力オーディオフォーマットです。この値は常に pcm です。
input_audio_transcription object
トランスクリプションの構成です。
Properties
model string
トランスクリプションモデルです。この値は常に qwen3-asr-flash-realtime です。このパラメーターは設定できません。
turn_detection object
音声区間検出 (VAD) の構成です。
Properties
type string
VAD タイプです。有効な値は server_vad(デフォルト)または semantic_vad です。クライアントイベント をご参照ください。
threshold float
VAD 検出のしきい値です。
silence_duration_ms integer
発話終了を検出するためのサイレンス持続時間(ミリ秒単位)です。
enable_search boolean
Web 検索を有効にするかどうかを指定します。Qwen3.5-Omni-Realtime のみでサポートされます。
search_options object
Web 検索のオプションです。
temperature float
モデルの温度パラメーターです。
|
session.updated
クライアントが session.update リクエストを成功させた後、サーバーはこのイベントを返します。リクエストが失敗した場合は、サーバーは error イベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_X1HsXS4b4uptp6yo1LgKd",
"type": "session.updated",
"session": {
"id": "sess_Aih6vAcY5Ddt6jwFx1tCa",
"object": "realtime.session",
"model": "qwen3-omni-flash-realtime",
"modalities": [
"text",
"audio"
],
"instructions": "You are Xiao Yun, a personal assistant. Answer user questions accurately and in a friendly manner. Always respond with a helpful attitude.",
"voice": "Cherry",
"input_audio_format": "pcm",
"output_audio_format": "pcm",
"input_audio_transcription": {
"model": "qwen3-asr-flash-realtime"
},
"turn_detection": {
// The value can be server_vad or semantic_vad (only supported by qwen3.5-omni-realtime).
"type": "server_vad",
"threshold": 0.1,
"prefix_padding_ms": 500,
"silence_duration_ms": 900,
"create_response": true,
"interrupt_response": true
},
"enable_search": true,
"search_options": {
"enable_source": true
},
"tools": [
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Useful for querying the weather in a specific city.",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "The city name"}
},
"required": ["location"]
}
}
}
],
"temperature": 0.8,
"max_response_output_token": "inf",
"max_tokens": 16384,
"repetition_penalty": 1.05,
"presence_penalty": 0.0,
"top_k": 50,
"top_p": 1.0,
"seed":-1
}
}
|
|
type string
イベントタイプです。この値は常に session.updated です。
|
|
session object
セッションの構成です。
Properties
temperature float
モデルの温度パラメーターです。
modalities array
モデルの出力モダリティです。
voice string
モデル生成オーディオの音声です。
instructions string
モデルの目的とロールです。
input_audio_format string
入力オーディオフォーマットです。pcm のみがサポートされます。
output_audio_format string
出力オーディオフォーマットです。pcm のみがサポートされます。
input_audio_transcription object
トランスクリプションの構成です。
Properties
model string
トランスクリプションモデルです。この値は常に qwen3-asr-flash-realtime です。このパラメーターは設定できません。
turn_detection object
音声区間検出 (VAD) の構成です。
Properties
type string
VAD タイプです。有効な値は server_vad(デフォルト)または semantic_vad です。クライアントイベント をご参照ください。
threshold float
VAD 検出のしきい値です。
silence_duration_ms integer
発話終了を検出するためのサイレンス持続時間(ミリ秒単位)です。
enable_search boolean (optional)
Web 検索を有効にするかどうかを指定します。Qwen3.5-Omni-Realtime のみでサポートされます。
search_options object (optional)
Web 検索のオプションです。
top_p float
核サンプリングの確率しきい値です。
top_k integer
モデル生成時のサンプル候補セットのサイズです。
max_tokens integer
リクエストに対してモデルが返すことができるトークンの最大数です。
repetition_penalty float
生成時の連続シーケンスにおける繰り返しを制御します。
presence_penalty float
生成コンテンツにおける繰り返しを制御します。
seed integer
リクエストごとのモデル出力の一貫性の程度です。
|
input_audio_buffer.speech_started
VAD モードでは、サーバーはオーディオバッファー内で発話の開始を検出したときに、このイベントを返します。
このイベントは、発話が検出される前にバッファーにオーディオを追加するたびにトリガーされる可能性があります。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_Pvp8nEhsQuGCQbFJ9x58n",
"type": "input_audio_buffer.speech_started",
"audio_start_ms": 3647,
"item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}
|
|
type string
イベントタイプです。この値は常に input_audio_buffer.speech_started です。
|
|
audio_start_ms integer
バッファーへのオーディオ書き込み開始から最初に発話を検出するまでの時間(ミリ秒単位)です。
|
|
item_id string
発話終了が検出されたときに作成されるユーザーメッセージアイテムの ID です。
ユーザーメッセージアイテムは、会話履歴にユーザー入力を追加するために使用され、その後のモデル推論および生成に利用されます。
|
input_audio_buffer.speech_stopped
VAD モードでは、サーバーはオーディオバッファー内で発話の終了を検出したときに、このイベントを返します。
また、サーバーは対応するユーザーメッセージアイテムを作成する conversation.item.created イベントも返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_UhQiqNVRsgUiq4KUS5Xb5",
"type": "input_audio_buffer.speech_stopped",
"audio_end_ms": 4453,
"item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}
|
|
type string
イベントタイプです。この値は常に input_audio_buffer.speech_stopped です。
|
|
audio_end_ms integer
セッション開始時から発話終了を検出するまでの時間(ミリ秒単位)です。
|
|
item_id string
作成されるユーザーメッセージアイテムの ID です。
|
input_audio_buffer.committed
サーバーは、入力オーディオバッファーがコミットされたときに、このイベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_Iy6sUzL1nmdFgshFYxJEz",
"type": "input_audio_buffer.committed",
"item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}
|
|
type string
イベントタイプです。この値は常に input_audio_buffer.committed です。
|
|
item_id string
作成されるユーザーメッセージアイテムの ID です。
|
input_audio_buffer.cleared
サーバーは、クライアントが input_audio_buffer.clear イベントを送信した後に、このイベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_RoUu4T8yExPMI37GKwaOC",
"type": "input_audio_buffer.cleared"
}
|
|
type string
イベントタイプです。この値は常に input_audio_buffer.cleared です。
|
conversation.item.created
サーバーは、会話アイテムが作成されたときに、このイベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_JEfkrr9gO3Ny7Xcv9bGVd",
"type": "conversation.item.created",
"item": {
"id": "item_YbAiGvK2H7YaS34o4R6Ba",
"object": "realtime.item",
"type": "message",
"status": "in_progress",
"role": "assistant",
"content": [
{
"type": "input_audio"
}
]
}
}
// Tool calling scenario
{
"event_id": "event_S1hkaIQgcuQD8OEdOpGHQ",
"type": "conversation.item.created",
"item": {
"id": "item_FEG9qJGNkPcdf4et3p7BV",
"object": "realtime.item",
"type": "function_call",
"status": "in_progress",
"call_id": "call_bc0a7fb7235840f69ecfe4",
"name": "get_current_weather",
"arguments": ""
}
}
|
|
type string
イベントタイプです。この値は常に conversation.item.created です。
|
|
item object
追加する会話アイテムです。
Properties
id string
会話アイテムの一意な ID です。
object string
この値は常に realtime.item です。
status string
会話アイテムのステータスです。
content string
メッセージのコンテンツです。このパラメーターは、type が message の場合に返されます。
type string
会話アイテムのタイプです。有効な値は message または function_call です。
name string
function_call の場合、呼び出される関数の名前です。
call_id string
type が function_call の場合、これは関数呼び出しの一意な ID です。
arguments string
type が function_call の場合、このパラメーターには関数呼び出しの引数が JSON 文字列として含まれます。
|
conversation.item.input_audio_transcription.completed
ユーザーのオーディオがトランスクリプションされたことを示します。トランスクリプションは、組み込みの音声認識モデル (qwen3-asr-flash-realtime) によって実行されます。このパラメーターは設定できません。
音声認識モデルによるトランスクリプションテキストは、Qwen-Omni-Realtime モデルによる解釈と異なる場合があります。トランスクリプションはリファレンス目的のみで使用してください。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_FrrZcxiDfTB9LD9p4pVng",
"type": "conversation.item.input_audio_transcription.completed",
"item_id": "item_YbAiGvK2H7YaS34o4R6Ba",
"content_index": 0,
"transcript": "Hello."
}
|
|
type string
イベントタイプです。この値は常に conversation.item.input_audio_transcription.completed です。
|
|
item_id string
ユーザーメッセージアイテムの ID です。
|
|
content_index integer
この値は常に 0 です。
|
|
transcript string
トランスクリプションテキストです。
|
conversation.item.input_audio_transcription.failed
入力オーディオトランスクリプションが有効になっており、トランスクリプションが失敗した場合、サーバーはこのイベントを返します。このイベントは error イベントとは独立しており、クライアントがトランスクリプションの失敗を特定するのに役立ちます。
|
event_id string
このイベントの一意な識別子です。
|
{
"type": "conversation.item.input_audio_transcription.failed",
"item_id": "<item_id>",
"content_index": 0,
"error": {
"code": "<code>",
"message": "<message>",
"param": "<param>"
}
}
|
|
type string
イベントタイプです。この値は常に conversation.item.input_audio_transcription.failed です。
|
|
item_id string
ユーザーメッセージアイテムの ID です。
|
|
content_index integer
この値は常に 0 です。
|
|
error object
エラー情報です。
Properties
message string
エラーメッセージです。
param string
エラーに関連するパラメーターです。
|
response.created
サーバーは、新しいモデル応答を生成したときに、このイベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_XuDavMzQN3KKepqGu3KRh",
"type": "response.created",
"response": {
"id": "resp_HaVOPdbmX6vifiV5pAfJY",
"object": "realtime.response",
"conversation_id": "conv_FjJaccpnvwHNo9cPVuzGc",
"status": "in_progress",
"modalities": [
"text",
"audio"
],
"voice": "Cherry",
"output_audio_format": "pcm",
"output": []
}
}
|
|
type string
イベントタイプです。この値は常に response.created です。
|
|
response object
応答オブジェクトです。
Properties
conversation_id string
現在のセッションの一意な ID です。
object string
オブジェクトタイプです。このイベントの場合、この値は常に realtime.response です。
status string
応答ステータスです。有効な値は completed, failed, in_progress, または incomplete です。
modalities array
応答モダリティです。
voice string
モデル生成オーディオの音声です。
output string
このイベントでは、このフィールドは空です。
|
response.done
サーバーは、応答が完全に生成された後に、このイベントを返します。response オブジェクトには、生のオーディオデータを除くすべての出力アイテムが含まれます。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_CSaxRRYLvbrfexDXAEuDG",
"type": "response.done",
"response": {
"id": "resp_HaVOPdbmX6vifiV5pAfJY",
"object": "realtime.response",
"conversation_id": "conv_FjJaccpnvwHNo9cPVuzGc",
"status": "completed",
"modalities": [
"text",
"audio"
],
"voice": "Cherry",
"output_audio_format": "pcm",
"output": [
{
"id": "item_Ls6MtCUWO7LM4E59QziNv",
"object": "realtime.item",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "audio",
"transcript": "Hello! How can I help you?"
}
]
}
],
"usage": {
"total_tokens": 377,
"input_tokens": 336,
"output_tokens": 41,
"input_tokens_details": {
"text_tokens": 228,
"audio_tokens": 108
},
"output_tokens_details": {
"text_tokens": 9,
"audio_tokens": 32
},
"plugins": {
"search": {
"count": 1,
"strategy": "agent"
}
}
}
}
}
// Tool calling scenario
{
"event_id": "event_T1EFAJp43X2DWtDRmxTtx",
"type": "response.done",
"response": {
"id": "resp_TucN5QgymL5MA8vkJvFlS",
"object": "realtime.response",
"conversation_id": "conv_SEDZESRlefT8WvLSmEn6E",
"status": "completed",
"modalities": ["text", "audio"],
"voice": "Ethan",
"output_audio_format": "pcm16",
"output": [
{
"id": "item_FEG9qJGNkPcdf4et3p7BV",
"object": "realtime.item",
"type": "function_call",
"status": "completed",
"call_id": "call_bc0a7fb7235840f69ecfe4",
"name": "get_current_weather",
"arguments": " {\"location\": \"Hangzhou\"}"
}
],
"usage": {
"total_tokens": 567,
"input_tokens": 524,
"output_tokens": 43,
"input_tokens_details": {
"text_tokens": 487,
"audio_tokens": 37
},
"output_tokens_details": {
"text_tokens": 43
}
}
}
}
|
|
type string
イベントタイプです。この値は常に response.done です。
|
|
response object
応答オブジェクトです。
Properties
conversation_id string
現在のセッションの一意な ID です。
object string
オブジェクトタイプです。このイベントの場合、この値は常に realtime.response です。
modalities array
応答モダリティです。
voice string
モデル生成オーディオの音声です。
output object
応答出力です。
Properties
type string
出力アイテムのタイプです。有効な値は message または function_call です。
object string
出力アイテムのオブジェクトタイプです。この値は常に realtime.item です。
status string
出力アイテムのステータスです。
role string
出力アイテムのロールです。
content array
出力アイテムのコンテンツです。このフィールドは、type が message の場合に返されます。
Properties
type string
コンテンツタイプです。値はプレーンテキスト出力の場合は text、オーディオ出力の場合は audio になります。
transcript string
オーディオのテキストトランスクリプションです。
name string
function_call の場合、呼び出される関数の名前です。
call_id string
type が function_call の場合、これは関数呼び出しの一意な ID です。
arguments string
type が function_call の場合、このフィールドには関数呼び出しの完全な引数が JSON 文字列として含まれます。
usage object
この応答のトークン使用量の詳細です。
Properties
total_tokens integer
この応答で使用されたトークンの総数です。
input_tokens integer
入力トークンの数です。
output_tokens integer
出力トークンの数です。
input_tokens_details object
入力トークン使用量の詳細です。text_tokens および audio_tokens を含みます。
output_tokens_details object
出力トークン使用量の詳細です。text_tokens および audio_tokens を含みます。
plugins object (optional)
プラグイン使用量メトリックです。Web 検索 (enable_search) が有効になっている場合に返されます。
Properties
search object
検索メータリングデータです。
|
response.text.delta
出力モダリティがテキストのみの場合、モデルが新しいテキストを増分的に生成すると、サーバーはこのイベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"delta": "Hello",
"event_id": "event_TH49MauuPmRo1RGaMSlP7",
"type": "response.text.delta",
"response_id": "resp_PrRSvPVpnCExdUOGHHLuP",
"item_id": "item_L8IRm9kRXFpxoOjDqDC96",
"output_index": 0,
"content_index": 0
}
|
|
type string
イベントタイプです。この値は常に response.text.delta です。
|
|
delta string
返される増分テキストです。
|
|
response_id string
応答 ID です。
|
|
item_id string
メッセージアイテム ID です。同じメッセージアイテムを参照するために使用できます。
|
|
output_index integer
応答内の出力アイテムのインデックスです。この値は常に 0 です。
|
|
content_index integer
出力アイテム内の内部部分のインデックスです。この値は常に 0 です。
|
response.text.done
出力モダリティがテキストのみの場合、モデルがテキストの生成を完了すると、サーバーはこのイベントを返します。
応答が中断、未完了、またはキャンセルされた場合にも、サーバーはこのイベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_B1lIeE2Nac33zn5V7h2mm",
"type": "response.text.done",
"response_id": "resp_B1lIdtjF4Noqpn5NOjznj",
"item_id": "item_B1lIdJsAJlJiFs8ztWpJt",
"output_index": 0,
"content_index": 0,
"text": "How can I assist you today?"
}
|
|
type string
イベントタイプです。この値は常に response.text.done です。
|
|
response_id string
応答 ID です。
|
|
item_id string
メッセージアイテム ID です。
|
|
output_index integer
応答内の出力アイテムのインデックスです。
|
|
content_index integer
応答内の出力アイテムのインデックスです。
|
|
text string
モデルが生成した完全なテキストです。
|
response.audio.delta
出力モダリティにオーディオが含まれる場合、モデルが新しいオーディオデータを増分的に生成すると、サーバーはこのイベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_B1osWMZBtrEQbiIwW0qHQ",
"type": "response.audio.delta",
"response_id": "resp_P79OOMs8LnrXVpiIHUCKR",
"item_id": "item_OFaPGtzfWCPyGzxnuEX9i",
"output_index": 0,
"content_index": 0,
"delta": "{base64 audio}"
}
|
|
type string
イベントタイプです。この値は常に response.audio.delta です。
|
|
response_id string
応答 ID です。
|
|
item_id string
メッセージアイテム ID です。
|
|
output_index integer
応答内の出力アイテムのインデックスです。
|
|
content_index integer
応答内の出力アイテムのインデックスです。
|
|
delta string
モデルが生成した増分オーディオデータです。Base64 エンコードされています。
|
response.audio.done
出力モダリティにオーディオが含まれる場合、モデルがオーディオデータの生成を完了すると、サーバーはこのイベントを返します。
応答が中断、未完了、またはキャンセルされた場合にも、サーバーはこのイベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_Le1TDl7VfyHQxl47DtGxI",
"type": "response.audio.done",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"item_id": "item_Ls6MtCUWO7LM4E59QziNv",
"output_index": 0,
"content_index": 0
}
|
|
type string
イベントタイプです。この値は常に response.audio.done です。
|
|
response_id string
応答 ID です。
|
|
item_id string
メッセージアイテム ID です。
|
|
output_index integer
応答内の出力アイテムのインデックスです。
|
|
content_index integer
応答内の出力アイテムのインデックスです。
|
response.audio_transcript.delta
出力モダリティにオーディオが含まれる場合、モデルがオーディオのテキストを増分的に生成すると、サーバーは response.audio_transcript.delta イベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_BksW7fOwnyavZdDxIzZYM",
"type": "response.audio_transcript.delta",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"item_id": "item_Ls6MtCUWO7LM4E59QziNv",
"output_index": 0,
"content_index": 0,
"delta": "What"
}
|
|
type string
イベントタイプです。この値は常に response.audio_transcript.delta です。
|
|
response_id string
応答 ID です。
|
|
item_id string
メッセージアイテム ID です。
|
|
output_index integer
応答内の出力アイテムのインデックスです。
|
|
content_index integer
応答内の出力アイテムのインデックスです。
|
|
delta string
増分テキストです。
|
response.audio_transcript.done
出力モダリティにオーディオが含まれる場合、モデルがオーディオのトランスクリプションを完了すると、サーバーは response.audio_transcript.done イベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_X49tL2WerT4WjxcmH16lS",
"type": "response.audio_transcript.done",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"item_id": "item_Ls6MtCUWO7LM4E59QziNv",
"output_index": 0,
"content_index": 0,
"transcript": "Hello! How can I help you?"
}
|
|
type string
イベントタイプです。この値は常に response.audio_transcript.done です。
|
|
response_id string
応答 ID です。
|
|
item_id string
メッセージアイテム ID です。
|
|
output_index integer
応答内の出力アイテムのインデックスです。
|
|
content_index integer
応答内の出力アイテムのインデックスです。
|
|
transcript string
完全なトランスクリプションテキストです。
|
response.function_call_arguments.delta
モデルがストリーミング方式で関数呼び出しの引数文字列を生成する場合、サーバーは新しいコンテンツセグメントごとにこのイベントをプッシュします。受信順に各イベントの delta フィールドを連結して、現在の引数テキストを取得してください。完全なコンテンツは、後続の response.function_call_arguments.done イベントで提供されます。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_SlKoJyEbPEqLq14DSM1u5",
"type": "response.function_call_arguments.delta",
"response_id": "resp_JnTOsWXlFhKcFohZbtfz6",
"item_id": "item_Rhcms7CauTNsQprV5S4Hr",
"output_index": 0,
"call_id": "call_2be200f4cafe419b9530dd",
"delta": " {\"location\": \"Beijing\"}"
}
|
|
type string
イベントタイプです。この値は常に response.function_call_arguments.delta です。
|
|
response_id string
応答 ID です。
|
|
item_id string
メッセージアイテム ID です。
|
|
output_index integer
応答内の出力アイテムのインデックスです。
|
|
call_id string
この関数呼び出しの一意な ID です。同じターン内の done イベントと一致します。
|
|
delta string
引数文字列の新しいセグメント(増分)です。これらのセグメントを順番に連結する必要があります。
|
response.function_call_arguments.done
関数呼び出しの引数が完全に生成されたことを示します。このイベントの arguments フィールドには、完全な引数文字列が含まれます。このイベントを受信した後、引数を解析してローカルのツール関数を呼び出すことができます。連結した delta 結果ではなく、このイベントの完全な arguments を使用する必要があります。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_X6suLyuL5agdH7r6koesM",
"type": "response.function_call_arguments.done",
"response_id": "resp_JnTOsWXlFhKcFohZbtfz6",
"item_id": "item_Rhcms7CauTNsQprV5S4Hr",
"output_index": 0,
"name": "get_current_weather",
"call_id": "call_2be200f4cafe419b9530dd",
"arguments": " {\"location\": \"Beijing\"}"
}
|
|
type string
イベントタイプです。この値は常に response.function_call_arguments.done です。
|
|
response_id string
応答 ID です。
|
|
item_id string
メッセージアイテム ID です。
|
|
output_index integer
応答内の出力アイテムのインデックスです。
|
|
call_id string
この関数呼び出しの一意な ID です。
|
|
name string
呼び出された関数の名前です。
|
|
arguments string
関数呼び出しの完全な引数です。通常、JSON 文字列として表されます。
|
response.output_item.added
サーバーは、応答生成中に新しいアイテムを作成したときに、このイベントを返します。アイテムタイプは message または function_call です。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_DsCO341DEVtiATtCB6BUY",
"type": "response.output_item.added",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"output_index": 0,
"item": {
"id": "item_Ls6MtCUWO7LM4E59QziNv",
"object": "realtime.item",
"type": "message",
"status": "in_progress",
"role": "assistant",
"content": []
}
}
// Tool calling scenario
{
"event_id": "event_HXmKt5pGoiRtXx7Hq7zpN",
"type": "response.output_item.added",
"response_id": "resp_TucN5QgymL5MA8vkJvFlS",
"output_index": 0,
"item": {
"id": "item_FEG9qJGNkPcdf4et3p7BV",
"object": "realtime.item",
"type": "function_call",
"status": "in_progress",
"call_id": "call_bc0a7fb7235840f69ecfe4",
"name": "get_current_weather",
"arguments": ""
}
}
|
|
type string
イベントタイプです。この値は常に response.output_item.added です。
|
|
response_id string
応答 ID です。
|
|
output_index integer
応答内の出力アイテムのインデックスです。
|
|
item object
出力アイテムの情報です。
Properties
id string
出力アイテムの一意な ID です。
object string
この値は常に realtime.item です。
status string
出力アイテムのステータスです。
content string
メッセージのコンテンツです。このフィールドは、type が message の場合に返されます。
type string
出力アイテムのタイプです。有効な値は message または function_call です。
name string
type が function_call の場合、呼び出す関数の名前です。
call_id string
function_call の場合、現在の関数呼び出しの一意な ID です。
arguments string
type が function_call の場合、関数呼び出しの引数が JSON 文字列として含まれます。added イベントでは、このフィールドは最初は空の文字列です。
|
response.output_item.done
サーバーは、新しい出力アイテムの生成が完了したときに、このイベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_MEu5nlLw1LsOguHiehIP8",
"type": "response.output_item.done",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"output_index": 0,
"item": {
"id": "item_Ls6MtCUWO7LM4E59QziNv",
"object": "realtime.item",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "audio",
"text": "Hello! How can I help you?"
}
]
}
}
// Tool calling scenario
{
"event_id": "event_FHspdfAnCyjuME3mmAwSY",
"type": "response.output_item.done",
"response_id": "resp_TucN5QgymL5MA8vkJvFlS",
"output_index": 0,
"item": {
"id": "item_FEG9qJGNkPcdf4et3p7BV",
"object": "realtime.item",
"type": "function_call",
"status": "completed",
"call_id": "call_bc0a7fb7235840f69ecfe4",
"name": "get_current_weather",
"arguments": " {\"location\": \"Hangzhou\"}"
}
}
|
|
type string
イベントタイプです。この値は常に response.output_item.done です。
|
|
response_id string
応答 ID です。
|
|
output_index integer
応答内の出力アイテムのインデックスです。
|
|
item object
出力アイテム情報です。
Properties
id string
出力アイテムの一意な ID です。
object string
この値は常に realtime.item です。
status string
出力アイテムのステータスです。
content string
メッセージのコンテンツです。このフィールドは、type が message の場合に返されます。
type string
出力アイテムのタイプです。有効な値は message または function_call です。
name string
function_call の場合、呼び出される関数の名前です。
call_id string
type が function_call の場合、これは関数呼び出しの一意な ID です。
arguments string
type が function_call の場合、このフィールドは関数呼び出しの完全な引数を含む JSON 文字列です。
|
response.content_part.added
サーバーは、応答生成中にアシスタントメッセージアイテムに新しいコンテンツパートを追加したときに、このイベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_AVBOmrgY3C8bjlRajfSUT",
"type": "response.content_part.added",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"item_id": "item_Ls6MtCUWO7LM4E59QziNv",
"output_index": 0,
"content_index": 0,
"part": {
"type": "audio",
"text": ""
}
}
|
|
type string
イベントタイプです。この値は常に response.content_part.added です。
|
|
response_id string
応答 ID です。
|
|
item_id string
メッセージアイテム ID です。
|
|
output_index integer
応答内の出力アイテムのインデックスです。この値は常に 0 です。
|
|
content_index integer
出力アイテム内の内部パートのインデックスです。この値は常に 0 です。
|
|
part object
出力アイテム情報です。
Properties
type string
コンテンツパートのタイプです。
text string
コンテンツパートのテキストです。
|
response.content_part.done
サーバーは、アシスタントメッセージアイテム内のコンテンツパートのストリーミングが完了したときに、このイベントを返します。
|
event_id string
このイベントの一意な識別子です。
|
{
"event_id": "event_Il8HD19v58Qr5IBkw7LtN",
"type": "response.content_part.done",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"item_id": "item_Ls6MtCUWO7LM4E59QziNv",
"output_index": 0,
"content_index": 0,
"part": {
"type": "audio",
"text": "Hello! How can I help you?"
}
}
|
|
type string
イベントタイプです。この値は常に response.content_part.done です。
|
|
response_id string
応答 ID です。
|
|
item_id string
メッセージアイテム ID です。
|
|
output_index integer
応答内の出力アイテムのインデックスです。この値は常に 0 です。
|
|
content_index integer
コンテンツ配列内のコンテンツパートのインデックスです。この値は常に 0 です。
|
|
part object
出力アイテム情報です。
Properties
type string
コンテンツパートのタイプです。
text string
コンテンツパートのテキストです。
|