Azure OpenAI responses

API 版本: v1

Server:{endpoint}/openai/v1 — Azure AI Foundry Models API

伺服器變數:

Variable 預設值 Description
端點 支援的 Azure AI Foundry 模型 API 端點,包含協定與主機名稱。
例如:
https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/)。

Authentication

ApiKeyAuth (API Key)

在標頭中傳遞你的 API 金鑰 api-key 。

ApiKeyAuth_(API 金鑰)

在標頭中傳遞你的 API 金鑰 authorization 。

OAuth2Auth (OAuth 2.0)

流程: 隱式

授權 URL:https://login.microsoftonline.com/common/oauth2/v2.0/authorize

內窺鏡:

  • https://cognitiveservices.azure.com/.default

安全要求

端點接受 以下任一種 認證方法:

  1. ApiKeyAuth
  2. ApiKeyAuth_
  3. OAuth2Auth (範圍: https://cognitiveservices.azure.com/.default)

建立回應

POST {endpoint}/openai/v1/responses

建立模型回應。

URI 參數

Name In Required 類型 Description
端點 伺服器 Yes 字串 支援的 Azure AI Foundry 模型 API 端點,包含協定與主機名稱。
例如:
https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/)。
API版本 查詢 No 字串
可能的值: v1、 preview
要用於此請求的 Azure AI Foundry 模型 API 的明確版本。
v1 如果未指定,則為預設值。

請求主體

Content-Type:application/json

Name 類型 Description Required 預設值
背景 布林值或零值 No
context_management OpenAI.ContextManagementParam 或 null 的陣列 此請求的上下文管理設定。 No
交談 OpenAI.ConversationParam 或 null No
包括 OpenAI 的陣列 。IncludeEnum 或 null No
輸入 OpenAI.InputParam 用來讓模型產生回應的文字、影像或檔案輸入。
瞭解詳情:
- 文字輸入和輸出
- 影像輸入
- 檔案輸入
- 對話狀態
- 函式呼叫
No
instructions 字串或空 No
max_output_tokens 整數或零 No
最大工具呼叫次數 整數或零 No
中繼資料 OpenAI.Metadata 或 null No
型號 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
平行工具呼叫 布林值或零值 No
previous_response_id 字串或空 No
提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
prompt_cache_retention 字串或空 No
reasoning OpenAI.推理 或空 No
safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
儲存 布林值或零值 No
串流 布林值或零值 No
stream_options OpenAI.ResponseStreamOptions 或 null No
溫度 數或空 No
收發簡訊 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
tool_choice OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。

您可以提供模型的兩種工具類別如下:

- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,例如檔案搜尋。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫您自己的程式碼。
No
top_logprobs 整數或零 No
top_p 數或空 No
truncation 字串或空 No
使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No

Responses

狀態代碼: 200

描述:要求已成功。

內容類型 Type 說明
application/json 物件
text/event-stream 物件
Name 類型 Description Required 預設值
背景 布林值或零值 No
completed_at 字串或空 No
content_filters array of AzureContentFilterForResponsesAPI 內容過濾器是RAI產生的。 No
交談 OpenAI.ConversationReference 或 null No
建立於 整數(Unixtime) 建立此回應時的 Unix 時間戳(以秒為單位)。 Yes
錯誤 OpenAI.ResponseError 或 null Yes
id 字串 此回應的唯一標識碼。 Yes
incomplete_details OpenAI.ResponseIncompleteDetails 或 null Yes
instructions OpenAI.InputItem 的字串或陣列,或 null Yes
max_output_tokens 整數或零 No
最大工具呼叫次數 整數或零 No
中繼資料 OpenAI.Metadata 或 null No
型號 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
物件 列舉 此資源的物件類型 - 一律設定為 response。
可能的數值: response
Yes
輸出 OpenAI.OutputItem 的陣列 模型所產生的內容項目陣列。
- 陣列中 output 項目的長度和順序相依
針對模型的回應。
- 而不是存取 output 陣列中的第一個項目,而且
假設這是一則由 assistant 所生成的內容訊息。
模型,您可能會考慮使用 output_text 屬性,其中
在 SDK 中支持。
Yes
output_text 字串或空 No
平行工具呼叫 boolean 是否允許模型平行執行工具呼叫。 Yes 沒錯
previous_response_id 字串或空 No
提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
prompt_cache_retention 字串或空 No
reasoning OpenAI.推理 或空 No
safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
狀態 列舉 回應產生的狀態。 下列其中一項:completed、failed、
in_progress、、 cancelled、 queued或 incomplete。
可能的值:completed、、、failedin_progresscancelled、queued、incomplete
No
溫度 數或空 No
收發簡訊 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
tool_choice OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。
我們支援以下類別的工具:
- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,比如網頁搜尋
或檔案搜尋。 了解更多
內建工具。
- MCP 工具:透過自訂 MCP 伺服器與第三方系統整合
或是預先定義的連接器,如 Google Drive 和 SharePoint。 了解更多
MCP 工具。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫你自己的程式碼,並帶有強型別參數
以及輸出。 了解更多
函式呼叫。 你也可以使用
自訂工具來呼叫自己的程式碼。
No
top_logprobs 整數或零 No
top_p 數或空 No
truncation 字串或空 No
使用方式 OpenAI.ResponseUsage 表示令牌使用詳細數據,包括輸入令牌、輸出令牌、
輸出令牌的細目,以及所使用的令牌總數。
No
使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No

回應標頭:

標頭 類型 Description
apim-request-id 字串 一個用於故障排除的請求 ID。

狀態代碼: 預設

描述:非預期的錯誤回應。

內容類型 Type 說明
application/json 物件
Name 類型 Description Required 預設值
字碼 字串或空 Yes
inner_error No
訊息 字串 Yes
param 字串或空 No
型別 字串 No

回應標頭:

標頭 類型 Description
apim-request-id 字串 一個用於故障排除的請求 ID。

Examples

Example

建立模型回應

POST {endpoint}/openai/v1/responses?api-version=v1

取得回應

GET {endpoint}/openai/v1/responses/{response_id}

擷取具有指定標識碼的模型回應。

URI 參數

Name In Required 類型 Description
端點 伺服器 Yes 字串 支援的 Azure AI Foundry 模型 API 端點,包含協定與主機名稱。
例如:
https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/)。
API版本 查詢 No 字串
可能的值: v1、 preview
要用於此請求的 Azure AI Foundry 模型 API 的明確版本。
v1 如果未指定,則為預設值。
response_id 路徑 Yes 字串
include[] 查詢 No 陣列 要包含在回應中的其他欄位。 更多資訊請參閱上方回應建立的 include 參數。
串流 查詢 No boolean 如果設定為 true,則模型回應資料將會串流至用戶端,因為它是使用伺服器傳送的事件產生的。
序號: 爆炸:錯誤
starting_after 查詢 No 整數(int32) 事件的序號,之後開始串流。
序號: 爆炸:錯誤
include_obfuscation 查詢 No boolean 當為真時,串流混淆會被啟用。 串流混淆會在串流的 delta 事件中加入隨機字元 obfuscation ,以標準化有效載荷大小,以緩解某些側通道攻擊。 這些混淆欄位預設包含,但會對資料流增加少量額外負擔。 如果你信任應用程式與 OpenAI API 之間的網路連結,可以設定 include_obfuscation 為 false 來優化頻寬。
序號: 爆炸:錯誤

Responses

狀態代碼: 200

描述:要求已成功。

內容類型 Type 說明
application/json 物件
Name 類型 Description Required 預設值
背景 布林值或零值 No
completed_at 字串或空 No
content_filters array of AzureContentFilterForResponsesAPI 內容過濾器是RAI產生的。 No
交談 OpenAI.ConversationReference 或 null No
建立於 整數(Unixtime) 建立此回應時的 Unix 時間戳(以秒為單位)。 Yes
錯誤 OpenAI.ResponseError 或 null Yes
id 字串 此回應的唯一標識碼。 Yes
incomplete_details OpenAI.ResponseIncompleteDetails 或 null Yes
instructions OpenAI.InputItem 的字串或陣列,或 null Yes
max_output_tokens 整數或零 No
最大工具呼叫次數 整數或零 No
中繼資料 OpenAI.Metadata 或 null No
型號 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
物件 列舉 此資源的物件類型 - 一律設定為 response。
可能的數值: response
Yes
輸出 OpenAI.OutputItem 的陣列 模型所產生的內容項目陣列。
- 陣列中 output 項目的長度和順序相依
針對模型的回應。
- 而不是存取 output 陣列中的第一個項目,而且
假設這是一則由 assistant 所生成的內容訊息。
模型,您可能會考慮使用 output_text 屬性,其中
在 SDK 中支持。
Yes
output_text 字串或空 No
平行工具呼叫 boolean 是否允許模型平行執行工具呼叫。 Yes 沒錯
previous_response_id 字串或空 No
提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
prompt_cache_retention 字串或空 No
reasoning OpenAI.推理 或空 No
safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
狀態 列舉 回應產生的狀態。 下列其中一項:completed、failed、
in_progress、、 cancelled、 queued或 incomplete。
可能的值:completed、、、failedin_progresscancelled、queued、incomplete
No
溫度 數或空 No
收發簡訊 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
tool_choice OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。
我們支援以下類別的工具:
- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,比如網頁搜尋
或檔案搜尋。 了解更多
內建工具。
- MCP 工具:透過自訂 MCP 伺服器與第三方系統整合
或是預先定義的連接器,如 Google Drive 和 SharePoint。 了解更多
MCP 工具。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫你自己的程式碼,並帶有強型別參數
以及輸出。 了解更多
函式呼叫。 你也可以使用
自訂工具來呼叫自己的程式碼。
No
top_logprobs 整數或零 No
top_p 數或空 No
truncation 字串或空 No
使用方式 OpenAI.ResponseUsage 表示令牌使用詳細數據,包括輸入令牌、輸出令牌、
輸出令牌的細目,以及所使用的令牌總數。
No
使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No

回應標頭:

標頭 類型 Description
apim-request-id 字串 一個用於故障排除的請求 ID。

狀態代碼: 預設

描述:非預期的錯誤回應。

內容類型 Type 說明
application/json 物件
Name 類型 Description Required 預設值
字碼 字串或空 Yes
inner_error No
訊息 字串 Yes
param 字串或空 No
型別 字串 No

回應標頭:

標頭 類型 Description
apim-request-id 字串 一個用於故障排除的請求 ID。

刪除回應

DELETE {endpoint}/openai/v1/responses/{response_id}

依識別碼刪除回應。

URI 參數

Name In Required 類型 Description
端點 伺服器 Yes 字串 支援的 Azure AI Foundry 模型 API 端點,包含協定與主機名稱。
例如:
https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/)。
API版本 查詢 No 字串
可能的值: v1、 preview
要用於此請求的 Azure AI Foundry 模型 API 的明確版本。
v1 如果未指定,則為預設值。
response_id 路徑 Yes 字串

Responses

狀態代碼: 200

描述:要求已成功。

內容類型 Type 說明
application/json 物件
Name 類型 Description Required 預設值
已刪除 列舉
可能的數值: True
Yes
id 字串 Yes
物件 列舉
可能的數值: response.deleted
Yes

回應標頭:

標頭 類型 Description
apim-request-id 字串 一個用於故障排除的請求 ID。

狀態代碼: 預設

描述:非預期的錯誤回應。

內容類型 Type 說明
application/json 物件
Name 類型 Description Required 預設值
字碼 字串或空 Yes
inner_error No
訊息 字串 Yes
param 字串或空 No
型別 字串 No

回應標頭:

標頭 類型 Description
apim-request-id 字串 一個用於故障排除的請求 ID。

取消回應

POST {endpoint}/openai/v1/responses/{response_id}/cancel

取消以指定 ID 的模型回應。 只有將背景參數設為 true 的回應才能被取消。

URI 參數

Name In Required 類型 Description
端點 伺服器 Yes 字串 支援的 Azure AI Foundry 模型 API 端點,包含協定與主機名稱。
例如:
https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/)。
API版本 查詢 No 字串
可能的值: v1、 preview
要用於此請求的 Azure AI Foundry 模型 API 的明確版本。
v1 如果未指定,則為預設值。
response_id 路徑 Yes 字串

Responses

狀態代碼: 200

描述:要求已成功。

內容類型 Type 說明
application/json 物件
Name 類型 Description Required 預設值
背景 布林值或零值 No
completed_at 字串或空 No
content_filters array of AzureContentFilterForResponsesAPI 內容過濾器是RAI產生的。 No
交談 OpenAI.ConversationReference 或 null No
建立於 整數(Unixtime) 建立此回應時的 Unix 時間戳(以秒為單位)。 Yes
錯誤 OpenAI.ResponseError 或 null Yes
id 字串 此回應的唯一標識碼。 Yes
incomplete_details OpenAI.ResponseIncompleteDetails 或 null Yes
instructions OpenAI.InputItem 的字串或陣列,或 null Yes
max_output_tokens 整數或零 No
最大工具呼叫次數 整數或零 No
中繼資料 OpenAI.Metadata 或 null No
型號 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
物件 列舉 此資源的物件類型 - 一律設定為 response。
可能的數值: response
Yes
輸出 OpenAI.OutputItem 的陣列 模型所產生的內容項目陣列。
- 陣列中 output 項目的長度和順序相依
針對模型的回應。
- 而不是存取 output 陣列中的第一個項目,而且
假設這是一則由 assistant 所生成的內容訊息。
模型,您可能會考慮使用 output_text 屬性,其中
在 SDK 中支持。
Yes
output_text 字串或空 No
平行工具呼叫 boolean 是否允許模型平行執行工具呼叫。 Yes 沒錯
previous_response_id 字串或空 No
提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
prompt_cache_retention 字串或空 No
reasoning OpenAI.推理 或空 No
safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
狀態 列舉 回應產生的狀態。 下列其中一項:completed、failed、
in_progress、、 cancelled、 queued或 incomplete。
可能的值:completed、、、failedin_progresscancelled、queued、incomplete
No
溫度 數或空 No
收發簡訊 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
tool_choice OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。
我們支援以下類別的工具:
- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,比如網頁搜尋
或檔案搜尋。 了解更多
內建工具。
- MCP 工具:透過自訂 MCP 伺服器與第三方系統整合
或是預先定義的連接器,如 Google Drive 和 SharePoint。 了解更多
MCP 工具。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫你自己的程式碼,並帶有強型別參數
以及輸出。 了解更多
函式呼叫。 你也可以使用
自訂工具來呼叫自己的程式碼。
No
top_logprobs 整數或零 No
top_p 數或空 No
truncation 字串或空 No
使用方式 OpenAI.ResponseUsage 表示令牌使用詳細數據,包括輸入令牌、輸出令牌、
輸出令牌的細目,以及所使用的令牌總數。
No
使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No

回應標頭:

標頭 類型 Description
apim-request-id 字串 一個用於故障排除的請求 ID。

狀態代碼: 預設

描述:非預期的錯誤回應。

內容類型 Type 說明
application/json 物件
Name 類型 Description Required 預設值
字碼 字串或空 Yes
inner_error No
訊息 字串 Yes
param 字串或空 No
型別 字串 No

回應標頭:

標頭 類型 Description
apim-request-id 字串 一個用於故障排除的請求 ID。

列出輸入項目

GET {endpoint}/openai/v1/responses/{response_id}/input_items

傳回指定回應的輸入項目清單。

URI 參數

Name In Required 類型 Description
端點 伺服器 Yes 字串 支援的 Azure AI Foundry 模型 API 端點,包含協定與主機名稱。
例如:
https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/)。
API版本 查詢 No 字串
可能的值: v1、 preview
要用於此請求的 Azure AI Foundry 模型 API 的明確版本。
v1 如果未指定,則為預設值。
response_id 路徑 Yes 字串
limit 查詢 No 整數(int32) 限制可歸還的物品數量。 限制的範圍可以介於 1 到 100 之間,以及
預設值為 20。
序號: 爆炸:錯誤
順序 查詢 No 字串
可能的值: asc、 desc
依 created_at 物件的時間戳排序順序。 asc 表示遞增順序,desc則表示遞減順序
表示遞減順序。
序號: 爆炸:錯誤
後 查詢 No 字串 一個用於分頁的游標。 after 是一個定義你在清單中位置的物件 ID。
例如,如果您提出清單要求並收到 100 個物件 (以 obj_foo 結尾),您的
隨後的呼叫可以包含像是 after=obj_foo 的參數,以便擷取清單的下一頁。
序號: 爆炸:錯誤
before 查詢 No 字串 一個用於分頁的游標。 before 是一個定義你在清單中位置的物件 ID。
例如,如果您提出清單要求並收到 100 個物件 (以 obj_foo 結尾),您的
後續呼叫可以包含 before=obj_foo,以便擷取清單的上一頁。
序號: 爆炸:錯誤

Responses

狀態代碼: 200

描述:要求已成功。

內容類型 Type 說明
application/json OpenAI.ResponseItemList

回應標頭:

標頭 類型 Description
apim-request-id 字串 一個用於故障排除的請求 ID。

狀態代碼: 預設

描述:非預期的錯誤回應。

內容類型 Type 說明
application/json 物件
Name 類型 Description Required 預設值
字碼 字串或空 Yes
inner_error No
訊息 字串 Yes
param 字串或空 No
型別 字串 No

回應標頭:

標頭 類型 Description
apim-request-id 字串 一個用於故障排除的請求 ID。

Components

Azure AI 工廠模型 API 版本

Property 價值
Type 字串
價值 v1
preview

AzureContentFilterBlocklistResult

已設定自定義封鎖清單之 true/false 篩選結果的集合。

Name 類型 Description Required 預設值
details 物件陣列 個別封鎖清單標識碼的配對,以及它們是否導致篩選動作。 No
過濾 boolean 值,指出是否有任何詳細的封鎖清單導致篩選動作。 Yes

AzureContentFilterCompletionTextSpan

Azure OpenAI 內容篩選結果所使用的完成文字範圍表示法。

Name 類型 Description Required 預設值
completion_end_offset 整數(int32) 偏移第一個 UTF32 碼點,該碼點被排除在 span 之外。 對於空跨,這個欄位總是等於completion_start_offset。 此欄位一律大於非空白範圍的 completion_start_offset。 Yes
completion_start_offset 整數(int32) 起始區間的 UTF32 碼點的偏移量。 Yes

AzureContentFilterCompletionTextSpanDetectionResult

Name 類型 Description Required 預設值
details array of AzureContentFilterCompletionTextSpan 偵測到完成文字範圍的詳細資訊。 Yes
detected boolean 是否在內容中偵測到已標記的內容類別。 Yes
過濾 boolean 內容偵測是否導致內容篩選動作。 Yes

AzureContentFilterCustomTopicResult

已設定自定義主題的 true/false 篩選結果集合。

Name 類型 Description Required 預設值
details 物件陣列 個別主題標識碼的組合以及它們是否被偵測到。 No
過濾 boolean 值,指出是否有任何詳細主題導致篩選動作。 Yes

AzureContentFilterDetectionResult

標示為內容篩選結果的項目,指出是否已偵測到內容,以及內容是否已被篩選。

Name 類型 Description Required 預設值
detected boolean 是否在內容中偵測到已標記的內容類別。 Yes
過濾 boolean 內容偵測是否導致內容篩選動作。 Yes

AzureContentFilterForResponsesAPI

Name 類型 Description Required 預設值
被封鎖 boolean 請指出回應是否被阻擋。 Yes
content_filter_offsets AzureContentFilterResultOffsets Yes
content_filter_results AzureContentFilterResultsForResponsesAPI Yes
└─ 自訂封鎖清單 AzureContentFilterBlocklistResult 一組用於設定自訂封鎖清單的二元篩選結果。 No
自訂主題 AzureContentFilterCustomTopicResult 一組用於設定自訂主題的二元篩選結果。 No
-------- 錯誤 物件 如果有的話,有關導致內容篩選無法完成其評估的錯誤詳細數據。 No
└─ 程式碼 整數(int32) 與錯誤相關聯的不同電腦可讀取程式碼。 Yes
|---- 訊息 字串 與錯誤相關的人類可讀訊息。 Yes
~---- 仇恨 AzureContentFilterSeverityResult 內容過濾器類別,可指任何攻擊或使用貶義或歧視性內容的內容
基於特定族群的區別屬性,指涉個人或身份群體的語言
包括但不限於種族、族裔、國籍、性別認同與表達、性取向,
宗教、移民身份、能力狀況、個人外貌和體型。
No
└─ 間接攻擊 AzureContentFilterDetectionResult 一個偵測結果,描述了對由生成式 AI 模型驅動系統的攻擊,這些攻擊每次都可能發生
應用程式處理的資訊並非由應用程式開發者直接撰寫,或
使用者。
No
└─ 越獄 AzureContentFilterDetectionResult 一個偵測結果,描述了使用者提示注入攻擊,惡意使用者故意利用這些攻擊
系統漏洞會引發 LLM 未經授權的行為。 這可能導致不當內容
產生或違反系統施加的限制。
Yes
└─ personally_identifiable_information AzureContentFilterPersonallyIdentifiableInformationResult 一個偵測結果,描述與個人識別資訊(Personal Identifiable Information)及可設定子類別的匹配。 No
‧---- 粗話 AzureContentFilterDetectionResult 一個偵測結果,用以識別是否存在粗俗、粗俗或其他反對語言於
滿足。
No
└─ protected_material_code 物件 一個偵測結果,描述與授權的代碼或其他受保護來源材料的匹配。 No
|---- 引文 物件 如果有的話,引文詳細資料會描述相關聯的授權及其位置。 No
└─ 網址 字串(URI) 與授權相關聯的 URL。 No
\---- 授權 字串 與偵測相關聯的授權名稱或標識碼。 No
└─ 偵測到 boolean 是否在內容中偵測到已標記的內容類別。 Yes
\---- 已篩選 boolean 內容偵測是否導致內容篩選動作。 Yes
└─ protected_material_text AzureContentFilterDetectionResult 一種偵測結果,描述與受版權或其他狀態保護的文字匹配。 No
└─ 自我傷害 AzureContentFilterSeverityResult 一個內容過濾器類別,描述與意圖故意傷害、傷害的身體行為相關的語言,
傷害身體或自殺。
No
└─ 性愛 AzureContentFilterSeverityResult 一個針對解剖器官與生殖器、浪漫關係、行為相關語言的內容過濾器分類
以情色或充滿感情的語氣描繪懷孕、身體性行為,包括被描繪為
攻擊或強迫性暴力行為、賣淫、色情及虐待。
No
└─ task_adherence AzureContentFilterDetectionResult 一個偵測結果,指示執行流程是否仍能維持計畫。 Yes
└─ ungrounded_material AzureContentFilterCompletionTextSpanDetectionResult No
‧---- 暴力 AzureContentFilterSeverityResult 一個內容過濾器分類,專門針對意圖傷害、傷害、損害或致死的身體行為相關語言
某個人或某物;描述武器、槍械及相關實體,如製造商、協會,
立法等等。
No
來源類型 字串 訊息來源類型的名稱。 Yes
tool_call_id 字串 與此內容過濾器相關的工具呼叫 ID 會被結果(如適用)。 No

AzureContentFilterPersonallyIdentifiableInformationResult

個人識別資訊的內容過濾器偵測結果,包含傷害擴展。

Name 類型 Description Required 預設值
detected boolean 是否在內容中偵測到已標記的內容類別。 Yes
過濾 boolean 內容偵測是否導致內容篩選動作。 Yes
redacted_text 字串 含個人識別資訊的塗黑文字已被移除或遮蔽。 No
sub_categories array of AzurePiiSubCategoryResult 個別 PIIHarmSubCategory 的詳細結果。 No

AzureContentFilterResultOffsets

Name 類型 Description Required 預設值
check_offset 整數(int32) Yes
end_offset 整數(int32) Yes
start_offset 整數(int32) Yes

AzureContentFilterResultsForResponsesAPI

Name 類型 Description Required 預設值
custom_blocklists AzureContentFilterBlocklistResult 已設定自定義封鎖清單之 true/false 篩選結果的集合。 No
|---- 詳細數據 物件陣列 個別封鎖清單標識碼的配對,以及它們是否導致篩選動作。 No
\---- 已篩選 boolean 一個表示封鎖清單是否產生過濾動作的值。 Yes
‧----識別碼 字串 自訂封鎖清單的 ID 會被評估。 Yes
\---- 已篩選 boolean 值,指出是否有任何詳細的封鎖清單導致篩選動作。 Yes
自定主題 AzureContentFilterCustomTopicResult 已設定自定義主題的 true/false 篩選結果集合。 No
|---- 詳細數據 物件陣列 個別主題標識碼的組合以及它們是否被偵測到。 No
└─ 偵測到 boolean 一個表示主題是否被偵測到的值。 Yes
‧----識別碼 字串 評估了自訂主題的識別碼。 Yes
\---- 已篩選 boolean 值,指出是否有任何詳細主題導致篩選動作。 Yes
錯誤 物件 如果有的話,有關導致內容篩選無法完成其評估的錯誤詳細數據。 No
└─ 程式碼 整數(int32) 與錯誤相關聯的不同電腦可讀取程式碼。 Yes
|---- 訊息 字串 與錯誤相關的人類可讀訊息。 Yes
仇恨 AzureContentFilterSeverityResult 標示內容篩選結果項目,指示內容是否已篩選,以及篩選結果的質性特徵為何。
根據類別的內容篩選設定評估內容的嚴重性層級。
No
\---- 已篩選 boolean 內容嚴重性是否導致內容篩選動作。 Yes
----- 嚴重性 列舉 標示的內容嚴重性。
可能的值:safe、、low、 mediumhigh
Yes
indirect_attack AzureContentFilterDetectionResult 標示的內容篩選結果項目,指出是否偵測到內容,以及內容是否被篩除。
已過濾。
No
└─ 偵測到 boolean 是否在內容中偵測到已標記的內容類別。 Yes
\---- 已篩選 boolean 內容偵測是否導致內容篩選動作。 Yes
越獄 AzureContentFilterDetectionResult 標示的內容篩選結果項目,指出是否偵測到內容,以及內容是否被篩除。
已過濾。
Yes
└─ 偵測到 boolean 是否在內容中偵測到已標記的內容類別。 Yes
\---- 已篩選 boolean 內容偵測是否導致內容篩選動作。 Yes
personally_identifiable_information AzureContentFilterPersonallyIdentifiableInformationResult 個人識別資訊的內容過濾器偵測結果,包含傷害擴展。 No
└─ redacted_text 字串 含個人識別資訊的塗黑文字已被移除或遮蔽。 No
└─ 子類別 array of AzurePiiSubCategoryResult 個別 PIIHarmSubCategory 的詳細結果。 No
髒話 AzureContentFilterDetectionResult 標示的內容篩選結果項目,指出是否偵測到內容,以及內容是否被篩除。
已過濾。
No
└─ 偵測到 boolean 是否在內容中偵測到已標記的內容類別。 Yes
\---- 已篩選 boolean 內容偵測是否導致內容篩選動作。 Yes
protected_material_code 物件 一個偵測結果,描述與授權的代碼或其他受保護來源材料的匹配。 No
|---- 引文 物件 如果有的話,引文詳細資料會描述相關聯的授權及其位置。 No
└─ 網址 字串(URI) 與授權相關聯的 URL。 No
\---- 授權 字串 與偵測相關聯的授權名稱或標識碼。 No
└─ 偵測到 boolean 是否在內容中偵測到已標記的內容類別。 Yes
\---- 已篩選 boolean 內容偵測是否導致內容篩選動作。 Yes
protected_material_text AzureContentFilterDetectionResult 標示的內容篩選結果項目,指出是否偵測到內容,以及內容是否被篩除。
已過濾。
No
└─ 偵測到 boolean 是否在內容中偵測到已標記的內容類別。 Yes
\---- 已篩選 boolean 內容偵測是否導致內容篩選動作。 Yes
self_harm AzureContentFilterSeverityResult 標示內容篩選結果項目,指示內容是否已篩選,以及篩選結果的質性特徵為何。
根據類別的內容篩選設定評估內容的嚴重性層級。
No
\---- 已篩選 boolean 內容嚴重性是否導致內容篩選動作。 Yes
----- 嚴重性 列舉 標示的內容嚴重性。
可能的值:safe、、low、 mediumhigh
Yes
性方面 AzureContentFilterSeverityResult 標示內容篩選結果項目,指示內容是否已篩選,以及篩選結果的質性特徵為何。
根據類別的內容篩選設定評估內容的嚴重性層級。
No
\---- 已篩選 boolean 內容嚴重性是否導致內容篩選動作。 Yes
----- 嚴重性 列舉 標示的內容嚴重性。
可能的值:safe、、low、 mediumhigh
Yes
task_adherence AzureContentFilterDetectionResult 標示的內容篩選結果項目,指出是否偵測到內容,以及內容是否被篩除。
已過濾。
Yes
└─ 偵測到 boolean 是否在內容中偵測到已標記的內容類別。 Yes
\---- 已篩選 boolean 內容偵測是否導致內容篩選動作。 Yes
ungrounded_material AzureContentFilterCompletionTextSpanDetectionResult No
暴力 AzureContentFilterSeverityResult 標示內容篩選結果項目,指示內容是否已篩選,以及篩選結果的質性特徵為何。
根據類別的內容篩選設定評估內容的嚴重性層級。
No
\---- 已篩選 boolean 內容嚴重性是否導致內容篩選動作。 Yes
----- 嚴重性 列舉 標示的內容嚴重性。
可能的值:safe、、low、 mediumhigh
Yes

AzureContentFilterSeverityResult

標示的內容篩選結果項目,指出內容是否已篩選,以及內容的定性嚴重性層級,如針對類別的內容篩選組態進行評估。

Name 類型 Description Required 預設值
過濾 boolean 內容嚴重性是否導致內容篩選動作。 Yes
嚴重程度 列舉 標示的內容嚴重性。
可能的值:safe、、low、 mediumhigh
Yes

AzurePiiSubCategoryResult

個別 PIIHarmSubCategory 的結果詳情。

Name 類型 Description Required 預設值
detected boolean 標註內容子類別是否在內容中被偵測到。 Yes
過濾 boolean 內容偵測是否導致此子類別的內容過濾行動。 Yes
已編輯 boolean 該子類別的內容是否被刪減。 Yes
sub_category 字串 被評估的PIIHarm子類別。 Yes

AzureToolApprovalRequest

Azure tool approval request

回應輸出中出現 Azure 工具批准請求。

Name 類型 Description Required 預設值
arguments 字串 工具的自變數 JSON 字串。 Yes
call_id 字串 需要核准的工具呼叫 ID。 Yes
id 字串 核准申請的唯一 ID。 Yes
標籤 字串 工具標籤(例如「remote_functions」)。 Yes
名字 字串 工具函式的名稱(例如,『output_binding』)。 Yes
型別 列舉 物品的種類。 一律為 tool_approval_request。
可能的數值: tool_approval_request
Yes

AzureToolApprovalResponse

Azure tool approval response

請求輸入中的 Azure 工具批准回應。

Name 類型 Description Required 預設值
approval_request_id 字串 正在回應之核准要求的識別碼。 Yes
approve boolean 是否已核准要求。 Yes
型別 列舉 物品的種類。 一律為 tool_approval_response。
可能的數值: tool_approval_response
Yes

OpenAI.Annotation

一個適用於輸出文字範圍的註解。

OpenAI.Annotation 的鑑別子

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
file_citation OpenAI.FileCitationBody
url_citation OpenAI.UrlCitationBody
container_file_citation OpenAI.ContainerFileCitationBody
file_path OpenAI.FilePath
Name 類型 Description Required 預設值
型別 OpenAI.AnnotationType Yes

OpenAI.AnnotationType

Property 價值
Type 字串
價值 file_citation
url_citation
container_file_citation
file_path

OpenAI.ApplyPatchCallOutputStatus

Property 價值
Type 字串
價值 completed
failed

OpenAI.ApplyPatchCallOutputStatusParam

套用補丁呼叫輸出狀態

apply_patch工具呼叫輸出的結果值報告。

Property 價值
Type 字串
價值 completed
failed

OpenAI.ApplyPatchCallStatus(開放AI)。ApplyPatchCallStatus(查詢狀態)

Property 價值
Type 字串
價值 in_progress
completed

OpenAI.ApplyPatchCallStatusParam

套用補丁呼叫狀態

apply_patch工具呼叫的狀態值報告。

Property 價值
Type 字串
價值 in_progress
completed

OpenAI.ApplyPatchCreateFileOperation

套用補丁 建立檔案操作

說明如何透過 apply_patch 工具建立檔案的說明。

Name 類型 Description Required 預設值
差異 字串 申請差異很大。 Yes
路徑 字串 檔案建立的路徑。 Yes
型別 列舉 用提供的差異建立一個新檔案。
可能的數值: create_file
Yes create_file

OpenAI.ApplyPatchCreateFileOperationParam

套用補丁 建立檔案操作

透過 apply_patch 工具建立新檔案的說明。

Name 類型 Description Required 預設值
差異 字串 建立檔案時要套用統一差異內容。
限制條件: maxLength: 10485760
Yes
路徑 字串 相對於工作區根目錄建立的檔案路徑。
限制條件: 最小長度:1
Yes
型別 列舉 作業類型。 一律為 create_file。
可能的數值: create_file
Yes create_file

OpenAI.ApplyPatchDeleteFileOperation

套用補丁刪除檔案操作

說明如何透過apply_patch工具刪除檔案。

Name 類型 Description Required 預設值
路徑 字串 檔案的路徑。 Yes
型別 列舉 刪除指定的檔案。
可能的數值: delete_file
Yes delete_file

OpenAI.ApplyPatchDeleteFileOperationParam

套用補丁刪除檔案操作

透過 apply_patch 工具刪除現有檔案的說明。

Name 類型 Description Required 預設值
路徑 字串 相對於工作區根目錄,檔案要刪除的路徑。
限制條件: 最小長度:1
Yes
型別 列舉 作業類型。 一律為 delete_file。
可能的數值: delete_file
Yes delete_file

OpenAI.ApplyPatchFileOperation

套用補丁操作

其中一種create_file、delete_file或update_file操作透過apply_patch應用。

OpenAI 的判別器。ApplyPatchFileOperation

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
create_file OpenAI.ApplyPatchCreateFileOperation
delete_file OpenAI.ApplyPatchDeleteFileOperation
update_file OpenAI.ApplyPatchUpdateFileOperation
Name 類型 Description Required 預設值
型別 OpenAI.ApplyPatchFileOperationType Yes

OpenAI.ApplyPatchFileOperationType

Property 價值
Type 字串
價值 create_file
delete_file
update_file

OpenAI.ApplyPatchOperationParam

套用補丁操作

這是提供給apply_patch工具的create_file、delete_file或update_file操作之一。

OpenAI 的判別器。ApplyPatchOperationParam

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
create_file OpenAI.ApplyPatchCreateFileOperationParam
delete_file OpenAI.ApplyPatchDeleteFileOperationParam
update_file OpenAI.ApplyPatchUpdateFileOperationParam
Name 類型 Description Required 預設值
型別 OpenAI.ApplyPatchOperationParamType Yes

OpenAI.ApplyPatchOperationParamType

Property 價值
Type 字串
價值 create_file
delete_file
update_file

OpenAI.ApplyPatchToolParam

套用補丁工具

允許助理使用統一差異來建立、刪除或更新檔案。

Name 類型 Description Required 預設值
型別 列舉 工具的類型。 一律為 apply_patch。
可能的數值: apply_patch
Yes apply_patch

OpenAI.ApplyPatchUpdateFileOperation

套用補丁更新檔案操作

說明如何透過 apply_patch 工具更新檔案的說明。

Name 類型 Description Required 預設值
差異 字串 申請差異很大。 Yes
路徑 字串 檔案更新路徑。 Yes
型別 列舉 用提供的差異檔更新現有檔案。
可能的數值: update_file
Yes update_file

OpenAI.ApplyPatchUpdateFileOperationParam

套用補丁更新檔案操作

透過apply_patch工具更新現有檔案的說明。

Name 類型 Description Required 預設值
差異 字串 統一差異內容套用到現有檔案。
限制條件: maxLength: 10485760
Yes
路徑 字串 檔案相對於工作區根的更新路徑。
限制條件: 最小長度:1
Yes
型別 列舉 作業類型。 一律為 update_file。
可能的數值: update_file
Yes update_file

OpenAI.ApproximateLocation(大致位置)

Name 類型 Description Required 預設值
城市 字串或空 No
國家 字串或空 No
區域 字串或空 No
timezone 字串或空 No
型別 列舉 位置近似的類型。 一律為 approximate。
可能的數值: approximate
Yes 近似

OpenAI.AutoCodeInterpreterToolParam

自動程式碼解譯工具參數

程式代碼解釋器容器的設定。 選擇性地指定要執行程式碼之檔案的識別碼。

Name 類型 Description Required 預設值
文件識別碼 字串陣列 一個上傳的檔案選擇性清單,可提供給您的程式使用。
限制: 最大物品數量:50
No
記憶體限制 OpenAI.ContainerMemoryLimit 或 null No
network_policy OpenAI.ContainerNetworkPolicyParam 容器的網路存取政策。 No
型別 列舉 一律為 auto。
可能的數值: auto
Yes 自動

OpenAI.ClickButtonType

Property 價值
Type 字串
價值 left
right
wheel
back
forward

OpenAI.ClickParam

Click

按一下動作。

Name 類型 Description Required 預設值
按鈕 OpenAI.ClickButtonType Yes
keys 字串或空的陣列 No
型別 列舉 指定事件類型。 對於點擊動作,這個性質總是 click。
可能的數值: click
Yes click
x 整數 按一下發生位置的 X 座標。 Yes
y 整數 點擊發生位置的 Y 座標。 Yes

OpenAI.CodeInterpreterOutputImage

程式碼直譯器輸出影像

程式碼解釋器生成的圖像輸出。

Name 類型 Description Required 預設值
型別 列舉 輸出的類型。 一律為 image。
可能的數值: image
Yes 圖片
url 字串(URI) 程式代碼解釋器中影像輸出的 URL。 Yes

OpenAI.CodeInterpreterOutputLogs

程式碼直譯器輸出日誌

程式碼解釋器的日誌輸出。

Name 類型 Description Required 預設值
記錄 字串 程式碼解釋器的日誌輸出。 Yes
型別 列舉 輸出的類型。 一律為 logs。
可能的數值: logs
Yes 記錄

OpenAI.CodeInterpreterTool

程式碼解譯器

一個能執行 Python 程式碼以協助生成回應提示的工具。

Name 類型 Description Required 預設值
容器 string 或 OpenAI.AutoCodeInterpreterToolParam 程式碼解譯器容器。 可以是容器 ID 或物件
指定上傳的檔案 ID,以供你的程式碼使用,並附帶
可選 memory_limit 設定。
Yes
型別 列舉 程式代碼解釋器工具的類型。 一律為 code_interpreter。
可能的數值: code_interpreter
Yes

OpenAI.ComparisonFilter

比較過濾器

篩選器用於使用定義的比較操作將指定的屬性鍵與給定值進行比較。

Name 類型 Description Required 預設值
Key 字串 用來與值比較的鍵。 Yes
型別 列舉 指定比較運算子:eq, ne, gtgteltltein。 nin
- eq:等於
- ne:不等於
- gt:大於
- gte:大於或等於
- lt:小於
- lte:小於或等於
- in: 在
- nin:不在
可能的值:eq、、、negtgte、、、、、ltlteinnin
Yes eq
value 字串、數字、布林值或字串或數字的陣列 要與屬性索引鍵比較的值;支援字串、數字或布爾型別。 Yes

OpenAI.CompoundFilter

複合濾波器

使用 and 或 or結合多個篩選。

Name 類型 Description Required 預設值
濾波器 OpenAI.ComparisonFilter 或物件的陣列 要組合的濾鏡陣列。 項目可以是 ComparisonFilter 或 CompoundFilter。 Yes
型別 列舉 工作類型: and 或 or。
可能的值: and、 or
Yes

OpenAI.ComputerAction

OpenAI.ComputerAction 的鑑別子

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
click OpenAI.ClickParam
double_click OpenAI.雙擊動作
drag OpenAI.DragParam
keypress OpenAI.KeyPressAction
move OpenAI.MoveParam
screenshot OpenAI.ScreenshotParam
scroll OpenAI.ScrollParam
type OpenAI.TypeParam
wait OpenAI.waitParam
Name 類型 Description Required 預設值
型別 OpenAI.ComputerActionType Yes

OpenAI.ComputerActionList

電腦行動列表

對 的扁平批次動作。computer_use 每個動作包含判 type 別子及動作專屬欄位。

陣列:OpenAI.ComputerAction

OpenAI.ComputerActionType

Property 價值
Type 字串
價值 click
double_click
drag
keypress
move
screenshot
scroll
type
wait

OpenAI.ComputerCallSafetyCheckParam

電腦呼叫的擱置安全性檢查。

Name 類型 Description Required 預設值
字碼 字串或空 No
id 字串 擱置安全性檢查的識別碼。 Yes
訊息 字串或空 No

OpenAI.ComputerEnvironment

Property 價值
Type 字串
價值 windows
mac
linux
ubuntu
browser

OpenAI.Computer截圖內容

電腦截圖

一張電腦截圖。

Name 類型 Description Required 預設值
細節 OpenAI.ImageDetail Yes
檔案識別碼 (file_id) 字串或空 Yes
image_url 字串或空 Yes
型別 列舉 指定事件類型。 針對電腦螢幕快照,這個屬性一律設定為 computer_screenshot。
可能的數值: computer_screenshot
Yes computer_screenshot

OpenAI.Computer截圖圖片

計算機螢幕快照影像,與計算機使用工具搭配使用。

Name 類型 Description Required 預設值
檔案識別碼 (file_id) 字串 包含螢幕快照之已上傳檔案的標識碼。 No
image_url 字串(URI) 螢幕快照影像的 URL。 No
型別 列舉 指定事件類型。 對於電腦截圖,這個屬性是
總是設定為 computer_screenshot。
可能的數值: computer_screenshot
Yes computer_screenshot

OpenAI.ComputerTool

電腦

控制虛擬電腦的工具。

Name 類型 Description Required 預設值
型別 列舉 電腦工具的類型。 一律為 computer。
可能的數值: computer
Yes 電腦

OpenAI.電腦使用預覽工具

電腦使用預覽

控制虛擬電腦的工具。

Name 類型 Description Required 預設值
顯示高度 整數 計算機顯示的高度。 Yes
顯示寬度 整數 計算機的顯示寬度。 Yes
環境 OpenAI.ComputerEnvironment Yes
型別 列舉 計算機使用工具的類型。 一律為 computer_use_preview。
可能的數值: computer_use_preview
Yes computer_use_preview

OpenAI.ContainerAutoParam

Name 類型 Description Required 預設值
文件識別碼 字串陣列 一個上傳的檔案選擇性清單,可提供給您的程式使用。
限制: 最大物品數量:50
No
記憶體限制 OpenAI.ContainerMemoryLimit 或 null No
network_policy OpenAI.ContainerNetworkPolicyParam 容器的網路存取政策。 No
技能 OpenAI.ContainerSkill 的 array 一個可選的技能清單,由 id 或 inline 資料參考。
限制: 最大物品數量:200
No
型別 列舉 自動為此請求建立容器
可能的數值: container_auto
Yes container_auto

OpenAI.ContainerFileCitationBody

容器檔案引用

一個用於產生模型回應的容器檔案引用。

Name 類型 Description Required 預設值
container_id 字串 容器檔案的 ID。 Yes
end_index 整數 訊息中容器檔案引用最後一個字元的索引。 Yes
檔案識別碼 (file_id) 字串 檔案的ID。 Yes
filename 字串 引用容器檔案的檔名。 Yes
start_index 整數 訊息中容器檔案引用首位字元的索引。 Yes
型別 列舉 容器檔案引用的類型。 一律為 container_file_citation。
可能的數值: container_file_citation
Yes container_file_citation

OpenAI.ContainerMemoryLimit(開放式儲存容器記憶限制)

Property 價值
Type 字串
價值 1g
4g
16g
64g

OpenAI.ContainerNetworkPolicyAllowlistParam

Name 類型 Description Required 預設值
allowed_domains 字串陣列 當類型為 allowlist時允許的網域清單。
限制: 最小項目:1
Yes
型別 列舉 只允許對指定網域進行外撥網路存取。 一律為 allowlist。
可能的數值: allowlist
Yes 允許清單

OpenAI.ContainerNetworkPolicyDisabledParam

Name 類型 Description Required 預設值
型別 列舉 關閉外撥網路存取。 一律為 disabled。
可能的數值: disabled
Yes 停用

OpenAI.ContainerNetworkPolicyParam

容器的網路存取政策。

OpenAI 的判別器。ContainerNetworkPolicyParam

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
disabled OpenAI.ContainerNetworkPolicyDisabledParam
allowlist OpenAI.ContainerNetworkPolicyAllowlistParam
Name 類型 Description Required 預設值
型別 OpenAI.ContainerNetworkPolicyParamType Yes

OpenAI.ContainerNetworkPolicyParamType

Property 價值
Type 字串
價值 disabled
allowlist

OpenAI.ContainerReferenceResource

容器參考

代表由 /v1/containers 建立的容器。

Name 類型 Description Required 預設值
container_id 字串 Yes
型別 列舉 環境類型。 一律為 container_reference。
可能的數值: container_reference
Yes container_reference

OpenAI.ContainerSkill

OpenAI 的判別器。ContainerSkill

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
skill_reference OpenAI.SkillReferenceparam
inline OpenAI.InlineSkillParam
Name 類型 Description Required 預設值
型別 OpenAI.ContainerSkillType Yes

OpenAI.ContainerSkillType

Property 價值
Type 字串
價值 skill_reference
inline

OpenAI.ContextManagementParam

Name 類型 Description Required 預設值
compact_threshold 整數或零 No
型別 字串 情境管理的輸入類型。 目前僅支援「壓縮」功能。 Yes

OpenAI.ConversationParam

這個回應所屬的對話。 本次對話內容在回應請求前加上 input_items 。 此回應的輸入項目與輸出項目會在回應結束後自動加入此對話中。

此組件可為以下之一:

OpenAI.ConversationParam-2

對話對象

這個回應所屬的對話。

Name 類型 Description Required 預設值
id 字串 對話中獨特的ID。 Yes

OpenAI.ConversationReference

交談

這句話所屬的對話。 這個回應的輸入項目和輸出項目會自動加入這個對話。

Name 類型 Description Required 預設值
id 字串 這個回應所關聯的對話唯一ID。 Yes

OpenAI.CoordParam

Coordinate

x/y 座標組,例如 { x: 100, y: 200 }。

Name 類型 Description Required 預設值
x 整數 X 座標。 Yes
y 整數 Y 座標。 Yes

OpenAI.CreateResponse

Name 類型 Description Required 預設值
背景 布林值或零值 No
context_management OpenAI.ContextManagementParam 或 null 的陣列 此請求的上下文管理設定。 No
交談 OpenAI.ConversationParam 或 null No
包括 OpenAI 的陣列 。IncludeEnum 或 null No
輸入 OpenAI.InputParam 用來讓模型產生回應的文字、影像或檔案輸入。
瞭解詳情:
- 文字輸入和輸出
- 影像輸入
- 檔案輸入
- 對話狀態
- 函式呼叫
No
instructions 字串或空 No
max_output_tokens 整數或零 No
最大工具呼叫次數 整數或零 No
中繼資料 OpenAI.Metadata 或 null No
型號 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
平行工具呼叫 布林值或零值 No
previous_response_id 字串或空 No
提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
prompt_cache_retention 字串或空 No
reasoning OpenAI.推理 或空 No
safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
儲存 布林值或零值 No
串流 布林值或零值 No
stream_options OpenAI.ResponseStreamOptions 或 null No
溫度 數或空 No
收發簡訊 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
tool_choice OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。

您可以提供模型的兩種工具類別如下:

- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,例如檔案搜尋。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫您自己的程式碼。
No
top_logprobs 整數或零 No
top_p 數或空 No
truncation 字串或空 No
使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No

OpenAI.CustomGrammarFormatParam

文法格式

一種由使用者定義的文法。

Name 類型 Description Required 預設值
定義 字串 文法定義。 Yes
語法 OpenAI.GrammarSyntax1 Yes
型別 列舉 文法格式。 一律為 grammar。
可能的數值: grammar
Yes 文法

OpenAI.CustomTextFormatParam

文字格式

不受限制的自由形式文字。

Name 類型 Description Required 預設值
型別 列舉 不受限制的文字格式。 一律為 text。
可能的數值: text
Yes 收發簡訊

OpenAI.CustomToolParam

自訂工具

一個自訂工具,能依照指定格式處理輸入。 了解更多自訂工具

Name 類型 Description Required 預設值
defer_loading boolean 是否應該延後這個工具,並透過工具搜尋來發現。 No
描述 字串 自訂工具的可選描述,用以提供更多背景說明。 No
format OpenAI.CustomToolParamFormat 自訂工具的輸入格式。 預設是無限制文字。 No
\---- 類型 OpenAI.CustomToolParamFormatType Yes
名字 字串 自訂工具名稱,用於工具呼叫時的識別。 Yes
型別 列舉 自訂工具的類型。 一律為 custom。
可能的數值: custom
Yes custom

OpenAI.CustomToolParamFormat

自訂工具的輸入格式。 預設是無限制文字。

OpenAI 的 Discriminator CustomToolParamFormat

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
text OpenAI.CustomTextFormatParam
grammar OpenAI.CustomGrammarFormatParam
Name 類型 Description Required 預設值
型別 OpenAI.CustomToolParamFormatType Yes

OpenAI.CustomToolParamFormatType

Property 價值
Type 字串
價值 text
grammar

OpenAI.DetailEnum

Property 價值
Type 字串
價值 low
high
auto
original

OpenAI.雙擊動作

DoubleClick

按兩下動作。

Name 類型 Description Required 預設值
keys 字串或空的陣列 Yes
型別 列舉 指定事件類型。 對於按兩下動作,這個屬性一律會設定為 double_click。
可能的數值: double_click
Yes double_click
x 整數 按兩下發生位置的 X 座標。 Yes
y 整數 按兩下發生位置的 Y 座標。 Yes

OpenAI.DragParam

Drag

拖曳動作。

Name 類型 Description Required 預設值
keys 字串或空的陣列 No
路徑 OpenAI.CoordParam 的 array 座標陣列,表示拖曳動作的路徑。 座標會顯示為對象的陣列,例如
<br> [ { x: 100, y: 200 }, { x: 200, y: 300 } ]<br>
Yes
型別 列舉 指定事件類型。 針對拖曳動作,這個屬性一律設定為 drag。
可能的數值: drag
Yes 拖曳

OpenAI.EasyInputMessage

輸入訊息

具有角色的訊息輸入至模型,指出下列階層的指示。 由 developer 或 system 角色給出的指示優先於由角色 user 給出的指示。 具有 assistant 角色的訊息被認為是在先前交互作用中由模型產生的。

Name 類型 Description Required 預設值
內容 string 或 OpenAI.InputMessageContentList 用於產生回應的模型文字、影像或音訊輸入。
也可以包含先前的助理回應。
Yes
階段 OpenAI.MessagePhase 或 null No
角色 列舉 訊息輸入的作用。 一個user、assistant、system或其中之一
developer。
可能的值:user、、assistant、 systemdeveloper
Yes
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
No
型別 列舉 訊息輸入的類型。 一律為 message。
可能的數值: message
Yes

OpenAI.EmptyModelParam

類型:物件

OpenAI.FileCitationBody

檔案引用

檔案的引文。

Name 類型 Description Required 預設值
檔案識別碼 (file_id) 字串 檔案的ID。 Yes
filename 字串 所引用檔案的檔名。 Yes
索引 整數 檔案清單中的檔案索引。 Yes
型別 列舉 檔案引文的類型。 一律為 file_citation。
可能的數值: file_citation
Yes file_citation

OpenAI.FileInputDetail

Property 價值
Type 字串
價值 low
high

OpenAI.FilePath

檔案路徑

檔案的路徑。

Name 類型 Description Required 預設值
檔案識別碼 (file_id) 字串 檔案的ID。 Yes
索引 整數 檔案清單中的檔案索引。 Yes
型別 列舉 檔案路徑的類型。 一律為 file_path。
可能的數值: file_path
Yes

OpenAI.FileSearchTool

檔案搜尋

從上傳的檔案搜尋相關內容的工具。

Name 類型 Description Required 預設值
濾波器 OpenAI.Filters 或 null No
最大結果數量 整數 回傳的結果數量。 這個數字應該介於1到50之間。 No
排名選項 OpenAI.RankingOptions No
└─ hybrid_search OpenAI.HybridSearchOptions 控制互惠秩融合在啟用混合搜尋時,語意嵌入匹配與稀疏關鍵字匹配的權重。 No
----- 排名器 OpenAI.RankerVersionType 要用於檔案搜尋的排名器。 No
分數門檻 編號 檔案搜尋的分數閾值,數位介於 0 到 1 之間。 接近 1 的數位只會嘗試只傳回最相關的結果,但可能會傳回較少的結果。 No
型別 列舉 檔案搜尋工具的類型。 一律為 file_search。
可能的數值: file_search
Yes file_search
向量儲存庫_IDs 字串陣列 要搜尋之向量存放區的識別碼。 Yes

OpenAI.FileSearchToolCallResults

Name 類型 Description Required 預設值
attributes OpenAI.VectorStoreFileAttributes 或 null No
檔案識別碼 (file_id) 字串 No
filename 字串 No
分數 數字(浮點數) No
收發簡訊 字串 No

OpenAI.過濾器

類型: OpenAI.ComparisonFilter 或 OpenAI.CompoundFilter

OpenAI.FunctionAndCustomToolCallOutput

OpenAI 的判別器。FunctionAndCustomToolCallOutput

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
input_text OpenAI.FunctionAndCustomToolCallOutputInputTextContent
input_image OpenAI.FunctionAndCustomToolCallOutputInputImageContent
input_file OpenAI.FunctionAndCustomToolCallOutputInputFileContent
Name 類型 Description Required 預設值
型別 OpenAI.FunctionAndCustomToolCallOutputType Yes

OpenAI.FunctionAndCustomToolCallOutputInputFileContent

輸入檔案

模型的檔案輸入。

Name 類型 Description Required 預設值
細節 OpenAI.FileInputDetail No
file_data 字串 要傳送至模型的檔案內容。 No
檔案識別碼 (file_id) 字串或空 No
file_url 字串(URI) 要傳送給模型的檔案網址。 No
filename 字串 要傳送至模型的檔案名稱。 No
型別 列舉 輸入項目的型別。 一律為 input_file。
可能的數值: input_file
Yes input_file

OpenAI.FunctionAndCustomToolCallOutputInputImageContent

輸入影像

輸入至模型的影像

Name 類型 Description Required 預設值
細節 OpenAI.ImageDetail Yes
檔案識別碼 (file_id) 字串或空 No
image_url 字串或空 No
型別 列舉 輸入項目的型別。 一律為 input_image。
可能的數值: input_image
Yes input_image

OpenAI.FunctionAndCustomToolCallOutputInputTextContent

輸入文字

模型的文字輸入。

Name 類型 Description Required 預設值
收發簡訊 字串 模型的文字輸入。 Yes
型別 列舉 輸入項目的型別。 一律為 input_text。
可能的數值: input_text
Yes input_text

OpenAI.FunctionAndCustomToolCallOutputType

Property 價值
Type 字串
價值 input_text
input_image
input_file

OpenAI.FunctionCallItemStatus(開放AI)功能呼叫項目狀態(ItemStatus)

Property 價值
Type 字串
價值 in_progress
completed
incomplete

OpenAI.FunctionCallOutputStatusEnum

Property 價值
Type 字串
價值 in_progress
completed
incomplete

OpenAI.FunctionCallStatus

Property 價值
Type 字串
價值 in_progress
completed
incomplete

OpenAI.FunctionShellAction

殼牌執行委員會行動

執行一個殼狀指令。

Name 類型 Description Required 預設值
commands 字串陣列 Yes
max_output_length 整數或零 Yes
timeout_ms 整數或零 Yes

OpenAI.FunctionShellActionParam

炮彈作用

描述如何執行 shell 工具呼叫的指令與限制。

Name 類型 Description Required 預設值
commands 字串陣列 命令執行環境執行 shell 指令。 Yes
max_output_length 整數或零 No
timeout_ms 整數或零 No

OpenAI.FunctionShellCallEnvironment

OpenAI 的判別器。FunctionShellCallEnvironment

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
local OpenAI.LocalEnvironmentResource
container_reference OpenAI.ContainerReferenceResource
Name 類型 Description Required 預設值
型別 OpenAI.FunctionShellCallEnvironmentType Yes

OpenAI.FunctionShellCallEnvironmentType

Property 價值
Type 字串
價值 local
container_reference

OpenAI.FunctionShellCallItemParamEnvironment

執行 shell 指令的環境。

OpenAI 的判別器。FunctionShellCallItemParamEnvironment

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
local OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam
container_reference OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam
Name 類型 Description Required 預設值
型別 OpenAI.FunctionShellCallItemParamEnvironmentType Yes

OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam

Name 類型 Description Required 預設值
container_id 字串 參考容器的 ID。 Yes
型別 列舉 參考使用 /v1/containers 端點建立的容器
可能的數值: container_reference
Yes container_reference

OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam

Name 類型 Description Required 預設值
技能 OpenAI.LocalSkillParam 的 array 這是一份可選的技能清單。
限制: 最大物品數量:200
No
型別 列舉 使用本地電腦環境。
可能的數值: local
Yes 區域

OpenAI.FunctionShellCallItemParamEnvironmentType

Property 價值
Type 字串
價值 local
container_reference

OpenAI.FunctionShellCallItemStatus

殼牌呼叫狀態

Shell 工具呼叫的狀態值報告。

Property 價值
Type 字串
價值 in_progress
completed
incomplete

OpenAI.FunctionShellCallOutputContent

Shell 呼叫輸出內容

是 shell 工具呼叫輸出的內容。

Name 類型 Description Required 預設值
創建者 字串 創建該項目的演員識別碼。 No
結果 OpenAI.FunctionShellCallOutputOutresult 代表一個結束結果(帶有退出代碼)或一個超時結果,適用於 shell 呼叫的輸出區塊。 Yes
\---- 類型 OpenAI.FunctionShellCallOutputOutcomeType Yes
stderr 字串 所擷取的標準誤差輸出。 Yes
stdout 字串 被捕捉到的標準輸出。 Yes

OpenAI.FunctionShellCallOutputContentParam

殼層輸出內容

擷取 shell 工具呼叫輸出的一部分 stdout 和 stderr。

Name 類型 Description Required 預設值
結果 OpenAI.FunctionShellCallOutputOutcomeParam 與此 shell 呼叫相關的退出或超時結果。 Yes
\---- 類型 OpenAI.FunctionShellCallOutputOutcomeParamType Yes
stderr 字串 擷取了 shell 呼叫的 stderr 輸出。
限制條件: maxLength: 10485760
Yes
stdout 字串 擷取了 shell 呼叫的標準輸出。
限制條件: maxLength: 10485760
Yes

OpenAI.FunctionShellCallOutputExitOutcome

殼牌呼叫退出結果

表示 shell 指令已完成並回傳一個退出代碼。

Name 類型 Description Required 預設值
exit_code 整數 從 shell 程序中移除退出程式碼。 Yes
型別 列舉 結果類型。 一律為 exit。
可能的數值: exit
Yes 結束

OpenAI.FunctionShellCallOutputExitOutcomeParam

殼牌呼叫退出結果

表示 shell 指令已完成並回傳一個退出代碼。

Name 類型 Description Required 預設值
exit_code 整數 退出代碼由 shell 程序回傳。 Yes
型別 列舉 結果類型。 一律為 exit。
可能的數值: exit
Yes 結束

OpenAI.FunctionShellCallOutputOutresult

殼牌呼叫結果

代表一個結束結果(帶有退出代碼)或一個超時結果,適用於 shell 呼叫的輸出區塊。

OpenAI 的判別器。FunctionShellCallOutputOutcomes

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
timeout OpenAI.FunctionShellCallOutputTimeoutoutoutoutcomes
exit OpenAI.FunctionShellCallOutputExitOutcome
Name 類型 Description Required 預設值
型別 OpenAI.FunctionShellCallOutputOutcomeType Yes

OpenAI.FunctionShellCallOutputOutcomeParam

殼牌呼叫結果

與此 shell 呼叫相關的退出或超時結果。

OpenAI 的判別器。FunctionShellCallOutputOutcomeParam

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
timeout OpenAI.FunctionShellCallOutputTimeoutoutcomeParam
exit OpenAI.FunctionShellCallOutputExitOutcomeParam
Name 類型 Description Required 預設值
型別 OpenAI.FunctionShellCallOutputOutcomeParamType Yes

OpenAI.FunctionShellCallOutputOutcomeParamType

Property 價值
Type 字串
價值 timeout
exit

OpenAI.FunctionShellCallOutputOutcomeType

Property 價值
Type 字串
價值 timeout
exit

OpenAI.FunctionShellCallOutputStatusEnum

Property 價值
Type 字串
價值 in_progress
completed
incomplete

OpenAI.FunctionShellCallOutputTimeoutoutoutoutcomes

殼牌呼叫超時結果

表示 shell 呼叫已超過設定時間限制。

Name 類型 Description Required 預設值
型別 列舉 結果類型。 一律為 timeout。
可能的數值: timeout
Yes timeout

OpenAI.FunctionShellCallOutputTimeoutoutcomeParam

殼牌呼叫超時結果

表示 shell 呼叫已超過設定時間限制。

Name 類型 Description Required 預設值
型別 列舉 結果類型。 一律為 timeout。
可能的數值: timeout
Yes timeout

OpenAI.FunctionShellCallStatus

Property 價值
Type 字串
價值 in_progress
completed
incomplete

OpenAI.FunctionShellToolParam

殼型工具

一個讓模型能執行 shell 指令的工具。

Name 類型 Description Required 預設值
環境 OpenAI.FunctionShellToolParamEnvironment 或 null No
型別 列舉 外殼工具的種類。 一律為 shell。
可能的數值: shell
Yes 殼層

OpenAI.FunctionShellToolParamEnvironment

OpenAI 的判別器。FunctionShellToolParamEnvironment

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
local OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam
container_reference OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam
container_auto OpenAI.ContainerAutoParam
Name 類型 Description Required 預設值
型別 OpenAI.FunctionShellToolParamEnvironmentType Yes

OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam

Name 類型 Description Required 預設值
container_id 字串 參考容器的 ID。 Yes
型別 列舉 參考使用 /v1/containers 端點建立的容器
可能的數值: container_reference
Yes container_reference

OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam

Name 類型 Description Required 預設值
技能 OpenAI.LocalSkillParam 的 array 這是一份可選的技能清單。
限制: 最大物品數量:200
No
型別 列舉 使用本地電腦環境。
可能的數值: local
Yes 區域

OpenAI.FunctionShellToolParamEnvironmentType

Property 價值
Type 字串
價值 container_auto
local
container_reference

OpenAI.FunctionTool

Function

在您自己的程式代碼中定義函式,模型可以選擇呼叫。

Name 類型 Description Required 預設值
defer_loading boolean 這個功能是否被延遲並透過工具搜尋載入。 No
描述 字串或空 No
名字 字串 要呼叫的函式名稱。 Yes
parameters 物件或空 Yes
嚴格 布林值或零值 Yes
型別 列舉 函式工具的類型。 一律為 function。
可能的數值: function
Yes 函式

OpenAI.FunctionToolParam

Name 類型 Description Required 預設值
defer_loading boolean 是否應該延後這個功能,並透過工具搜尋來發現。 No
描述 字串或空 No
名字 字串 限制條件: 最小長度:1,最大長度:128,模式: ^[a-zA-Z0-9_-]+$ Yes
parameters OpenAI.EmptyModelParam 或 null No
嚴格 布林值或零值 No
型別 列舉
可能的數值: function
Yes 函式

OpenAI.GrammarSyntax1

Property 價值
Type 字串
價值 lark
regex

OpenAI.HybridSearchOptions

Name 類型 Description Required 預設值
embedding_weight 編號 倒數排序融合中嵌入的權重。 Yes
text_weight 編號 文本權重在互惠排名融合中。 Yes

OpenAI.ImageDetail

Property 價值
Type 字串
價值 low
high
auto
original

OpenAI.ImageGenActionEnum

Property 價值
Type 字串
價值 generate
edit
auto

OpenAI.ImageGenTool

影像生成工具

一個利用 GPT 影像模型生成影像的工具。

有效的模型:

gpt-image-1
gpt-image-1-mini
gpt-image-1.5
Name 類型 Description Required 預設值
動作 OpenAI.ImageGenActionEnum No
背景 列舉 所產生影像的背景類型。 下列其中一項:transparent
opaque 或 auto。 預設值:auto。
可能的值:transparent、、 opaqueauto
No 自動
輸入精確度 OpenAI.InputFidelity 或 null No
輸入圖像遮罩 OpenAI.ImageGenToolInputImageMask No
file_id 字串 No
image_url(圖片網址) 字串(URI) No
型號 字串 (請參閱下面的有效模型) No
節制 列舉 生成影像的調製等級。 預設值:auto。
可能的值: auto、 low
No 自動
輸出壓縮 整數 輸出影像的壓縮層級。 預設值:100。
限制: 最小:0,最大:100
No 100
輸出格式 列舉 產生的影像輸出格式。 其中一個 png、webp或
jpeg。 預設值:png。
可能的值:png、、 webpjpeg
No png
部分影像 整數 在串流模式中產生的部分影像數目,從 0(預設值)到 3。
限制: 最小:0,最大:3
No
品質 列舉 產生的影像品質。 其中一個low、medium、high
或 auto。 預設值:auto。
可能的值:low、、medium、 highauto
No 自動
size 字串 (請參閱下面的有效模型) 產生的影像大小。 對於 gpt-image-2 和 gpt-image-2-2026-04-21,支持任意解析作為 WIDTHxHEIGHT 字串,例如 1536x864。 寬度與高度必須皆可被16整除,且要求的長寬比必須介於1:3至3:1之間。 上述 2560x1440 解析度為實驗性解析度,最大支援解析度為 3840x2160。 所請求的尺寸也必須符合模型目前的像素與邊緣限制。 標準尺寸1024x1024、、、1536x1024均由GPT影像模型支援;1024x1536支援自動調整auto尺寸的模型。 對於 dall-e-2,請使用其中 256x256之一 、 512x512或 1024x1024。 對於 dall-e-3,請使用其中 1024x1024之一 、 1792x1024或 1024x1792。 No
型別 列舉 影像產生工具的類型。 一律為 image_generation。
可能的數值: image_generation
Yes image_generation

OpenAI.ImageGenToolInputImageMask

Name 類型 Description Required 預設值
檔案識別碼 (file_id) 字串 No
image_url 字串(URI) No

OpenAI.IncludeEnum

指定要包含在模型回應中的其他輸出數據。 目前支援的值如下:

  • web_search_call.results:包含網路搜尋工具呼叫的搜尋結果。
  • web_search_call.action.sources:請提供網路搜尋工具呼叫的來源。
  • code_interpreter_call.outputs:包含 Python 程式碼在程式碼解釋器工具中呼叫項目的執行輸出。
  • computer_call_output.output.image_url:包含來自計算機呼叫輸出的圖像 URL。
  • file_search_call.results:包含檔案搜尋工具呼叫的搜尋結果。
  • message.input_image.image_url:包含輸入訊息中的影像 URL。
  • message.output_text.logprobs:將 logprobs 包含在助手訊息中。
  • reasoning.encrypted_content:在推理項目輸出中包含已加密版本的推理令牌。 這可讓在多回合交談中使用推理項目,例如,當以無狀態方式使用回應 API 時(例如當 store 參數設定為 false時,或者當組織已註冊無數據保留計劃時)。
Property 價值
說明 指定要包含在模型回應中的其他輸出數據。 目前支援的值如下:
- web_search_call.results:包含網路搜尋工具呼叫的搜尋結果。
- web_search_call.action.sources:請提供網路搜尋工具呼叫的來源。
- code_interpreter_call.outputs:在程式碼解譯器工具呼叫項目中包含python程式碼執行的輸出。
- computer_call_output.output.image_url:包含來自計算機呼叫輸出的圖像 URL。
- file_search_call.results:包含檔案搜尋工具呼叫的搜尋結果。
- message.input_image.image_url:包含輸入訊息中的影像 URL。
- message.output_text.logprobs:包含具有助理訊息的 logprobs。
- reasoning.encrypted_content:在推理項目輸出中包含推理記號的加密版本。 這可讓在多回合交談中使用推理項目,例如,當以無狀態方式使用回應 API 時(例如當 store 參數設定為 false時,或者當組織已註冊無數據保留計劃時)。
Type 字串
價值 file_search_call.results
web_search_call.results
web_search_call.action.sources
message.input_image.image_url
computer_call_output.output.image_url
code_interpreter_call.outputs
reasoning.encrypted_content
message.output_text.logprobs

OpenAI.InlineSkillParam

Name 類型 Description Required 預設值
描述 字串 技能描述。 Yes
名字 字串 這個技能的名字。 Yes
來源 OpenAI.InlineSkillSourceParam 線上技能載荷 Yes
‧---- 數據 字串 Base64 編碼的技能壓縮包。
限制條件: 最小長度:1,最大長度:70254592
Yes
└─ media_type 列舉 線上技能載荷的媒體類型。 必須是 application/zip。
可能的數值: application/zip
Yes application/zip
\---- 類型 列舉 線上技能來源的類型。 必須是 base64。
可能的數值: base64
Yes base64
型別 列舉 定義了這個請求的內嵌技能。
可能的數值: inline
Yes 內嵌

OpenAI.InlineSkillSourceParam

線上技能載荷

Name 類型 Description Required 預設值
資料 字串 Base64 編碼的技能壓縮包。
限制條件: 最小長度:1,最大長度:70254592
Yes
media_type 列舉 線上技能載荷的媒體類型。 必須是 application/zip。
可能的數值: application/zip
Yes application/zip
型別 列舉 線上技能來源的類型。 必須是 base64。
可能的數值: base64
Yes base64

OpenAI.InputContent

OpenAI 的判別器。InputContent

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
input_text OpenAI.InputContentInputTextContent
input_image OpenAI.InputContentInputImageContent
input_file OpenAI.InputContentInputFileContent
Name 類型 Description Required 預設值
型別 OpenAI.InputContentType Yes

OpenAI.InputContentInputFileContent

輸入檔案

模型的檔案輸入。

Name 類型 Description Required 預設值
細節 OpenAI.FileInputDetail No
file_data 字串 要傳送至模型的檔案內容。 No
檔案識別碼 (file_id) 字串或空 No
file_url 字串(URI) 要傳送給模型的檔案網址。 No
filename 字串 要傳送至模型的檔案名稱。 No
型別 列舉 輸入項目的型別。 一律為 input_file。
可能的數值: input_file
Yes input_file

OpenAI.InputContentInputImageContent

輸入影像

輸入至模型的影像

Name 類型 Description Required 預設值
細節 OpenAI.ImageDetail Yes
檔案識別碼 (file_id) 字串或空 No
image_url 字串或空 No
型別 列舉 輸入項目的型別。 一律為 input_image。
可能的數值: input_image
Yes input_image

OpenAI.InputContentInputTextContent

輸入文字

模型的文字輸入。

Name 類型 Description Required 預設值
收發簡訊 字串 模型的文字輸入。 Yes
型別 列舉 輸入項目的型別。 一律為 input_text。
可能的數值: input_text
Yes input_text

OpenAI.InputContentType

Property 價值
Type 字串
價值 input_text
input_image
input_file

OpenAI.InputFidelity

控制模型將發揮多少努力來比對輸入影像的樣式和特徵,尤其是臉部特徵。 此參數僅支援 gpt-image-1 及 gpt-image-1.5 及 後續模型,不支援 gpt-image-1-mini。 支持與 highlow。 預設為 low。

Property 價值
Type 字串
價值 high
low

OpenAI.InputFileContent

輸入檔案

模型的檔案輸入。

Name 類型 Description Required 預設值
細節 OpenAI.FileInputDetail No
file_data 字串 要傳送至模型的檔案內容。 No
檔案識別碼 (file_id) 字串或空 No
file_url 字串(URI) 要傳送給模型的檔案網址。 No
filename 字串 要傳送至模型的檔案名稱。 No
型別 列舉 輸入項目的型別。 一律為 input_file。
可能的數值: input_file
Yes input_file

OpenAI.InputFileContentParam

輸入檔案

模型的檔案輸入。

Name 類型 Description Required 預設值
細節 OpenAI.FileInputDetail No
file_data 字串或空 No
檔案識別碼 (file_id) 字串或空 No
file_url 字串或空 No
filename 字串或空 No
型別 列舉 輸入項目的型別。 一律為 input_file。
可能的數值: input_file
Yes input_file

OpenAI.InputImageContent

輸入影像

輸入至模型的影像

Name 類型 Description Required 預設值
細節 OpenAI.ImageDetail Yes
檔案識別碼 (file_id) 字串或空 No
image_url 字串或空 No
型別 列舉 輸入項目的型別。 一律為 input_image。
可能的數值: input_image
Yes input_image

OpenAI.InputImageContentParamAutoParam

輸入影像

輸入至模型的影像 了解影像輸入

Name 類型 Description Required 預設值
細節 OpenAI.DetailEnum 或 null No
檔案識別碼 (file_id) 字串或空 No
image_url 字串或空 No
型別 列舉 輸入項目的型別。 一律為 input_image。
可能的數值: input_image
Yes input_image

OpenAI.InputItem

一個代表部分情境的項目,供模型產生回應。 可包含文字、圖片與音訊輸入,以及先前的助理回應與工具呼叫輸出。

OpenAI 的判別器。輸入項目

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
message OpenAI.EasyInputMessage
item_reference OpenAI.ItemReferenceParam
output_message OpenAI.InputItemOutputMessage
file_search_call OpenAI.InputItemFileSearchToolCall
computer_call OpenAI.InputItemComputerToolCall
computer_call_output OpenAI.InputItemComputerCallOutputItemParam
web_search_call OpenAI.InputItemWebSearchToolCall
function_call OpenAI.InputItemFunctionToolCall
function_call_output OpenAI.InputItemFunctionCallOutputItemParam
tool_search_call OpenAI.InputItemToolSearchCallItemParam
tool_search_output OpenAI.InputItemToolSearchOutputItemParam
reasoning OpenAI.InputItemReasoningItem
compaction OpenAI.InputItemCompactionSummaryItemParam
image_generation_call OpenAI.InputItemImageGenToolCall
code_interpreter_call OpenAI.InputItemCodeInterpreterToolCall
local_shell_call OpenAI.InputItemLocalShellToolCall
local_shell_call_output OpenAI.InputItemLocalShellToolCallOutput
shell_call OpenAI.InputItemFunctionShellCallItemParam
shell_call_output OpenAI.InputItemFunctionShellCallOutputItemParam
apply_patch_call OpenAI.InputItemApplyPatchToolCallItemParam
apply_patch_call_output OpenAI.InputItemApplyPatchToolCallOutputItemParam
mcp_list_tools OpenAI.InputItemMcpListTools
mcp_approval_request OpenAI.InputItemMcpApprovalRequest
mcp_approval_response OpenAI.InputItemMcpApprovalResponse(開放AI)。InputItemMcpApprovalResponse(回應)
mcp_call OpenAI.InputItemMcpToolCall
custom_tool_call_output OpenAI.InputItemCustomToolCallOutput
custom_tool_call OpenAI.InputItemCustomToolCall
tool_approval_response AzureToolApprovalResponse
Name 類型 Description Required 預設值
型別 OpenAI.InputItemType Yes

OpenAI.InputItemApplyPatchToolCallItemParam

套用補丁工具呼叫

一個工具呼叫,代表使用差異補丁建立、刪除或更新檔案的請求。

Name 類型 Description Required 預設值
call_id 字串 模型產生的套用補丁工具呼叫的唯一 ID。
限制條件: 最小長度:1,最大長度:64
Yes
id 字串或空 No
作業 OpenAI.ApplyPatchOperationParam 這是提供給apply_patch工具的create_file、delete_file或update_file操作之一。 Yes
\---- 類型 OpenAI.ApplyPatchOperationParamType Yes
狀態 OpenAI.ApplyPatchCallStatusParam apply_patch工具呼叫的狀態值報告。 Yes
型別 列舉 物品的種類。 一律為 apply_patch_call。
可能的數值: apply_patch_call
Yes apply_patch_call

OpenAI.InputItemApplyPatchToolCallOutputItemParam

套用補丁工具呼叫輸出

由 apply 修補工具呼叫所輸出的串流輸出。

Name 類型 Description Required 預設值
call_id 字串 模型產生的套用補丁工具呼叫的唯一 ID。
限制條件: 最小長度:1,最大長度:64
Yes
id 字串或空 No
輸出 字串或空 No
狀態 OpenAI.ApplyPatchCallOutputStatusParam apply_patch工具呼叫輸出的結果值報告。 Yes
型別 列舉 物品的種類。 一律為 apply_patch_call_output。
可能的數值: apply_patch_call_output
Yes apply_patch_call_output

OpenAI.InputItemCodeInterpreterToolCall

程式碼直譯器工具呼叫

執行程式代碼的工具呼叫。

Name 類型 Description Required 預設值
字碼 字串或空 Yes
container_id 字串 用來執行程式代碼之容器的標識碼。 Yes
id 字串 程式代碼解釋器工具呼叫的唯一標識符。 Yes
outputs OpenAI.CodeInterpreterOutputLogs 或 OpenAI.CodeInterpreterOutputImage 或 null 的陣列 Yes
狀態 列舉 程式代碼解釋器工具呼叫的狀態。 有效值為 in_progress、completed、incomplete、interpreting 和 failed。
可能的值:in_progress、completed、incomplete、interpreting、failed
Yes
型別 列舉 程式代碼解釋器工具呼叫的類型。 一律為 code_interpreter_call。
可能的數值: code_interpreter_call
Yes code_interpreter_call

OpenAI.InputItemCompactionSummaryItemParam

壓縮項目

API產生 v1/responses/compact 的壓縮項目。

Name 類型 Description Required 預設值
encrypted_content 字串 壓縮摘要的加密內容。
限制條件: maxLength: 10485760
Yes
id 字串或空 No
型別 列舉 物品的種類。 一律為 compaction。
可能的數值: compaction
Yes 壓縮

OpenAI.InputItemComputerCallOutputItemParam

電腦工具呼叫輸出

電腦工具呼叫的輸出。

Name 類型 Description Required 預設值
acknowledged_safety_checks OpenAI.ComputerCallSafetyCheckParam 或 null 的陣列 No
call_id 字串 產生輸出之計算機工具呼叫的標識碼。
限制條件: 最小長度:1,最大長度:64
Yes
id 字串或空 No
輸出 OpenAI.Computer截圖圖片 計算機螢幕快照影像,與計算機使用工具搭配使用。 Yes
狀態 OpenAI.FunctionCallItemStatus 或 null No
型別 列舉 計算機工具呼叫輸出的類型。 一律為 computer_call_output。
可能的數值: computer_call_output
Yes computer_call_output

OpenAI.InputItemComputerToolCall

電腦工具呼叫

對電腦使用工具發出的工具呼叫。

Name 類型 Description Required 預設值
動作 OpenAI.ComputerAction No
actions OpenAI.ComputerActionList 對 的扁平批次動作。computer_use 每個行動包含
type 判別器與動作專屬領域。
No
call_id 字串 使用輸出回應工具呼叫時所使用的識別碼。 Yes
id 字串 計算機呼叫的唯一標識碼。 Yes
pending_safety_checks OpenAI.ComputerCallCallSafetyCheckParam 的陣列 電腦呼叫的擱置安全性檢查。 Yes
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
Yes
型別 列舉 計算機呼叫的類型。 一律為 computer_call。
可能的數值: computer_call
Yes computer_call

OpenAI.InputItemCustomToolCall

自訂工具呼叫

呼叫模型建立的自訂工具。

Name 類型 Description Required 預設值
call_id 字串 一個用於將此自訂工具呼叫映射到工具呼叫輸出的識別碼。 Yes
id 字串 OpenAI 平台自訂工具呼叫的唯一 ID。 No
輸入 字串 模型產生的自訂工具呼叫輸入。 Yes
名字 字串 正在被呼叫的自訂工具名稱。 Yes
命名空間 字串 被呼叫的自訂工具命名空間。 No
型別 列舉 自訂工具呼叫的類型。 一律為 custom_tool_call。
可能的數值: custom_tool_call
Yes

OpenAI.InputItemCustomToolCallOutput

自訂工具呼叫輸出

你程式碼中自訂工具呼叫的輸出,會回傳給模型。

Name 類型 Description Required 預設值
call_id 字串 呼叫 ID,用來將這個自訂工具呼叫輸出對應到自訂工具呼叫。 Yes
id 字串 OpenAI 平台中自訂工具呼叫輸出的唯一 ID。 No
輸出 OpenAI.FunctionAndCustomToolCallOutput 的字串或陣列 你的程式碼產生的自訂工具呼叫輸出。
可以是字串或輸出內容的清單。
Yes
型別 列舉 自訂工具呼叫輸出的類型。 一律為 custom_tool_call_output。
可能的數值: custom_tool_call_output
Yes

OpenAI.InputItemFileSearchToolCall

檔案搜尋工具呼叫

檔案搜尋工具呼叫的結果。

Name 類型 Description Required 預設值
id 字串 檔案搜尋工具呼叫的唯一標識符。 Yes
查詢 字串陣列 用來搜尋檔案的查詢。 Yes
results OpenAI.FileSearchToolCallResults 的陣列或 null No
狀態 列舉 檔案搜尋工具呼叫的狀態。 下列其中一項:in_progress
searching、 或 incomplete、 failed
可能的值:in_progress、searching、completed、incomplete、failed
Yes
型別 列舉 檔案搜尋工具呼叫的類型。 一律為 file_search_call。
可能的數值: file_search_call
Yes

OpenAI.InputItemFunctionCallOutputItemParam

函式工具呼叫輸出

函式工具呼叫的輸出。

Name 類型 Description Required 預設值
call_id 字串 模型所產生的函式工具呼叫的唯一標識符。
限制條件: 最小長度:1,最大長度:64
Yes
id 字串或空 No
輸出 OpenAI.InputTextContentParam 或 OpenAI.InputImageContentParamAutoParam 或 OpenAI.InputFileContentParam 的字串或陣列 函式工具呼叫的文字、圖片或檔案輸出。 Yes
狀態 OpenAI.FunctionCallItemStatus 或 null No
型別 列舉 函數工具呼叫輸出類型。 一律為 function_call_output。
可能的數值: function_call_output
Yes function_call_output

OpenAI.InputItemFunctionShellCallItemParam

殼層工具呼叫

一個代表執行一個或多個 shell 指令請求的工具。

Name 類型 Description Required 預設值
動作 OpenAI.FunctionShellActionParam 描述如何執行 shell 工具呼叫的指令與限制。 Yes
└─ 指令 字串陣列 命令執行環境執行 shell 指令。 Yes
└─ max_output_length 整數或零 No
└─ timeout_ms 整數或零 No
call_id 字串 模型產生的殼層工具呼叫的唯一 ID。
限制條件: 最小長度:1,最大長度:64
Yes
環境 OpenAI.FunctionShellCallItemParamEnvironment 或 null No
id 字串或空 No
狀態 OpenAI.FunctionShellCallItemStatus 或 null No
型別 列舉 物品的種類。 一律為 shell_call。
可能的數值: shell_call
Yes shell_call

OpenAI.InputItemFunctionShellCallOutputItemParam

Shell 工具呼叫輸出

由 shell 工具呼叫所輸出的串流輸出項目。

Name 類型 Description Required 預設值
call_id 字串 模型產生的殼層工具呼叫的唯一 ID。
限制條件: 最小長度:1,最大長度:64
Yes
id 字串或空 No
max_output_length 整數或零 No
輸出 OpenAI.FunctionShellCallOutputContentParam 的陣列 擷取 stdout 和 stderr 輸出區塊,以及它們相關的結果。 Yes
狀態 OpenAI.FunctionShellCallItemStatus 或 null No
型別 列舉 物品的種類。 一律為 shell_call_output。
可能的數值: shell_call_output
Yes shell_call_output

OpenAI.InputItemFunctionToolCall

函式工具呼叫

執行函式的工具呼叫。

Name 類型 Description Required 預設值
arguments 字串 要傳遞至函式的引數 JSON 字串。 Yes
call_id 字串 模型所產生的函式工具呼叫的唯一標識符。 Yes
id 字串(唯讀) 函數工具呼叫的唯一標識碼。 Yes
名字 字串 要執行的函式名稱。 Yes
命名空間 字串 要執行的函式命名空間。 No
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
No
型別 列舉 函式工具呼叫的類型。 一律為 function_call。
可能的數值: function_call
Yes

OpenAI.InputItemImageGenToolCall

影像生成呼叫

模型提出的圖像生成要求。

Name 類型 Description Required 預設值
id 字串 影像生成呼叫的唯一 ID。 Yes
result 字串或空 Yes
狀態 列舉 影像生成通話狀態。
可能的值:in_progress、、completed、 generatingfailed
Yes
型別 列舉 影像生成呼叫的類型。 一律為 image_generation_call。
可能的數值: image_generation_call
Yes

OpenAI.InputItemLocalShellToolCall

局部殼叫

在本機殼層上執行命令的工具呼叫。

Name 類型 Description Required 預設值
動作 OpenAI.LocalShellExecAction 在伺服器上執行殼層命令。 Yes
call_id 字串 模型所產生的本機殼層工具呼叫的唯一識別碼。 Yes
id 字串 本地 shell 呼叫的唯一 ID。 Yes
狀態 列舉 本地空殼通話狀態。
可能的值:in_progress、、 completedincomplete
Yes
型別 列舉 本地 shell 呼叫的類型。 一律為 local_shell_call。
可能的數值: local_shell_call
Yes

OpenAI.InputItemLocalShellToolCallOutput

本地殼層呼叫輸出

本機 Shell 工具呼叫的輸出。

Name 類型 Description Required 預設值
id 字串 模型所產生的本機殼層工具呼叫的唯一識別碼。 Yes
輸出 字串 本機殼層工具呼叫輸出的 JSON 字串。 Yes
狀態 字串或空 No
型別 列舉 本地殼層工具呼叫輸出的類型。 一律為 local_shell_call_output。
可能的數值: local_shell_call_output
Yes

OpenAI.InputItemMcpApprovalRequest

MCP 核准申請

要求人工核准工具叫用。

Name 類型 Description Required 預設值
arguments 字串 工具的自變數 JSON 字串。 Yes
id 字串 核准申請的唯一 ID。 Yes
名字 字串 要執行的工具名稱。 Yes
伺服器標籤 字串 發出要求的 MCP 伺服器的標籤。 Yes
型別 列舉 物品的種類。 一律為 mcp_approval_request。
可能的數值: mcp_approval_request
Yes

OpenAI.InputItemMcpApprovalResponse(開放AI)。InputItemMcpApprovalResponse(回應)

MCP 核准回應

對 MCP 核准申請的回應。

Name 類型 Description Required 預設值
approval_request_id 字串 正在回應之核准要求的識別碼。 Yes
approve boolean 是否已核准要求。 Yes
id 字串或空 No
reason 字串或空 No
型別 列舉 物品的種類。 一律為 mcp_approval_response。
可能的數值: mcp_approval_response
Yes

OpenAI.InputItemMcpListTools

MCP 清單工具

MCP 伺服器上可用的工具清單。

Name 類型 Description Required 預設值
錯誤 OpenAI.RealtimeMCPError No
id 字串 名單的唯一ID。 Yes
伺服器標籤 字串 MCP 伺服器的標籤。 Yes
工具 OpenAI.MCPListToolsTool 的 array 伺服器上可用的工具。 Yes
型別 列舉 物品的種類。 一律為 mcp_list_tools。
可能的數值: mcp_list_tools
Yes

OpenAI.InputItemMcpToolCall

MCP 工具呼叫

MCP 伺服器上的工具叫用。

Name 類型 Description Required 預設值
approval_request_id 字串或空 No
arguments 字串 傳遞到工具的參數所構成的 JSON 字串。 Yes
錯誤 OpenAI.RealtimeMCPError No
id 字串 工具呼叫的唯一 ID。 Yes
名字 字串 執行的工具名稱。 Yes
輸出 字串或空 No
伺服器標籤 字串 執行此工具之 MCP 伺服器的標籤。 Yes
狀態 OpenAI.MCPToolCallStatus(開放AI.MCPToolCallStatus) No
型別 列舉 物品的種類。 一律為 mcp_call。
可能的數值: mcp_call
Yes

OpenAI.InputItemOutputMessage

輸出訊息

來自模型的輸出訊息。

Name 類型 Description Required 預設值
內容 OpenAI 的陣列 。OutputMessageContent 輸出訊息的內容。 Yes
id 字串 輸出訊息的唯一標識碼。 Yes
階段 OpenAI.MessagePhase 或 null No
角色 列舉 輸出訊息的角色。 一律為 assistant。
可能的數值: assistant
Yes
狀態 列舉 訊息輸入的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回輸入項目時填入。
可能的值:in_progress、、 completedincomplete
Yes
型別 列舉 輸出訊息的類型。 一律為 message。
可能的數值: output_message
Yes

OpenAI.InputItemReasoningItem

Reasoning

產生回應時,推理模型所使用之思想鏈結的描述。 如果您要手動管理內容,請務必將這些項目包含在回應 API 的 input 中,以進行後續的交談回合。

Name 類型 Description Required 預設值
內容 OpenAI 的陣列 。ReasoningTextContent 推理文本內容。 No
encrypted_content 字串或空 No
id 字串 推理內容的唯一標識碼。 Yes
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
No
摘要 OpenAI 的陣列 。摘要文字內容 推理摘要內容。 Yes
型別 列舉 物件的類型。 一律為 reasoning。
可能的數值: reasoning
Yes

OpenAI.InputItemToolSearchCallItemParam

Name 類型 Description Required 預設值
arguments OpenAI.EmptyModelParam Yes
call_id 字串或空 No
執行 OpenAI.ToolSearchExecutionType No
id 字串或空 No
狀態 OpenAI.FunctionCallItemStatus 或 null No
型別 列舉 項目類型。 一律為 tool_search_call。
可能的數值: tool_search_call
Yes tool_search_call

OpenAI.InputItemToolSearchOutputItemParam

Name 類型 Description Required 預設值
call_id 字串或空 No
執行 OpenAI.ToolSearchExecutionType No
id 字串或空 No
狀態 OpenAI.FunctionCallItemStatus 或 null No
工具 OpenAI.Tool 的陣列 工具搜尋輸出回傳的載入工具定義。 Yes
型別 列舉 項目類型。 一律為 tool_search_output。
可能的數值: tool_search_output
Yes tool_search_output

OpenAI.InputItemType

Property 價值
Type 字串
價值 message
output_message
file_search_call
computer_call
computer_call_output
web_search_call
function_call
function_call_output
tool_search_call
tool_search_output
reasoning
compaction
image_generation_call
code_interpreter_call
local_shell_call
local_shell_call_output
shell_call
shell_call_output
apply_patch_call
apply_patch_call_output
mcp_list_tools
mcp_approval_request
mcp_approval_response
mcp_call
custom_tool_call_output
custom_tool_call
item_reference
tool_approval_response

OpenAI.InputItemWebSearchToolCall

網路搜尋工具呼叫

網路搜尋工具的結果。

Name 類型 Description Required 預設值
動作 OpenAI.WebSearchActionSearch 或 OpenAI.WebSearchActionOpenPage 或 OpenAI.WebSearchActionFind 一個描述此網路搜尋呼叫中具體行動的物件。
包含模型如何使用網路(搜尋、open_page、find_in_page)的細節。
Yes
id 字串 網路搜尋工具呼叫的唯一 ID。 Yes
狀態 列舉 Web 搜尋工具呼叫的狀態。
可能的值:in_progress、、searching、 completedfailed
Yes
型別 列舉 網路搜尋工具的呼叫類型。 一律為 web_search_call。
可能的數值: web_search_call
Yes

OpenAI.InputMessageContentList

輸入項目內容列表

模型中一或多個輸入項目的清單,其中包含不同的內容類型。

陣列:OpenAI.InputContent

OpenAI.InputParam

用來讓模型產生回應的文字、影像或檔案輸入。 瞭解詳情:

  • 文字輸入與輸出
  • 影像輸入
  • 檔案輸入
  • 對話狀態
  • 函式呼叫

此組件可為以下之一:

  • 字串
  • 陣列

OpenAI.InputTextContent

輸入文字

模型的文字輸入。

Name 類型 Description Required 預設值
收發簡訊 字串 模型的文字輸入。 Yes
型別 列舉 輸入項目的型別。 一律為 input_text。
可能的數值: input_text
Yes input_text

OpenAI.InputTextContentParam

輸入文字

模型的文字輸入。

Name 類型 Description Required 預設值
收發簡訊 字串 模型的文字輸入。
限制條件: maxLength: 10485760
Yes
型別 列舉 輸入項目的型別。 一律為 input_text。
可能的數值: input_text
Yes input_text

OpenAI.ItemReferenceParam

項目參考

要參考之項目的內部識別碼。

Name 類型 Description Required 預設值
id 字串 要參考之專案的標識碼。 Yes
型別 列舉 要參考的項目類型。 一律為 item_reference。
可能的數值: item_reference
Yes item_reference

OpenAI.ItemResource

用來產生回應的內容項目。

OpenAI.ItemResource 的鑑別子

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
message OpenAI.ItemResourceInputMessage
output_message OpenAI.ItemResourceOutputMessage
file_search_call OpenAI.ItemResourceFileSearchToolCall
computer_call OpenAI.ItemResourceComputerToolCall
computer_call_output OpenAI.ItemResourceComputerToolCallOutput
web_search_call OpenAI.ItemResourceWebSearchToolCall
function_call OpenAI.ItemResourceFunctionToolCall
function_call_output OpenAI.ItemResourceFunctionToolCallOutput
tool_search_call OpenAI.ItemResourceToolSearchCall
tool_search_output OpenAI.ItemResourceToolSearchOutput
reasoning OpenAI.ItemResourceReasoningItem
compaction OpenAI.ItemResourceCompactionBody
image_generation_call OpenAI.ItemResourceImageGenToolCall
code_interpreter_call OpenAI.ItemResourceCodeInterpreterToolCall
local_shell_call OpenAI.ItemResourceLocalShellToolCall
local_shell_call_output OpenAI.ItemResourceLocalShellToolCallOutput
shell_call OpenAI.ItemResourceFunctionShellCall
shell_call_output OpenAI.ItemResourceFunctionShellCallOutput
apply_patch_call OpenAI.ItemResourceApplyPatchToolCall
apply_patch_call_output OpenAI.ItemResourceApplyPatchToolCallOutput
mcp_list_tools OpenAI.ItemResourceMcpListTools
mcp_approval_request OpenAI.ItemResourceMcpApprovalRequest
mcp_approval_response OpenAI.ItemResourceMcpApprovalResponseResource
mcp_call OpenAI.ItemResourceMcpToolCall
custom_tool_call OpenAI.ItemResourceCustomToolCallResource
custom_tool_call_output OpenAI.ItemResourceCustomToolCallOutputResource
Name 類型 Description Required 預設值
型別 OpenAI.ItemResourceType Yes

OpenAI.ItemResourceApplyPatchToolCall

套用補丁工具呼叫

一個工具呼叫,透過建立、刪除或更新檔案來套用檔案差異。

Name 類型 Description Required 預設值
call_id 字串 模型產生的套用補丁工具呼叫的唯一 ID。 Yes
創建者 字串 創建這個工具呼叫的實體的 ID。 No
id 字串 套用補丁工具呼叫的唯一 ID。 透過 API 傳回此項目時填入。 Yes
作業 OpenAI.ApplyPatchFileOperation 其中一種create_file、delete_file或update_file操作透過apply_patch應用。 Yes
\---- 類型 OpenAI.ApplyPatchFileOperationType Yes
狀態 OpenAI.ApplyPatchCallStatus(開放AI)。ApplyPatchCallStatus(查詢狀態) Yes
型別 列舉 物品的種類。 一律為 apply_patch_call。
可能的數值: apply_patch_call
Yes apply_patch_call

OpenAI.ItemResourceApplyPatchToolCallOutput

套用補丁工具呼叫輸出

由 apply patch tool 呼叫所輸出的輸出。

Name 類型 Description Required 預設值
call_id 字串 模型產生的套用補丁工具呼叫的唯一 ID。 Yes
創建者 字串 建立此工具的實體 ID 呼叫輸出。 No
id 字串 apply patch 工具呼叫輸出的唯一 ID。 透過 API 傳回此項目時填入。 Yes
輸出 字串或空 No
狀態 OpenAI.ApplyPatchCallOutputStatus Yes
型別 列舉 物品的種類。 一律為 apply_patch_call_output。
可能的數值: apply_patch_call_output
Yes apply_patch_call_output

OpenAI.ItemResourceCodeInterpreterToolCall

程式碼直譯器工具呼叫

執行程式代碼的工具呼叫。

Name 類型 Description Required 預設值
字碼 字串或空 Yes
container_id 字串 用來執行程式代碼之容器的標識碼。 Yes
id 字串 程式代碼解釋器工具呼叫的唯一標識符。 Yes
outputs OpenAI.CodeInterpreterOutputLogs 或 OpenAI.CodeInterpreterOutputImage 或 null 的陣列 Yes
狀態 列舉 程式代碼解釋器工具呼叫的狀態。 有效值為 in_progress、completed、incomplete、interpreting 和 failed。
可能的值:in_progress、completed、incomplete、interpreting、failed
Yes
型別 列舉 程式代碼解釋器工具呼叫的類型。 一律為 code_interpreter_call。
可能的數值: code_interpreter_call
Yes code_interpreter_call

OpenAI.ItemResourceCompactionBody

壓縮項目

API產生 v1/responses/compact 的壓縮項目。

Name 類型 Description Required 預設值
創建者 字串 創建該項目的演員識別碼。 No
encrypted_content 字串 由壓縮產生的加密內容。 Yes
id 字串 壓縮項目的唯一 ID。 Yes
型別 列舉 物品的種類。 一律為 compaction。
可能的數值: compaction
Yes 壓縮

OpenAI.ItemResourceComputerToolCall

電腦工具呼叫

對電腦使用工具發出的工具呼叫。

Name 類型 Description Required 預設值
動作 OpenAI.ComputerAction No
actions OpenAI.ComputerActionList 對 的扁平批次動作。computer_use 每個行動包含
type 判別器與動作專屬領域。
No
call_id 字串 使用輸出回應工具呼叫時所使用的識別碼。 Yes
id 字串 計算機呼叫的唯一標識碼。 Yes
pending_safety_checks OpenAI.ComputerCallCallSafetyCheckParam 的陣列 電腦呼叫的擱置安全性檢查。 Yes
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
Yes
型別 列舉 計算機呼叫的類型。 一律為 computer_call。
可能的數值: computer_call
Yes computer_call

OpenAI.ItemResourceComputerToolCallOutput

電腦工具呼叫輸出

電腦工具呼叫的輸出。

Name 類型 Description Required 預設值
acknowledged_safety_checks OpenAI.ComputerCallCallSafetyCheckParam 的陣列 API 報告的安全檢查已得到以下項目的認可:
開發人員。
No
call_id 字串 產生輸出之計算機工具呼叫的標識碼。 Yes
id 字串(唯讀) 計算機工具呼叫輸出的識別碼。 Yes
輸出 OpenAI.Computer截圖圖片 計算機螢幕快照影像,與計算機使用工具搭配使用。 Yes
狀態 列舉 訊息輸入的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回輸入項目時填入。
可能的值:in_progress、、 completedincomplete
No
型別 列舉 計算機工具呼叫輸出的類型。 一律為 computer_call_output。
可能的數值: computer_call_output
Yes computer_call_output

OpenAI.ItemResourceCustomToolCallOutputResource

回應自訂工具呼叫輸出項目

Name 類型 Description Required 預設值
call_id 字串 呼叫 ID,用來將這個自訂工具呼叫輸出對應到自訂工具呼叫。 Yes
創建者 字串 創建該項目的演員識別碼。 No
id 字串 OpenAI 平台中自訂工具呼叫輸出的唯一 ID。 No
輸出 OpenAI.FunctionAndCustomToolCallOutput 的字串或陣列 你的程式碼產生的自訂工具呼叫輸出。
可以是字串或輸出內容的清單。
Yes
狀態 OpenAI.FunctionCallOutputStatusEnum Yes
型別 列舉 自訂工具呼叫輸出的類型。 一律為 custom_tool_call_output。
可能的數值: custom_tool_call_output
Yes

OpenAI.ItemResourceCustomToolCallResource

回應自訂工具呼叫項目

Name 類型 Description Required 預設值
call_id 字串 一個用於將此自訂工具呼叫映射到工具呼叫輸出的識別碼。 Yes
創建者 字串 創建該項目的演員識別碼。 No
id 字串 OpenAI 平台自訂工具呼叫的唯一 ID。 No
輸入 字串 模型產生的自訂工具呼叫輸入。 Yes
名字 字串 正在被呼叫的自訂工具名稱。 Yes
命名空間 字串 被呼叫的自訂工具命名空間。 No
狀態 OpenAI.FunctionCallStatus Yes
型別 列舉 自訂工具呼叫的類型。 一律為 custom_tool_call。
可能的數值: custom_tool_call
Yes

OpenAI.ItemResourceFileSearchToolCall

檔案搜尋工具呼叫

檔案搜尋工具呼叫的結果。

Name 類型 Description Required 預設值
id 字串 檔案搜尋工具呼叫的唯一標識符。 Yes
查詢 字串陣列 用來搜尋檔案的查詢。 Yes
results OpenAI.FileSearchToolCallResults 的陣列或 null No
狀態 列舉 檔案搜尋工具呼叫的狀態。 下列其中一項:in_progress
searching、 或 incomplete、 failed
可能的值:in_progress、searching、completed、incomplete、failed
Yes
型別 列舉 檔案搜尋工具呼叫的類型。 一律為 file_search_call。
可能的數值: file_search_call
Yes

OpenAI.ItemResourceFunctionShellCall

殼層工具呼叫

一個在受管理環境中執行一個或多個 shell 指令的工具呼叫。

Name 類型 Description Required 預設值
動作 OpenAI.FunctionShellAction 執行一個殼狀指令。 Yes
└─ 指令 字串陣列 Yes
└─ max_output_length 整數或零 Yes
└─ timeout_ms 整數或零 Yes
call_id 字串 模型產生的殼層工具呼叫的唯一 ID。 Yes
創建者 字串 創建這個工具呼叫的實體的 ID。 No
環境 OpenAI.FunctionShellCallEnvironment 或 null Yes
id 字串 shell 工具呼叫的唯一 ID。 透過 API 傳回此項目時填入。 Yes
狀態 OpenAI.FunctionShellCallStatus Yes
型別 列舉 物品的種類。 一律為 shell_call。
可能的數值: shell_call
Yes shell_call

OpenAI.ItemResourceFunctionShellCallOutput

殼層呼叫輸出

是 shell 工具呼叫所發出的輸出。

Name 類型 Description Required 預設值
call_id 字串 模型產生的殼層工具呼叫的唯一 ID。 Yes
創建者 字串 創建該項目的演員識別碼。 No
id 字串 shell呼叫輸出的唯一ID。 透過 API 傳回此項目時填入。 Yes
max_output_length 整數或零 Yes
輸出 OpenAI.FunctionShellCallOutputContent 的陣列 一個包含 shell 呼叫輸出內容的陣列 Yes
狀態 OpenAI.FunctionShellCallOutputStatusEnum Yes
型別 列舉 shell呼叫輸出的類型。 一律為 shell_call_output。
可能的數值: shell_call_output
Yes shell_call_output

OpenAI.ItemResourceFunctionToolCall

函式工具呼叫

執行函式的工具呼叫。

Name 類型 Description Required 預設值
arguments 字串 要傳遞至函式的引數 JSON 字串。 Yes
call_id 字串 模型所產生的函式工具呼叫的唯一標識符。 Yes
id 字串(唯讀) 函數工具呼叫的唯一標識碼。 Yes
名字 字串 要執行的函式名稱。 Yes
命名空間 字串 要執行的函式命名空間。 No
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
No
型別 列舉 函式工具呼叫的類型。 一律為 function_call。
可能的數值: function_call
Yes

OpenAI.ItemResourceFunctionToolCallOutput

函式工具呼叫輸出

函式工具呼叫的輸出。

Name 類型 Description Required 預設值
call_id 字串 模型所產生的函式工具呼叫的唯一標識符。 Yes
id 字串(唯讀) 函式工具呼叫輸出的唯一標識碼。 當這個項目時,已填滿
透過 API 回傳。
Yes
輸出 OpenAI.FunctionAndCustomToolCallOutput 的字串或陣列 是你程式碼產生的函式呼叫輸出。
可以是字串或輸出內容的清單。
Yes
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
No
型別 列舉 函數工具呼叫輸出類型。 一律為 function_call_output。
可能的數值: function_call_output
Yes

OpenAI.ItemResourceImageGenToolCall

影像生成呼叫

模型提出的圖像生成要求。

Name 類型 Description Required 預設值
id 字串 影像生成呼叫的唯一 ID。 Yes
result 字串或空 Yes
狀態 列舉 影像生成通話狀態。
可能的值:in_progress、、completed、 generatingfailed
Yes
型別 列舉 影像生成呼叫的類型。 一律為 image_generation_call。
可能的數值: image_generation_call
Yes

OpenAI.ItemResourceInputMessage

輸入訊息

具有角色的訊息輸入至模型,指出下列階層的指示。 由 developer 或 system 角色給出的指示優先於由角色 user 給出的指示。

Name 類型 Description Required 預設值
內容 OpenAI.InputMessageContentList 一個或多個輸入項目的清單,包含不同內容
types.
Yes
id 字串(唯讀) 訊息輸入的唯一標識碼。 Yes
角色 列舉 訊息輸入的作用。 user、system 或 developer 的其中之一。
可能的值:user、、 systemdeveloper
Yes
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
No
型別 列舉 訊息輸入的類型。 一律設定為 message。
可能的數值: message
Yes 訊息

OpenAI.ItemResourceLocalShellToolCall

局部殼叫

在本機殼層上執行命令的工具呼叫。

Name 類型 Description Required 預設值
動作 OpenAI.LocalShellExecAction 在伺服器上執行殼層命令。 Yes
call_id 字串 模型所產生的本機殼層工具呼叫的唯一識別碼。 Yes
id 字串 本地 shell 呼叫的唯一 ID。 Yes
狀態 列舉 本地空殼通話狀態。
可能的值:in_progress、、 completedincomplete
Yes
型別 列舉 本地 shell 呼叫的類型。 一律為 local_shell_call。
可能的數值: local_shell_call
Yes

OpenAI.ItemResourceLocalShellToolCallOutput

本地殼層呼叫輸出

本機 Shell 工具呼叫的輸出。

Name 類型 Description Required 預設值
id 字串 模型所產生的本機殼層工具呼叫的唯一識別碼。 Yes
輸出 字串 本機殼層工具呼叫輸出的 JSON 字串。 Yes
狀態 字串或空 No
型別 列舉 本地殼層工具呼叫輸出的類型。 一律為 local_shell_call_output。
可能的數值: local_shell_call_output
Yes

OpenAI.ItemResourceMcpApprovalRequest

MCP 核准申請

要求人工核准工具叫用。

Name 類型 Description Required 預設值
arguments 字串 工具的自變數 JSON 字串。 Yes
id 字串 核准申請的唯一 ID。 Yes
名字 字串 要執行的工具名稱。 Yes
伺服器標籤 字串 發出要求的 MCP 伺服器的標籤。 Yes
型別 列舉 物品的種類。 一律為 mcp_approval_request。
可能的數值: mcp_approval_request
Yes

OpenAI.ItemResourceMcpApprovalResponseResource

MCP 核准回應

對 MCP 核准申請的回應。

Name 類型 Description Required 預設值
approval_request_id 字串 正在回應之核准要求的識別碼。 Yes
approve boolean 是否已核准要求。 Yes
id 字串 核准回應的唯一識別碼 Yes
reason 字串或空 No
型別 列舉 物品的種類。 一律為 mcp_approval_response。
可能的數值: mcp_approval_response
Yes

OpenAI.ItemResourceMcpListTools

MCP 清單工具

MCP 伺服器上可用的工具清單。

Name 類型 Description Required 預設值
錯誤 OpenAI.RealtimeMCPError No
id 字串 名單的唯一ID。 Yes
伺服器標籤 字串 MCP 伺服器的標籤。 Yes
工具 OpenAI.MCPListToolsTool 的 array 伺服器上可用的工具。 Yes
型別 列舉 物品的種類。 一律為 mcp_list_tools。
可能的數值: mcp_list_tools
Yes

OpenAI.ItemResourceMcpToolCall

MCP 工具呼叫

MCP 伺服器上的工具叫用。

Name 類型 Description Required 預設值
approval_request_id 字串或空 No
arguments 字串 傳遞到工具的參數所構成的 JSON 字串。 Yes
錯誤 OpenAI.RealtimeMCPError No
id 字串 工具呼叫的唯一 ID。 Yes
名字 字串 執行的工具名稱。 Yes
輸出 字串或空 No
伺服器標籤 字串 執行此工具之 MCP 伺服器的標籤。 Yes
狀態 OpenAI.MCPToolCallStatus(開放AI.MCPToolCallStatus) No
型別 列舉 物品的種類。 一律為 mcp_call。
可能的數值: mcp_call
Yes

OpenAI.ItemResourceOutputMessage

輸出訊息

來自模型的輸出訊息。

Name 類型 Description Required 預設值
內容 OpenAI 的陣列 。OutputMessageContent 輸出訊息的內容。 Yes
id 字串 輸出訊息的唯一標識碼。 Yes
階段 OpenAI.MessagePhase 或 null No
角色 列舉 輸出訊息的角色。 一律為 assistant。
可能的數值: assistant
Yes
狀態 列舉 訊息輸入的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回輸入項目時填入。
可能的值:in_progress、、 completedincomplete
Yes
型別 列舉 輸出訊息的類型。 一律為 message。
可能的數值: output_message
Yes

OpenAI.ItemResourceReasoningItem

Reasoning

產生回應時,推理模型所使用之思想鏈結的描述。 如果您要手動管理內容,請務必將這些項目包含在回應 API 的 input 中,以進行後續的交談回合。

Name 類型 Description Required 預設值
內容 OpenAI 的陣列 。ReasoningTextContent 推理文本內容。 No
encrypted_content 字串或空 No
id 字串 推理內容的唯一標識碼。 Yes
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
No
摘要 OpenAI 的陣列 。摘要文字內容 推理摘要內容。 Yes
型別 列舉 物件的類型。 一律為 reasoning。
可能的數值: reasoning
Yes

OpenAI.ItemResourceToolSearchCall

Name 類型 Description Required 預設值
arguments 用於工具搜尋呼叫的參數。 Yes
call_id 字串或空 Yes
創建者 字串 創建該項目的演員識別碼。 No
執行 OpenAI.ToolSearchExecutionType Yes
id 字串 工具搜尋呼叫項目的唯一 ID。 Yes
狀態 OpenAI.FunctionCallStatus Yes
型別 列舉 物品的種類。 一律為 tool_search_call。
可能的數值: tool_search_call
Yes tool_search_call

OpenAI.ItemResourceToolSearchOutput

Name 類型 Description Required 預設值
call_id 字串或空 Yes
創建者 字串 創建該項目的演員識別碼。 No
執行 OpenAI.ToolSearchExecutionType Yes
id 字串 工具搜尋輸出項目的唯一 ID。 Yes
狀態 OpenAI.FunctionCallOutputStatusEnum Yes
工具 OpenAI.Tool 的陣列 工具搜尋會回傳載入的工具定義。 Yes
型別 列舉 物品的種類。 一律為 tool_search_output。
可能的數值: tool_search_output
Yes tool_search_output

OpenAI.ItemResourceType

Property 價值
Type 字串
價值 message
output_message
file_search_call
computer_call
computer_call_output
web_search_call
function_call
function_call_output
tool_search_call
tool_search_output
reasoning
compaction
image_generation_call
code_interpreter_call
local_shell_call
local_shell_call_output
shell_call
shell_call_output
apply_patch_call
apply_patch_call_output
mcp_list_tools
mcp_approval_request
mcp_approval_response
mcp_call
custom_tool_call
custom_tool_call_output

OpenAI.ItemResourceWebSearchToolCall

網路搜尋工具呼叫

網路搜尋工具的結果。

Name 類型 Description Required 預設值
動作 OpenAI.WebSearchActionSearch 或 OpenAI.WebSearchActionOpenPage 或 OpenAI.WebSearchActionFind 一個描述此網路搜尋呼叫中具體行動的物件。
包含模型如何使用網路(搜尋、open_page、find_in_page)的細節。
Yes
id 字串 網路搜尋工具呼叫的唯一 ID。 Yes
狀態 列舉 Web 搜尋工具呼叫的狀態。
可能的值:in_progress、、searching、 completedfailed
Yes
型別 列舉 網路搜尋工具的呼叫類型。 一律為 web_search_call。
可能的數值: web_search_call
Yes

OpenAI.KeyPressAction

KeyPress

模型想要執行的按鍵集合。

Name 類型 Description Required 預設值
keys 字串陣列 模型要求按下的按鍵組合。 這是字串陣列,每個字串都代表索引鍵。 Yes
型別 列舉 指定事件類型。 對於 keypress 動作,這個屬性一律會設定為 keypress。
可能的數值: keypress
Yes 按鍵

OpenAI.LocalEnvironmentResource

當地環境

代表利用本地環境執行殼層動作。

Name 類型 Description Required 預設值
型別 列舉 環境類型。 一律為 local。
可能的數值: local
Yes 區域

OpenAI.LocalShellExecAction

地方空殼執行委員會行動

在伺服器上執行殼層命令。

Name 類型 Description Required 預設值
command 字串陣列 逃跑的命令。 Yes
env 物件 要為命令設定的環境變數。 Yes
timeout_ms 整數或零 No
型別 列舉 本地命令介面操作的類型。 一律為 exec。
可能的數值: exec
Yes exec
使用者 字串或空 No
工作目錄 字串或空 No

OpenAI.LocalShellToolParam

本地殼層工具

允許模型在本機環境中執行殼層命令的工具。

Name 類型 Description Required 預設值
型別 列舉 本地 shell 工具的類型。 一律為 local_shell。
可能的數值: local_shell
Yes local_shell

OpenAI.LocalSkillParam

Name 類型 Description Required 預設值
描述 字串 技能描述。 Yes
名字 字串 這個技能的名字。 Yes
路徑 字串 指向包含該技能的目錄的路徑。 Yes

OpenAI.LogProb

對數機率

詞元的對數機率。

Name 類型 Description Required 預設值
bytes 整數陣列 Yes
logprob 編號 Yes
Token 字串 Yes
top_logprobs OpenAI.TopLogProb 的陣列 Yes

OpenAI.MCPListToolsTool

MCP 清單工具工具

MCP 伺服器上可用的工具。

Name 類型 Description Required 預設值
annotations OpenAI.MCPListToolsToolAnnotations 或 null No
描述 字串或空 No
input_schema OpenAI.MCPListToolsToolInputSchema Yes
名字 字串 工具的名稱。 Yes

OpenAI.MCPListToolsToolAnnotations

類型:物件

OpenAI.MCPListToolsToolInputSchema

類型:物件

OpenAI.MCPTool

MCP 工具

透過遠端模型情境協定(MCP)伺服器,讓模型能夠存取更多工具。

Name 類型 Description Required 預設值
允許的工具 字串陣列或 OpenAI.MCPToolFilter 或 null No
授權 字串 一種可與遠端 MCP 伺服器共用的 OAuth 存取權杖,以下為
並可自訂 MCP 伺服器 URL 或服務連接器。 您的應用程式
必須處理 OAuth 授權流程,並在此提供令牌。
No
connector_id 列舉 服務連接器的識別碼,例如 ChatGPT 中的連接器。 其中之一
server_url 或 connector_id 必須提供。 了解更多關於服務的資訊
這裡是連接器。
目前支援 connector_id 的數值有:
- Dropbox: connector_dropbox
- Gmail: connector_gmail
- Google 日曆: connector_googlecalendar
- Google 雲端硬碟: connector_googledrive
- Microsoft Teams:connector_microsoftteams
- Outlook 日曆:connector_outlookcalendar
- Outlook 電子郵件:connector_outlookemail
- SharePoint:connector_sharepoint
可能的值:connector_dropbox、、、connector_gmailconnector_googlecalendarconnector_googledrive、、、、、connector_microsoftteamsconnector_outlookcalendarconnector_outlookemailconnector_sharepoint
No
defer_loading boolean 是否會將此 MCP 工具延遲或透過工具搜尋發現。 No
headers 物件或空 No
需核准 OpenAI.MCPToolRequireApproval 或 string 或 null No
server_description 字串 MCP 伺服器的可選描述,用以提供更多背景說明。 No
伺服器標籤 字串 此 MCP 伺服器的標籤,用來在工具呼叫中識別它。 Yes
伺服器_URL 字串(URI) MCP 伺服器的 URL。 其中一 server_url 例 connector_id 必為
提供。
No
型別 列舉 MCP 工具的類型。 一律為 mcp。
可能的數值: mcp
Yes

OpenAI.MCPToolCallStatus(開放AI.MCPToolCallStatus)

Property 價值
Type 字串
價值 in_progress
completed
incomplete
calling
failed

OpenAI.MCPToolFilter

MCP 工具過濾器

一個篩選物件用來指定允許使用哪些工具。

Name 類型 Description Required 預設值
read_only boolean 表示工具是否會修改資料或為唯讀。 如果
MCP 伺服器標 註為 readOnlyHint,
它會符合這個過濾器。
No
tool_names 字串陣列 允許的工具名稱清單。 No

OpenAI.MCPToolRequireApproval

Name 類型 Description Required 預設值
永遠 OpenAI.MCPToolFilter 一個篩選物件用來指定允許使用哪些工具。 No
從不 OpenAI.MCPToolFilter 一個篩選物件用來指定允許使用哪些工具。 No

OpenAI.訊息內容

構成輸入或輸出項目的內容部分。

OpenAI 的判別器。訊息內容

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
text OpenAI.TextContent
computer_screenshot OpenAI.Computer截圖內容
input_text OpenAI.訊息內容輸入文字內容
output_text OpenAI.訊息內容輸出文字內容
reasoning_text OpenAI.訊息內容推理文字內容
refusal OpenAI.訊息內容拒絕內容
input_image OpenAI.訊息內容輸入影像內容
input_file OpenAI.訊息內容輸入檔案內容
summary_text OpenAI.摘要文字內容
Name 類型 Description Required 預設值
型別 OpenAI.MessageContentType Yes

OpenAI.訊息內容輸入檔案內容

輸入檔案

模型的檔案輸入。

Name 類型 Description Required 預設值
細節 OpenAI.FileInputDetail No
file_data 字串 要傳送至模型的檔案內容。 No
檔案識別碼 (file_id) 字串或空 No
file_url 字串(URI) 要傳送給模型的檔案網址。 No
filename 字串 要傳送至模型的檔案名稱。 No
型別 列舉 輸入項目的型別。 一律為 input_file。
可能的數值: input_file
Yes input_file

OpenAI.訊息內容輸入影像內容

輸入影像

輸入至模型的影像

Name 類型 Description Required 預設值
細節 OpenAI.ImageDetail Yes
檔案識別碼 (file_id) 字串或空 No
image_url 字串或空 No
型別 列舉 輸入項目的型別。 一律為 input_image。
可能的數值: input_image
Yes input_image

OpenAI.訊息內容輸入文字內容

輸入文字

模型的文字輸入。

Name 類型 Description Required 預設值
收發簡訊 字串 模型的文字輸入。 Yes
型別 列舉 輸入項目的型別。 一律為 input_text。
可能的數值: input_text
Yes input_text

OpenAI.訊息內容輸出文字內容

輸出文字

模型的文字輸出。

Name 類型 Description Required 預設值
annotations OpenAI 的 array 。註解 文字輸出的註釋。 Yes
logprobs OpenAI.LogProb 的陣列 Yes
收發簡訊 字串 模型的文字輸出。 Yes
型別 列舉 輸出文字的類型。 一律為 output_text。
可能的數值: output_text
Yes output_text

OpenAI.訊息內容推理文字內容

推理文本

模型的推理文本。

Name 類型 Description Required 預設值
收發簡訊 字串 模型的推理文本。 Yes
型別 列舉 推理文本的類型。 一律為 reasoning_text。
可能的數值: reasoning_text
Yes reasoning_text

OpenAI.訊息內容拒絕內容

Refusal

模型拒絕回應。

Name 類型 Description Required 預設值
拒絕 字串 模型的拒絕說明。 Yes
型別 列舉 拒絕的類型。 一律為 refusal。
可能的數值: refusal
Yes 拒絕

OpenAI.MessageContentType

Property 價值
Type 字串
價值 input_text
output_text
text
summary_text
reasoning_text
refusal
input_image
computer_screenshot
input_file

OpenAI.MessagePhase

將訊息標記 assistant 為中間評論(commentary)或最終答案(final_answer)。 對於類似 gpt-5.3-codex 及更後續的型號,發送後續請求時,請保留並重發所有助理訊息的階段——若放棄,可能會降低效能。 不用於用戶訊息。

Property 價值
Type 字串
價值 commentary
final_answer

OpenAI.Metadata

一組 16 組可附加於物件的鍵值對。 這很適合用來以結構化格式儲存物件的其他資訊,以及透過 API 或儀錶板查詢物件。 鍵是長度最大為 64 字元的字串。 值是長度最大為 512 字元的字串。

類型:物件

OpenAI.MoveParam

Move

滑鼠移動動作。

Name 類型 Description Required 預設值
keys 字串或空的陣列 No
型別 列舉 指定事件類型。 對於移動動作,這個屬性一律會設定為 move。
可能的數值: move
Yes 移動
x 整數 要作為移動目的地的 X 座標。 Yes
y 整數 要作為移動目的地的 Y 座標。 Yes

OpenAI.NamespaceToolParam

Namespace

群組功能/自訂工具在共享命名空間下。

Name 類型 Description Required 預設值
描述 字串 模型中顯示的命名空間描述。
限制條件: 最小長度:1
Yes
名字 字串 工具呼叫中使用的命名空間名稱(例如, crm。
限制條件: 最小長度:1
Yes
工具 OpenAI.FunctionToolParam 或 OpenAI.CustomToolParam 的 array 此命名空間內可用的函式/自訂工具。
限制: 最小項目:1
Yes
型別 列舉 工具的類型。 一律為 namespace。
可能的數值: namespace
Yes 命名空間

OpenAI.OutputContent

OpenAI 的判別器。OutputContent

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
output_text OpenAI.OutputContentOutputTextContent
refusal OpenAI.OutputContentRefusalContent
reasoning_text OpenAI.OutputContentReasoningTextContent
Name 類型 Description Required 預設值
型別 OpenAI.OutputContentType Yes

OpenAI.OutputContentOutputTextContent

輸出文字

模型的文字輸出。

Name 類型 Description Required 預設值
annotations OpenAI 的 array 。註解 文字輸出的註釋。 Yes
logprobs OpenAI.LogProb 的陣列 Yes
收發簡訊 字串 模型的文字輸出。 Yes
型別 列舉 輸出文字的類型。 一律為 output_text。
可能的數值: output_text
Yes output_text

OpenAI.OutputContentReasoningTextContent

推理文本

模型的推理文本。

Name 類型 Description Required 預設值
收發簡訊 字串 模型的推理文本。 Yes
型別 列舉 推理文本的類型。 一律為 reasoning_text。
可能的數值: reasoning_text
Yes reasoning_text

OpenAI.OutputContentRefusalContent

Refusal

模型拒絕回應。

Name 類型 Description Required 預設值
拒絕 字串 模型的拒絕說明。 Yes
型別 列舉 拒絕的類型。 一律為 refusal。
可能的數值: refusal
Yes 拒絕

OpenAI.OutputContentType

Property 價值
Type 字串
價值 output_text
refusal
reasoning_text

OpenAI.OutputItem

OpenAI 判別器。OutputItem

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
output_message OpenAI.OutputItemOutputMessage
file_search_call OpenAI.OutputItemFileSearchToolCall
function_call OpenAI.OutputItemFunctionToolCall
function_call_output OpenAI.OutputItemFunctionToolCallOutput
web_search_call OpenAI.OutputItemWebSearchToolCall
computer_call OpenAI.OutputItemComputerToolCall
computer_call_output OpenAI.OutputItemComputerToolCallOutput
reasoning OpenAI.OutputItemReasoningItem
tool_search_call OpenAI.OutputItemToolSearchCall
tool_search_output OpenAI.OutputItemToolSearchOutput
compaction OpenAI.OutputItemCompactionBody
image_generation_call OpenAI.OutputItemImageGenToolCall
code_interpreter_call OpenAI.OutputItemCodeInterpreterToolCall
local_shell_call OpenAI.OutputItemLocalShellToolCall
local_shell_call_output OpenAI.OutputItemLocalShellToolCallOutput
shell_call OpenAI.OutputItemFunctionShellCall
shell_call_output OpenAI.OutputItemFunctionShellCallOutput
apply_patch_call OpenAI.OutputItemApplyPatchToolCall
apply_patch_call_output OpenAI.OutputItemApplyPatchToolCallOutput
mcp_call OpenAI.OutputItemMcpToolCall
mcp_list_tools OpenAI.OutputItemMcpListTools
mcp_approval_request OpenAI.OutputItemMcpApprovalRequest
mcp_approval_response OpenAI.OutputItemMcpApprovalResponseResource
custom_tool_call OpenAI.OutputItemCustomToolCallResource
custom_tool_call_output OpenAI.OutputItemCustomToolCallOutputResource
tool_approval_request AzureToolApprovalRequest
Name 類型 Description Required 預設值
型別 OpenAI.OutputItemType Yes

OpenAI.OutputItemApplyPatchToolCall

套用補丁工具呼叫

一個工具呼叫,透過建立、刪除或更新檔案來套用檔案差異。

Name 類型 Description Required 預設值
call_id 字串 模型產生的套用補丁工具呼叫的唯一 ID。 Yes
創建者 字串 創建這個工具呼叫的實體的 ID。 No
id 字串 套用補丁工具呼叫的唯一 ID。 透過 API 傳回此項目時填入。 Yes
作業 OpenAI.ApplyPatchFileOperation 其中一種create_file、delete_file或update_file操作透過apply_patch應用。 Yes
\---- 類型 OpenAI.ApplyPatchFileOperationType Yes
狀態 OpenAI.ApplyPatchCallStatus(開放AI)。ApplyPatchCallStatus(查詢狀態) Yes
型別 列舉 物品的種類。 一律為 apply_patch_call。
可能的數值: apply_patch_call
Yes apply_patch_call

OpenAI.OutputItemApplyPatchToolCallOutput

套用補丁工具呼叫輸出

由 apply patch tool 呼叫所輸出的輸出。

Name 類型 Description Required 預設值
call_id 字串 模型產生的套用補丁工具呼叫的唯一 ID。 Yes
創建者 字串 建立此工具的實體 ID 呼叫輸出。 No
id 字串 apply patch 工具呼叫輸出的唯一 ID。 透過 API 傳回此項目時填入。 Yes
輸出 字串或空 No
狀態 OpenAI.ApplyPatchCallOutputStatus Yes
型別 列舉 物品的種類。 一律為 apply_patch_call_output。
可能的數值: apply_patch_call_output
Yes apply_patch_call_output

OpenAI.OutputItemCodeInterpreterToolCall

程式碼直譯器工具呼叫

執行程式代碼的工具呼叫。

Name 類型 Description Required 預設值
字碼 字串或空 Yes
container_id 字串 用來執行程式代碼之容器的標識碼。 Yes
id 字串 程式代碼解釋器工具呼叫的唯一標識符。 Yes
outputs OpenAI.CodeInterpreterOutputLogs 或 OpenAI.CodeInterpreterOutputImage 或 null 的陣列 Yes
狀態 列舉 程式代碼解釋器工具呼叫的狀態。 有效值為 in_progress、completed、incomplete、interpreting 和 failed。
可能的值:in_progress、completed、incomplete、interpreting、failed
Yes
型別 列舉 程式代碼解釋器工具呼叫的類型。 一律為 code_interpreter_call。
可能的數值: code_interpreter_call
Yes code_interpreter_call

OpenAI.OutputItemCompactionBody

壓縮項目

API產生 v1/responses/compact 的壓縮項目。

Name 類型 Description Required 預設值
創建者 字串 創建該項目的演員識別碼。 No
encrypted_content 字串 由壓縮產生的加密內容。 Yes
id 字串 壓縮項目的唯一 ID。 Yes
型別 列舉 物品的種類。 一律為 compaction。
可能的數值: compaction
Yes 壓縮

OpenAI.OutputItemComputerToolCall

電腦工具呼叫

對電腦使用工具發出的工具呼叫。

Name 類型 Description Required 預設值
動作 OpenAI.ComputerAction No
actions OpenAI.ComputerActionList 對 的扁平批次動作。computer_use 每個行動包含
type 判別器與動作專屬領域。
No
call_id 字串 使用輸出回應工具呼叫時所使用的識別碼。 Yes
id 字串 計算機呼叫的唯一標識碼。 Yes
pending_safety_checks OpenAI.ComputerCallCallSafetyCheckParam 的陣列 電腦呼叫的擱置安全性檢查。 Yes
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
Yes
型別 列舉 計算機呼叫的類型。 一律為 computer_call。
可能的數值: computer_call
Yes computer_call

OpenAI.OutputItemComputerToolCallOutput

電腦工具呼叫輸出

電腦工具呼叫的輸出。

Name 類型 Description Required 預設值
acknowledged_safety_checks OpenAI.ComputerCallCallSafetyCheckParam 的陣列 API 報告的安全檢查已得到以下項目的認可:
開發人員。
No
call_id 字串 產生輸出之計算機工具呼叫的標識碼。 Yes
id 字串(唯讀) 計算機工具呼叫輸出的識別碼。 Yes
輸出 OpenAI.Computer截圖圖片 計算機螢幕快照影像,與計算機使用工具搭配使用。 Yes
狀態 列舉 訊息輸入的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回輸入項目時填入。
可能的值:in_progress、、 completedincomplete
No
型別 列舉 計算機工具呼叫輸出的類型。 一律為 computer_call_output。
可能的數值: computer_call_output
Yes computer_call_output

OpenAI.OutputItemCustomToolCallOutputResource

回應自訂工具呼叫輸出項目

Name 類型 Description Required 預設值
call_id 字串 呼叫 ID,用來將這個自訂工具呼叫輸出對應到自訂工具呼叫。 Yes
創建者 字串 創建該項目的演員識別碼。 No
id 字串 OpenAI 平台中自訂工具呼叫輸出的唯一 ID。 No
輸出 OpenAI.FunctionAndCustomToolCallOutput 的字串或陣列 你的程式碼產生的自訂工具呼叫輸出。
可以是字串或輸出內容的清單。
Yes
狀態 OpenAI.FunctionCallOutputStatusEnum Yes
型別 列舉 自訂工具呼叫輸出的類型。 一律為 custom_tool_call_output。
可能的數值: custom_tool_call_output
Yes

OpenAI.OutputItemCustomToolCallResource

回應自訂工具呼叫項目

Name 類型 Description Required 預設值
call_id 字串 一個用於將此自訂工具呼叫映射到工具呼叫輸出的識別碼。 Yes
創建者 字串 創建該項目的演員識別碼。 No
id 字串 OpenAI 平台自訂工具呼叫的唯一 ID。 No
輸入 字串 模型產生的自訂工具呼叫輸入。 Yes
名字 字串 正在被呼叫的自訂工具名稱。 Yes
命名空間 字串 被呼叫的自訂工具命名空間。 No
狀態 OpenAI.FunctionCallStatus Yes
型別 列舉 自訂工具呼叫的類型。 一律為 custom_tool_call。
可能的數值: custom_tool_call
Yes

OpenAI.OutputItemFileSearchToolCall

檔案搜尋工具呼叫

檔案搜尋工具呼叫的結果。

Name 類型 Description Required 預設值
id 字串 檔案搜尋工具呼叫的唯一標識符。 Yes
查詢 字串陣列 用來搜尋檔案的查詢。 Yes
results OpenAI.FileSearchToolCallResults 的陣列或 null No
狀態 列舉 檔案搜尋工具呼叫的狀態。 下列其中一項:in_progress
searching、 或 incomplete、 failed
可能的值:in_progress、searching、completed、incomplete、failed
Yes
型別 列舉 檔案搜尋工具呼叫的類型。 一律為 file_search_call。
可能的數值: file_search_call
Yes

OpenAI.OutputItemFunctionShellCall

殼層工具呼叫

一個在受管理環境中執行一個或多個 shell 指令的工具呼叫。

Name 類型 Description Required 預設值
動作 OpenAI.FunctionShellAction 執行一個殼狀指令。 Yes
└─ 指令 字串陣列 Yes
└─ max_output_length 整數或零 Yes
└─ timeout_ms 整數或零 Yes
call_id 字串 模型產生的殼層工具呼叫的唯一 ID。 Yes
創建者 字串 創建這個工具呼叫的實體的 ID。 No
環境 OpenAI.FunctionShellCallEnvironment 或 null Yes
id 字串 shell 工具呼叫的唯一 ID。 透過 API 傳回此項目時填入。 Yes
狀態 OpenAI.FunctionShellCallStatus Yes
型別 列舉 物品的種類。 一律為 shell_call。
可能的數值: shell_call
Yes shell_call

OpenAI.OutputItemFunctionShellCallOutput

殼層呼叫輸出

是 shell 工具呼叫所發出的輸出。

Name 類型 Description Required 預設值
call_id 字串 模型產生的殼層工具呼叫的唯一 ID。 Yes
創建者 字串 創建該項目的演員識別碼。 No
id 字串 shell呼叫輸出的唯一ID。 透過 API 傳回此項目時填入。 Yes
max_output_length 整數或零 Yes
輸出 OpenAI.FunctionShellCallOutputContent 的陣列 一個包含 shell 呼叫輸出內容的陣列 Yes
狀態 OpenAI.FunctionShellCallOutputStatusEnum Yes
型別 列舉 shell呼叫輸出的類型。 一律為 shell_call_output。
可能的數值: shell_call_output
Yes shell_call_output

OpenAI.OutputItemFunctionToolCall

函式工具呼叫

執行函式的工具呼叫。

Name 類型 Description Required 預設值
arguments 字串 要傳遞至函式的引數 JSON 字串。 Yes
call_id 字串 模型所產生的函式工具呼叫的唯一標識符。 Yes
id 字串(唯讀) 函數工具呼叫的唯一標識碼。 Yes
名字 字串 要執行的函式名稱。 Yes
命名空間 字串 要執行的函式命名空間。 No
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
No
型別 列舉 函式工具呼叫的類型。 一律為 function_call。
可能的數值: function_call
Yes

OpenAI.OutputItemFunctionToolCallOutput

函式工具呼叫輸出

函式工具呼叫的輸出。

Name 類型 Description Required 預設值
call_id 字串 模型所產生的函式工具呼叫的唯一標識符。 Yes
id 字串(唯讀) 函式工具呼叫輸出的唯一標識碼。 當這個項目時,已填滿
透過 API 回傳。
Yes
輸出 OpenAI.FunctionAndCustomToolCallOutput 的字串或陣列 是你程式碼產生的函式呼叫輸出。
可以是字串或輸出內容的清單。
Yes
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
No
型別 列舉 函數工具呼叫輸出類型。 一律為 function_call_output。
可能的數值: function_call_output
Yes

OpenAI.OutputItemImageGenToolCall

影像生成呼叫

模型提出的圖像生成要求。

Name 類型 Description Required 預設值
id 字串 影像生成呼叫的唯一 ID。 Yes
result 字串或空 Yes
狀態 列舉 影像生成通話狀態。
可能的值:in_progress、、completed、 generatingfailed
Yes
型別 列舉 影像生成呼叫的類型。 一律為 image_generation_call。
可能的數值: image_generation_call
Yes

OpenAI.OutputItemLocalShellToolCall

局部殼叫

在本機殼層上執行命令的工具呼叫。

Name 類型 Description Required 預設值
動作 OpenAI.LocalShellExecAction 在伺服器上執行殼層命令。 Yes
call_id 字串 模型所產生的本機殼層工具呼叫的唯一識別碼。 Yes
id 字串 本地 shell 呼叫的唯一 ID。 Yes
狀態 列舉 本地空殼通話狀態。
可能的值:in_progress、、 completedincomplete
Yes
型別 列舉 本地 shell 呼叫的類型。 一律為 local_shell_call。
可能的數值: local_shell_call
Yes

OpenAI.OutputItemLocalShellToolCallOutput

本地殼層呼叫輸出

本機 Shell 工具呼叫的輸出。

Name 類型 Description Required 預設值
id 字串 模型所產生的本機殼層工具呼叫的唯一識別碼。 Yes
輸出 字串 本機殼層工具呼叫輸出的 JSON 字串。 Yes
狀態 字串或空 No
型別 列舉 本地殼層工具呼叫輸出的類型。 一律為 local_shell_call_output。
可能的數值: local_shell_call_output
Yes

OpenAI.OutputItemMcpApprovalRequest

MCP 核准申請

要求人工核准工具叫用。

Name 類型 Description Required 預設值
arguments 字串 工具的自變數 JSON 字串。 Yes
id 字串 核准申請的唯一 ID。 Yes
名字 字串 要執行的工具名稱。 Yes
伺服器標籤 字串 發出要求的 MCP 伺服器的標籤。 Yes
型別 列舉 物品的種類。 一律為 mcp_approval_request。
可能的數值: mcp_approval_request
Yes

OpenAI.OutputItemMcpApprovalResponseResource

MCP 核准回應

對 MCP 核准申請的回應。

Name 類型 Description Required 預設值
approval_request_id 字串 正在回應之核准要求的識別碼。 Yes
approve boolean 是否已核准要求。 Yes
id 字串 核准回應的唯一識別碼 Yes
reason 字串或空 No
型別 列舉 物品的種類。 一律為 mcp_approval_response。
可能的數值: mcp_approval_response
Yes

OpenAI.OutputItemMcpListTools

MCP 清單工具

MCP 伺服器上可用的工具清單。

Name 類型 Description Required 預設值
錯誤 OpenAI.RealtimeMCPError No
id 字串 名單的唯一ID。 Yes
伺服器標籤 字串 MCP 伺服器的標籤。 Yes
工具 OpenAI.MCPListToolsTool 的 array 伺服器上可用的工具。 Yes
型別 列舉 物品的種類。 一律為 mcp_list_tools。
可能的數值: mcp_list_tools
Yes

OpenAI.OutputItemMcpToolCall

MCP 工具呼叫

MCP 伺服器上的工具叫用。

Name 類型 Description Required 預設值
approval_request_id 字串或空 No
arguments 字串 傳遞到工具的參數所構成的 JSON 字串。 Yes
錯誤 OpenAI.RealtimeMCPError No
id 字串 工具呼叫的唯一 ID。 Yes
名字 字串 執行的工具名稱。 Yes
輸出 字串或空 No
伺服器標籤 字串 執行此工具之 MCP 伺服器的標籤。 Yes
狀態 OpenAI.MCPToolCallStatus(開放AI.MCPToolCallStatus) No
型別 列舉 物品的種類。 一律為 mcp_call。
可能的數值: mcp_call
Yes

OpenAI.OutputItemOutputMessage

輸出訊息

來自模型的輸出訊息。

Name 類型 Description Required 預設值
內容 OpenAI 的陣列 。OutputMessageContent 輸出訊息的內容。 Yes
id 字串 輸出訊息的唯一標識碼。 Yes
階段 OpenAI.MessagePhase 或 null No
角色 列舉 輸出訊息的角色。 一律為 assistant。
可能的數值: assistant
Yes
狀態 列舉 訊息輸入的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回輸入項目時填入。
可能的值:in_progress、、 completedincomplete
Yes
型別 列舉 輸出訊息的類型。 一律為 message。
可能的數值: output_message
Yes

OpenAI.OutputItemReasoningItem

Reasoning

產生回應時,推理模型所使用之思想鏈結的描述。 如果您要手動管理內容,請務必將這些項目包含在回應 API 的 input 中,以進行後續的交談回合。

Name 類型 Description Required 預設值
內容 OpenAI 的陣列 。ReasoningTextContent 推理文本內容。 No
encrypted_content 字串或空 No
id 字串 推理內容的唯一標識碼。 Yes
狀態 列舉 項目的狀態。 其中一個 in_progress、completed或
incomplete。 透過 API 傳回項目時填入。
可能的值:in_progress、、 completedincomplete
No
摘要 OpenAI 的陣列 。摘要文字內容 推理摘要內容。 Yes
型別 列舉 物件的類型。 一律為 reasoning。
可能的數值: reasoning
Yes

OpenAI.OutputItemToolSearchCall

Name 類型 Description Required 預設值
arguments 用於工具搜尋呼叫的參數。 Yes
call_id 字串或空 Yes
創建者 字串 創建該項目的演員識別碼。 No
執行 OpenAI.ToolSearchExecutionType Yes
id 字串 工具搜尋呼叫項目的唯一 ID。 Yes
狀態 OpenAI.FunctionCallStatus Yes
型別 列舉 物品的種類。 一律為 tool_search_call。
可能的數值: tool_search_call
Yes tool_search_call

OpenAI.OutputItemToolSearchOutput

Name 類型 Description Required 預設值
call_id 字串或空 Yes
創建者 字串 創建該項目的演員識別碼。 No
執行 OpenAI.ToolSearchExecutionType Yes
id 字串 工具搜尋輸出項目的唯一 ID。 Yes
狀態 OpenAI.FunctionCallOutputStatusEnum Yes
工具 OpenAI.Tool 的陣列 工具搜尋會回傳載入的工具定義。 Yes
型別 列舉 物品的種類。 一律為 tool_search_output。
可能的數值: tool_search_output
Yes tool_search_output

OpenAI.OutputItemType

Property 價值
Type 字串
價值 output_message
file_search_call
function_call
function_call_output
web_search_call
computer_call
computer_call_output
reasoning
tool_search_call
tool_search_output
compaction
image_generation_call
code_interpreter_call
local_shell_call
local_shell_call_output
shell_call
shell_call_output
apply_patch_call
apply_patch_call_output
mcp_call
mcp_list_tools
mcp_approval_request
mcp_approval_response
custom_tool_call
custom_tool_call_output
tool_approval_request

OpenAI.OutputItemWebSearchToolCall

網路搜尋工具呼叫

網路搜尋工具的結果。

Name 類型 Description Required 預設值
動作 OpenAI.WebSearchActionSearch 或 OpenAI.WebSearchActionOpenPage 或 OpenAI.WebSearchActionFind 一個描述此網路搜尋呼叫中具體行動的物件。
包含模型如何使用網路(搜尋、open_page、find_in_page)的細節。
Yes
id 字串 網路搜尋工具呼叫的唯一 ID。 Yes
狀態 列舉 Web 搜尋工具呼叫的狀態。
可能的值:in_progress、、searching、 completedfailed
Yes
型別 列舉 網路搜尋工具的呼叫類型。 一律為 web_search_call。
可能的數值: web_search_call
Yes

OpenAI.OutputMessageContent

OpenAI 的判別器。OutputMessageContent

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
output_text OpenAI.OutputMessageContentOutputTextContent
refusal OpenAI.OutputMessageContentRefusalContent
Name 類型 Description Required 預設值
型別 OpenAI.OutputMessageContentType Yes

OpenAI.OutputMessageContentOutputTextContent

輸出文字

模型的文字輸出。

Name 類型 Description Required 預設值
annotations OpenAI 的 array 。註解 文字輸出的註釋。 Yes
logprobs OpenAI.LogProb 的陣列 Yes
收發簡訊 字串 模型的文字輸出。 Yes
型別 列舉 輸出文字的類型。 一律為 output_text。
可能的數值: output_text
Yes output_text

OpenAI.OutputMessageContentRefusalContent

Refusal

模型拒絕回應。

Name 類型 Description Required 預設值
拒絕 字串 模型的拒絕說明。 Yes
型別 列舉 拒絕的類型。 一律為 refusal。
可能的數值: refusal
Yes 拒絕

OpenAI.OutputMessageContentType

Property 價值
Type 字串
價值 output_text
refusal

OpenAI.Prompt

關於提示範本及其變數的參考。

Name 類型 Description Required 預設值
id 字串 要使用的提示範本的唯一識別碼。 Yes
variables OpenAI.ResponsePromptVariables 或 null No
版本 字串或空 No

OpenAI.RankerVersionType

Property 價值
Type 字串
價值 auto
default-2024-11-15

OpenAI.排名選項

Name 類型 Description Required 預設值
hybrid_search OpenAI.HybridSearchOptions No
└─ embedding_weight 編號 倒數排序融合中嵌入的權重。 Yes
└─ text_weight 編號 文本權重在互惠排名融合中。 Yes
排名工具 OpenAI.RankerVersionType No
分數門檻 編號 檔案搜尋的分數閾值,數位介於 0 到 1 之間。 接近 1 的數位只會嘗試只傳回最相關的結果,但可能會傳回較少的結果。 No

OpenAI.RealtimeMCPError

OpenAI 的判別器。RealtimeMCPError

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
protocol_error OpenAI.RealtimeMCPProtocolError
tool_execution_error OpenAI.RealtimeMCPToolExecutionError
http_error OpenAI.RealtimeMCPHTTPError
Name 類型 Description Required 預設值
型別 OpenAI.RealtimeMcpErrorType Yes

OpenAI.RealtimeMCPHTTPError

即時 MCP HTTP 錯誤

Name 類型 Description Required 預設值
字碼 整數 Yes
訊息 字串 Yes
型別 列舉
可能的數值: http_error
Yes

OpenAI.RealtimeMCPProtocolError

即時 MCP 協定錯誤

Name 類型 Description Required 預設值
字碼 整數 Yes
訊息 字串 Yes
型別 列舉
可能的數值: protocol_error
Yes

OpenAI.RealtimeMCPToolExecutionError

即時 MCP 工具執行錯誤

Name 類型 Description Required 預設值
訊息 字串 Yes
型別 列舉
可能的數值: tool_execution_error
Yes

OpenAI.RealtimeMcpErrorType

Property 價值
Type 字串
價值 protocol_error
tool_execution_error
http_error

OpenAI.Reasoning

Reasoning

僅限 GPT-5 與 O 系列車型 推理模型的配置選項。

Name 類型 Description Required 預設值
投入量 OpenAI.ReasoningEffort 限制推理的努力
推理模型。
目前支援的值為 none、 minimal、 lowmediumhighxhigh和 。 減少
推理工作可能會導致更快的回應和更少的令牌使用
回應中的推理。
- gpt-5.1 預設為 none,但不執行推理。 支持的 gpt-5.1 推理值為 none、 low、 medium、 high和 。 GPT-5.1 中支援所有推理值的工具呼叫。
- 所有預設推理前gpt-5.1的模型皆不支援medium。none
- 模型 gpt-5-pro 預設(且僅支援) high 推理努力。
- xhigh 支援所有之後 gpt-5.1-codex-max的模型。
No
generate_summary 字串或空 No
摘要 字串或空 No

OpenAI.ReasoningEffort

限制推理模型的推理工作。 目前支援的值為 none、 minimal、 lowmediumhighxhigh和 。 減少推理努力能帶來更快的回應,並減少回應中用於推理的標記。

  • gpt-5.1 預設為 none,但不執行推理。 支持的 gpt-5.1 推理值為 none、 low、 medium、 high和 。 GPT-5.1 中支援所有推理值的工具呼叫。
  • 所有模型在預設推gpt-5.1理努力之前medium皆不支援none。
  • 該 gpt-5-pro 模型預設(且僅支持) high 推理努力。
  • xhigh 支援所有之後 gpt-5.1-codex-max的模型。
Property 價值
說明 限制推理的努力
推理模型。
目前支援的值為 none、 minimal、 lowmediumhighxhigh和 。 減少
推理工作可能會導致更快的回應和更少的令牌使用
回應中的推理。
- gpt-5.1 預設為 none,但不執行推理。 支持的 gpt-5.1 推理值為 none、 low、 medium、 high和 。 GPT-5.1 中支援所有推理值的工具呼叫。
- 所有預設推理前gpt-5.1的模型皆不支援medium。none
- 模型 gpt-5-pro 預設(且僅支援) high 推理努力。
- xhigh 支援所有之後 gpt-5.1-codex-max的模型。
Type 字串
價值 none
minimal
low
medium
high
xhigh

OpenAI.ReasoningTextContent

推理文本

模型的推理文本。

Name 類型 Description Required 預設值
收發簡訊 字串 模型的推理文本。 Yes
型別 列舉 推理文本的類型。 一律為 reasoning_text。
可能的數值: reasoning_text
Yes reasoning_text

OpenAI.Response

回應物件

Name 類型 Description Required 預設值
背景 布林值或零值 No
completed_at 字串或空 No
content_filters array of AzureContentFilterForResponsesAPI 內容過濾器是RAI產生的。 No
交談 OpenAI.ConversationReference 或 null No
建立於 整數(Unixtime) 建立此回應時的 Unix 時間戳(以秒為單位)。 Yes
錯誤 OpenAI.ResponseError 或 null Yes
id 字串 此回應的唯一標識碼。 Yes
incomplete_details OpenAI.ResponseIncompleteDetails 或 null Yes
instructions OpenAI.InputItem 的字串或陣列,或 null Yes
max_output_tokens 整數或零 No
最大工具呼叫次數 整數或零 No
中繼資料 OpenAI.Metadata 或 null No
型號 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
物件 列舉 此資源的物件類型 - 一律設定為 response。
可能的數值: response
Yes
輸出 OpenAI.OutputItem 的陣列 模型所產生的內容項目陣列。
- 陣列中 output 項目的長度和順序相依
針對模型的回應。
- 而不是存取 output 陣列中的第一個項目,而且
假設這是一則由 assistant 所生成的內容訊息。
模型,您可能會考慮使用 output_text 屬性,其中
在 SDK 中支持。
Yes
output_text 字串或空 No
平行工具呼叫 boolean 是否允許模型平行執行工具呼叫。 Yes 沒錯
previous_response_id 字串或空 No
提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
prompt_cache_retention 字串或空 No
reasoning OpenAI.推理 或空 No
safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
狀態 列舉 回應產生的狀態。 下列其中一項:completed、failed、
in_progress、、 cancelled、 queued或 incomplete。
可能的值:completed、、、failedin_progresscancelled、queued、incomplete
No
溫度 數或空 No
收發簡訊 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
tool_choice OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。
我們支援以下類別的工具:
- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,比如網頁搜尋
或檔案搜尋。 了解更多
內建工具。
- MCP 工具:透過自訂 MCP 伺服器與第三方系統整合
或是預先定義的連接器,如 Google Drive 和 SharePoint。 了解更多
MCP 工具。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫你自己的程式碼,並帶有強型別參數
以及輸出。 了解更多
函式呼叫。 你也可以使用
自訂工具來呼叫自己的程式碼。
No
top_logprobs 整數或零 No
top_p 數或空 No
truncation 字串或空 No
使用方式 OpenAI.ResponseUsage 表示令牌使用詳細數據,包括輸入令牌、輸出令牌、
輸出令牌的細目,以及所使用的令牌總數。
No
使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No

OpenAI.ResponseAudioDeltaEvent

當有部分音訊回應時發出。

Name 類型 Description Required 預設值
delta 字串 Base64 編碼回應音訊位元組的區塊。
限制條件: 編碼:base64
Yes
sequence_number 整數 這是這段串流回應的序號。 Yes
型別 列舉 事件的類型。 一律為 response.audio.delta。
可能的數值: response.audio.delta
Yes

OpenAI.ResponseAudioDoneEvent

當音訊回應完成時發出。

Name 類型 Description Required 預設值
sequence_number 整數 那是delta的序號。 Yes
型別 列舉 事件的類型。 一律為 response.audio.done。
可能的數值: response.audio.done
Yes

OpenAI.回應音訊逐字稿DeltaEvent

當有部分音訊文字記錄時發出。

Name 類型 Description Required 預設值
delta 字串 音訊回應的部分文字記錄。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.audio.transcript.delta。
可能的數值: response.audio.transcript.delta
Yes

OpenAI.ResponseAudioTranscriptDoneEvent

完整音訊文字記錄完成時發出。

Name 類型 Description Required 預設值
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.audio.transcript.done。
可能的數值: response.audio.transcript.done
Yes

OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent

當程式代碼解釋器串流部分代碼段時發出。

Name 類型 Description Required 預設值
delta 字串 程式代碼解釋器正在串流的部分代碼段。 Yes
item_id 字串 程式代碼解釋器工具呼叫專案的唯一標識碼。 Yes
output_index 整數 回應中正在為其串流程式碼的輸出項目的索引。 Yes
sequence_number 整數 此事件的序號用於排序串流事件。 Yes
型別 列舉 事件的類型。 一律為 response.code_interpreter_call_code.delta。
可能的數值: response.code_interpreter_call_code.delta
Yes

OpenAI.ResponseCodeInterpreterCallCodeDoneEvent

當程式碼片段由程式代碼解釋器完成時發出信號。

Name 類型 Description Required 預設值
字碼 字串 程式代碼解釋器輸出的最終代碼段。 Yes
item_id 字串 程式代碼解釋器工具呼叫專案的唯一標識碼。 Yes
output_index 整數 回應中已為其完成程式碼的輸出項目的索引。 Yes
sequence_number 整數 此事件的序號用於排序串流事件。 Yes
型別 列舉 事件的類型。 一律為 response.code_interpreter_call_code.done。
可能的數值: response.code_interpreter_call_code.done
Yes

OpenAI.ResponseCodeInterpreterCallCompletedEvent

當程式代碼解釋器呼叫完成時發出。

Name 類型 Description Required 預設值
item_id 字串 程式代碼解釋器工具呼叫專案的唯一標識碼。 Yes
output_index 整數 回應中已為其完成程式碼解譯器呼叫的輸出項目的索引。 Yes
sequence_number 整數 此事件的序號用於排序串流事件。 Yes
型別 列舉 事件的類型。 一律為 response.code_interpreter_call.completed。
可能的數值: response.code_interpreter_call.completed
Yes

OpenAI.ResponseCodeInterpreterCallInProgressEvent

當程式代碼解釋器呼叫正在進行時發出。

Name 類型 Description Required 預設值
item_id 字串 程式代碼解釋器工具呼叫專案的唯一標識碼。 Yes
output_index 整數 回應中為其正在進行程式碼解譯器呼叫的輸出項目的索引。 Yes
sequence_number 整數 此事件的序號用於排序串流事件。 Yes
型別 列舉 事件的類型。 一律為 response.code_interpreter_call.in_progress。
可能的數值: response.code_interpreter_call.in_progress
Yes

OpenAI.ResponseCodeInterpreterCallInterpretingEvent

當程式代碼解釋器正在主動解譯代碼段時發出。

Name 類型 Description Required 預設值
item_id 字串 程式代碼解釋器工具呼叫專案的唯一標識碼。 Yes
output_index 整數 回應中為其程式碼解譯器正在解譯程式碼的輸出項目的索引。 Yes
sequence_number 整數 此事件的序號用於排序串流事件。 Yes
型別 列舉 事件的類型。 一律為 response.code_interpreter_call.interpreting。
可能的數值: response.code_interpreter_call.interpreting
Yes

OpenAI.ResponseCompletedEvent

模型回應完成時發出。

Name 類型 Description Required 預設值
response OpenAI.回應 Yes
‧---- 背景 布林值或零值 No
└─ completed_at 字串或空(unixTimestamp) No
└─ content_filters array of AzureContentFilterForResponsesAPI 內容過濾器是RAI產生的。 No
└─ 對話 OpenAI.ConversationReference 或 null No
└─ created_at 整數(Unixtime) 建立此回應時的 Unix 時間戳(以秒為單位)。 Yes
-------- 錯誤 OpenAI.ResponseError 或 null Yes
‧----識別碼 字串 此回應的唯一標識碼。 Yes
└─ 未完成的細節 OpenAI.ResponseIncompleteDetails 或 null Yes
└─ 指示 OpenAI.InputItem 的字串或陣列,或 null Yes
輸出字元數最大值 (max_output_tokens) 整數或零 No
max_tool_calls 整數或零 No
~---- 元數據 OpenAI.Metadata 或 null No
└─ 模型 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
└─ 物件 列舉 此資源的物件類型 - 一律設定為 response。
可能的數值: response
Yes
└─ 輸出 OpenAI.OutputItem 的陣列 模型所產生的內容項目陣列。
- 陣列中 output 項目的長度和順序相依
針對模型的回應。
- 而不是存取 output 陣列中的第一個項目,而且
假設這是一則由 assistant 所生成的內容訊息。
模型,您可能會考慮使用 output_text 屬性,其中
在 SDK 中支持。
Yes
└─ 輸出文字 字串或空 No
└─ 平行工具調用 boolean 是否允許模型平行執行工具呼叫。 Yes 沒錯
└─ 上一個回應ID (previous_response_id) 字串或空 No
└─ 提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
└─ prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
└─ prompt_cache_retention 字串或空 No
|---- 推理 OpenAI.推理 或空 No
└─ safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
└─ 狀態 列舉 回應產生的狀態。 下列其中一項:completed、failed、
in_progress、、 cancelled、 queued或 incomplete。
可能的值:completed、、、failedin_progresscancelled、queued、incomplete
No
‧---- 溫度 數或空 No 1
└─ 正文 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
└─ 工具選擇 OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
|---- 工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。
我們支援以下類別的工具:
- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,比如網頁搜尋
或檔案搜尋。 了解更多
內建工具。
- MCP 工具:透過自訂 MCP 伺服器與第三方系統整合
或是預先定義的連接器,如 Google Drive 和 SharePoint。 了解更多
MCP 工具。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫你自己的程式碼,並帶有強型別參數
以及輸出。 了解更多
函式呼叫。 你也可以使用
自訂工具來呼叫自己的程式碼。
No
└─ top_logprobs 整數或零 No
top_p 數或空 No 1
└─ 截斷 字串或空 No 停用
|---- 使用方式 OpenAI.ResponseUsage 表示令牌使用詳細數據,包括輸入令牌、輸出令牌、
輸出令牌的細目,以及所使用的令牌總數。
No
└─ 使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No
sequence_number 整數 這個事件的序列編號。 Yes
型別 列舉 事件的類型。 一律為 response.completed。
可能的數值: response.completed
Yes

OpenAI.ResponseContentPartAddedEvent

新增內容元件時發出。

Name 類型 Description Required 預設值
content_index 整數 已新增之內容元件的索引。 Yes
item_id 字串 已新增內容組件的輸出項目識別碼。 Yes
output_index 整數 已新增內容組件的輸出項目索引。 Yes
組件 OpenAI.OutputContent Yes
\---- 類型 OpenAI.OutputContentType Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.content_part.added。
可能的數值: response.content_part.added
Yes

OpenAI.ResponseContentPartDoneEvent

當內容部份已完成時發出。

Name 類型 Description Required 預設值
content_index 整數 完成的內容組件索引。 Yes
item_id 字串 已新增內容組件的輸出項目識別碼。 Yes
output_index 整數 已新增內容組件的輸出項目索引。 Yes
組件 OpenAI.OutputContent Yes
\---- 類型 OpenAI.OutputContentType Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.content_part.done。
可能的數值: response.content_part.done
Yes

OpenAI.ResponseCreatedEvent

建立回應時發出的事件。

Name 類型 Description Required 預設值
response OpenAI.回應 Yes
‧---- 背景 布林值或零值 No
└─ completed_at 字串或空(unixTimestamp) No
└─ content_filters array of AzureContentFilterForResponsesAPI 內容過濾器是RAI產生的。 No
└─ 對話 OpenAI.ConversationReference 或 null No
└─ created_at 整數(Unixtime) 建立此回應時的 Unix 時間戳(以秒為單位)。 Yes
-------- 錯誤 OpenAI.ResponseError 或 null Yes
‧----識別碼 字串 此回應的唯一標識碼。 Yes
└─ 未完成的細節 OpenAI.ResponseIncompleteDetails 或 null Yes
└─ 指示 OpenAI.InputItem 的字串或陣列,或 null Yes
輸出字元數最大值 (max_output_tokens) 整數或零 No
max_tool_calls 整數或零 No
~---- 元數據 OpenAI.Metadata 或 null No
└─ 模型 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
└─ 物件 列舉 此資源的物件類型 - 一律設定為 response。
可能的數值: response
Yes
└─ 輸出 OpenAI.OutputItem 的陣列 模型所產生的內容項目陣列。
- 陣列中 output 項目的長度和順序相依
針對模型的回應。
- 而不是存取 output 陣列中的第一個項目,而且
假設這是一則由 assistant 所生成的內容訊息。
模型,您可能會考慮使用 output_text 屬性,其中
在 SDK 中支持。
Yes
└─ 輸出文字 字串或空 No
└─ 平行工具調用 boolean 是否允許模型平行執行工具呼叫。 Yes 沒錯
└─ 上一個回應ID (previous_response_id) 字串或空 No
└─ 提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
└─ prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
└─ prompt_cache_retention 字串或空 No
|---- 推理 OpenAI.推理 或空 No
└─ safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
└─ 狀態 列舉 回應產生的狀態。 下列其中一項:completed、failed、
in_progress、、 cancelled、 queued或 incomplete。
可能的值:completed、、、failedin_progresscancelled、queued、incomplete
No
‧---- 溫度 數或空 No 1
└─ 正文 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
└─ 工具選擇 OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
|---- 工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。
我們支援以下類別的工具:
- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,比如網頁搜尋
或檔案搜尋。 了解更多
內建工具。
- MCP 工具:透過自訂 MCP 伺服器與第三方系統整合
或是預先定義的連接器,如 Google Drive 和 SharePoint。 了解更多
MCP 工具。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫你自己的程式碼,並帶有強型別參數
以及輸出。 了解更多
函式呼叫。 你也可以使用
自訂工具來呼叫自己的程式碼。
No
└─ top_logprobs 整數或零 No
top_p 數或空 No 1
└─ 截斷 字串或空 No 停用
|---- 使用方式 OpenAI.ResponseUsage 表示令牌使用詳細數據,包括輸入令牌、輸出令牌、
輸出令牌的細目,以及所使用的令牌總數。
No
└─ 使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No
sequence_number 整數 這個事件的序列編號。 Yes
型別 列舉 事件的類型。 一律為 response.created。
可能的數值: response.created
Yes

OpenAI.ResponseCustomToolCallInputDeltaEvent

回應自訂工具呼叫輸入三角洲

代表對自訂工具呼叫輸入的 delta(部分更新)的事件。

Name 類型 Description Required 預設值
delta 字串 自訂工具呼叫的增量輸入資料(delta)。 Yes
item_id 字串 與此事件相關的 API 項目唯一識別碼。 Yes
output_index 整數 此 delta 適用於輸出的指數。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件類型識別碼。
可能的數值: response.custom_tool_call_input.delta
Yes

OpenAI.ResponseCustomToolCallInputDoneEvent

回應自訂工具呼叫輸入完成

表示該輸入對自訂工具呼叫已完成的事件。

Name 類型 Description Required 預設值
輸入 字串 自訂工具呼叫的完整輸入資料。 Yes
item_id 字串 與此事件相關的 API 項目唯一識別碼。 Yes
output_index 整數 此事件所適用的輸出索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件類型識別碼。
可能的數值: response.custom_tool_call_input.done
Yes

OpenAI.ResponseError

當模型無法生成回應時,會返回一個錯誤對象。

Name 類型 Description Required 預設值
字碼 OpenAI.ResponseErrorCode 回應的錯誤碼。 Yes
訊息 字串 一個人類易讀的錯誤描述。 Yes

OpenAI.ResponseErrorCode

回應的錯誤碼。

Property 價值
Type 字串
價值 server_error
rate_limit_exceeded
invalid_prompt
vector_store_timeout
invalid_image
invalid_image_format
invalid_base64_image
invalid_image_url
image_too_large
image_too_small
image_parse_error
image_content_policy_violation
invalid_image_mode
image_file_too_large
unsupported_image_media_type
empty_image_file
failed_to_download_image
image_file_not_found

OpenAI.ResponseErrorEvent

發生錯誤時發出。

Name 類型 Description Required 預設值
字碼 字串或空 Yes
訊息 字串 錯誤訊息。 Yes
param 字串或空 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 error。
可能的數值: error
Yes

OpenAI.ResponseFailedEvent

回應失敗時所發出的事件。

Name 類型 Description Required 預設值
response OpenAI.回應 Yes
‧---- 背景 布林值或零值 No
└─ completed_at 字串或空(unixTimestamp) No
└─ content_filters array of AzureContentFilterForResponsesAPI 內容過濾器是RAI產生的。 No
└─ 對話 OpenAI.ConversationReference 或 null No
└─ created_at 整數(Unixtime) 建立此回應時的 Unix 時間戳(以秒為單位)。 Yes
-------- 錯誤 OpenAI.ResponseError 或 null Yes
‧----識別碼 字串 此回應的唯一標識碼。 Yes
└─ 未完成的細節 OpenAI.ResponseIncompleteDetails 或 null Yes
└─ 指示 OpenAI.InputItem 的字串或陣列,或 null Yes
輸出字元數最大值 (max_output_tokens) 整數或零 No
max_tool_calls 整數或零 No
~---- 元數據 OpenAI.Metadata 或 null No
└─ 模型 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
└─ 物件 列舉 此資源的物件類型 - 一律設定為 response。
可能的數值: response
Yes
└─ 輸出 OpenAI.OutputItem 的陣列 模型所產生的內容項目陣列。
- 陣列中 output 項目的長度和順序相依
針對模型的回應。
- 而不是存取 output 陣列中的第一個項目,而且
假設這是一則由 assistant 所生成的內容訊息。
模型,您可能會考慮使用 output_text 屬性,其中
在 SDK 中支持。
Yes
└─ 輸出文字 字串或空 No
└─ 平行工具調用 boolean 是否允許模型平行執行工具呼叫。 Yes 沒錯
└─ 上一個回應ID (previous_response_id) 字串或空 No
└─ 提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
└─ prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
└─ prompt_cache_retention 字串或空 No
|---- 推理 OpenAI.推理 或空 No
└─ safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
└─ 狀態 列舉 回應產生的狀態。 下列其中一項:completed、failed、
in_progress、、 cancelled、 queued或 incomplete。
可能的值:completed、、、failedin_progresscancelled、queued、incomplete
No
‧---- 溫度 數或空 No 1
└─ 正文 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
└─ 工具選擇 OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
|---- 工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。
我們支援以下類別的工具:
- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,比如網頁搜尋
或檔案搜尋。 了解更多
內建工具。
- MCP 工具:透過自訂 MCP 伺服器與第三方系統整合
或是預先定義的連接器,如 Google Drive 和 SharePoint。 了解更多
MCP 工具。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫你自己的程式碼,並帶有強型別參數
以及輸出。 了解更多
函式呼叫。 你也可以使用
自訂工具來呼叫自己的程式碼。
No
└─ top_logprobs 整數或零 No
top_p 數或空 No 1
└─ 截斷 字串或空 No 停用
|---- 使用方式 OpenAI.ResponseUsage 表示令牌使用詳細數據,包括輸入令牌、輸出令牌、
輸出令牌的細目,以及所使用的令牌總數。
No
└─ 使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.failed。
可能的數值: response.failed
Yes

OpenAI.ResponseFileSearchCallCompletedEvent

完成檔案搜尋呼叫時發出 (找到的結果)。

Name 類型 Description Required 預設值
item_id 字串 發起檔案搜尋呼叫的輸出項目的標識碼。 Yes
output_index 整數 起始檔案搜尋呼叫的輸出項目索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.file_search_call.completed。
可能的數值: response.file_search_call.completed
Yes

OpenAI.ResponseFileSearchCallInProgressEvent

起始檔案搜尋呼叫時發出。

Name 類型 Description Required 預設值
item_id 字串 發起檔案搜尋呼叫的輸出項目的標識碼。 Yes
output_index 整數 起始檔案搜尋呼叫的輸出項目索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.file_search_call.in_progress。
可能的數值: response.file_search_call.in_progress
Yes

OpenAI.ResponseFileSearchCallSearchingEvent

檔案搜尋目前正在搜尋時發出。

Name 類型 Description Required 預設值
item_id 字串 發起檔案搜尋呼叫的輸出項目的標識碼。 Yes
output_index 整數 檔案搜尋呼叫正在搜尋時輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.file_search_call.searching。
可能的數值: response.file_search_call.searching
Yes

OpenAI.ResponseFormatJsonSchemaSchema (OpenAI.回應格式Json架構模式)

JSON 結構描述

回應格式的結構,描述為 JSON Schema 物件。 瞭解如何 在這裡建置 JSON 架構。

類型:物件

OpenAI.ResponseFunctionCallArgumentsDeltaEvent

當有部分函式呼叫引數差異時發出。

Name 類型 Description Required 預設值
delta 字串 新增的函式呼叫引數差異。 Yes
item_id 字串 函式呼叫引數差異新增至的輸出項目識別碼。 Yes
output_index 整數 函式呼叫引數差異新增至的輸出項目索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.function_call_arguments.delta。
可能的數值: response.function_call_arguments.delta
Yes

OpenAI.ResponseFunctionCallArgumentsDoneEvent

在完成函式呼叫引數時發出。

Name 類型 Description Required 預設值
arguments 字串 函數調用引數。 Yes
item_id 字串 項目的標識碼。 Yes
名字 字串 被呼叫的函式名稱。 Yes
output_index 整數 輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉
可能的數值: response.function_call_arguments.done
Yes

OpenAI.ResponseImageGenCallCompletedEvent

回應圖片GenCallCompletedEvent(回應圖片GenCallCompletedEvent)

當映像產生工具呼叫完成且最終映像可供使用時發出。

Name 類型 Description Required 預設值
item_id 字串 正在處理之影像產生專案的唯一標識符。 Yes
output_index 整數 回應輸出陣列中輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 'response.image_generation_call.completed'。
可能的數值: response.image_generation_call.completed
Yes

OpenAI.ResponseImageGenCallGeneratingEvent

回應影像GenCallGeneratingEvent

當映像產生工具呼叫主動產生映射時發出 (中繼狀態)。

Name 類型 Description Required 預設值
item_id 字串 正在處理之影像產生專案的唯一標識符。 Yes
output_index 整數 回應輸出陣列中輸出項目的索引。 Yes
sequence_number 整數 正在處理的影像生成項目的序號。 Yes
型別 列舉 事件的類型。 一律為 'response.image_generation_call.generating'。
可能的數值: response.image_generation_call.generating
Yes

OpenAI.ResponseImageGenCallInProgressEvent

回應圖片GenCallInProgressEvent

映像產生工具呼叫進行時發出。

Name 類型 Description Required 預設值
item_id 字串 正在處理之影像產生專案的唯一標識符。 Yes
output_index 整數 回應輸出陣列中輸出項目的索引。 Yes
sequence_number 整數 正在處理的影像生成項目的序號。 Yes
型別 列舉 事件的類型。 一律為 'response.image_generation_call.in_progress'。
可能的數值: response.image_generation_call.in_progress
Yes

OpenAI.ResponseImageGenCallPartialImageEvent

回應影像GenCallPartialImageEvent

在影像產生串流期間提供部分影像時發出。

Name 類型 Description Required 預設值
item_id 字串 正在處理之影像產生專案的唯一標識符。 Yes
output_index 整數 回應輸出陣列中輸出項目的索引。 Yes
partial_image_b64 字串 Base64 編碼的部分影像數據,適合轉譯為影像。 Yes
partial_image_index 整數 部分影像的索引以 0 為起點(後端以 1 為基礎,但對使用者而言是以 0 為基礎)。 Yes
sequence_number 整數 正在處理的影像生成項目的序號。 Yes
型別 列舉 事件的類型。 一律為 'response.image_generation_call.partial_image'。
可能的數值: response.image_generation_call.partial_image
Yes

OpenAI.ResponseInProgressEvent

回應正在進行時發出。

Name 類型 Description Required 預設值
response OpenAI.回應 Yes
‧---- 背景 布林值或零值 No
└─ completed_at 字串或空(unixTimestamp) No
└─ content_filters array of AzureContentFilterForResponsesAPI 內容過濾器是RAI產生的。 No
└─ 對話 OpenAI.ConversationReference 或 null No
└─ created_at 整數(Unixtime) 建立此回應時的 Unix 時間戳(以秒為單位)。 Yes
-------- 錯誤 OpenAI.ResponseError 或 null Yes
‧----識別碼 字串 此回應的唯一標識碼。 Yes
└─ 未完成的細節 OpenAI.ResponseIncompleteDetails 或 null Yes
└─ 指示 OpenAI.InputItem 的字串或陣列,或 null Yes
輸出字元數最大值 (max_output_tokens) 整數或零 No
max_tool_calls 整數或零 No
~---- 元數據 OpenAI.Metadata 或 null No
└─ 模型 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
└─ 物件 列舉 此資源的物件類型 - 一律設定為 response。
可能的數值: response
Yes
└─ 輸出 OpenAI.OutputItem 的陣列 模型所產生的內容項目陣列。
- 陣列中 output 項目的長度和順序相依
針對模型的回應。
- 而不是存取 output 陣列中的第一個項目,而且
假設這是一則由 assistant 所生成的內容訊息。
模型,您可能會考慮使用 output_text 屬性,其中
在 SDK 中支持。
Yes
└─ 輸出文字 字串或空 No
└─ 平行工具調用 boolean 是否允許模型平行執行工具呼叫。 Yes 沒錯
└─ 上一個回應ID (previous_response_id) 字串或空 No
└─ 提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
└─ prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
└─ prompt_cache_retention 字串或空 No
|---- 推理 OpenAI.推理 或空 No
└─ safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
└─ 狀態 列舉 回應產生的狀態。 下列其中一項:completed、failed、
in_progress、、 cancelled、 queued或 incomplete。
可能的值:completed、、、failedin_progresscancelled、queued、incomplete
No
‧---- 溫度 數或空 No 1
└─ 正文 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
└─ 工具選擇 OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
|---- 工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。
我們支援以下類別的工具:
- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,比如網頁搜尋
或檔案搜尋。 了解更多
內建工具。
- MCP 工具:透過自訂 MCP 伺服器與第三方系統整合
或是預先定義的連接器,如 Google Drive 和 SharePoint。 了解更多
MCP 工具。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫你自己的程式碼,並帶有強型別參數
以及輸出。 了解更多
函式呼叫。 你也可以使用
自訂工具來呼叫自己的程式碼。
No
└─ top_logprobs 整數或零 No
top_p 數或空 No 1
└─ 截斷 字串或空 No 停用
|---- 使用方式 OpenAI.ResponseUsage 表示令牌使用詳細數據,包括輸入令牌、輸出令牌、
輸出令牌的細目,以及所使用的令牌總數。
No
└─ 使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.in_progress。
可能的數值: response.in_progress
Yes

OpenAI.回應不完整細節

Name 類型 Description Required 預設值
reason 列舉
可能的值: max_output_tokens、 content_filter
No

OpenAI.ResponseIncompleteEvent

當回應以不完整狀態結束時所發出的事件。

Name 類型 Description Required 預設值
response OpenAI.回應 Yes
‧---- 背景 布林值或零值 No
└─ completed_at 字串或空(unixTimestamp) No
└─ content_filters array of AzureContentFilterForResponsesAPI 內容過濾器是RAI產生的。 No
└─ 對話 OpenAI.ConversationReference 或 null No
└─ created_at 整數(Unixtime) 建立此回應時的 Unix 時間戳(以秒為單位)。 Yes
-------- 錯誤 OpenAI.ResponseError 或 null Yes
‧----識別碼 字串 此回應的唯一標識碼。 Yes
└─ 未完成的細節 OpenAI.ResponseIncompleteDetails 或 null Yes
└─ 指示 OpenAI.InputItem 的字串或陣列,或 null Yes
輸出字元數最大值 (max_output_tokens) 整數或零 No
max_tool_calls 整數或零 No
~---- 元數據 OpenAI.Metadata 或 null No
└─ 模型 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
└─ 物件 列舉 此資源的物件類型 - 一律設定為 response。
可能的數值: response
Yes
└─ 輸出 OpenAI.OutputItem 的陣列 模型所產生的內容項目陣列。
- 陣列中 output 項目的長度和順序相依
針對模型的回應。
- 而不是存取 output 陣列中的第一個項目,而且
假設這是一則由 assistant 所生成的內容訊息。
模型,您可能會考慮使用 output_text 屬性,其中
在 SDK 中支持。
Yes
└─ 輸出文字 字串或空 No
└─ 平行工具調用 boolean 是否允許模型平行執行工具呼叫。 Yes 沒錯
└─ 上一個回應ID (previous_response_id) 字串或空 No
└─ 提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
└─ prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
└─ prompt_cache_retention 字串或空 No
|---- 推理 OpenAI.推理 或空 No
└─ safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
└─ 狀態 列舉 回應產生的狀態。 下列其中一項:completed、failed、
in_progress、、 cancelled、 queued或 incomplete。
可能的值:completed、、、failedin_progresscancelled、queued、incomplete
No
‧---- 溫度 數或空 No 1
└─ 正文 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
└─ 工具選擇 OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
|---- 工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。
我們支援以下類別的工具:
- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,比如網頁搜尋
或檔案搜尋。 了解更多
內建工具。
- MCP 工具:透過自訂 MCP 伺服器與第三方系統整合
或是預先定義的連接器,如 Google Drive 和 SharePoint。 了解更多
MCP 工具。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫你自己的程式碼,並帶有強型別參數
以及輸出。 了解更多
函式呼叫。 你也可以使用
自訂工具來呼叫自己的程式碼。
No
└─ top_logprobs 整數或零 No
top_p 數或空 No 1
└─ 截斷 字串或空 No 停用
|---- 使用方式 OpenAI.ResponseUsage 表示令牌使用詳細數據,包括輸入令牌、輸出令牌、
輸出令牌的細目,以及所使用的令牌總數。
No
└─ 使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.incomplete。
可能的數值: response.incomplete
Yes

OpenAI.ResponseItemList

回應項目的清單。

Name 類型 Description Required 預設值
資料 OpenAI.ItemResource 的陣列 用來產生此回應的項目清單。 Yes
first_id 字串 清單中第一個項目的標識碼。 Yes
還有更多 boolean 是否有更多項目可用。 Yes
last_id 字串 清單中最後一個項目的標識碼。 Yes
物件 列舉 傳回的物件類型必須是 list。
可能的數值: list
Yes

OpenAI.回應LogProb

對數概率是模型在序列中指定位置產生特定標記的對數機率。 較低負(較高)的 logprob 值表示模型對該標記選擇的信心更高。

Name 類型 Description Required 預設值
logprob 編號 此標記的對數機率。 Yes
Token 字串 可能的文字標記。 Yes
top_logprobs OpenAI 陣列 。回應LogProbTopLogprobs 最多20個最可能的標記的對數機率。 No

OpenAI.回應LogProb頂Logprobs

Name 類型 Description Required 預設值
logprob 編號 No
Token 字串 No

OpenAI.ResponseMCPCallArgumentsDeltaEvent

回應MCPCallArgumentsDeltaEvent

當 MCP 工具呼叫的引數有差異 (部分更新) 時發出。

Name 類型 Description Required 預設值
delta 字串 一個包含 MCP 工具呼叫參數部分更新的 JSON 字串。 Yes
item_id 字串 處理 MCP 工具呼叫專案的唯一識別碼。 Yes
output_index 整數 回應輸出陣列中輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 永遠是「response.mcp_call_arguments.delta」。
可能的數值: response.mcp_call_arguments.delta
Yes

OpenAI.ResponseMCPCallArgumentsDoneEvent

回應MCPCallArgumentsDoneEvent

當 MCP 工具呼叫的自變數完成時發出。

Name 類型 Description Required 預設值
arguments 字串 一個包含 MCP 工具呼叫最終參數的 JSON 字串。 Yes
item_id 字串 處理 MCP 工具呼叫專案的唯一識別碼。 Yes
output_index 整數 回應輸出陣列中輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 總是「response.mcp_call_arguments完成」。
可能的數值: response.mcp_call_arguments.done
Yes

OpenAI.ResponseMCPCallCompletedEvent

回應MCPCallCompletedEvent(回應)

MCP 工具呼叫成功完成時發出。

Name 類型 Description Required 預設值
item_id 字串 完成的 MCP 工具呼叫項目的 ID。 Yes
output_index 整數 完成的輸出項目索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 'response.mcp_call.completed'。
可能的數值: response.mcp_call.completed
Yes

OpenAI.ResponseMCPCallFailedEvent

回應MCPCallFailedEvent

MCP 工具呼叫失敗時發出。

Name 類型 Description Required 預設值
item_id 字串 失敗的 MCP 工具呼叫項目的 ID。 Yes
output_index 整數 失敗的輸出項目索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 'response.mcp_call.failed'。
可能的數值: response.mcp_call.failed
Yes

OpenAI.ResponseMCPCallInProgressEvent

回應MCPCallInProgressEvent

MCP 工具呼叫進行時發出。

Name 類型 Description Required 預設值
item_id 字串 處理 MCP 工具呼叫專案的唯一識別碼。 Yes
output_index 整數 回應輸出陣列中輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 'response.mcp_call.in_progress'。
可能的數值: response.mcp_call.in_progress
Yes

OpenAI.ResponseMCPListToolsCompletedEvent

回應MCPListTools完成事件

成功擷取可用 MCP 工具清單時發出。

Name 類型 Description Required 預設值
item_id 字串 產生此輸出的 MCP 工具呼叫項目的 ID。 Yes
output_index 整數 被處理的輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 'response.mcp_list_tools.completed'。
可能的數值: response.mcp_list_tools.completed
Yes

OpenAI.ResponseMCPListToolsFailedEvent

回應MCPListToolsFailedEvent

嘗試列出可用的 MCP 工具失敗時發出。

Name 類型 Description Required 預設值
item_id 字串 失敗的 MCP 工具呼叫項目的 ID。 Yes
output_index 整數 失敗的輸出項目索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 'response.mcp_list_tools.failed'。
可能的數值: response.mcp_list_tools.failed
Yes

OpenAI.ResponseMCPListToolsInProgressEvent

回應MCPListToolsInProgressEvent

當系統正在擷取可用 MCP 工具清單時發出。

Name 類型 Description Required 預設值
item_id 字串 正在處理的 MCP 工具呼叫項目的 ID。 Yes
output_index 整數 正在處理的輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 'response.mcp_list_tools.in_progress'。
可能的數值: response.mcp_list_tools.in_progress
Yes

OpenAI.ResponseOutputItemAddedEvent

新增輸出項目時發出。

Name 類型 Description Required 預設值
項目 OpenAI.OutputItem Yes
\---- 類型 OpenAI.OutputItemType Yes
output_index 整數 已新增的輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.output_item.added。
可能的數值: response.output_item.added
Yes

OpenAI.ResponseOutputItemDoneEvent

當輸出項目標示為完成時發出。

Name 類型 Description Required 預設值
項目 OpenAI.OutputItem Yes
\---- 類型 OpenAI.OutputItemType Yes
output_index 整數 標示為已完成之輸出專案的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.output_item.done。
可能的數值: response.output_item.done
Yes

OpenAI.ResponseTextAnnotationAddedEvent

回應輸出文字註解新增事件

當新增註解以輸出文字內容時會發出。

Name 類型 Description Required 預設值
註釋 OpenAI.註解 一個適用於輸出文字範圍的註解。 Yes
\---- 類型 OpenAI.AnnotationType Yes
annotation_index 整數 內容部分中註解的索引。 Yes
content_index 整數 輸出項目中內容部分的索引。 Yes
item_id 字串 標註所加入項目的唯一識別碼。 Yes
output_index 整數 回應輸出陣列中輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 永遠是「response.output_text.annotation.added」。
可能的數值: response.output_text.annotation.added
Yes

OpenAI.ResponsePromptVariables

提示變數

選用的值對應,用於替換您提示中的變數。 替代值可以是字串或其他回應輸入類型,例如影像或檔案。

類型:物件

OpenAI.ResponseQueuedEvent

回應佇列事件

當回應排入佇列並等候處理時發出。

Name 類型 Description Required 預設值
response OpenAI.回應 Yes
‧---- 背景 布林值或零值 No
└─ completed_at 字串或空(unixTimestamp) No
└─ content_filters array of AzureContentFilterForResponsesAPI 內容過濾器是RAI產生的。 No
└─ 對話 OpenAI.ConversationReference 或 null No
└─ created_at 整數(Unixtime) 建立此回應時的 Unix 時間戳(以秒為單位)。 Yes
-------- 錯誤 OpenAI.ResponseError 或 null Yes
‧----識別碼 字串 此回應的唯一標識碼。 Yes
└─ 未完成的細節 OpenAI.ResponseIncompleteDetails 或 null Yes
└─ 指示 OpenAI.InputItem 的字串或陣列,或 null Yes
輸出字元數最大值 (max_output_tokens) 整數或零 No
max_tool_calls 整數或零 No
~---- 元數據 OpenAI.Metadata 或 null No
└─ 模型 字串 用於產生回應的型號識別碼,如 gpt-4o 或 o3。 OpenAI
提供多種不同功能與性能的車型
特性與價格。 請參閱模型指南
瀏覽並比較可取得的車款。
No
└─ 物件 列舉 此資源的物件類型 - 一律設定為 response。
可能的數值: response
Yes
└─ 輸出 OpenAI.OutputItem 的陣列 模型所產生的內容項目陣列。
- 陣列中 output 項目的長度和順序相依
針對模型的回應。
- 而不是存取 output 陣列中的第一個項目,而且
假設這是一則由 assistant 所生成的內容訊息。
模型,您可能會考慮使用 output_text 屬性,其中
在 SDK 中支持。
Yes
└─ 輸出文字 字串或空 No
└─ 平行工具調用 boolean 是否允許模型平行執行工具呼叫。 Yes 沒錯
└─ 上一個回應ID (previous_response_id) 字串或空 No
└─ 提示 OpenAI.Prompt 關於提示範本及其變數的參考。
No
└─ prompt_cache_key 字串 OpenAI 用來緩存類似請求的回應,以優化快取命中率。 取代了欄位 user。 No
└─ prompt_cache_retention 字串或空 No
|---- 推理 OpenAI.推理 或空 No
└─ safety_identifier 字串 一個穩定的識別碼,用來協助偵測可能違反 OpenAI 使用政策的應用程式使用者。
ID 應為一個字串,唯一識別每位使用者,長度最多為 64 個字元。 我們建議你先查閱他們的用戶名稱或電子郵件地址,以避免傳送任何識別資訊給我們。
限制: 最大長度:64
No
└─ 狀態 列舉 回應產生的狀態。 下列其中一項:completed、failed、
in_progress、、 cancelled、 queued或 incomplete。
可能的值:completed、、、failedin_progresscancelled、queued、incomplete
No
‧---- 溫度 數或空 No 1
└─ 正文 OpenAI.回應文字參數 來自模型的文字回應組態選項。 可以是普通的
文字或結構化 JSON 資料。 瞭解詳情:
- 文字輸入和輸出
- 結構化輸出
No
└─ 工具選擇 OpenAI.ToolChoiceOptions 或 OpenAI.ToolChoiceParam No
|---- 工具 OpenAI.ToolsArray 模型可能會在產生回應時呼叫的工具陣列。 你
可以藉由設定 tool_choice 參數來指定要使用的工具。
我們支援以下類別的工具:
- 內建工具:OpenAI 所提供的工具,可擴充
模型的功能,比如網頁搜尋
或檔案搜尋。 了解更多
內建工具。
- MCP 工具:透過自訂 MCP 伺服器與第三方系統整合
或是預先定義的連接器,如 Google Drive 和 SharePoint。 了解更多
MCP 工具。
- 函式呼叫 (自訂工具):您定義的函式,
讓模型能夠呼叫你自己的程式碼,並帶有強型別參數
以及輸出。 了解更多
函式呼叫。 你也可以使用
自訂工具來呼叫自己的程式碼。
No
└─ top_logprobs 整數或零 No
top_p 數或空 No 1
└─ 截斷 字串或空 No 停用
|---- 使用方式 OpenAI.ResponseUsage 表示令牌使用詳細數據,包括輸入令牌、輸出令牌、
輸出令牌的細目,以及所使用的令牌總數。
No
└─ 使用者 字串(已棄用) 此欄位被替換為 safety_identifier 和 prompt_cache_key。 請用 prompt_cache_key 來維護快取優化。
為你的終端使用者提供穩定的識別碼。
用來提升快取命中率,透過更精確的分桶分類類似請求,並幫助 OpenAI 偵測及防止濫用行為。
No
sequence_number 整數 這個事件的序列編號。 Yes
型別 列舉 事件的類型。 一律為 'response.queued'。
可能的數值: response.queued
Yes

OpenAI.ResponseReasoningSummaryPartAddedEvent

新增新的推理摘要組件時發出。

Name 類型 Description Required 預設值
item_id 字串 這個摘要組件所關聯項目的識別碼。 Yes
output_index 整數 這個摘要組件所關聯輸出項目的索引。 Yes
組件 OpenAI.回應理由摘要部分新增事件部分 Yes
└─ 正文 字串 Yes
\---- 類型 列舉
可能的數值: summary_text
Yes
sequence_number 整數 這個事件的序號。 Yes
summary_index 整數 推理摘要內摘要組件的索引。 Yes
型別 列舉 事件的類型。 一律為 response.reasoning_summary_part.added。
可能的數值: response.reasoning_summary_part.added
Yes

OpenAI.回應理由摘要部分新增事件部分

Name 類型 Description Required 預設值
收發簡訊 字串 Yes
型別 列舉
可能的數值: summary_text
Yes

OpenAI.ResponseReasoningSummaryPartDoneEvent

當推理摘要部分完成時發出。

Name 類型 Description Required 預設值
item_id 字串 這個摘要組件所關聯項目的識別碼。 Yes
output_index 整數 這個摘要組件所關聯輸出項目的索引。 Yes
組件 OpenAI.回應理由摘要部分完成事件部分 Yes
└─ 正文 字串 Yes
\---- 類型 列舉
可能的數值: summary_text
Yes
sequence_number 整數 這個事件的序號。 Yes
summary_index 整數 推理摘要內摘要組件的索引。 Yes
型別 列舉 事件的類型。 一律為 response.reasoning_summary_part.done。
可能的數值: response.reasoning_summary_part.done
Yes

OpenAI.回應理由摘要部分完成事件部分

Name 類型 Description Required 預設值
收發簡訊 字串 Yes
型別 列舉
可能的數值: summary_text
Yes

OpenAI.ResponseReasoningSummaryTextDeltaEvent

當差異新增至推理摘要文字時發出。

Name 類型 Description Required 預設值
delta 字串 新增至摘要的文字差異。 Yes
item_id 字串 這個摘要文字差異所關聯項目的識別碼。 Yes
output_index 整數 這個摘要文字差異所關聯輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
summary_index 整數 推理摘要內摘要組件的索引。 Yes
型別 列舉 事件的類型。 一律為 response.reasoning_summary_text.delta。
可能的數值: response.reasoning_summary_text.delta
Yes

OpenAI.ResponseReasoningSummaryTextDoneEvent

當推理摘要文字完成時發出。

Name 類型 Description Required 預設值
item_id 字串 這個摘要文字所關聯之專案的標識碼。 Yes
output_index 整數 這個摘要文字所關聯輸出項目的索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
summary_index 整數 推理摘要內摘要組件的索引。 Yes
收發簡訊 字串 已完成的推理摘要全文。 Yes
型別 列舉 事件的類型。 一律為 response.reasoning_summary_text.done。
可能的數值: response.reasoning_summary_text.done
Yes

OpenAI.ResponseReasoningTextDeltaEvent

當推理文本中加入 delta 時會產生。

Name 類型 Description Required 預設值
content_index 整數 此 delta 所關聯的推理內容部分索引。 Yes
delta 字串 新增到推理內容中的文字差異。 Yes
item_id 字串 此推理文字 delta 所關聯的項目 ID。 Yes
output_index 整數 此推理文本 delta 所關聯的輸出項目索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.reasoning_text.delta。
可能的數值: response.reasoning_text.delta
Yes

OpenAI.回應推理文字完成事件

當推理文本完成時會發出。

Name 類型 Description Required 預設值
content_index 整數 推理內容部分的索引。 Yes
item_id 字串 這段推理文本所關聯的物品 ID。 Yes
output_index 整數 此推理文本所關聯的輸出項目索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
收發簡訊 字串 完成推理內容的全文。 Yes
型別 列舉 事件的類型。 一律為 response.reasoning_text.done。
可能的數值: response.reasoning_text.done
Yes

OpenAI.ResponseRefusalDeltaEvent

當有部分拒絕文字時發出。

Name 類型 Description Required 預設值
content_index 整數 拒絕文字加入之內容部分的索引。 Yes
delta 字串 新增的拒絕文字。 Yes
item_id 字串 要新增拒絕文字的輸出項目識別碼。 Yes
output_index 整數 拒絕文字新增至的輸出項目索引。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.refusal.delta。
可能的數值: response.refusal.delta
Yes

OpenAI.ResponseRefusalDoneEvent

拒絕文字完成時發出。

Name 類型 Description Required 預設值
content_index 整數 已完成拒絕文字的內容組件索引。 Yes
item_id 字串 已完成拒絕文字的輸出項目識別碼。 Yes
output_index 整數 拒絕文字完成的輸出項目索引。 Yes
拒絕 字串 最終的拒絕文字。 Yes
sequence_number 整數 這個事件的序號。 Yes
型別 列舉 事件的類型。 一律為 response.refusal.done。
可能的數值: response.refusal.done
Yes

OpenAI.ResponseStreamEvent

OpenAI.ResponseStreamEvent 的鑑別子

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
response.audio.done OpenAI.ResponseAudioDoneEvent
response.audio.transcript.delta OpenAI.回應音訊逐字稿DeltaEvent
response.audio.transcript.done OpenAI.ResponseAudioTranscriptDoneEvent
response.code_interpreter_call_code.delta OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent
response.code_interpreter_call_code.done OpenAI.ResponseCodeInterpreterCallCodeDoneEvent
response.code_interpreter_call.completed OpenAI.ResponseCodeInterpreterCallCompletedEvent
response.code_interpreter_call.in_progress OpenAI.ResponseCodeInterpreterCallInProgressEvent
response.code_interpreter_call.interpreting OpenAI.ResponseCodeInterpreterCallInterpretingEvent
response.completed OpenAI.ResponseCompletedEvent
response.content_part.added OpenAI.ResponseContentPartAddedEvent
response.content_part.done OpenAI.ResponseContentPartDoneEvent
response.created OpenAI.ResponseCreatedEvent
response.custom_tool_call_input.delta OpenAI.ResponseCustomToolCallInputDeltaEvent
response.custom_tool_call_input.done OpenAI.ResponseCustomToolCallInputDoneEvent
error OpenAI.ResponseErrorEvent
response.failed OpenAI.ResponseFailedEvent
response.file_search_call.completed OpenAI.ResponseFileSearchCallCompletedEvent
response.file_search_call.in_progress OpenAI.ResponseFileSearchCallInProgressEvent
response.file_search_call.searching OpenAI.ResponseFileSearchCallSearchingEvent
response.function_call_arguments.delta OpenAI.ResponseFunctionCallArgumentsDeltaEvent
response.function_call_arguments.done OpenAI.ResponseFunctionCallArgumentsDoneEvent
response.image_generation_call.completed OpenAI.ResponseImageGenCallCompletedEvent
response.image_generation_call.generating OpenAI.ResponseImageGenCallGeneratingEvent
response.image_generation_call.in_progress OpenAI.ResponseImageGenCallInProgressEvent
response.image_generation_call.partial_image OpenAI.ResponseImageGenCallPartialImageEvent
response.in_progress OpenAI.ResponseInProgressEvent
response.incomplete OpenAI.ResponseIncompleteEvent
response.mcp_call_arguments.delta OpenAI.ResponseMCPCallArgumentsDeltaEvent
response.mcp_call_arguments.done OpenAI.ResponseMCPCallArgumentsDoneEvent
response.mcp_call.completed OpenAI.ResponseMCPCallCompletedEvent
response.mcp_call.failed OpenAI.ResponseMCPCallFailedEvent
response.mcp_call.in_progress OpenAI.ResponseMCPCallInProgressEvent
response.mcp_list_tools.completed OpenAI.ResponseMCPListToolsCompletedEvent
response.mcp_list_tools.failed OpenAI.ResponseMCPListToolsFailedEvent
response.mcp_list_tools.in_progress OpenAI.ResponseMCPListToolsInProgressEvent
response.output_item.added OpenAI.ResponseOutputItemAddedEvent
response.output_item.done OpenAI.ResponseOutputItemDoneEvent
response.output_text.annotation.added OpenAI.ResponseTextAnnotationAddedEvent
response.queued OpenAI.ResponseQueuedEvent
response.reasoning_summary_part.added OpenAI.ResponseReasoningSummaryPartAddedEvent
response.reasoning_summary_part.done OpenAI.ResponseReasoningSummaryPartDoneEvent
response.reasoning_summary_text.delta OpenAI.ResponseReasoningSummaryTextDeltaEvent
response.reasoning_summary_text.done OpenAI.ResponseReasoningSummaryTextDoneEvent
response.reasoning_text.delta OpenAI.ResponseReasoningTextDeltaEvent
response.reasoning_text.done OpenAI.回應推理文字完成事件
response.refusal.delta OpenAI.ResponseRefusalDeltaEvent
response.refusal.done OpenAI.ResponseRefusalDoneEvent
response.output_text.delta OpenAI.ResponseTextDeltaEvent
response.output_text.done OpenAI.ResponseTextDoneEvent
response.web_search_call.completed OpenAI.ResponseWebSearchCallCompletedEvent
response.web_search_call.in_progress OpenAI.ResponseWebSearchCallInProgressEvent
response.web_search_call.searching OpenAI.ResponseWebSearchCallSearchingEvent
response.audio.delta OpenAI.ResponseAudioDeltaEvent
Name 類型 Description Required 預設值
型別 OpenAI.ResponseStreamEventType Yes

OpenAI.ResponseStreamEventType

Property 價值
Type 字串
價值 response.audio.delta
response.audio.done
response.audio.transcript.delta
response.audio.transcript.done
response.code_interpreter_call_code.delta
response.code_interpreter_call_code.done
response.code_interpreter_call.completed
response.code_interpreter_call.in_progress
response.code_interpreter_call.interpreting
response.completed
response.content_part.added
response.content_part.done
response.created
error
response.file_search_call.completed
response.file_search_call.in_progress
response.file_search_call.searching
response.function_call_arguments.delta
response.function_call_arguments.done
response.in_progress
response.failed
response.incomplete
response.output_item.added
response.output_item.done
response.reasoning_summary_part.added
response.reasoning_summary_part.done
response.reasoning_summary_text.delta
response.reasoning_summary_text.done
response.reasoning_text.delta
response.reasoning_text.done
response.refusal.delta
response.refusal.done
response.output_text.delta
response.output_text.done
response.web_search_call.completed
response.web_search_call.in_progress
response.web_search_call.searching
response.image_generation_call.completed
response.image_generation_call.generating
response.image_generation_call.in_progress
response.image_generation_call.partial_image
response.mcp_call_arguments.delta
response.mcp_call_arguments.done
response.mcp_call.completed
response.mcp_call.failed
response.mcp_call.in_progress
response.mcp_list_tools.completed
response.mcp_list_tools.failed
response.mcp_list_tools.in_progress
response.output_text.annotation.added
response.queued
response.custom_tool_call_input.delta
response.custom_tool_call_input.done

OpenAI.ResponseStreamOptions

串流回應的選項。 只有在你設定 stream: true時才會設定這個。

Name 類型 Description Required 預設值
include_obfuscation boolean 當為真時,串流混淆會被啟用。 串流混淆加法
隨機字元到 obfuscation 一個欄位,串流 delta 事件到
將有效載荷大小標準化,以防範某些側通道攻擊。
這些混淆欄位預設包含,但會增加少量
將開銷轉移到資料流。 你可以設定 include_obfuscation 為
false 是為了優化頻寬,前提是你信任網路連結
你的應用程式和 OpenAI API 一起。
No

OpenAI.ResponseTextDeltaEvent

當有額外的文字差異時發出。

Name 類型 Description Required 預設值
content_index 整數 已新增文字差異的內容組件索引。 Yes
delta 字串 已新增的文字差異。 Yes
item_id 字串 已新增文字差異的輸出項目識別碼。 Yes
logprobs OpenAI 的陣列 。回應LogProb delta 中標記的對數機率。 Yes
output_index 整數 已新增文字差異的輸出項目索引。 Yes
sequence_number 整數 這個事件的序列編號。 Yes
型別 列舉 事件的類型。 一律為 response.output_text.delta。
可能的數值: response.output_text.delta
Yes

OpenAI.ResponseTextDoneEvent

完成文字內容時發出。

Name 類型 Description Required 預設值
content_index 整數 文字內容完成的內容組件索引。 Yes
item_id 字串 已完成文字內容的輸出項目識別碼。 Yes
logprobs OpenAI 的陣列 。回應LogProb delta 中標記的對數機率。 Yes
output_index 整數 已完成文字內容的輸出項目索引。 Yes
sequence_number 整數 這個事件的序列編號。 Yes
收發簡訊 字串 已完成的文字內容。 Yes
型別 列舉 事件的類型。 一律為 response.output_text.done。
可能的數值: response.output_text.done
Yes

OpenAI.回應文字參數

來自模型的文字回應組態選項。 可以是純文字或結構化 JSON 數據。 瞭解詳情:

  • 文字輸入與輸出
  • 結構化輸出
Name 類型 Description Required 預設值
format OpenAI.TextResponseFormatConfiguration 物件,指定模型必須輸出的格式。
{ "type": "json_schema" }設定可啟用結構化輸出,
這可確保模型符合您提供的 JSON 架構。 了解更多資訊請見

預設格式為 { "type": "text" },且沒有其他選項。
不建議使用 gpt-4o 和較新的模型:
設定為 { "type": "json_object" } 可啟用較舊的 JSON 模式,
確保模型產生的訊息是有效的 JSON。 使用 json_schema
支援該功能的模型較為常用。
No
詳細程度 OpenAI.冗長 限制模型回應的冗長程度。 數值越低,結果為
回答越簡潔,而數值越高,回答越冗長。
目前支援的值為 low、 medium、 high和 。
No

OpenAI.ResponseUsage

代表令牌使用詳細數據,包括輸入令牌、輸出令牌、輸出令牌明細,以及所使用的令牌總數。

Name 類型 Description Required 預設值
input_tokens 整數 輸入令牌的數目。 Yes
input_tokens_details OpenAI.ResponseUsageInputTokensDetails Yes
cached_tokens 整數 Yes
output_tokens 整數 輸出令牌的數目。 Yes
output_tokens_details OpenAI.回應使用輸出代幣詳情 Yes
└─ 推理詞元 整數 Yes
total_tokens 整數 使用的令牌總數。 Yes

OpenAI.ResponseUsageInputTokensDetails

Name 類型 Description Required 預設值
cached_tokens 整數 Yes

OpenAI.回應使用輸出代幣詳情

Name 類型 Description Required 預設值
reasoning_tokens 整數 Yes

OpenAI.ResponseWebSearchCallCompletedEvent

注意:網路搜索尚未能夠透過 Azure OpenAI 使用。

Name 類型 Description Required 預設值
item_id 字串 與 Web 搜尋呼叫相關聯的輸出專案的唯一標識碼。 Yes
output_index 整數 與 Web 搜尋呼叫相關聯的輸出專案索引。 Yes
sequence_number 整數 正在處理的網路搜尋呼叫的序號。 Yes
型別 列舉 事件的類型。 一律為 response.web_search_call.completed。
可能的數值: response.web_search_call.completed
Yes

OpenAI.ResponseWebSearchCallInProgressEvent

注意:網路搜索尚未能夠透過 Azure OpenAI 使用。

Name 類型 Description Required 預設值
item_id 字串 與 Web 搜尋呼叫相關聯的輸出專案的唯一標識碼。 Yes
output_index 整數 與 Web 搜尋呼叫相關聯的輸出專案索引。 Yes
sequence_number 整數 正在處理的網路搜尋呼叫的序號。 Yes
型別 列舉 事件的類型。 一律為 response.web_search_call.in_progress。
可能的數值: response.web_search_call.in_progress
Yes

OpenAI.ResponseWebSearchCallSearchingEvent

注意:網路搜索尚未能夠透過 Azure OpenAI 使用。

Name 類型 Description Required 預設值
item_id 字串 與 Web 搜尋呼叫相關聯的輸出專案的唯一標識碼。 Yes
output_index 整數 與 Web 搜尋呼叫相關聯的輸出專案索引。 Yes
sequence_number 整數 正在處理的網路搜尋呼叫的序號。 Yes
型別 列舉 事件的類型。 一律為 response.web_search_call.searching。
可能的數值: response.web_search_call.searching
Yes

OpenAI.ScreenshotParam

Screenshot

螢幕擷取畫面動作。

Name 類型 Description Required 預設值
型別 列舉 指定事件類型。 針對螢幕快照動作,這個屬性一律設定為 screenshot。
可能的數值: screenshot
Yes 螢幕擷取畫面

OpenAI.ScrollParam

Scroll

捲動動作。

Name 類型 Description Required 預設值
keys 字串或空的陣列 No
scroll_x 整數 水平捲動距離。 Yes
scroll_y 整數 垂直捲動距離。 Yes
型別 列舉 指定事件類型。 對於卷動動作,這個屬性一律會設定為 scroll。
可能的數值: scroll
Yes 捲軸
x 整數 發生捲動的 X 座標。 Yes
y 整數 發生捲動的 Y 座標位置。 Yes

OpenAI.SearchContentType

Property 價值
Type 字串
價值 text
image

OpenAI.SearchContextSize

Property 價值
Type 字串
價值 low
medium
high

OpenAI.SkillReferenceparam

Name 類型 Description Required 預設值
skill_id 字串 就是提到的技能ID。
限制條件: 最小長度:1,最大長度:64
Yes
型別 列舉 參考一個用 /v1/skills 端點建立的技能。
可能的數值: skill_reference
Yes skill_reference
版本 字串 可選技能版本。 使用正整數或「最新」字。 預設時省略。 No

OpenAI.SpecificApplyPatchParam

特定套用補丁工具選擇

執行工具呼叫時,強制模型呼叫apply_patch工具。

Name 類型 Description Required 預設值
型別 列舉 這個工具可以呼叫。 一律為 apply_patch。
可能的數值: apply_patch
Yes apply_patch

OpenAI.SpecificFunctionShellParam

特定外殼工具選擇

當需要工具呼叫時,強制模型呼叫 shell 工具。

Name 類型 Description Required 預設值
型別 列舉 這個工具可以呼叫。 一律為 shell。
可能的數值: shell
Yes 殼層

OpenAI.摘要文字內容

摘要文本

模型的摘要文字。

Name 類型 Description Required 預設值
收發簡訊 字串 這是目前模型推理輸出的總結。 Yes
型別 列舉 物件的類型。 一律為 summary_text。
可能的數值: summary_text
Yes summary_text

OpenAI.TextContent

文字內容

文字內容。

Name 類型 Description Required 預設值
收發簡訊 字串 Yes
型別 列舉
可能的數值: text
Yes 收發簡訊

OpenAI.TextResponseFormatConfiguration

物件,指定模型必須輸出的格式。 { "type": "json_schema" }設定會啟用結構化輸出,以確保模型符合您提供的 JSON 架構。 了解更多資訊請見

預設格式為 { "type": "text" },且沒有其他選項。 不建議用於 GPT-4o 及更新型號: 設定啟用 { "type": "json_object" } 舊版 JSON 模式,確保模型產生的訊息是有效的 JSON。 對於支援它的模型,最好使用 。json_schema

OpenAI 的判別器。TextResponseFormatConfiguration

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
json_schema OpenAI.TextResponseFormatJsonSchema
text OpenAI.TextResponseFormatConfigurationResponseFormatText
json_object OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject
Name 類型 Description Required 預設值
型別 OpenAI.TextResponseFormatConfigurationType Yes

OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject

JSON 物件

JSON 物件回應格式。 產生 JSON 回應的較舊方法。 針對支援它的模型,建議使用 json_schema 。 請注意,模型不會產生 JSON,除非有系統或使用者訊息指示它這樣做。

Name 類型 Description Required 預設值
型別 列舉 正在定義的回應格式類型。 一律為 json_object。
可能的數值: json_object
Yes

OpenAI.TextResponseFormatConfigurationResponseFormatText

Text

默認回應格式。 用來產生文字回應。

Name 類型 Description Required 預設值
型別 列舉 正在定義的回應格式類型。 一律為 text。
可能的數值: text
Yes

OpenAI.TextResponseFormatConfigurationType

Property 價值
Type 字串
價值 text
json_schema
json_object

OpenAI.TextResponseFormatJsonSchema

JSON 結構描述

JSON 結構的回應格式。 用來產生結構化 JSON 回應。

Name 類型 Description Required 預設值
描述 字串 模型使用之回應格式的描述
決定如何以特定格式回應。
No
名字 字串 回應格式的名稱。 必須是 a-z、A-Z、0-9 或包含
底線和虛線,最大長度為 64。
Yes
結構描述 OpenAI.ResponseFormatJsonSchemaSchema 回應格式的結構,描述為 JSON Schema 物件。
瞭解如何 在這裡建置 JSON 架構。
Yes
嚴格 布林值或零值 No
型別 列舉 正在定義的回應格式類型。 一律為 json_schema。
可能的數值: json_schema
Yes

OpenAI.Tool

可用來產生回應的工具。

OpenAI.Tool 的識別器

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
code_interpreter OpenAI.CodeInterpreterTool
function OpenAI.FunctionTool
file_search OpenAI.FileSearchTool
computer_use_preview OpenAI.ComputerUsePreviewTool
web_search OpenAI.WebSearchTool
mcp OpenAI.MCPTool
image_generation OpenAI.ImageGenTool
local_shell OpenAI.LocalShellToolParam
shell OpenAI.FunctionShellToolParam
custom OpenAI.CustomToolParam
web_search_preview OpenAI.WebSearchPreviewTool
apply_patch OpenAI.ApplyPatchToolParam
computer OpenAI.ComputerTool
namespace OpenAI.NamespaceToolParam
tool_search OpenAI.ToolSearchToolParam
Name 類型 Description Required 預設值
型別 OpenAI.ToolType Yes

OpenAI.工具選擇允許

允許的工具

限制模型可用的工具於預先定義的集合。

Name 類型 Description Required 預設值
mode 列舉 限制模型可用的工具於預先定義的集合。
auto 允許模型從允許的工具中選擇並產生
訊息。
required 需要模型呼叫一個或多個允許的工具。
可能的值: auto、 required
Yes
工具 物件陣列 一份模型應被允許呼叫的工具定義清單。
對於回應 API,工具定義清單可能如下:
json<br> [ { "type": "function", "name": "get_weather" }, { "type": "mcp", "server_label": "deepwiki" }, { "type": "image_generation" } ]<br>
Yes
型別 列舉 允許的工具配置類型。 一律為 allowed_tools。
可能的數值: allowed_tools
Yes

OpenAI.ToolChoiceCodeInterpreter

指出模型應該使用內建工具來產生回應。 了解更多關於內建工具的資訊。

Name 類型 Description Required 預設值
型別 列舉
可能的數值: code_interpreter
Yes

OpenAI.ToolChoiceComputer

指出模型應該使用內建工具來產生回應。 了解更多關於內建工具的資訊。

Name 類型 Description Required 預設值
型別 列舉
可能的數值: computer
Yes

OpenAI.工具選擇電腦使用

指出模型應該使用內建工具來產生回應。 了解更多關於內建工具的資訊。

Name 類型 Description Required 預設值
型別 列舉
可能的數值: computer_use
Yes

OpenAI.ToolChoiceComputerUsePreview

指出模型應該使用內建工具來產生回應。 了解更多關於內建工具的資訊。

Name 類型 Description Required 預設值
型別 列舉
可能的數值: computer_use_preview
Yes

OpenAI.ToolChoiceCustom

自訂工具

用這個選項強制模型呼叫特定的自訂工具。

Name 類型 Description Required 預設值
名字 字串 要呼叫的自訂工具名稱。 Yes
型別 列舉 對於自訂工具呼叫,類型總是 custom。
可能的數值: custom
Yes

OpenAI.ToolChoiceFileSearch

指出模型應該使用內建工具來產生回應。 了解更多關於內建工具的資訊。

Name 類型 Description Required 預設值
型別 列舉
可能的數值: file_search
Yes

OpenAI.ToolChoiceFunction

函式工具

使用此選項可強制模型呼叫特定函式。

Name 類型 Description Required 預設值
名字 字串 要呼叫的函式名稱。 Yes
型別 列舉 針對函式呼叫,類型一律為function。
可能的數值: function
Yes

OpenAI.ToolChoiceImageGeneration

指出模型應該使用內建工具來產生回應。 了解更多關於內建工具的資訊。

Name 類型 Description Required 預設值
型別 列舉
可能的數值: image_generation
Yes

OpenAI.ToolChoiceMCP

MCP 工具

使用此選項可強制模型在遠端 MCP 伺服器上呼叫特定工具。

Name 類型 Description Required 預設值
名字 字串或空 No
伺服器標籤 字串 要使用的 MCP 伺服器的標籤。 Yes
型別 列舉 針對 MCP 工具,類型一律為 mcp。
可能的數值: mcp
Yes

OpenAI.ToolChoiceOptions

工具選擇模式

控制模型呼叫哪個(如果有)工具。 none 表示模型不會呼叫任何工具,而是會產生訊息。 auto 表示模型可以選擇產生訊息或呼叫一個或多個工具。 required 表示模型必須呼叫一個或多個工具。

Property 價值
Type 字串
價值 none
auto
required

OpenAI.ToolChoiceParam

模型應該如何選取產生回應時要使用的工具(或工具)。 tools請參閱 參數,以瞭解如何指定模型可以呼叫的工具。

OpenAI 的判別器。ToolChoiceParam

此元件會使用 屬性 type 來區分不同的類型:

類型值 Schema
allowed_tools OpenAI.工具選擇允許
mcp OpenAI.ToolChoiceMCP
custom OpenAI.ToolChoiceCustom
apply_patch OpenAI.SpecificApplyPatchParam
shell OpenAI.SpecificFunctionShellParam
file_search OpenAI.ToolChoiceFileSearch
web_search_preview OpenAI.ToolChoiceWebSearchPreview
computer_use_preview OpenAI.ToolChoiceComputerUsePreview
web_search_preview_2025_03_11 OpenAI.ToolChoiceWebSearchPreview20250311
image_generation OpenAI.ToolChoiceImageGeneration
code_interpreter OpenAI.ToolChoiceCodeInterpreter
computer OpenAI.ToolChoiceComputer
computer_use OpenAI.工具選擇電腦使用
function OpenAI.ToolChoiceFunction
Name 類型 Description Required 預設值
型別 OpenAI.ToolChoiceParamType Yes

OpenAI.ToolChoiceParamType

Property 價值
Type 字串
價值 allowed_tools
function
mcp
custom
apply_patch
shell
file_search
web_search_preview
computer_use_preview
web_search_preview_2025_03_11
image_generation
code_interpreter
computer
computer_use

OpenAI.ToolChoiceWebSearchPreview

注意:網路搜索尚未能夠透過 Azure OpenAI 使用。

Name 類型 Description Required 預設值
型別 列舉
可能的數值: web_search_preview
Yes

OpenAI.ToolChoiceWebSearchPreview20250311

指出模型應該使用內建工具來產生回應。 了解更多關於內建工具的資訊。

Name 類型 Description Required 預設值
型別 列舉
可能的數值: web_search_preview_2025_03_11
Yes

OpenAI.ToolSearchExecutionType

Property 價值
Type 字串
價值 server
client

OpenAI.ToolSearchToolParam

工具搜尋工具

延遲工具的託管或自帶自帶工具搜尋設定。

Name 類型 Description Required 預設值
描述 字串或空 No
執行 OpenAI.ToolSearchExecutionType No
parameters OpenAI.EmptyModelParam 或 null No
型別 列舉 工具的類型。 一律為 tool_search。
可能的數值: tool_search
Yes tool_search

OpenAI.ToolType

Property 價值
Type 字串
價值 function
file_search
computer
computer_use_preview
web_search
mcp
code_interpreter
image_generation
local_shell
shell
custom
namespace
tool_search
web_search_preview
apply_patch

OpenAI.ToolsArray

模型可能會在產生回應時呼叫的工具陣列。 您可以藉由設定 tool_choice 參數來指定要使用的工具。 我們支援以下類別的工具:

  • 內建工具:由 OpenAI 提供的工具,擴展模型功能,如網頁搜尋或檔案搜尋。 了解更多關於內建工具的資訊。
  • MCP 工具:透過自訂 MCP 伺服器或預定義連接器如 Google Drive 和 SharePoint 與第三方系統整合。 了解更多關於 MCP 工具的資訊。
  • 函式呼叫(自訂工具):由你定義的函式,使模型能呼叫帶有強型別參數與輸出的程式碼。 深入瞭解 函式呼叫。 你也可以使用自訂工具來呼叫自己的程式碼。

陣列:OpenAI.Tool

OpenAI.TopLogProb

最高對數機率

詞元的最高對數機率。

Name 類型 Description Required 預設值
bytes 整數陣列 Yes
logprob 編號 Yes
Token 字串 Yes

OpenAI.TypeParam

Type

要輸入文字的動作。

Name 類型 Description Required 預設值
收發簡訊 字串 要輸入的文字。 Yes
型別 列舉 指定事件類型。 對於類型動作,這個屬性一律會設定為 type。
可能的數值: type
Yes 型別

OpenAI.UrlCitationBody

網址引用

用來產生模型回應之 Web 資源的引文。

Name 類型 Description Required 預設值
end_index 整數 訊息中 URL 引文最後一個字元的索引。 Yes
start_index 整數 訊息中 URL 引文第一個字元的索引。 Yes
title 字串 Web 資源的標題。 Yes
型別 列舉 URL 引文的類型。 一律為 url_citation。
可能的數值: url_citation
Yes url_citation
url 字串(URI) Web 資源的 URL。 Yes

OpenAI.VectorStoreFileAttributes

一組 16 組可附加於物件的鍵值對。 這很適合用來以結構化格式儲存物件的其他資訊,以及透過 API 或儀錶板查詢物件。 鍵是長度最大為 64 字元的字串。 值是長度上限為 512 個字元、布爾值或數位的字串。

類型:物件

OpenAI.冗長

限制模型回應的冗長程度。 數值越低,回答越簡潔,數值越高,回答越冗長。 目前支援的值為 low、 medium、 high和 。

Property 價值
說明 限制模型回應的冗長程度。 數值越低,結果為
回答越簡潔,而數值越高,回答越冗長。
目前支援的值為 low、 medium、 high和 。
Type 字串
價值 low
medium
high

OpenAI.waitParam

等候

等候動作。

Name 類型 Description Required 預設值
型別 列舉 指定事件類型。 若為等候動作,這個屬性一律會設定為 wait。
可能的數值: wait
Yes wait

OpenAI.WebSearchActionFind

尋找行動

動作類型「find_in_page」:在已載入的頁面中搜尋模式。

Name 類型 Description Required 預設值
模式 字串 在頁面內搜尋的模式或文字。 Yes
型別 列舉 動作型。
可能的數值: find_in_page
Yes
url 字串(URI) 搜尋該模式的頁面的 URL。 Yes

OpenAI.WebSearchActionOpenPage

開頁動作

動作類型 「open_page」 - 從搜尋結果開啟特定的 URL。

Name 類型 Description Required 預設值
型別 列舉 動作型。
可能的數值: open_page
Yes
url 字串或空 模型所開啟的 URL。 No

OpenAI.WebSearchActionSearch

搜尋行動

動作類型 「search」 - 執行 Web 搜尋查詢。

Name 類型 Description Required 預設值
查詢 字串陣列 搜尋查詢。 No
查詢 字串(已棄用) [已棄用]搜尋關鍵字。 Yes
資料來源 OpenAI 的陣列 。WebSearchActionSearchSearchSources 搜尋所用的資料來源。 No
型別 列舉 動作型。
可能的數值: search
Yes

OpenAI.WebSearchAction搜尋來源

Name 類型 Description Required 預設值
型別 列舉
可能的數值: url
Yes
url 字串(URI) Yes

OpenAI.WebSearchApproximateLocation

網路搜尋的大致位置

使用者的大致位置。

Name 類型 Description Required 預設值
城市 字串或空 No
國家 字串或空 No
區域 字串或空 No
timezone 字串或空 No
型別 列舉 位置近似的類型。 一律為 approximate。
可能的數值: approximate
Yes 近似

OpenAI.WebSearchPreviewTool

網頁搜尋預覽

注意:網路搜索尚未能夠透過 Azure OpenAI 使用。

Name 類型 Description Required 預設值
search_content_types OpenAI.SearchContentType 的陣列 No
搜尋上下文大小 OpenAI.SearchContextSize No
型別 列舉 Web 搜尋工具的類型。 其中之一 web_search_preview 或 web_search_preview_2025_03_11。
可能的數值: web_search_preview
Yes web_search_preview
使用者位置 OpenAI.ApproximateLocation 或 null No

OpenAI.WebSearchTool

網路搜尋

注意:網路搜索尚未能夠透過 Azure OpenAI 使用。

Name 類型 Description Required 預設值
濾波器 OpenAI.WebSearchToolFilters 或 null No
搜尋上下文大小 列舉 用於搜尋的內容窗口空間量高階指引。 low、medium 或 high 的其中之一。 medium 是預設值。
可能的值:low、、 mediumhigh
No 適中
型別 列舉 Web 搜尋工具的類型。 其中之一 web_search 或 web_search_2025_08_26。
可能的數值: web_search
Yes 網路搜尋
使用者位置 OpenAI.WebSearchApproximateLocation 或 null No

OpenAI.WebSearchToolFilters

Name 類型 Description Required 預設值
allowed_domains 字串或空的陣列 No