共用方式為


Microsoft Foundry 模型中的 Azure OpenAI 編寫 REST API 預覽參考

備註

本文件指的是 Microsoft Foundry(經典版) 入口網站。

🔍 請參閱 Microsoft Foundry(新)文件 以了解新入口網站。

本文提供 Azure OpenAI 的推斷 REST API 端點詳細資料。

API 規格

對 Azure OpenAI 模型和資源的管理與互動,分別由三個主要 API 介面執行:

  • 控制平面
  • 資料平面 - 製作
  • 資料平面 - 推斷

每個 API 介面/規格都會封裝一組不同的 Azure OpenAI 功能。 每個 API 都各有獨特的預覽版和穩定/正式發行 (GA) API 版本。 預覽版本目前通常會遵循每月頻率。

這很重要

現在有新的預覽推斷 API。 在我們的 API 生命週期指南中深入瞭解。

API 最新預覽版本 最新 GA 版本 規格 說明
控制平面 2025-07-01-preview 2025-06-01 規格檔案 控制平面 API 用於 建立資源模型部署和其他更高層級資源管理工作等作業。 控制平面也會控管如何使用 Azure Resource Manager、Bicep、Terraform 和 Azure CLI 這類功能。
資料平面 v1 preview v1 規格檔案 資料平面 API 會控制推斷和編寫作業。

認證

Azure OpenAI 提供兩種驗證方法。 您可以使用 API 金鑰或 Microsoft Entra ID。

  • API 金鑰驗證:在這類型的驗證中,所有 API 要求都必須在 api-key HTTP 標頭中包含 API 金鑰。 此快速入門提供如何使用這類型驗證進行呼叫的指引。

  • Microsoft Entra ID 驗證:您可以使用 Microsoft Entra 權杖來驗證 API 呼叫。 驗證權杖會包含在要求中作為 Authorization 標頭。 提供的權杖前面必須加上 Bearer,例如 Bearer YOUR_AUTH_TOKEN。 您可以閱讀我們的操作指南,了解如何使用 Microsoft Entra ID 進行驗證

REST API 版本設定

服務 API 使用 api-version 查詢參數設定版本。 所有版本都遵循 YYYY-MM-DD 日期結構。 例如:

POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2024-06-01

數據平面撰寫

文章的其餘部分將介紹 Azure OpenAI 資料平面推論規範的預覽版本。 2025-04-01-preview

如果您要尋找最新 GA API 版本的文件,請參閱最新 GA 資料平面推斷 API

批次 - 清單

GET {endpoint}/openai/batches?api-version=2025-04-01-preview

取得 Azure OpenAI 資源所擁有的所有批次清單。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
after 查詢 字串 上一個分頁要求中最後一個事件的識別碼。
限制 查詢 整數 要擷取的批次數目。 預設值為 20。
$過濾器 查詢 字串 描述篩選條件的 OData 運算式。
$orderby 查詢 字串 描述排序次序的 OData 運算式。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json BatchesList

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/batches?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "has_more": false,
    "data": [
      {
        "object": "batch",
        "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f",
        "endpoint": "/chat/completions",
        "errors": null,
        "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f",
        "completion_window": "24h",
        "status": "completed",
        "output_file_id": "file-f2ddaf43-b48b-46dd-b264-90da10c7a85b",
        "error_file_id": "file-c3b563b0-ebc7-47da-93e3-a2fa694aef0c",
        "created_at": 1646126127,
        "in_progress_at": 1646126130,
        "expires_at": 1646126170,
        "finalizing_at": 1646126134,
        "completed_at": 1646126136,
        "failed_at": null,
        "expired_at": null,
        "cancelling_at": null,
        "cancelled_at": null,
        "request_counts": {
          "total": 500,
          "completed": 400,
          "failed": 100
        },
        "first_id": "batch_abc123",
        "last_id": "batch_abc456",
        "metadata": {
          "batch_description": "Evaluation job"
        }
      }
    ],
    "object": "list"
  }
}

批次 - 建立

POST {endpoint}/openai/batches?api-version=2025-04-01-preview

從上傳的要求檔案建立和執行批次。

回應包含加入佇列作業的詳細資料,包括作業狀態。

結果檔案的識別碼會在完成之後新增至回應。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

請求主體

Content-Type:application/json

名稱 類型 說明 為必填項目 預設
completion_window 字串 應處理批次的時間範圍。 是的
端點 字串 批次所使用的 API 端點。 是的
輸入區塊 字串 要作為批次輸入的 Azure 儲存體 Blob URL。
輸入檔案代號 字串 批次的輸入檔識別碼。
中繼資料 物件 可連結至批次的一組索引鍵/值組。 這有助於以結構化格式儲存批次的其他相關資訊。
output_expires_after FileExpiresAfter 定義檔案的到期日。
output_folder BatchOutputReference 用來儲存輸出的 Azure 記憶體資料夾。

回覆

狀態代碼: 201

描述:已成功建立批次。

Content-Type 型別 說明
application/json Batch

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/batches?api-version=2025-04-01-preview

回應:狀態代碼:201

{
  "headers": {
    "deployment-enqueued-tokens": 1000,
    "deployment-maximum-enqueued-tokens": 5000
  },
  "body": {
    "object": "batch",
    "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f",
    "endpoint": "/chat/completions",
    "errors": null,
    "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f",
    "completion_window": "24h",
    "status": "validating",
    "output_file_id": null,
    "error_file_id": null,
    "created_at": 1646126127,
    "in_progress_at": null,
    "expires_at": null,
    "finalizing_at": null,
    "completed_at": null,
    "failed_at": null,
    "expired_at": null,
    "cancelling_at": null,
    "cancelled_at": null,
    "request_counts": {
      "total": 0,
      "completed": 0,
      "failed": 0
    },
    "metadata": {
      "batch_description": "Evaluation job"
    }
  }
}

批次 - 取得

GET {endpoint}/openai/batches/{batch-id}?api-version=2025-04-01-preview

取得指定批次識別碼所指定單一批次的詳細資料。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
批次編號 路徑 是的 字串 批次的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json Batch

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/batches/{batch-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "batch",
    "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f",
    "endpoint": "/chat/completions",
    "errors": null,
    "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f",
    "completion_window": "24h",
    "status": "completed",
    "output_file_id": "file-f2ddaf43-b48b-46dd-b264-90da10c7a85b",
    "error_file_id": "file-c3b563b0-ebc7-47da-93e3-a2fa694aef0c",
    "created_at": 1646126127,
    "in_progress_at": 1646126130,
    "expires_at": 1646126170,
    "finalizing_at": 1646126134,
    "completed_at": 1646126136,
    "failed_at": null,
    "expired_at": null,
    "cancelling_at": null,
    "cancelled_at": null,
    "request_counts": {
      "total": 500,
      "completed": 400,
      "failed": 100
    },
    "metadata": {
      "batch_description": "Evaluation job"
    }
  }
}

批次 - 取消

POST {endpoint}/openai/batches/{batch-id}/cancel?api-version=2025-04-01-preview

取消指定批次識別碼所指定批次的處理。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
批次編號 路徑 是的 字串 批次的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:已成功取消批次。

Content-Type 型別 說明
application/json Batch

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/batches/{batch-id}/cancel?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "batch",
    "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f",
    "endpoint": "/chat/completions",
    "errors": null,
    "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f",
    "completion_window": "24h",
    "status": "cancelling",
    "output_file_id": null,
    "error_file_id": null,
    "created_at": 1646126127,
    "in_progress_at": 1646126130,
    "expires_at": 1646126170,
    "finalizing_at": null,
    "completed_at": null,
    "failed_at": null,
    "expired_at": null,
    "cancelling_at": 1646126138,
    "cancelled_at": null,
    "request_counts": {
      "total": 500,
      "completed": 100,
      "failed": 5
    },
    "metadata": {
      "batch_description": "Evaluation job"
    }
  }
}

預存完成 - 清單

GET {endpoint}/openai/chat/completions?api-version=2025-04-01-preview

取得預存完成的清單。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
中繼資料 查詢 字串 依預存完成中的 (索引鍵、值) 組進行篩選。
型號 查詢 字串 依模型名稱篩選。
after 查詢 字串 上一個分頁要求中最後一個預存完成的識別碼。
限制 查詢 整數 要擷取的預存完成數目。 預設值為 20。
順序 查詢 字串 依建立時間排序結果的順序 (遞增或遞減)。 預設值為遞減。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json 已儲存完成列表

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/chat/completions?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "list",
    "data": [
      {
        "id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
        "model": "gpt-4o-mini-2024-07-18",
        "created": 1738193475,
        "request_id": "e539c139-a97d-4ee1-bde9-3be3d5c6edb5",
        "usage": {
          "total_tokens": 25,
          "completion_tokens": 7,
          "prompt_tokens": 18
        },
        "seed": 123,
        "top_p": 1,
        "temperature": 1,
        "presence_penalty": 0,
        "frequency_penalty": 0,
        "system_fingerprint": "fp_f3927aa00d",
        "metadata": {
          "key_1": "val_1",
          "key_2": "val_2"
        },
        "choices": [
          {
            "index": 0,
            "message": {
              "content": "Hello, how are you?",
              "role": "assistant"
            },
            "finish_reason": "stop"
          }
        ]
      }
    ],
    "total": 1,
    "first_id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "last_id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "has_more": false
  }
}

預存完成 - 取得

GET {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview

依指定的預存完成識別碼取得預存完成。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
stored-completion-id 路徑 是的 字串 預存完成的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json StoredCompletionResponse

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "chat.completion",
    "id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "model": "gpt-4o-mini-2024-07-18",
    "created": 1738193475,
    "request_id": "e539c139-a97d-4ee1-bde9-3be3d5c6edb5",
    "usage": {
      "total_tokens": 25,
      "completion_tokens": 7,
      "prompt_tokens": 18
    },
    "seed": 123,
    "top_p": 1,
    "temperature": 1,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "system_fingerprint": "fp_f3927aa00d",
    "metadata": {
      "key_1": "val_1",
      "key_2": "val_2"
    },
    "choices": [
      {
        "index": 0,
        "message": {
          "content": "Hello, how are you?",
          "role": "assistant"
        },
        "finish_reason": "stop"
      }
    ]
  }
}

預存完成 - 更新

POST {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview

依指定的預存完成識別碼更新預存完成。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
stored-completion-id 路徑 是的 字串 預存完成的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

請求主體

Content-Type:application/json

名稱 類型 說明 為必填項目 預設
中繼資料 物件 用來取得其他資訊的任意索引鍵/值組。

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json StoredCompletion

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "chat.completion",
    "id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "model": "gpt-4o-mini-2024-07-18",
    "created": 1738193475,
    "request_id": "e539c139-a97d-4ee1-bde9-3be3d5c6edb5",
    "usage": {
      "total_tokens": 25,
      "completion_tokens": 7,
      "prompt_tokens": 18
    },
    "seed": 123,
    "top_p": 1,
    "temperature": 1,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "system_fingerprint": "fp_f3927aa00d",
    "metadata": {
      "key_1": "val_1",
      "key_2": "val_2"
    },
    "choices": [
      {
        "index": 0,
        "message": {
          "content": "Hello, how are you?",
          "role": "assistant"
        },
        "finish_reason": "stop"
      }
    ]
  }
}

預存完成 - 刪除

DELETE {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview

刪除指定的預存完成識別碼的預存完成。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
stored-completion-id 路徑 是的 字串 預存完成的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:已成功刪除預存的完成項目。

Content-Type 型別 說明
application/json StoredCompletionDelete

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

DELETE {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "chat.completion.deleted",
    "id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "deleted": true
  }
}

預存完成 - Getmessages

GET {endpoint}/openai/chat/completions/{stored-completion-id}/messages?api-version=2025-04-01-preview

依指定的預存完成識別碼取得預存完成訊息。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
stored-completion-id 路徑 是的 字串 預存完成的識別碼。
after 查詢 字串 上一個分頁要求中最後一個預存完成訊息的識別碼。
限制 查詢 整數 要擷取的預存完成訊息數目。 預設值為 20。
順序 查詢 字串 依訊息索引排序結果的順序 (遞增或遞減)。 預設值為遞增。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json 儲存的完成訊息

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/chat/completions/{stored-completion-id}/messages?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "list",
    "data": [
      {
        "role": "user",
        "content": "Hello"
      }
    ],
    "total": 1,
    "first_id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "last_id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "has_more": false
  }
}

評估 - 取得清單

GET {endpoint}/openai/evals?api-version=2025-04-01-preview

列出專案的評估細項。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
after 查詢 字串 上一個分頁要求中最後一個評估的識別碼。
限制 查詢 整數 要擷取的評估次數。
順序 查詢 字串
可能的值: ascdesc
評估依時間戳記的排序次序。 用於 asc 遞增順序或 desc 遞減順序。
order_by 查詢 字串
可能的值: created_atupdated_at
Evals 可以按照建立時間或上次更新時間進行排序。 用於 created_at 建立時間或 updated_at 上次更新時間。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:評估清單

Content-Type 型別 說明
application/json EvalList

範例

GET {endpoint}/openai/evals?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "list",
    "data": [
      {
        "object": "eval",
        "id": "eval_6801694950848190b10968bb628b651d",
        "data_source_config": {
          "type": "custom",
          "schema": {
            "type": "object",
            "properties": {
              "item": {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string"
                  },
                  "A": {
                    "type": "string"
                  },
                  "B": {
                    "type": "string"
                  },
                  "C": {
                    "type": "string"
                  },
                  "D": {
                    "type": "string"
                  },
                  "answer": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "item"
            ]
          }
        },
        "testing_criteria": [
          {
            "name": "string check",
            "type": "string_check",
            "input": "{{sample.output_text}}",
            "reference": "{{item.answer}}",
            "operation": "eq"
          }
        ],
        "name": "Math Quiz",
        "created_at": 1744922953,
        "metadata": {}
      }
    ],
    "first_id": "eval_6801694950848190b10968bb628b651d",
    "last_id": "eval_6801694950848190b10968bb628b651d",
    "has_more": false
  }
}

評估 - 建立

POST {endpoint}/openai/evals?api-version=2025-04-01-preview

建立可用來測試模型效能的評估結構。 評估是一組測試準則和數據源。 建立評估之後,您可以在不同的模型和模型參數上執行評估。 我們支持數種類型的評分者和數據源。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態代碼: 201

描述:正常

Content-Type 型別 說明
application/json Eval

範例

POST {endpoint}/openai/evals?api-version=2025-04-01-preview

{
 "name": "Math Quiz",
 "data_source_config": {
  "type": "custom",
  "include_sample_schema": true,
  "item_schema": {
   "type": "object",
   "properties": {
    "question": {
     "type": "string"
    },
    "A": {
     "type": "string"
    },
    "B": {
     "type": "string"
    },
    "C": {
     "type": "string"
    },
    "D": {
     "type": "string"
    },
    "answer": {
     "type": "string"
    }
   }
  }
 },
 "testing_criteria": [
  {
   "type": "string_check",
   "reference": "{{item.answer}}",
   "input": "{{sample.output_text}}",
   "operation": "eq",
   "name": "string check"
  }
 ]
}

回應:狀態代碼:201

{
  "headers": {},
  "body": {
    "object": "eval",
    "id": "eval_6801694950848190b10968bb628b651d",
    "data_source_config": {
      "type": "custom",
      "schema": {
        "type": "object",
        "properties": {
          "item": {
            "type": "object",
            "properties": {
              "question": {
                "type": "string"
              },
              "A": {
                "type": "string"
              },
              "B": {
                "type": "string"
              },
              "C": {
                "type": "string"
              },
              "D": {
                "type": "string"
              },
              "answer": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "item"
        ]
      }
    },
    "testing_criteria": [
      {
        "name": "string check",
        "type": "string_check",
        "input": "{{sample.output_text}}",
        "reference": "{{item.answer}}",
        "operation": "eq"
      }
    ],
    "name": "Math Quiz",
    "created_at": 1744922953,
    "metadata": {}
  }
}

評估 - 刪除

DELETE {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview

刪除評估。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
eval-id 路徑 是的 字串 要刪除之評估的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:已成功刪除評估。

Content-Type 型別 說明
application/json 物件

狀態代碼: 404

描述:找不到評估。

Content-Type 型別 說明
application/json 錯誤

範例

DELETE {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "eval.deleted",
    "deleted": true,
    "eval_id": "eval_6801694950848190b10968bb628b651d"
  }
}

狀態代碼:404

{
  "headers": {},
  "body": {
    "code": "notFound",
    "message": "Evaluation with ID eval_6801694950848190b10968bb628b651d not found."
  }
}

評估 - 取得

GET {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview

依識別碼取得評估。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
eval-id 路徑 是的 字串 要擷取之評估的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:評估

Content-Type 型別 說明
application/json Eval

範例

GET {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "eval",
    "id": "eval_6801694950848190b10968bb628b651d",
    "data_source_config": {
      "type": "custom",
      "schema": {
        "type": "object",
        "properties": {
          "item": {
            "type": "object",
            "properties": {
              "question": {
                "type": "string"
              },
              "A": {
                "type": "string"
              },
              "B": {
                "type": "string"
              },
              "C": {
                "type": "string"
              },
              "D": {
                "type": "string"
              },
              "answer": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "item"
        ]
      }
    },
    "testing_criteria": [
      {
        "name": "string check",
        "type": "string_check",
        "input": "{{sample.output_text}}",
        "reference": "{{item.answer}}",
        "operation": "eq"
      }
    ],
    "name": "Math Quiz",
    "created_at": 1744922953,
    "metadata": {}
  }
}

評估 - 更新

POST {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview

更新評估的特定屬性。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
eval-id 路徑 是的 字串 要更新之評估的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:更新的評估

Content-Type 型別 說明
application/json Eval

範例

POST {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview

{
 "name": "Updated Math Quiz",
 "metadata": {
  "description": "Updated description"
 }
}

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "eval",
    "id": "eval_6801694950848190b10968bb628b651d",
    "data_source_config": {
      "type": "custom",
      "schema": {
        "type": "object",
        "properties": {
          "item": {
            "type": "object",
            "properties": {
              "question": {
                "type": "string"
              },
              "A": {
                "type": "string"
              },
              "B": {
                "type": "string"
              },
              "C": {
                "type": "string"
              },
              "D": {
                "type": "string"
              },
              "answer": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "item"
        ]
      }
    },
    "testing_criteria": [
      {
        "name": "string check",
        "type": "string_check",
        "input": "{{sample.output_text}}",
        "reference": "{{item.answer}}",
        "operation": "eq"
      }
    ],
    "name": "Updated Math Quiz",
    "created_at": 1744922953,
    "metadata": {
      "description": "Updated description"
    }
  }
}

評估 - Getrunlist

GET {endpoint}/openai/evals/{eval-id}/runs?api-version=2025-04-01-preview

取得評估的執行清單。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
eval-id 路徑 是的 字串 要擷取執行之評估的識別碼。
after 查詢 字串 上一個分頁要求中最後一個執行識別碼。
限制 查詢 整數 要擷取的執行數目。
順序 查詢 字串
可能的值: ascdesc
執行依時間戳記的排序次序。 用於 asc 遞增順序或 desc 遞減順序。 預設為 asc
狀態 查詢 字串
可能的值:queuedin_progresscompletedcanceledfailed
依狀態執行篩選。 使用「queued」、「in_progress」、「failed」、「completed」、「canceled」。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:評估的執行清單

Content-Type 型別 說明
application/json EvalRunList

範例

GET {endpoint}/openai/evals/{eval-id}/runs?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "list",
    "data": [
      {
        "object": "eval.run",
        "id": "evalrun_68016a056f0481909b9774447bdd1aa3",
        "eval_id": "eval_6801694950848190b10968bb628b651d",
        "report_url": "https://ai.azure.com/resource/evaluation",
        "status": "queued",
        "model": "gpt-4o-mini",
        "name": "Math quiz",
        "created_at": 1744923141,
        "result_counts": {
          "total": 0,
          "errored": 0,
          "failed": 0,
          "passed": 0
        },
        "per_model_usage": null,
        "per_testing_criteria_results": null,
        "data_source": {
          "type": "completions",
          "source": {
            "type": "file_content",
            "content": [
              {
                "item": {
                  "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
                  "A": "0",
                  "B": "4",
                  "C": "2",
                  "D": "6",
                  "answer": "B"
                }
              },
              {
                "item": {
                  "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
                  "A": "8",
                  "B": "2",
                  "C": "24",
                  "D": "120",
                  "answer": "C"
                }
              }
            ]
          },
          "input_messages": {
            "template": [
              {
                "type": "message",
                "role": "system",
                "content": {
                  "text": "Answer the question's with A, B, C, or D."
                }
              },
              {
                "type": "message",
                "role": "user",
                "content": {
                  "text": "Question: {{item.question}} A: {{item.A}} B: {{item.B}} C: {{item.C}} D: {{item.D}}."
                }
              }
            ]
          },
          "model": "gpt-4o-mini",
          "sampling_params": {
            "seed": 42,
            "temperature": 1,
            "top_p": 1
          }
        },
        "error": null,
        "metadata": {}
      }
    ],
    "first_id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "last_id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "has_more": false
  }
}

評估 - 建立執行

POST {endpoint}/openai/evals/{eval-id}/runs?api-version=2025-04-01-preview

建立新的評估執行。 這是將開始評分的端點。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
eval-id 路徑 是的 字串 要為其建立執行之評估的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態代碼: 201

描述:已成功為評估建立執行

Content-Type 型別 說明
application/json EvalRun

狀態代碼: 400

描述:錯誤的請求(例如遺漏評估物件)

Content-Type 型別 說明
application/json 錯誤

範例

POST {endpoint}/openai/evals/{eval-id}/runs?api-version=2025-04-01-preview

{
 "name": "Math quiz",
 "data_source": {
  "type": "completions",
  "source": {
   "type": "file_content",
   "content": [
    {
     "item": {
      "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
      "A": "0",
      "B": "4",
      "C": "2",
      "D": "6",
      "answer": "B"
     }
    },
    {
     "item": {
      "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
      "A": "8",
      "B": "2",
      "C": "24",
      "D": "120",
      "answer": "C"
     }
    }
   ]
  },
  "input_messages": {
   "type": "template",
   "template": [
    {
     "type": "message",
     "role": "system",
     "content": {
      "text": "Answer the question's with A, B, C, or D."
     }
    },
    {
     "type": "message",
     "role": "user",
     "content": {
      "text": "Question: {{item.question}} A: {{item.A}} B: {{item.B}} C: {{item.C}} D: {{item.D}}."
     }
    }
   ]
  },
  "model": "gpt-4o-mini",
  "sampling_params": {
   "temperature": 1,
   "top_p": 1,
   "seed": 42
  }
 }
}

回應:狀態代碼:201

{
  "headers": {},
  "body": {
    "object": "eval.run",
    "id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "eval_id": "eval_6801694950848190b10968bb628b651d",
    "report_url": "https://ai.azure.com/resource/evaluation",
    "status": "queued",
    "model": "gpt-4o-mini",
    "name": "Math quiz",
    "created_at": 1744923141,
    "result_counts": {
      "total": 0,
      "errored": 0,
      "failed": 0,
      "passed": 0
    },
    "per_model_usage": null,
    "per_testing_criteria_results": null,
    "data_source": {
      "type": "completions",
      "source": {
        "type": "file_content",
        "content": [
          {
            "item": {
              "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
              "A": "0",
              "B": "4",
              "C": "2",
              "D": "6",
              "answer": "B"
            }
          },
          {
            "item": {
              "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
              "A": "8",
              "B": "2",
              "C": "24",
              "D": "120",
              "answer": "C"
            }
          }
        ]
      },
      "input_messages": {
        "type": "template",
        "template": [
          {
            "type": "message",
            "role": "system",
            "content": {
              "text": "Answer the question's with A, B, C, or D."
            }
          },
          {
            "type": "message",
            "role": "user",
            "content": {
              "text": "Question: {{item.question}} A: {{item.A}} B: {{item.B}} C: {{item.C}} D: {{item.D}}."
            }
          }
        ]
      },
      "model": "gpt-4o-mini",
      "sampling_params": {
        "seed": 42,
        "temperature": 1,
        "top_p": 1
      }
    },
    "error": null,
    "metadata": {}
  }
}

評估 - 刪除執行

DELETE {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview

刪除評估執行。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
eval-id 路徑 是的 字串 要從中刪除執行之評估的識別碼。
run-id 路徑 是的 字串 要刪除的執行識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:已成功刪除評估回合

Content-Type 型別 說明
application/json 物件

狀態代碼: 404

描述:找不到執行

Content-Type 型別 說明
application/json 錯誤

範例

DELETE {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "eval.deleted",
    "deleted": true,
    "run_id": "evalrun_68016a056f0481909b9774447bdd1aa3"
  }
}

狀態代碼:404

{
  "headers": {},
  "body": {
    "code": "notFound",
    "message": "Evaluation Run with ID evalrun_68016a056f0481909b9774447bdd1aa3 not found."
  }
}

評估 - 取得執行

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview

取得依識別碼的評估執行。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
eval-id 路徑 是的 字串 要擷取執行之評估的識別碼。
run-id 路徑 是的 字串 要擷取的執行識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:評估回合

Content-Type 型別 說明
application/json EvalRun

範例

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "eval.run",
    "id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "eval_id": "eval_6801694950848190b10968bb628b651d",
    "report_url": "https://ai.azure.com/resource/evaluation",
    "status": "queued",
    "model": "gpt-4o-mini",
    "name": "Math quiz",
    "created_at": 1744923141,
    "result_counts": {
      "total": 0,
      "errored": 0,
      "failed": 0,
      "passed": 0
    },
    "per_model_usage": null,
    "per_testing_criteria_results": null,
    "data_source": {
      "type": "completions",
      "source": {
        "type": "file_content",
        "content": [
          {
            "item": {
              "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
              "A": "0",
              "B": "4",
              "C": "2",
              "D": "6",
              "answer": "B"
            }
          },
          {
            "item": {
              "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
              "A": "8",
              "B": "2",
              "C": "24",
              "D": "120",
              "answer": "C"
            }
          }
        ]
      },
      "input_messages": {
        "type": "template",
        "template": [
          {
            "type": "message",
            "role": "system",
            "content": {
              "text": "Answer the question's with A, B, C, or D."
            }
          },
          {
            "type": "message",
            "role": "user",
            "content": {
              "text": "Question: {{item.question}} A: {{item.A}} B: {{item.B}} C: {{item.C}} D: {{item.D}}."
            }
          }
        ]
      },
      "model": "gpt-4o-mini",
      "sampling_params": {
        "seed": 42,
        "temperature": 1,
        "top_p": 1
      }
    },
    "error": null,
    "metadata": {}
  }
}

評估 - 取消執行

POST {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview

取消進行中的評估過程。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
eval-id 路徑 是的 字串 您要取消其執行之評估的識別碼。
run-id 路徑 是的 字串 要取消的執行識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:取消的評估運行對象

Content-Type 型別 說明
application/json EvalRun

範例

POST {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "eval.run",
    "id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "eval_id": "eval_6801694950848190b10968bb628b651d",
    "report_url": "https://ai.azure.com/resource/evaluation",
    "status": "canceled",
    "model": "gpt-4o-mini",
    "name": "Math quiz",
    "created_at": 1744923141,
    "result_counts": {
      "total": 0,
      "errored": 0,
      "failed": 0,
      "passed": 0
    },
    "per_model_usage": null,
    "per_testing_criteria_results": null,
    "data_source": {
      "type": "completions",
      "source": {
        "type": "file_content",
        "content": [
          {
            "item": {
              "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
              "A": "0",
              "B": "4",
              "C": "2",
              "D": "6",
              "answer": "B"
            }
          },
          {
            "item": {
              "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
              "A": "8",
              "B": "2",
              "C": "24",
              "D": "120",
              "answer": "C"
            }
          }
        ]
      },
      "input_messages": {
        "type": "template",
        "template": [
          {
            "type": "message",
            "role": "system",
            "content": {
              "text": "Answer the question's with A, B, C, or D."
            }
          },
          {
            "type": "message",
            "role": "user",
            "content": {
              "text": "Question: {{item.question}} A: {{item.A}} B: {{item.B}} C: {{item.C}} D: {{item.D}}."
            }
          }
        ]
      },
      "model": "gpt-4o-mini",
      "sampling_params": {
        "seed": 42,
        "temperature": 1,
        "top_p": 1
      }
    },
    "error": null,
    "metadata": {}
  }
}

評估 - Getrunoutputitems

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}/output_items?api-version=2025-04-01-preview

取得評估執行的輸出項目清單。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
eval-id 路徑 是的 字串 要擷取執行之評估的識別碼。
run-id 路徑 是的 字串 要擷取輸出項目的執行識別碼。
after 查詢 字串 上一個分頁要求中最後一個輸出項目的標識碼。
限制 查詢 整數 要擷取的輸出項目數目。
狀態 查詢 字串
可能的值: failpass
依狀態篩選輸出專案。 使用 failed 依失敗的輸出專案進行篩選,或 pass 依傳遞的輸出專案進行篩選。
順序 查詢 字串
可能的值: ascdesc
依時間戳排序輸出專案的排序順序。 用於 asc 遞增順序或 desc 遞減順序。 預設為 asc
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:評估回合的輸出項目清單

Content-Type 型別 說明
application/json EvalRunOutputItemList

範例

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}/output_items?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "list",
    "data": [
      {
        "object": "eval.run.output_item",
        "id": "outputitem_68017251ff3881908bf5096bf4cd91c6",
        "created_at": 1744925265,
        "run_id": "evalrun_68016a056f0481909b9774447bdd1aa3",
        "eval_id": "eval_6801694950848190b10968bb628b651d",
        "status": "fail",
        "datasource_item_id": 1,
        "datasource_item": {
          "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
          "A": "8",
          "B": "2",
          "C": "24",
          "D": "120",
          "answer": "C"
        },
        "results": [
          {
            "name": "string check-63b1fffa-bee6-4c37-ae77-ed46e3dce2b7",
            "sample": null,
            "passed": false,
            "score": 0
          }
        ],
        "sample": {
          "input": [
            {
              "role": "system",
              "content": "Answer the question's with A, B, C, or D.",
              "function_call": null
            },
            {
              "role": "user",
              "content": "Question: Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5. A: 8 B: 2 C: 24 D: 120.",
              "function_call": null
            }
          ],
          "output": [
            {
              "role": "assistant",
              "content": "To find the index of the subgroup generated by the permutation \\( p = (1, 2, 5, 4)(2, 3) \\) in \\( S_5 \\), we first need to determine the order of \\( p \\).\n\n1. The cycle \\( (1, 2, 5, 4) \\) has length 4.\n2. The cycle \\( (2, 3) \\) has length 2.\n3. The least common multiple (LCM) of these lengths gives the order of the permutation \\( p \\).\n\nCalculating the LCM:\n\\[\n\\text{lcm}(4, 2) = 4\n\\]\nThus, the order of \\( p \\) is 4.\n\nNext, we find the size of the subgroup \\( \\langle p \\rangle \\):\n- The size of \\( \\langle p \\rangle \\) is equal to the order of \\( p \\), which is 4.\n\nNow, we know the size of \\( S_5 \\):\n\\[\n|S_5| = 5! = 120\n\\]\n\nFinally, to find the index of \\( \\langle p \\rangle \\) in \\( S_5 \\), we use the formula:\n\\[\n\\text{index} = \\frac{|S_5|}{|\\langle p \\rangle|} = \\frac{120}{4} = 30\n\\]\n\nHowever, the available answer choices do not include 30. There may be a mistake because the question expects an answer among A, B, C, and D.\n\nLet\u00e2\u20ac\u2122s assume we misunderstood \\( \\langle p \\rangle \\), and instead, we can deduce based solely on given answers looking for a relation to \\( S_5 \\) without delving into detailed subgroup tracks. \n\nSince \\( S_5 \\) has 30 different elements in a subgroup configuration, the closest answer physically relating as long as \\( p \\) covers two elements effectively would logically fit an answer of 120 / 60 which has no direct relationship.\n\nGiven the option choices and specific rank formulations as often made regarding elements in specific construct the subgroup at best reflects around a viable ratio of parts allowed through available indices. \n\nThus, after reasoning through which aligns most structurally geometrically yielding across all configurations possible integrated yet arrives leading \\( p \\) through neighborhood distributions leaving reflections outstanding:\n\n\n\nThe correct answer is:\n**C: 24**\n\nHowever per the discussion migrating \\( p \\) may leave various pathways leading ultimately toward that framing in modeling. Always a good suggestion confirming the elements group generating any possible in outputs rationales. ",
              "function_call": null
            }
          ],
          "finish_reason": "stop",
          "model": "gpt-4o-mini-2024-07-18",
          "usage": {
            "total_tokens": 627,
            "completion_tokens": 546,
            "prompt_tokens": 81,
            "cached_tokens": 0
          },
          "error": null,
          "temperature": 1,
          "top_p": 1,
          "seed": 42
        }
      },
      {
        "object": "eval.run.output_item",
        "id": "outputitem_6801724f54888190942ec66a197309dd",
        "created_at": 1744925263,
        "run_id": "evalrun_68016a056f0481909b9774447bdd1aa3",
        "eval_id": "eval_6801694950848190b10968bb628b651d",
        "status": "fail",
        "datasource_item_id": 0,
        "datasource_item": {
          "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
          "A": "0",
          "B": "4",
          "C": "2",
          "D": "6",
          "answer": "B"
        },
        "results": [
          {
            "name": "string check-63b1fffa-bee6-4c37-ae77-ed46e3dce2b7",
            "sample": null,
            "passed": false,
            "score": 0
          }
        ],
        "sample": {
          "input": [
            {
              "role": "system",
              "content": "Answer the question's with A, B, C, or D.",
              "function_call": null
            },
            {
              "role": "user",
              "content": "Question: Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q. A: 0 B: 4 C: 2 D: 6.",
              "function_call": null
            }
          ],
          "output": [
            {
              "role": "assistant",
              "content": "To find the degree of the field extension \\(\\mathbb{Q}(\\sqrt{2}, \\sqrt{3}, \\sqrt{18})\\) over \\(\\mathbb{Q}\\), we can simplify \\(\\sqrt{18}\\) since \\(\\sqrt{18} = \\sqrt{9 \\cdot 2} = 3\\sqrt{2}\\). \n\nThus, the field can be rewritten as \\(\\mathbb{Q}(\\sqrt{2}, \\sqrt{3})\\).\n\nNext, we calculate the degree of the extensions step by step:\n\n1. The extension \\(\\mathbb{Q}(\\sqrt{2})\\) over \\(\\mathbb{Q}\\) has degree 2, since \\(\\sqrt{2}\\) is not in \\(\\mathbb{Q}\\) and satisfies the polynomial \\(x^2 - 2\\).\n\n2. Next, we consider the extension \\(\\mathbb{Q}(\\sqrt{2}, \\sqrt{3})\\) over \\(\\mathbb{Q}(\\sqrt{2})\\). The element \\(\\sqrt{3}\\) is also not in \\(\\mathbb{Q}(\\sqrt{2})\\) and satisfies the polynomial \\(x^2 - 3\\), which is irreducible over \\(\\mathbb{Q}(\\sqrt{2})\\). Hence, the degree of the extension \\(\\mathbb{Q}(\\sqrt{2}, \\sqrt{3})\\) over \\(\\mathbb{Q}(\\sqrt{2})\\) is also 2.\n\nNow we can combine these degrees:\n\n\\[\n[\\mathbb{Q}(\\sqrt{2}, \\sqrt{3}) : \\mathbb{Q}] = [\\mathbb{Q}(\\sqrt{2}, \\sqrt{3}) : \\mathbb{Q}(\\sqrt{2})] \\times [\\mathbb{Q}(\\sqrt{2}) : \\mathbb{Q}] = 2 \\times 2 = 4.\n\\]\n\nThus, the degree of the field extension \\(\\mathbb{Q}(\\sqrt{2}, \\sqrt{3}, \\sqrt{18})\\) over \\(\\mathbb{Q}\\) is 4.\n\nTherefore, the answer is:\n\n**B: 4**.",
              "function_call": null
            }
          ],
          "finish_reason": "stop",
          "model": "gpt-4o-mini-2024-07-18",
          "usage": {
            "total_tokens": 556,
            "completion_tokens": 487,
            "prompt_tokens": 69,
            "cached_tokens": 0
          },
          "error": null,
          "temperature": 1,
          "top_p": 1,
          "seed": 42
        }
      }
    ],
    "first_id": "outputitem_68017251ff3881908bf5096bf4cd91c6",
    "last_id": "outputitem_6801724f54888190942ec66a197309dd",
    "has_more": false
  }
}

評估 - Getrunoutputitem

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}/output_items/{output-item-id}?api-version=2025-04-01-preview

依識別碼取得評估執行輸出項目。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
eval-id 路徑 是的 字串 要擷取執行之評估的識別碼。
run-id 路徑 是的 字串 要擷取的執行識別碼。
輸出項目編號 路徑 是的 字串 要擷取之輸出項目的標識碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:評估執行輸出項目

Content-Type 型別 說明
application/json EvalRunOutputItem

範例

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}/output_items/{output-item-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "eval.run.output_item",
    "id": "outputitem_68017251ff3881908bf5096bf4cd91c6",
    "created_at": 1744925265,
    "run_id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "eval_id": "eval_6801694950848190b10968bb628b651d",
    "status": "fail",
    "datasource_item_id": 1,
    "datasource_item": {
      "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
      "A": "8",
      "B": "2",
      "C": "24",
      "D": "120",
      "answer": "C"
    },
    "results": [
      {
        "name": "string check-63b1fffa-bee6-4c37-ae77-ed46e3dce2b7",
        "sample": null,
        "passed": false,
        "score": 0
      }
    ],
    "sample": {
      "input": [
        {
          "role": "system",
          "content": "Answer the question's with A, B, C, or D."
        },
        {
          "role": "user",
          "content": "Question: Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5. A: 8 B: 2 C: 24 D: 120."
        }
      ],
      "output": [
        {
          "role": "assistant",
          "content": "To find the index of the subgroup generated by the permutation \\( p = (1, 2, 5, 4)(2, 3) \\) in \\( S_5 \\), we first need to determine the order of \\( p \\).\n\n1. The cycle \\( (1, 2, 5, 4) \\) has length 4.\n2. The cycle \\( (2, 3) \\) has length 2.\n3. The least common multiple (LCM) of these lengths gives the order of the permutation \\( p \\).\n\nCalculating the LCM:\n\\[\n\\text{lcm}(4, 2) = 4\n\\]\nThus, the order of \\( p \\) is 4.\n\nNext, we find the size of the subgroup \\( \\langle p \\rangle \\):\n- The size of \\( \\langle p \\rangle \\) is equal to the order of \\( p \\), which is 4.\n\nNow, we know the size of \\( S_5 \\):\n\\[\n|S_5| = 5! = 120\n\\]\n\nFinally, to find the index of \\( \\langle p \\rangle \\) in \\( S_5 \\), we use the formula:\n\\[\n\\text{index} = \\frac{|S_5|}{|\\langle p \\rangle|} = \\frac{120}{4} = 30\n\\]\n\nHowever, the available answer choices do not include 30. There may be a mistake because the question expects an answer among A, B, C, and D.\n\nLet\u00e2\u20ac\u2122s assume we misunderstood \\( \\langle p \\rangle \\), and instead, we can deduce based solely on given answers looking for a relation to \\( S_5 \\) without delving into detailed subgroup tracks. \n\nSince \\( S_5 \\) has 30 different elements in a subgroup configuration, the closest answer physically relating as long as \\( p \\) covers two elements effectively would logically fit an answer of 120 / 60 which has no direct relationship.\n\nGiven the option choices and specific rank formulations as often made regarding elements in specific construct the subgroup at best reflects around a viable ratio of parts allowed through available indices. \n\nThus, after reasoning through which aligns most structurally geometrically yielding across all configurations possible integrated yet arrives leading \\( p \\) through neighborhood distributions leaving reflections outstanding:\n\n\n\nThe correct answer is:\n**C: 24**\n\nHowever per the discussion migrating \\( p \\) may leave various pathways leading ultimately toward that framing in modeling. Always a good suggestion confirming the elements group generating any possible in outputs rationales. "
        }
      ],
      "finish_reason": "stop",
      "model": "gpt-4o-mini-2024-07-18",
      "usage": {
        "total_tokens": 627,
        "completion_tokens": 546,
        "prompt_tokens": 81,
        "cached_tokens": 0
      },
      "error": null,
      "temperature": 1,
      "top_p": 1,
      "seed": 42
    }
  }
}

檔案 - 清單

GET {endpoint}/openai/files?api-version=2025-04-01-preview

取得 Azure OpenAI 資源所擁有的所有檔案清單。

其中包括使用者上傳的內容,例如具有目的為「微調」的檔案,用於定型或驗證微調模型,以及服務所產生的檔案,例如 「fine-tune-results」,其中包含對應微調作業的各種計量。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
目的 查詢 字串
可能的值:fine-tune、、、fine-tune-resultsassistantsassistants_output、、、、、batchbatch_outputevalsevals_output
只傳回具有指定用途的檔案。
限制 查詢 整數 要傳回的物件數目限制。 限制的範圍可以介於 1 到 10,000 之間,預設值為 10,000。
after 查詢 字串 用於分頁的游標。 after 是在清單中定義您的位置的物件識別碼。 例如,如果您提出清單要求並收到 100 個物件 (結尾為 obj_foo),則後續呼叫可以包含 after=obj_foo 來擷取清單的下一頁。
順序 查詢 字串 依物件的 created_at 時間戳記排序次序。 asc 表示遞增順序和 desc 遞減順序。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json FileList

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/files?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "data": [
      {
        "status": "processed",
        "bytes": 140,
        "purpose": "fine-tune",
        "filename": "puppy.jsonl",
        "id": "file-181a1cbdcdcf4677ada87f63a0928099",
        "created_at": 1646126127,
        "object": "file"
      },
      {
        "status": "processed",
        "bytes": 32423,
        "purpose": "fine-tune-results",
        "filename": "results.csv",
        "id": "file-181a1cbdcdcf4677ada87f63a0928099",
        "created_at": 1646126127,
        "object": "file"
      }
    ],
    "object": "list"
  }
}

檔案 - 上傳

POST {endpoint}/openai/files?api-version=2025-04-01-preview

從本機電腦上傳資料,以建立新的檔案實體。 例如,上傳的檔案可用於訓練或評估微調的模型。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

請求主體

Content-Type:multipart/form-data

名稱 類型 說明 為必填項目 預設
錨點 字串 定義錨點,相對於應該從哪個時間產生絕對到期。
seconds 整數 取得以秒為單位的相對到期時間。
範圍:[1209600 - 2592000]。
檔案 字串 取得或設定要上傳至 Azure OpenAI 的檔案。 是的
目的 字串 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。 是的

回覆

狀態代碼: 201

描述:已成功建立檔案。

Content-Type 型別 說明
application/json 檔案

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/files?api-version=2025-04-01-preview

回應:狀態代碼:201

{
  "headers": {
    "location": "https://aoairesource.openai.azure.com/openai/files/file-181a1cbdcdcf4677ada87f63a0928099"
  },
  "body": {
    "status": "pending",
    "purpose": "fine-tune",
    "filename": "puppy.jsonl",
    "id": "file-181a1cbdcdcf4677ada87f63a0928099",
    "created_at": 1646126127,
    "object": "file"
  }
}

檔案 - 匯入

POST {endpoint}/openai/files/import?api-version=2025-04-01-preview

從提供的 URL 匯入資料,以建立新的檔案實體。 例如,上傳的檔案可用於訓練或評估微調的模型。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

請求主體

Content-Type:application/json

名稱 類型 說明 為必填項目 預設
content_url 字串 要從中下載文件的 URL (可以是 Blob 的 SAS URL 或任何其他可透過 GET 要求存取的外部 URL)。 是的
expires_after FileExpiresAfter 定義檔案的到期日。
檔名 字串 要上傳的 JSON 行檔案名稱。
如果 purpose 設定為「fine-tune」,則每一行都是 JSON 記錄,其中包含代表訓練範例的「提示」和「完成」欄位。 是的
目的 目的 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。 是的

回覆

狀態代碼: 201

描述:已成功建立檔案。

Content-Type 型別 說明
application/json 檔案

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/files/import?api-version=2025-04-01-preview

回應:狀態代碼:201

{
  "headers": {
    "location": "https://aoairesource.openai.azure.com/openai/files/file-181a1cbdcdcf4677ada87f63a0928099"
  },
  "body": {
    "status": "pending",
    "purpose": "fine-tune",
    "filename": "puppy.jsonl",
    "id": "file-181a1cbdcdcf4677ada87f63a0928099",
    "created_at": 1646126127,
    "object": "file"
  }
}

檔案 - 取得

GET {endpoint}/openai/files/{file-id}?api-version=2025-04-01-preview

取得指定 file-id 所指定之單一檔案的詳細資料,包括狀態、大小、用途等。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
file-id 路徑 是的 字串 檔案的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json 檔案

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/files/{file-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "status": "processed",
    "bytes": 140,
    "purpose": "fine-tune",
    "filename": "puppy.jsonl",
    "id": "file-181a1cbdcdcf4677ada87f63a0928099",
    "created_at": 1646126127,
    "object": "file"
  }
}

檔案 - 刪除

DELETE {endpoint}/openai/files/{file-id}?api-version=2025-04-01-preview

刪除具有指定檔案識別碼的檔案。

如果使用檔案,例如微調作業中的訓練檔案,則也允許刪除。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
file-id 路徑 是的 字串 檔案的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:已成功刪除檔案。

Content-Type 型別 說明
application/json FileDelete

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

DELETE {endpoint}/openai/files/{file-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "object": "file",
    "deleted": true,
    "id": "file-181a1cbdcdcf4677ada87f63a0928099"
  }
}

檔案 - 取得內容

GET {endpoint}/openai/files/{file-id}/content?api-version=2025-04-01-preview

取得指定 file-id 所指定檔案的內容。

檔案可以是用戶上傳的內容,或由服務產生,例如微調作業的結果計量。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
file-id 路徑 是的 字串 檔案的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/octet-stream 字串
application/json 字串

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/octet-stream 錯誤回應
application/json 錯誤回應

範例

GET {endpoint}/openai/files/{file-id}/content?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": "raw file content"
}

微調 - 清單

GET {endpoint}/openai/fine_tuning/jobs?api-version=2025-04-01-preview

取得 Azure OpenAI 資源所擁有的所有微調作業清單。針對每個微調作業傳回的詳細資料,包括其標識符、基底模型、訓練和驗證檔案、超參數、時間戳記、狀態以及事件。

當作業狀態變更時,就會建立事件。 例如,執行或完成,以及上傳結果的時間。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
after 查詢 字串 上一個分頁要求中最後一個事件的識別碼。
限制 查詢 整數 要擷取的事件數目。 預設值為 20。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json FineTuningJobList

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/fine_tuning/jobs?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "has_more": false,
    "data": [
      {
        "hyperparameters": {
          "n_epochs": -1
        },
        "integrations": [
          {
            "type": "wandb",
            "wandb": {
              "project": "custom-wandb-project",
              "tags": [
                "project:tag",
                "lineage"
              ]
            }
          }
        ],
        "method": {
          "type": "supervised"
        },
        "status": "succeeded",
        "model": "curie",
        "fine_tuned_model": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f",
        "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
        "result_files": [
          "file-181a1cbdcdcf4677ada87f63a0928099"
        ],
        "finished_at": 1646127311,
        "trained_tokens": 2342,
        "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
        "created_at": 1646126127,
        "object": "fine_tuning.job"
      }
    ],
    "object": "list"
  }
}

微調 - 建立

POST {endpoint}/openai/fine_tuning/jobs?api-version=2025-04-01-preview

建立作業,從指定訓練檔案微調指定的模型。

回應包含加入佇列作業的詳細資料,包括作業狀態和超參數。

微調模型的名稱會在完成時新增至回應。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

請求主體

Content-Type:application/json

名稱 類型 說明 為必填項目 預設
超參數 FineTuningHyperParameters 微調作業中使用的超參數設定。
整合 陣列 支援微調作業之整合的設定清單。 規劃了許多整合,因此請務必檢查並處理整合類型。
方法 物件 用於受監督微調的方法
\---- 類型 微調方法類型
型號 字串 用於此微調之基本模型的識別碼 (model-id)。 是的
種子 整數 用於微調作業的種子。 傳入相同的種子和作業參數應該會產生相同的結果,但在罕見的情況下可能會有所不同。 如果未指定種子,將會為您產生一個種子。
尾碼 字串 用來識別微調模型的尾碼。 尾碼最多可包含 40 個字元 (a-z、A-Z、0-9 和 _),這些字元會新增至微調模型名稱中。
training_file 字串 用於訓練此微調模型的檔案識別碼 (file-id)。 是的
驗證檔案 字串 用於在訓練期間評估微調模型的檔案識別碼 (file-id)。

回覆

狀態代碼: 201

描述:已成功建立微調。

Content-Type 型別 說明
application/json FineTuningJob

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/fine_tuning/jobs?api-version=2025-04-01-preview

回應:狀態代碼:201

{
  "headers": {
    "location": "https://aoairesource.openai.azure.com/openai/fine_tuning/jobs/ft-72a2792ef7d24ba7b82c7fe4a37e379f"
  },
  "body": {
    "hyperparameters": {
      "n_epochs": -1
    },
    "integrations": [
      {
        "type": "wandb",
        "wandb": {
          "project": "custom-wandb-project",
          "tags": [
            "project:tag",
            "lineage"
          ]
        }
      }
    ],
    "method": {
      "type": "supervised"
    },
    "status": "pending",
    "model": "curie",
    "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
    "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "fine_tuning.job"
  }
}

微調 - 取得

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}?api-version=2025-04-01-preview

取得指定 fine-tune-id 所指定單一微調作業的詳細資料。

詳細數據包含基底模型、定型和驗證檔案、超參數、時間戳、狀態和事件。

當作業狀態變更 (例如執行或完成) 時,以及上傳結果時,就會建立事件。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
fine-tuning-job-id 路徑 是的 字串 微調作業的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json FineTuningJob

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "hyperparameters": {
      "n_epochs": -1
    },
    "integrations": [
      {
        "type": "wandb",
        "wandb": {
          "project": "custom-wandb-project",
          "tags": [
            "project:tag",
            "lineage"
          ]
        }
      }
    ],
    "method": {
      "type": "supervised"
    },
    "status": "succeeded",
    "model": "curie",
    "fine_tuned_model": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
    "result_files": [
      "file-181a1cbdcdcf4677ada87f63a0928099"
    ],
    "finished_at": 1646127311,
    "trained_tokens": 2342,
    "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "fine_tuning.job"
  }
}

微調 - 刪除

DELETE {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}?api-version=2025-04-01-preview

刪除指定的 fine-tune-id 所指定的微調作業。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
fine-tuning-job-id 路徑 是的 字串 微調作業的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態代碼: 204

描述:已成功刪除微調。

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

DELETE {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}?api-version=2025-04-01-preview

回應:狀態代碼:204

{
  "headers": {}
}

微調 - 取消

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/cancel?api-version=2025-04-01-preview

取消指定 fine-tune-id 所指定微調作業的處理。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
fine-tuning-job-id 路徑 是的 字串 微調作業的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:已成功取消微調

Content-Type 型別 說明
application/json FineTuningJob

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/cancel?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "hyperparameters": {
      "n_epochs": -1
    },
    "integrations": [
      {
        "type": "wandb",
        "wandb": {
          "project": "custom-wandb-project",
          "tags": [
            "project:tag",
            "lineage"
          ]
        }
      }
    ],
    "method": {
      "type": "supervised"
    },
    "status": "cancelled",
    "model": "curie",
    "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
    "finished_at": 1646127311,
    "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "fine_tuning.job"
  }
}

微調 - 取得檢查點

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/checkpoints?api-version=2025-04-01-preview

取得指定 fine-tune-id 所指定微調作業的檢查點。

檢查點會在訓練期間成功的 Epoch 結尾建立。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
fine-tuning-job-id 路徑 是的 字串 微調作業的識別碼。
after 查詢 字串 上一個分頁要求中最後一個檢查點識別碼的識別碼。
限制 查詢 整數 要擷取的檢查點數目。 預設值為 10。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json FineTuningJobCheckpointList

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/checkpoints?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "has_more": false,
    "data": [
      {
        "id": "ftckpt_qtZ5Gyk4BLq1SfLFWp3RtO3P",
        "created_at": 1646126127,
        "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-10",
        "step_number": 10,
        "metrics": {
          "step": 10,
          "train_loss": 0.478,
          "train_mean_token_accuracy": 0.924,
          "valid_loss": 10.112,
          "valid_mean_token_accuracy": 0.145,
          "full_valid_loss": 0.567,
          "full_valid_mean_token_accuracy": 0.944
        },
        "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f",
        "object": "fine_tuning.job.checkpoint"
      },
      {
        "id": "ftckpt_frtXDR2453C4FG67t03MLPs5",
        "created_at": 1646126137,
        "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-20",
        "step_number": 20,
        "metrics": {
          "step": 20,
          "train_loss": 0.355,
          "train_mean_token_accuracy": 0.947,
          "valid_loss": 11.32,
          "valid_mean_token_accuracy": 0.122,
          "full_valid_loss": 0.317,
          "full_valid_mean_token_accuracy": 0.955
        },
        "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f",
        "object": "fine_tuning.job.checkpoint"
      },
      {
        "id": "ftckpt_agLk6Gio560ORp14gl123fgd",
        "created_at": 1646126147,
        "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-30",
        "step_number": 30,
        "metrics": {
          "step": 30,
          "train_loss": 0.155,
          "train_mean_token_accuracy": 0.975,
          "valid_loss": 9.31,
          "valid_mean_token_accuracy": 0.092,
          "full_valid_loss": 0.114,
          "full_valid_mean_token_accuracy": 0.963
        },
        "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f",
        "object": "fine_tuning.job.checkpoint"
      }
    ],
    "object": "list"
  }
}

微調 - 取得事件

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/events?api-version=2025-04-01-preview

取得指定 fine-tune-id 所指定微調作業的事件。

當作業狀態變更 (例如執行或完成) 時,以及上傳結果時,就會建立事件。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
fine-tuning-job-id 路徑 是的 字串 微調作業的識別碼。
after 查詢 字串 上一個分頁要求中最後一個事件的識別碼。
限制 查詢 整數 要擷取的事件數目。 預設值為 20。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json FineTuningJobEventList

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/events?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "has_more": false,
    "data": [
      {
        "id": "ftevent-363dcd7cb4c74539bc53293c1dceef05",
        "created_at": 1646126127,
        "level": "info",
        "message": "Job enqueued. Waiting for jobs ahead to complete.",
        "type": "message",
        "object": "fine_tuning.job.event"
      },
      {
        "id": "ftevent-8c2a44999790437cb3230e543fa2cf0f",
        "created_at": 1646126169,
        "level": "info",
        "message": "Job started.",
        "type": "message",
        "object": "fine_tuning.job.event"
      },
      {
        "id": "ftevent-2d47d651d2f3484c8187c88c00078147",
        "created_at": 1646126192,
        "level": "info",
        "message": "Job succeeded.",
        "type": "message",
        "object": "fine_tuning.job.event"
      }
    ],
    "object": "list"
  }
}

微調 - 暫停

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/pause?api-version=2025-04-01-preview

暫停指定 fine-tune-id 所指定微調作業的處理。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
fine-tuning-job-id 路徑 是的 字串 微調作業的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:微調已成功暫停。

Content-Type 型別 說明
application/json FineTuningJob

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/pause?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "hyperparameters": {
      "n_epochs": -1
    },
    "integrations": [
      {
        "type": "wandb",
        "wandb": {
          "project": "custom-wandb-project",
          "tags": [
            "project:tag",
            "lineage"
          ]
        }
      }
    ],
    "method": {
      "type": "supervised"
    },
    "status": "paused",
    "model": "curie",
    "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
    "finished_at": 1646127311,
    "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "fine_tuning.job"
  }
}

微調 - 繼續

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/resume?api-version=2025-04-01-preview

繼續處理指定 fine-tune-id 所指定的微調作業。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
fine-tuning-job-id 路徑 是的 字串 微調作業的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:已成功繼續微調。

Content-Type 型別 說明
application/json FineTuningJob

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/resume?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "hyperparameters": {
      "n_epochs": -1
    },
    "integrations": [
      {
        "type": "wandb",
        "wandb": {
          "project": "custom-wandb-project",
          "tags": [
            "project:tag",
            "lineage"
          ]
        }
      }
    ],
    "method": {
      "type": "supervised"
    },
    "status": "resuming",
    "model": "curie",
    "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
    "finished_at": 1646127311,
    "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "fine_tuning.job"
  }
}

擷取作業 - 清單

GET {endpoint}/openai/ingestion/jobs?api-version=2025-04-01-preview

列出擷取作業。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。
mgmt-user-token 標頭 字串 用來存取工作區的權杖 (僅適用於使用者計算作業)。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json 導入工作清單

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/ingestion/jobs?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "body": {
    "value": [
      {
        "jobId": "usercompute-ingestion-job",
        "kind": "UserCompute",
        "workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev"
      },
      {
        "jobId": "syscompute-ingestion-job",
        "kind": "SystemCompute"
      }
    ]
  }
}

擷取作業 - 建立

PUT {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-04-01-preview

使用指定的作業識別碼建立擷取作業。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。
工作識別碼 (job-id) 路徑 是的 字串 將要建立之作業的識別碼。
mgmt-user-token 標頭 字串 用來存取工作區的權杖 (僅適用於使用者計算作業)。
aml-user-token 標頭 字串 用來存取工作區中作業內資源的權杖 (僅適用於使用者計算作業)。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

請求主體

Content-Type:application/json

名稱 類型 說明 為必填項目 預設
jobId 字串
kind 處理工作類型 (IngestionJobType) 作業類型。 是的

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json IngestionJob

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

PUT {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {
    "operation-location": "https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2025-04-01-preview"
  },
  "body": {
    "kind": "SystemCompute",
    "jobId": "ingestion-job",
    "searchServiceConnection": {
      "kind": "EndpointWithManagedIdentity",
      "endpoint": "https://aykame-dev-search.search.windows.net"
    },
    "datasource": {
      "kind": "Storage",
      "connection": {
        "kind": "EndpointWithManagedIdentity",
        "endpoint": "https://mystorage.blob.core.windows.net/",
        "resourceId": "/subscriptions/1234567-abcd-1234-5678-1234abcd/resourceGroups/my-resource/providers/Microsoft.Storage/storageAccounts/mystorage"
      },
      "containerName": "container",
      "chunking": {
        "maxChunkSizeInTokens": 2048
      },
      "embeddings": [
        {
          "connection": {
            "kind": "RelativeConnection"
          },
          "deploymentName": "Ada"
        }
      ]
    },
    "dataRefreshIntervalInHours": 24,
    "completionAction": "keepAllAssets"
  }
}
PUT {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {
    "operation-location": "https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2025-04-01-preview"
  },
  "body": {
    "kind": "UserCompute",
    "jobId": "ingestion-job",
    "workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev",
    "compute": {
      "kind": "ServerlessCompute"
    },
    "target": {
      "kind": "AzureAISearch",
      "connectionId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection"
    },
    "datasource": {
      "kind": "Dataset",
      "datasetId": "azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1",
      "datasetType": "uri_folder"
    }
  }
}

擷取作業 - 取得

GET {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-04-01-preview

取得指定作業識別碼的詳細資料。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。
工作識別碼 (job-id) 路徑 是的 字串 作業的識別碼。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json IngestionJob

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "body": {
    "kind": "UserCompute",
    "jobId": "ingestion-job",
    "workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev",
    "compute": {
      "kind": "ServerlessCompute"
    },
    "target": {
      "kind": "AzureAISearch",
      "connectionId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection"
    },
    "datasource": {
      "kind": "Dataset",
      "datasetId": "azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1",
      "datasetType": "uri_folder"
    }
  }
}

Ingestionjobruns - 清單

GET {endpoint}/openai/ingestion/jobs/{job-id}/runs?api-version=2025-04-01-preview

列出指定作業識別碼的執行。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。
工作識別碼 (job-id) 路徑 是的 字串 作業的識別碼。
mgmt-user-token 標頭 字串 用來存取工作區的權杖 (僅適用於使用者計算作業)。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json 資料引入任務運行列表

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/ingestion/jobs/{job-id}/runs?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "body": {
    "value": [
      {
        "jobId": "ingestion-job",
        "runId": "f375b912-331c-4fc5-8e9f-2d7205e3e036",
        "status": "succeeded"
      },
      {
        "jobId": "ingestion-job",
        "runId": "07f2d192-add7-4202-a2e3-858c2577f4fd",
        "status": "failed"
      },
      {
        "jobId": "ingestion-job",
        "runId": "5ef7a436-1147-4cbb-82e0-3d502bcc6a7b",
        "status": "running"
      }
    ]
  }
}

Ingestionjobruns - 取得

GET {endpoint}/openai/ingestion/jobs/{job-id}/runs/{run-id}?api-version=2025-04-01-preview

取得指定執行識別碼的詳細資料,作為指定作業識別碼的一部分。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。
工作識別碼 (job-id) 路徑 是的 字串 作業的識別碼。
run-id 路徑 是的 字串 執行的識別碼。
mgmt-user-token 標頭 字串 用來存取工作區的權杖 (僅適用於使用者計算作業)。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json IngestionJobRun

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/ingestion/jobs/{job-id}/runs/{run-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "body": {
    "jobId": "ingestion-job",
    "runId": "5ef7a436-1147-4cbb-82e0-3d502bcc6a7b",
    "status": "running",
    "progress": {
      "stageProgress": [
        {
          "name": "Preprocessing",
          "totalItems": 14,
          "processedItems": 0,
          "state": "notRunning"
        },
        {
          "name": "Indexing",
          "state": "notRunning"
        }
      ]
    }
  }
}

模型 - 清單

GET {endpoint}/openai/models?api-version=2025-04-01-preview

取得 Azure OpenAI 資源可存取的所有模型清單。

其中包括基本模型,以及所有成功完成 Azure OpenAI 資源所擁有的微調模型。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json ModelList

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/models?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "data": [
      {
        "status": "succeeded",
        "capabilities": {
          "fine_tune": true,
          "inference": true,
          "completion": true,
          "chat_completion": false,
          "embeddings": false
        },
        "lifecycle_status": `generally-available`,
        "deprecation": {
          "fine_tune": 1677662127,
          "inference": 1709284527
        },
        "id": "curie",
        "created_at": 1646126127,
        "object": "model"
      },
      {
        "status": "succeeded",
        "model": "curie",
        "fine_tune": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
        "capabilities": {
          "fine_tune": false,
          "inference": true,
          "completion": true,
          "chat_completion": false,
          "embeddings": false
        },
        "lifecycle_status": `generally-available`,
        "deprecation": {
          "inference": 1709284527
        },
        "id": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f",
        "created_at": 1646126127,
        "object": "model"
      }
    ],
    "object": "list"
  }
}

模型 - 取得

GET {endpoint}/openai/models/{model-id}?api-version=2025-04-01-preview

取得指定 modelId 所指定之模型的詳細資料。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
模型識別碼 路徑 是的 字串 模型的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json 型號

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

GET {endpoint}/openai/models/{model-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "status": "succeeded",
    "capabilities": {
      "fine_tune": true,
      "inference": true,
      "completion": true,
      "chat_completion": false,
      "embeddings": false
    },
    "lifecycle_status": `generally-available`,
    "deprecation": {
      "fine_tune": 1677662127,
      "inference": 1709284527
    },
    "id": "curie",
    "created_at": 1646126127,
    "object": "model"
  }
}
GET {endpoint}/openai/models/{model-id}?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "status": "succeeded",
    "model": "curie",
    "fine_tune": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "capabilities": {
      "fine_tune": false,
      "inference": true,
      "completion": true,
      "chat_completion": false,
      "embeddings": false
    },
    "lifecycle_status": `generally-available`,
    "deprecation": {
      "inference": 1709284527
    },
    "id": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "model"
  }
}

上傳檔案 - 開始

POST {endpoint}/openai/uploads?api-version=2025-04-01-preview

系統會建立中繼 Upload 物件,讓您將組件新增至該物件。 目前,Upload 大小可能總計為 9 GB,且會在建立後兩小時到期。

Upload 完成後,將產生 File 物件,其中包含所有上傳的組件。 然後,這個 File 物件就可用於我們的平台,就像任何其他檔案一樣。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

請求主體

Content-Type:application/json

名稱 類型 說明 為必填項目 預設
位元組 整數 是的
檔名 字串 是的
MIME類型 字串 是的
目的 目的 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。 是的

請求主體

Content-Type:text/json

名稱 類型 說明 為必填項目 預設
位元組 整數 是的
檔名 字串 是的
MIME類型 字串 是的
目的 目的 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。 是的

請求主體

Content-Type:application/*+json

名稱 類型 說明 為必填項目 預設
位元組 整數 是的
檔名 字串 是的
MIME類型 字串 是的
目的 目的 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。 是的

回覆

狀態碼:200

描述:已成功建立上傳。

Content-Type 型別 說明
application/json UploadResource

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/uploads?api-version=2025-04-01-preview

{
 "purpose": "fine-tune",
 "filename": "training_data_v21.jsonl",
 "bytes": 2097152,
 "mime_type": "application/json"
}

回應:狀態碼:200

{
  "headers": {
    "location": "https://aoairesource.openai.azure.com/openai/uploads/runs/fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f"
  },
  "body": {
    "bytes": 2097152,
    "filename": "training_data_v21.jsonl",
    "purpose": "fine-tune",
    "status": "pending",
    "expires_at": 1646133327,
    "file": {
      "status": "pending",
      "bytes": 140,
      "purpose": "fine-tune",
      "filename": "puppy.jsonl",
      "id": "file-181a1cbdcdcf4677ada87f63a0928099",
      "created_at": 1646126127,
      "object": "file"
    },
    "id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "upload"
  }
}

上傳檔案 - 取消

POST {endpoint}/openai/uploads/{upload-id}/cancel?api-version=2025-04-01-preview

取消 Upload,並會導致所有上傳的組件以非同步方式刪除。

取消 Upload 之後,可能不會新增任何組件。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
upload-id 路徑 是的 字串 上傳的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json UploadResource

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/uploads/{upload-id}/cancel?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "bytes": 2097152,
    "filename": "training_data_v21.jsonl",
    "purpose": "fine-tune",
    "status": "cancelled",
    "expires_at": 1646133327,
    "file": {
      "status": "pending",
      "bytes": 140,
      "purpose": "fine-tune",
      "filename": "puppy.jsonl",
      "id": "file-181a1cbdcdcf4677ada87f63a0928099",
      "created_at": 1646126127,
      "object": "file"
    },
    "id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "upload"
  }
}

上傳檔案 - 完成

POST {endpoint}/openai/uploads/{upload-id}/complete?api-version=2025-04-01-preview

這會完成 Upload,且傳回的 Upload 物件包含巢狀的 File 物件,已準備好可供跨平台使用。

您可以藉由提供組件識別碼的排序清單來定義組件的順序。

上傳的位元組總數必須符合建立 Upload 物件時原本指定的大小。

在此作業後,就無法在完成 Upload 之後新增其他組件。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
upload-id 路徑 是的 字串 上傳的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

請求主體

Content-Type:application/json

名稱 類型 說明 為必填項目 預設
md5 字串
part_ids(零件識別碼) 陣列 是的

請求主體

Content-Type:text/json

名稱 類型 說明 為必填項目 預設
md5 字串
part_ids(零件識別碼) 陣列 是的

請求主體

Content-Type:application/*+json

名稱 類型 說明 為必填項目 預設
md5 字串
part_ids(零件識別碼) 陣列 是的

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json UploadResource

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/uploads/{upload-id}/complete?api-version=2025-04-01-preview

{
 "part_ids": [
  "LnmictL3p0u4LH/ko343nw==",
  "LmmictL3p0u4LH/ko343nw=="
 ]
}

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "bytes": 2097152,
    "filename": "training_data_v21.jsonl",
    "purpose": "fine-tune",
    "status": "completed",
    "expires_at": 1646133327,
    "file": {
      "status": "processed",
      "bytes": 140,
      "purpose": "fine-tune",
      "filename": "puppy.jsonl",
      "id": "file-181a1cbdcdcf4677ada87f63a0928099",
      "created_at": 1646126127,
      "object": "file"
    },
    "id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "upload"
  }
}

上傳檔案 - 組件

POST {endpoint}/openai/uploads/{upload-id}/parts?api-version=2025-04-01-preview

將 Part 新增至 Upload 物件,其中每個 Part 代表您要上傳之檔案的區段。

根據 File 用途,每個組件最多可達檔案上傳的標準大小限制。 您可以繼續新增組件,直到達到 Upload 大小限制 9 GB 為止。

URI 參數

名稱 為必填項目 類型 說明
端點 路徑 是的 字串
url
支援的 Azure OpenAI 端點 (通訊協定和主機名稱,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 資源名稱取代「aoairesource」)。 https://{your-resource-name}.openai.azure.com
upload-id 路徑 是的 字串 上傳的識別碼。
API版本 查詢 是的 字串 要求的 API 版本。

請求標頭

使用令牌型驗證或 API 金鑰。 建議使用令牌型驗證進行驗證,且更安全。

名稱 為必填項目 類型 說明
授權 字串 範例:Authorization: Bearer {Azure_OpenAI_Auth_Token}

若要使用 Azure CLI 產生驗證權杖: az account get-access-token --resource https://cognitiveservices.azure.com

類型:oauth2
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍:https://cognitiveservices.azure.com/.default
API金鑰 字串 在這裡提供 Azure OpenAI API 金鑰

請求主體

Content-Type:multipart/form-data

名稱 類型 說明 為必填項目 預設
資料 字串 是的

回覆

狀態碼:200

描述:成功

Content-Type 型別 說明
application/json UploadPartResource

狀態碼:預設值

描述:發生錯誤。

Content-Type 型別 說明
application/json 錯誤回應

範例

POST {endpoint}/openai/uploads/{upload-id}/parts?api-version=2025-04-01-preview

回應:狀態碼:200

{
  "headers": {},
  "body": {
    "upload_id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f",
    "azure_block_id": "LnmictL3p0u4LH/ko343nw==",
    "id": "uplprt-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "upload.part"
  }
}

元件

AzureAI搜尋索引

Azure AI 搜尋服務索引。

名稱 類型 說明 為必填項目 預設
connectionId 字串 指向 Azure AI 搜尋服務索引的連線識別碼。
kind 目標類型 目標型別。 是的

BaseConnection

與資源的連線。

BaseConnection 的鑑別子

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

類型值 圖式
名稱 類型 說明 為必填項目 預設
kind 連接類型 連線類型。 是的

Batch

定義批次的值。

名稱 類型 說明 為必填項目 預設
cancelled_at 整數 此批次取消時間的時間戳記 (以 Unix Epoch 表示)。
cancelling_at 整數 此批次開始取消時間的時間戳記 (以 Unix Epoch 表示)。
completed_at 整數 此批次完成時間的時間戳記 (以 Unix Epoch 表示)。
completion_window 字串 應處理批次的時間範圍。
created_at 整數 此批次建立時間的時間戳記 (以 Unix Epoch 表示)。
端點 字串 批次所使用的 API 端點。
錯誤區塊 字串 包含具有錯誤之要求輸出的 Blob URL。
error_file_id 字串 檔案的識別碼,其中包含具有錯誤之要求的輸出。
錯誤 BatchErrors 對於失敗的批次,這將會包含失敗原因的詳細資訊。
expired_at 整數 此批次已到期的時間戳記 (以 Unix Epoch 表示)。
到期時間 整數 此批次將到期的時間戳記 (以 Unix Epoch 表示)。
failed_at 整數 此批次失敗時間的時間戳記 (以 Unix Epoch 表示)。
finalizing_at 整數 此批次已開始結束中的時間戳記 (以 Unix Epoch 表示)。
id 字串 此項目的身分識別。 是的
in_progress_at 整數 此批次已開始進行中的時間戳記 (以 Unix Epoch 表示)。
輸入區塊 字串 包含批次輸入檔的 Blob URL。
輸入檔案代號 字串 批次的輸入檔識別碼。 是的
中繼資料 物件 可連結至批次的一組索引鍵/值組。 這有助於以結構化格式儲存批次的其他相關資訊。
物件 TypeDiscriminator 定義物件的型別。
output_blob 字串 包含成功執行要求之輸出的 Blob URL。
output_file_id 字串 包含成功執行要求之輸出的檔案識別碼。
request_counts BatchRequestCounts 要求會計算批次內不同狀態的要求計數。
狀態 BatchStatus 批次的狀態。

批量創建請求 (BatchCreateRequest)

定義建立批次的要求。

名稱 類型 說明 為必填項目 預設
completion_window 字串 應處理批次的時間範圍。 是的
端點 字串 批次所使用的 API 端點。 是的
輸入區塊 字串 要作為批次輸入的 Azure 儲存體 Blob URL。
輸入檔案代號 字串 批次的輸入檔識別碼。
中繼資料 物件 可連結至批次的一組索引鍵/值組。 這有助於以結構化格式儲存批次的其他相關資訊。
output_expires_after FileExpiresAfter 定義檔案的到期日。
output_folder BatchOutputReference 用來儲存輸出的 Azure 記憶體資料夾。

批次錯誤資料

批次中失敗的錯誤資訊。

名稱 類型 說明 為必填項目 預設
字碼 字串 識別錯誤類型的錯誤碼。
線條 字串 發生錯誤的輸入檔行號,如果適用的話 (可以是 null)。
訊息 字串 人類可讀的訊息,提供有關錯誤的更多詳細資料。
參數 字串 造成錯誤的參數名稱,如果適用的話 (可以是 null)。

批量錯誤

對於失敗的批次,這將會包含失敗原因的詳細資訊。

名稱 類型 說明 為必填項目 預設
資料 BatchErrorData 批次中失敗的錯誤資訊。
物件 字串 Errors 物件的類型。 這一律為 'list'。

BatchRequestCounts

要求會計算批次內不同狀態的要求計數。

名稱 類型 說明 為必填項目 預設
已完成 整數 批次中已成功完成的要求數目。
失敗 整數 批次中失敗的要求數目。
total 整數 批次中的要求總數。

BatchOutputReference

用來儲存輸出的 Azure 記憶體資料夾。

名稱 類型 說明 為必填項目 預設
分隔符號 字串 選擇性。 資料夾路徑中使用的分隔符,預設為 /。
url 字串 儲存批次輸出之 Azure 記憶體資料夾的 URL。

BatchStatus

批次的狀態。

房產 價值觀
說明 批次的狀態。
型別 字串
價值 validating
failed
in_progress
finalizing
completed
expired
cancelling
cancelled

BatchesList

表示批次清單。

名稱 類型 說明 為必填項目 預設
資料 陣列 項目清單。
first_id 字串 傳回之批次清單中第一個批次的識別碼。
has_more boolean 指出清單是否包含超過傳回的元素的值。
last_id 字串 傳回批次清單中最後一個批次的識別碼。
物件 TypeDiscriminator 定義物件的型別。

能力

基本或微調模型的功能。

名稱 類型 說明 為必填項目 預設
chat_completion boolean 指出模型是否支援聊天完成的值。 是的
完成 boolean 指出模型是否支援完成的值。 是的
內嵌 boolean 指出模型是否支援內嵌的值。 是的
fine_tune boolean 指出模型是否可以用於微調的值。 是的
推斷 boolean 指出是否可以部署模型的值。 是的

選擇

名稱 類型 說明 為必填項目 預設
finish_reason 字串 模型停止產生標記的原因。
索引 整數 選擇清單中的選擇索引。
logprobs 物件 選擇的對數機率資訊。
訊息 ChoiceMessage

ChoiceMessage

名稱 類型 說明 為必填項目 預設
內容 字串 訊息的內容。
角色 字串 正在建立訊息的實體角色。
tool_calls 陣列 相關工具呼叫的清單。

ChunkingSettings

區塊化設定

名稱 類型 說明 為必填項目 預設
maxChunkSizeInTokens 整數

CompletionAction

完成動作。

房產 價值觀
說明 完成動作。
型別 字串
價值 cleanUpTempAssets
keepAllAssets

計算類型

計算類型。

房產 價值觀
說明 計算類型。
型別 字串
價值 ServerlessCompute
CustomCompute

ConnectionStringConnection

連接字串連線。

名稱 類型 說明 為必填項目 預設
connectionString 字串 連線字串
kind 連接類型 連線類型。 是的

連接類型

連線類型。

房產 價值觀
說明 連線類型。
型別 字串
價值 EndpointWithKey
ConnectionString
EndpointWithManagedIdentity
WorkspaceConnection
RelativeConnection

CosmosDB索引

CosmosDB 索引。

名稱 類型 說明 為必填項目 預設
collectionName 字串 Cosmos DB 集合的名稱。
connectionId 字串 指向 Cosmos DB 的連線識別碼。
資料庫名稱 字串 Cosmos DB 資料庫的名稱。
kind 目標類型 目標型別。 是的

CrawlingSettings

編目設定

名稱 類型 說明 為必填項目 預設
最大爬取深度 (maxCrawlDepth) 整數
maxCrawlTimeInMins 整數
最大下載時間(分鐘) 整數
最大檔案大小 整數
maxFiles 整數
maxRedirects 整數

CreateEvalCompletionsRunDataSource

CompletionsRunDataSource 物件,描述模型取樣組態。

名稱 類型 說明 為必填項目 預設
輸入訊息 物件
項目參考 字串 'item' 命名空間中變數的參考,例如 'item.name'。
|---- 範本 陣列 形成提示或內容的聊天訊息清單。 可能包含 'item' 命名空間的變數參考,例如 {{item.name}}。
\---- 類型 列舉 輸入訊息的類型。 templateitem_reference
可能的值: templateitem_reference
型號 字串 用於產生完成的模型名稱 (例如 'o3-mini')。
採樣參數 物件
max_completion_tokens(最大完成標記) 整數 產生的輸出中的令牌數目上限。
~---- 種子 整數 在取樣期間初始化隨機性的種子值。 42
‧---- 溫度 number 較高的溫度會增加輸出中的隨機性。 1
top_p number 核取樣溫度的替代方法;1.0 包含所有權杖。 1
來源 物件 是的
\---- 類型 列舉 來源的類型。 可以是EvalJsonlFileContentSourceEvalJsonlFileIdSourceEvalStoredCompletionsSource中的一個。
可能的值:EvalJsonlFileContentSource、、 EvalJsonlFileIdSourceEvalStoredCompletionsSource
型別 列舉 執行數據源的類型。 一律為 completions
可能的值:completions
是的

創建自訂評估資料來源配置

CustomDataSourceConfig 物件,定義用於評估執行的數據源架構。 此架構可用來定義數據的形狀:- 用來定義測試準則和 - 建立執行時需要哪些數據

名稱 類型 說明 為必填項目 預設
include_sample_schema boolean 評估是否應該預期您會填入範例命名空間 (例如,藉由從資料來源產生回應)
項目架構 物件 數據源中每個數據列的 JSON 架構。 是的
型別 列舉 資料來源的類型。 一律為 custom
可能的值:custom
是的

建立評估項目

組成提示或內容的聊天訊息。 可能包含 “item” 命名空間的變數參考,即 {{item.name}}。

名稱 類型 說明 為必填項目 預設
內容 ['string', 'InputTextContent', 'object'] 模型的文字輸入 - 可以包含範本字串。 是的
角色 列舉 訊息輸入的作用。 userassistantsystemdeveloper 的其中之一。。
可能的值:user、、assistantsystemdeveloper
是的
型別 列舉 訊息輸入的類型。 一律為 message
可能的值:message

CreateEvalJsonlRunDataSource

JsonlRunDataSource 物件,指定符合評估的 JSONL 檔案

名稱 類型 說明 為必填項目 預設
來源 物件 是的
\---- 內容 陣列 jsonl 檔案的內容。
‧----識別碼 字串 檔案的識別碼。
\---- 類型 列舉 jsonl 來源的類型。 一律為 file_id
可能的值:file_id
型別 列舉 資料來源的類型。 一律為 jsonl
可能的值:jsonl
是的

CreateEvalLabelModelGrader

LabelModelGrader 物件,使用模型將標籤指派給評估中的每個專案。

名稱 類型 說明 為必填項目 預設
輸入 陣列 形成提示或內容的聊天訊息清單。 可能包含 “item” 命名空間的變數參考,即 {{item.name}}。 是的
標籤 陣列 要分類至評估中每個項目的標籤。 是的
型號 字串 要用於評估的模型。 必須支援結構化輸出。 是的
名稱 字串 評分工具的名稱。 是的
passing_labels 陣列 表示通過結果的標示。 必須是標籤的子集。 是的
型別 列舉 物件類型,一律為 label_model
可能的值:label_model
是的

CreateEvalLogsDataSourceConfig

資料來源設定,指定預存完成查詢的中繼資料屬性。 這通常是像 usecase=chatbotprompt-version=v2 等的元數據。

名稱 類型 說明 為必填項目 預設
中繼資料 物件 記錄資料來源的中繼資料篩選。
型別 列舉 資料來源的類型。 一律為 logs
可能的值:logs
是的

CreateEvalRequest

名稱 類型 說明 為必填項目 預設
資料來源配置 物件 CustomDataSourceConfig 物件,定義用於評估執行的數據源架構。 此架構可用來定義數據的形狀:- 用來定義測試準則和 - 建立執行時需要哪些數據 是的
─[納入範例結構] boolean 評估是否應該預期您會填入範例命名空間 (例如,藉由從資料來源產生回應)
└─ item_schema 物件 數據源中每個數據列的 JSON 架構。
~---- 元數據 物件 記錄資料來源的中繼資料篩選。
\---- 類型 列舉 資料來源的類型。 一律為 logs
可能的值:logs
中繼資料 中繼資料 可附加至物件的索引鍵/值組 (16 個為一組)。 這很適合用來以結構化格式儲存物件的其他資訊,以及透過 API 或儀錶板查詢物件。 索引鍵是長度上限為64個字元的字串。 值是長度上限為 512 個字元的字串。
名稱 字串 評估的名稱。
測試標準 陣列 此群組中所有評估執行的評分工具清單。 是的

CreateEvalRunRequest

名稱 類型 說明 為必填項目 預設
資料來源 物件 JsonlRunDataSource 物件,指定符合評估的 JSONL 檔案 是的
└─ 輸入訊息 物件
項目參考 字串 'item' 命名空間中變數的參考,例如 'item.name'。
|---- 範本 陣列 形成提示或內容的聊天訊息清單。 可能包含 'item' 命名空間的變數參考,例如 {{item.name}}。
\---- 類型 列舉 輸入訊息的類型。 templateitem_reference
可能的值: templateitem_reference
└─ 模型 字串 用於產生完成的模型名稱 (例如 'o3-mini')。
取樣參數 物件
max_completion_tokens(最大完成標記) 整數 產生的輸出中的令牌數目上限。
~---- 種子 整數 在取樣期間初始化隨機性的種子值。 42
‧---- 溫度 number 較高的溫度會增加輸出中的隨機性。 1
top_p number 核取樣溫度的替代方法;1.0 包含所有權杖。 1
‧---- 來源 物件
\---- 類型 列舉 來源的類型。 可以是EvalJsonlFileContentSourceEvalJsonlFileIdSourceEvalStoredCompletionsSource中的一個。
可能的值:EvalJsonlFileContentSource、、 EvalJsonlFileIdSourceEvalStoredCompletionsSource
\---- 類型 列舉 執行數據源的類型。 一律為 completions
可能的值:completions
中繼資料 中繼資料 可附加至物件的索引鍵/值組 (16 個為一組)。 這很適合用來以結構化格式儲存物件的其他資訊,以及透過 API 或儀錶板查詢物件。 索引鍵是長度上限為64個字元的字串。 值是長度上限為 512 個字元的字串。
名稱 字串 執行的名稱。

CreateEvalStoredCompletionsRunDataSource

描述一組篩選條件的 StoredCompletionsRunDataSource 組態

名稱 類型 說明 為必填項目 預設
created_after 整數 選擇性的 Unix 時間戳,可篩選在此時間之後建立的專案。
created_before 整數 選擇性的 Unix 時間戳,可篩選在此時間之前建立的專案。
限制 整數 要傳回的選擇性項目數目上限。
中繼資料 中繼資料 可附加至物件的索引鍵/值組 (16 個為一組)。 這很適合用來以結構化格式儲存物件的其他資訊,以及透過 API 或儀錶板查詢物件。 索引鍵是長度上限為64個字元的字串。 值是長度上限為 512 個字元的字串。
型號 字串 篩選依據的選擇性模型(例如 'gpt-4o')。
型別 列舉 資料來源的類型。 一律為 stored_completions
可能的值:stored_completions
是的

自定義計算 (CustomCompute)

自訂計算。

名稱 類型 說明 為必填項目 預設
computeId 字串 自訂計算的識別碼
kind ComputeType 計算類型。 是的

DeploymentConnection

相對部署連線。

名稱 類型 說明 為必填項目 預設
kind 連接類型 連線類型。 是的

淘汰

定義模型不同使用案例的淘汰日期。

在建立之後,通常基本模型支援 1 年的微調。 在建立基本或微調模型之後,通常支援推斷 2 年。 確切的日期會指定於屬性中。

名稱 類型 說明 為必填項目 預設
fine_tune 整數 此模型微調支援的結束日期。 針對微調模型將為 null
推斷 整數 此模型推斷支援的結束日期。 是的

DpoHyperparamsRequest

微調 DPO 方法的超參數

名稱 類型 說明 為必填項目 預設
批次大小 整數 用於訓練的批次大小。 批次大小是用來訓練單一向前和向後傳遞的訓練範例數目。 一般而言,我們發現較大的批次大小較適合較大的數據集。這個屬性的預設值和最大值是基底模型特有的。
Beta number DPO Beta 值。
l2_multiplier number L2 正規化乘數
learning_rate_multiplier number 用於訓練的學習速率乘數。 微調學習速率是預先定型所用原始學習速率乘以此值。 學習速率越大,通常在越大的批次大小下擁有更佳效能。 建議您試驗 0.02 到 0.2 這個範圍內的值,看看哪些值會產生最佳結果。
n_epochs 整數 訓練模型的週期數目。 Epoch 是指透過訓練資料集的一個完整週期。

DpoMethod

DPO 方法微調的要求

名稱 類型 說明 為必填項目 預設
dpo DpoMethodConfigRequest dpo 微調方法的設定。 包含 DPO 專屬超參數 是的
型別 微調方法類型 是的

DpoMethodConfigRequest

dpo 微調方法的設定。 包含 DPO 專屬超參數

名稱 類型 說明 為必填項目 預設
超參數 DpoHyperparamsRequest 微調 DPO 方法的超參數

DpoMethodRequest

DPO 方法微調的要求

名稱 類型 說明 為必填項目 預設
dpo DpoMethodConfigRequest dpo 微調方法的設定。 包含 DPO 專屬超參數 是的
型別 微調方法類型 是的

EndpointKeyConnection

端點金鑰連線。

名稱 類型 說明 為必填項目 預設
端點 字串 端點
Key 字串 鑰匙
kind 連接類型 連線類型。 是的

EndpointMIConnection

端點受控識別連線。

名稱 類型 說明 為必填項目 預設
端點 字串 端點
kind 連接類型 連線類型。 是的
資源ID 字串 資源識別碼

錯誤

Microsoft REST 指導方針中所定義的錯誤內容。

名稱 類型 說明 為必填項目 預設
字碼 ErrorCode Microsoft REST 指導方針中所定義的錯誤碼。 是的
詳細資訊 陣列 如果有的話,則為錯誤詳細資料。
innererror 內部錯誤 Microsoft REST 指導方針中所定義的內部錯誤。
訊息 字串 此錯誤的訊息。 是的
目標 字串 如果有的話,則為發生錯誤的位置。

錯誤代碼

Microsoft REST 指導方針中所定義的錯誤碼。

房產 價值觀
說明 Microsoft REST 指導方針中所定義的錯誤碼。
型別 字串
價值 conflict
invalidPayload
forbidden
notFound
unexpectedEntityState
itemDoesAlreadyExist
serviceUnavailable
internalFailure
quotaExceeded
jsonlValidationFailed
fileImportFailed
tooManyRequests
unauthorized
contentFilter

ErrorResponse

Microsoft REST 指導方針中所定義的錯誤回應。

名稱 類型 說明 為必填項目 預設
錯誤 錯誤 Microsoft REST 指導方針中所定義的錯誤內容。 是的

Eval

具有數據源組態和測試準則的 Eval 物件。 評估代表要為 LLM 整合完成的工作。 例如:

  • 改善聊天機器人的品質
  • 查看聊天機器人如何處理客戶支援
  • 檢查 o3-mini 在我的使用案例是否比 gpt-4o 更好
名稱 類型 說明 為必填項目 預設
created_at 整數 建立 eval 時的 Unix 時間戳 (以秒為單位)。 是的
資料來源配置 物件 CustomDataSourceConfig,指定您的 item 的架構,並可選擇指定 sample 命名空間。 回應架構會定義數據的形狀:- 用來定義測試準則和 - 建立執行時需要哪些數據 是的
~---- 元數據 中繼資料 可附加至物件的索引鍵/值組 (16 個為一組)。 這很適合用來以結構化格式儲存物件的其他資訊,以及透過 API 或儀錶板查詢物件。 索引鍵是長度上限為64個字元的字串。 值是長度上限為 512 個字元的字串。
└─ 綱要 物件 執行數據源專案的 JSON 架構。 瞭解如何 在這裡建置 JSON 架構。
\---- 類型 列舉 資料來源的類型。 一律為 stored_completions
可能的值:stored_completions
id 字串 評估的唯一識別碼。 是的
中繼資料 中繼資料 可附加至物件的索引鍵/值組 (16 個為一組)。 這很適合用來以結構化格式儲存物件的其他資訊,以及透過 API 或儀錶板查詢物件。 索引鍵是長度上限為64個字元的字串。 值是長度上限為 512 個字元的字串。 是的
名稱 字串 評估的名稱。 是的
物件 列舉 物件類型。
可能的值:eval
是的
測試標準 陣列 測試準則的清單。 是的

EvalApiError

物件,表示來自 Eval API 的錯誤回應。

名稱 類型 說明 為必填項目 預設
字碼 字串 錯誤碼。 是的
訊息 字串 錯誤訊息。 是的

EvalCustomDataSourceConfig

CustomDataSourceConfig,指定您的 item 的架構,並可選擇指定 sample 命名空間。 回應架構會定義數據的形狀:- 用來定義測試準則和 - 建立執行時需要哪些數據

名稱 類型 說明 為必填項目 預設
結構描述 物件 執行數據源專案的 JSON 架構。 瞭解如何 在這裡建置 JSON 架構。 是的
型別 列舉 資料來源的類型。 一律為 custom
可能的值:custom
是的

EvalFileRunDataSource

具有檔案標識碼的 FileRunDataSource 組態

名稱 類型 說明 為必填項目 預設
檔案識別碼 (file_id) 字串 檔案的識別碼。 是的
型別 列舉 資料來源的類型。 一律為 file
可能的值:file
是的

EvalItem

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

名稱 類型 說明 為必填項目 預設
內容 物件 模型的文字輸入。 是的
└─ 正文 字串 模型的文字輸出。
\---- 類型 列舉 輸出文字的類型。 一律為 output_text
可能的值:output_text
角色 列舉 訊息輸入的作用。 userassistantsystemdeveloper 的其中之一。。
可能的值:user、、assistantsystemdeveloper
是的
型別 列舉 訊息輸入的類型。 一律為 message
可能的值:message

EvalJsonlFileContentSource

名稱 類型 說明 為必填項目 預設
內容 陣列 jsonl 檔案的內容。 是的
型別 列舉 jsonl 來源的類型。 一律為 file_content
可能的值:file_content
是的

EvalJsonlFileIdSource

名稱 類型 說明 為必填項目 預設
id 字串 檔案的識別碼。 是的
型別 列舉 jsonl 來源的類型。 一律為 file_id
可能的值:file_id
是的

EvalLabelModelGrader

LabelModelGrader 物件,使用模型將標籤指派給評估中的每個專案。

名稱 類型 說明 為必填項目 預設
輸入 陣列 是的
標籤 陣列 要指派給評估中每個項目的標籤。 是的
型號 字串 要用於評估的模型。 必須支援結構化輸出。 是的
名稱 字串 評分工具的名稱。 是的
passing_labels 陣列 表示通過結果的標示。 必須是標籤的子集。 是的
型別 列舉 物件類型,一律為 label_model
可能的值:label_model
是的

EvalList

表示評估清單的物件。

名稱 類型 說明 為必填項目 預設
資料 陣列 評估物件的陣列。 是的
first_id 字串 數據陣列中第一個評估的標識碼。 是的
has_more boolean 指出是否有更多可用的評估。 是的
last_id 字串 數據陣列中最後一個評估值的標識碼。 是的
物件 列舉 此物件的類型。 它一律會設定為「list」。
可能的值:list
是的

EvalRun

表示評估執行的結構描述。

名稱 類型 說明 為必填項目 預設
created_at 整數 建立評估回合時的 Unix 時間戳(以秒為單位)。 是的
資料來源 物件 JsonlRunDataSource 物件,指定符合評估的 JSONL 檔案 是的
└─ 輸入訊息 物件
項目參考 字串 'item' 命名空間中變數的參考,例如 'item.name'。
|---- 範本 陣列 形成提示或內容的聊天訊息清單。 可能包含 'item' 命名空間的變數參考,例如 {{item.name}}。
\---- 類型 列舉 輸入訊息的類型。 templateitem_reference
可能的值: templateitem_reference
└─ 模型 字串 用於產生完成的模型名稱 (例如 'o3-mini')。
取樣參數 物件
max_completion_tokens(最大完成標記) 整數 產生的輸出中的令牌數目上限。
~---- 種子 整數 在取樣期間初始化隨機性的種子值。 42
‧---- 溫度 number 較高的溫度會增加輸出中的隨機性。 1
top_p number 核取樣溫度的替代方法;1.0 包含所有權杖。 1
‧---- 來源 物件
\---- 類型 列舉 來源的類型。 可以是EvalJsonlFileContentSourceEvalJsonlFileIdSourceEvalStoredCompletionsSource中的一個。
可能的值:EvalJsonlFileContentSource、、 EvalJsonlFileIdSourceEvalStoredCompletionsSource
\---- 類型 列舉 執行數據源的類型。 一律為 completions
可能的值:completions
錯誤 EvalApiError 物件,表示來自 Eval API 的錯誤回應。 是的
eval_id 字串 相關聯評估的識別碼。 是的
id 字串 評估執行的唯一識別碼。 是的
中繼資料 中繼資料 可附加至物件的索引鍵/值組 (16 個為一組)。 這很適合用來以結構化格式儲存物件的其他資訊,以及透過 API 或儀錶板查詢物件。 索引鍵是長度上限為64個字元的字串。 值是長度上限為 512 個字元的字串。 是的
型號 字串 如果適用,則為評估的模型。 是的
名稱 字串 評估執行的名稱。 是的
物件 列舉 物件的型別。 一律為「eval.run」。
可能的值:eval.run
是的
per_model_usage 陣列 評估執行期間每個模型的使用量統計數據。 是的
per_testing_criteria_results 陣列 評估執行期間所套用每個測試準則的結果。 是的
report_url 字串 UI 儀表板上轉譯評估執行報表的 URL。 是的
result_counts 物件 摘要評估執行結果的計數器。 是的
|---- 錯誤 整數 導致錯誤的輸出項目數目。
----- 失敗 整數 無法通過評估的輸出項目數目。
通過 整數 通過評估的輸出項目數量。
|---- 總計 整數 執行輸出項目的總數。
狀態 字串 評估執行的狀態。 是的

EvalRunList

表示評估執行清單的物件。

名稱 類型 說明 為必填項目 預設
資料 陣列 評估執行物件的陣列。 是的
first_id 字串 資料陣列中第一個評估執行的識別碼。 是的
has_more boolean 指出是否有更多可用的評估。 是的
last_id 字串 資料陣列中最後一個評估執行的識別碼。 是的
物件 列舉 此物件的類型。 它一律會設定為「list」。
可能的值:list
是的

EvalRunOutputItem

表示評估執行輸出項目的結構描述。

名稱 類型 說明 為必填項目 預設
created_at 整數 建立評估回合時的 Unix 時間戳(以秒為單位)。 是的
datasource_item 物件 輸入數據源項目的詳細數據。 是的
datasource_item_id 整數 數據源項目的標識碼。 是的
eval_id 字串 評估群組的標識碼。 是的
id 字串 用於評估執行結果項目的唯一標識碼。 是的
物件 列舉 物件的型別。 一律為「eval.run.output_item」。
可能的值:eval.run.output_item
是的
results 陣列 評估執行的結果清單。 是的
運行識別碼 字串 與此輸出項目相關聯的評估回合識別碼。 是的
樣本 物件 包含評估執行輸入和輸出的範例。 是的
-------- 錯誤 EvalApiError 物件,表示來自 Eval API 的錯誤回應。
finish_reason 字串 完成範例產生的原因。
└─ 輸入 陣列 輸入訊息的陣列。
max_completion_tokens(最大完成標記) 整數 允許完成的令牌數目上限。
└─ 模型 字串 用於產生範例的模型。
└─ 輸出 陣列 輸出訊息的陣列。
~---- 種子 整數 用來產生樣本的種子。
‧---- 溫度 number 所使用的取樣溫度。
top_p number 用於取樣的 top_p 值。
|---- 使用方式 物件 範例的權杖使用方式詳細資料。
cached_tokens 整數 從快取擷取的權杖數目。
completion_tokens # 整數 產生的完成令牌數目。
prompt_tokens 整數 使用的提示令牌數目。
total_tokens 整數 使用的令牌總數。
狀態 字串 評估執行的狀態。 是的

EvalRunOutputItemList

表示評估執行輸出項目清單的物件。

名稱 類型 說明 為必填項目 預設
資料 陣列 評估執行輸出項目物件的陣列。 是的
first_id 字串 資料陣列中第一個評估執行輸出項目的識別碼。 是的
has_more boolean 指出是否有更多可用的評估執行輸出項目。 是的
last_id 字串 數據陣列中最後一個評估執行輸出項目的標識碼。 是的
物件 列舉 此物件的類型。 它一律會設定為「list」。
可能的值:list
是的

EvalScoreModelGrader

ScoreModelGrader 物件,使用模型將分數指派給輸入。

名稱 類型 說明 為必填項目 預設
輸入 陣列 輸入文字。 這可能包含範本字串。 是的
型號 字串 要用於評估的模型。 是的
名稱 字串 評分工具的名稱。 是的
pass_threshold number 分數的臨界值。
範圍 陣列 分數的範圍。 預設為 [0, 1]
採樣參數 物件 模型的取樣參數。
型別 列舉 物件類型,一律為 score_model
可能的值:score_model
是的

EvalStoredCompletionsDataSourceConfig

StoredCompletionsDataSourceConfig,指定預存完成查詢的中繼資料屬性。 這通常是像 usecase=chatbotprompt-version=v2 等的元數據。此數據源組態所返回的架構用來定義評估中可用的變數。 itemsample 都是在使用這個數據源組態時定義的。

名稱 類型 說明 為必填項目 預設
中繼資料 中繼資料 可附加至物件的索引鍵/值組 (16 個為一組)。 這很適合用來以結構化格式儲存物件的其他資訊,以及透過 API 或儀錶板查詢物件。 索引鍵是長度上限為64個字元的字串。 值是長度上限為 512 個字元的字串。
結構描述 物件 執行數據源專案的 JSON 架構。 瞭解如何 在這裡建置 JSON 架構。 是的
型別 列舉 資料來源的類型。 一律為 stored_completions
可能的值:stored_completions
是的

EvalStoredCompletionsSource

描述一組篩選條件的 StoredCompletionsRunDataSource 組態

名稱 類型 說明 為必填項目 預設
created_after 整數 選擇性的 Unix 時間戳,可篩選在此時間之後建立的專案。
created_before 整數 選擇性的 Unix 時間戳,可篩選在此時間之前建立的專案。
限制 整數 要傳回的選擇性項目數目上限。
中繼資料 中繼資料 可附加至物件的索引鍵/值組 (16 個為一組)。 這很適合用來以結構化格式儲存物件的其他資訊,以及透過 API 或儀錶板查詢物件。 索引鍵是長度上限為64個字元的字串。 值是長度上限為 512 個字元的字串。
型號 字串 篩選依據的選擇性模型(例如 'gpt-4o')。
型別 列舉 來源的類型。 一律為 stored_completions
可能的值:stored_completions
是的

EvalStringCheckGrader

StringCheckGrader 物件,使用指定的作業執行輸入與參考之間的字串比較。

名稱 類型 說明 為必填項目 預設
輸入 字串 輸入文字。 這可能包含範本字串。 是的
名稱 字串 評分工具的名稱。 是的
作業 列舉 要執行的字串檢查作業。 eqnelikeilike 的其中之一。。
可能的值:eq、、nelikeilike
是的
參考 字串 參考文字。 這可能包含範本字串。 是的
型別 列舉 物件類型,一律為 string_check
可能的值:string_check
是的

EvalTextSimilarityGrader

TextSimilarityGrader 物件,其會根據相似度計量來評分文字。

名稱 類型 說明 為必填項目 預設
評估指標 列舉 要使用的評估計量。 其中一個fuzzy_matchbleugleumeteorrouge_1rouge_2rouge_3rouge_4rouge_5rouge_l
可能的值:fuzzy_match、、、bleugleumeteorrouge_1rouge_2rouge_3rouge_4rouge_5rouge_l
是的
輸入 字串 正在評分的文字。 是的
名稱 字串 評分工具的名稱。
pass_threshold number 浮動分數,其中大於或等於的值表示通過的成績。 是的
參考 字串 要進行評分的文字。 是的
型別 列舉 評分器的類型。
可能的值:text_similarity
是的

事件類型

定義內容篩選結果的嚴重性。

房產 價值觀
說明 定義內容篩選結果的嚴重性。
型別 字串
價值 message
metrics

檔案

檔案是可用於訓練和驗證的文件。 它也可以是具有結果詳細資料的服務產生文件。

名稱 類型 說明 為必填項目 預設
位元組 整數 可用時為此檔案的大小 (可以是 null)。 不支援大於 2^53-1 的檔案大小,以確保與 JavaScript 整數相容。
created_at 整數 此作業或項目建立時間的時間戳記 (以 Unix Epoch 表示)。
到期時間 整數 檔案到期時的 Unix 時間戳記 (自 1970 年 1 月 1 日起經過的秒數)。
檔名 字串 檔案的檔名。 是的
id 字串 此項目的身分識別。
物件 TypeDiscriminator 定義物件的型別。
目的 目的 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。 是的
狀態 FileState 檔案的狀態。
狀態詳情 字串 當處理此檔案失敗時,具有詳細資料的錯誤訊息。 已廢棄。

FileCreate

定義要從外部內容 URL 匯入的檔,以搭配 Azure OpenAI 使用。

名稱 類型 說明 為必填項目 預設
content_url 字串 要從中下載文件的 URL (可以是 Blob 的 SAS URL 或任何其他可透過 GET 要求存取的外部 URL)。 是的
目的 目的 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。 是的

FileDelete

定義檔案刪除的回應。

名稱 類型 說明 為必填項目 預設
已刪除 boolean 指出是否已刪除檔案的值。 是的
id 字串 已刪除的 file-id。 是的
物件 字串 如果已刪除檔案。 是的

檔案詳情

檔案詳細資料是批次服務用來擷取檔案 Blob 詳細資料的文件。

名稱 類型 說明 為必填項目 預設
檔名 字串 檔案的檔名。 是的
id 字串 此項目的身分識別。
路徑 字串 容器內檔案的相對路徑。
目的 目的 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。 是的
storage_account_uri 字串 此檔案的記憶體帳戶 URL。
儲存容器名稱 字串 此檔案 Blob 的記憶體容器名稱。

FileExpiresAfter

定義檔案的到期日。

名稱 類型 說明 為必填項目 預設
錨點 FileExpiryAnchor 定義錨點,相對於應該從哪個時間產生絕對到期。
seconds 整數 相對到期時間,以秒為單位。 範圍:[1209600 - 2592000]。

FileExpiryAnchor

定義錨點,相對於應該從哪個時間產生絕對到期。

房產 價值觀
說明 定義錨點,相對於應該從哪個時間產生絕對到期。
型別 字串
價值 created_at

匯入檔案

定義要從外部內容 URL 匯入的檔,以搭配 Azure OpenAI 使用。

名稱 類型 說明 為必填項目 預設
content_url 字串 要從中下載文件的 URL (可以是 Blob 的 SAS URL 或任何其他可透過 GET 要求存取的外部 URL)。 是的
expires_after FileExpiresAfter 定義檔案的到期日。
檔名 字串 要上傳的 JSON 行檔案名稱。 如果 purpose 設定為「fine-tune」,則每一行都是 JSON 記錄,其中包含代表訓練範例的「提示」和「完成」欄位。 是的
目的 目的 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。 是的

檔案列表

此項目顯示一個檔案列表。

名稱 類型 說明 為必填項目 預設
資料 陣列 項目清單。
物件 TypeDiscriminator 定義物件的型別。

檔案狀態

檔案的狀態。

房產 價值觀
說明 檔案的狀態。
型別 字串
價值 uploaded
pending
running
processed
error
deleting
deleted

FineTuneMethod

FineTuneMethod 的鑑別子

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

類型值 圖式
名稱 類型 說明 為必填項目 預設
型別 微調方法類型 是的

FineTuneMethodRequest

FineTuneMethodRequest 的鑑別子

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

類型值 圖式
名稱 類型 說明 為必填項目 預設
型別 微調方法類型 是的

FineTuningHyperParameters

微調作業中使用的超參數設定。

名稱 類型 說明 為必填項目 預設
批次大小 整數 用於訓練的批次大小。 批次大小是用來訓練單一向前和向後傳遞的訓練範例數目。 一般而言,我們發現較大的批次大小通常較適合較大的資料集。 此屬性的預設值和最大值是基底模型所特有的。
learning_rate_multiplier number 用於訓練的學習速率乘數。 微調學習速率是預先定型所用原始學習速率乘以此值。 學習速率越大,通常在越大的批次大小下擁有更佳效能。 建議您試驗 0.02 到 0.2 這個範圍內的值,看看哪些值會產生最佳結果。
n_epochs 整數 訓練模型的週期數目。 Epoch 是指透過訓練資料集的一個完整週期。

FineTuningJob

定義微調作業的值。

名稱 類型 說明 為必填項目 預設
created_at 整數 此作業或項目建立時間的時間戳記 (以 Unix Epoch 表示)。
錯誤 FineTuningJobError 針對失敗的微調作業,這將會包含失敗原因的詳細資訊。
estimated_finish 整數 微調作業預估完成時的 Unix 時間戳記 (以秒為單位)。 如果微調作業未執行,此值將會是 Null。
fine_tuned_model 字串 所產生微調模型的識別碼 (model-id)。 此屬性只會填入成功完成的微調執行。 使用此識別碼來建立用於推斷的部署。
finished_at 整數 此作業或項目成功完成時間的時間戳記 (以 Unix Epoch 表示)。
超參數 FineTuningHyperParameters 微調作業中使用的超參數設定。
id 字串 此項目的身分識別。
整合 陣列 支援微調作業之整合的設定清單。 規劃了許多整合,因此請務必檢查並處理整合類型。
方法 物件 用於受監督微調的方法
\---- 類型 微調方法類型
型號 字串 用於微調之基本模型的識別碼 (model-id)。 是的
物件 TypeDiscriminator 定義物件的型別。
組織識別碼 字串 此微調作業的組織識別碼。 未在 Azure OpenAI 上使用;僅限 OpenAI 的相容性。
result_files 陣列 結果檔案身分識別 (file-id) 包含 csv 格式的訓練和評估計量。 檔案僅在成功完成微調過程後可存取。
種子 整數 用於微調作業的種子。
狀態 FineTuningState 微調物件或微調作業的狀態。
尾碼 字串 用來識別微調模型的尾碼。 尾碼最多可包含 40 個字元 (a-z、A-Z、0-9 和 _),這些字元會新增至微調模型名稱中。
trained_tokens 整數 此微調作業所處理的可計費權杖總數。
training_file 字串 用於訓練的檔案。 是的
驗證檔案 字串 用來評估訓練期間微調模型的檔案。

FineTuningJobCheckpoint

名稱 類型 說明 為必填項目 預設
created_at 整數 建立檢查點時的 Unix 時間戳記 (以秒為單位)。 是的
fine_tuned_model_checkpoint 字串 所建立之微調檢查點模型的名稱。 是的
fine_tuning_job_id 字串 從中建立此檢查點的微調作業名稱。 是的
id 字串 此檢查點的身分識別。
計量 物件 微調作業期間步驟編號的計量。 是的
物件 TypeDiscriminator 定義物件的型別。
步驟編號 整數 建立檢查點的步驟編號。 是的

FineTuningJobCheckpointList

這是一份檢查點列表。

名稱 類型 說明 為必填項目 預設
資料 陣列 項目清單。
has_more boolean 指出清單是否包含超過傳回的元素的值。
物件 TypeDiscriminator 定義物件的型別。

FineTuningJobCreation

定義微調作業的值。

名稱 類型 說明 為必填項目 預設
超參數 FineTuningHyperParameters 微調作業中使用的超參數設定。
整合 陣列 支援微調作業之整合的設定清單。 規劃了許多整合,因此請務必檢查並處理整合類型。
方法 物件 用於受監督微調的方法
\---- 類型 微調方法類型
型號 字串 用於此微調之基本模型的識別碼 (model-id)。 是的
種子 整數 用於微調作業的種子。 傳入相同的種子和作業參數應該會產生相同的結果,但在罕見的情況下可能會有所不同。 如果未指定種子,將會為您產生一個種子。
尾碼 字串 用來識別微調模型的尾碼。 尾碼最多可包含 40 個字元 (a-z、A-Z、0-9 和 _),這些字元會新增至微調模型名稱中。
training_file 字串 用於訓練此微調模型的檔案識別碼 (file-id)。 是的
驗證檔案 字串 用於在訓練期間評估微調模型的檔案識別碼 (file-id)。

FineTuningJobError

針對失敗的微調作業,這將會包含失敗原因的詳細資訊。

名稱 類型 說明 為必填項目 預設
字碼 字串 計算機可讀取的錯誤碼。
訊息 字串 人類可讀的錯誤訊息。
參數 字串 無效的參數,通常是 training_file 或 validation_file。 如果失敗不是參數特定,則此欄位會是 null。

FineTuningJobEvent

名稱 類型 說明 為必填項目 預設
created_at 整數 此事件建立時間的時間戳記 (以 Unix Epoch 表示)。 是的
資料 此事件的可由機器判讀的資料。
id 字串 此事件的身分識別。
水平儀 LogLevel 事件的詳細程度等級。 是的
訊息 字串 描述事件的訊息。 這可能是狀態變更,例如加入佇列、啟動、失敗或已完成,或其他事件,例如上傳的結果。 是的
物件 TypeDiscriminator 定義物件的型別。
型別 EventType 定義內容篩選結果的嚴重性。 是的

FineTuningJobEventList

代表事件的清單。

名稱 類型 說明 為必填項目 預設
資料 陣列 項目清單。
has_more boolean 指出清單是否包含超過傳回的元素的值。
物件 TypeDiscriminator 定義物件的型別。

FineTuningJobList

代表微調的清單。

名稱 類型 說明 為必填項目 預設
資料 陣列 項目清單。
has_more boolean 指出清單是否包含超過傳回的元素的值。
物件 TypeDiscriminator 定義物件的型別。

微調方法類型

房產 價值觀
型別 字串
價值 dpo
supervised

FineTuningState

微調物件或微調作業的狀態。

房產 價值觀
說明 微調物件或微調作業的狀態。
型別 字串
價值 created
pending
running
pausing
paused
resuming
succeeded
cancelled
failed

FunctionCallFunction

名稱 類型 說明 為必填項目 預設
引數 字串 模型預期要傳遞至函式的引數。
名稱 字串 函數的名稱。

函數定義

名稱 類型 說明 為必填項目 預設
說明 字串 函式用途的說明,由模型使用來選擇呼叫函式的時機和方式。
名稱 字串 要呼叫之函式的名稱。
參數 函式接受的參數,描述為 JSON 結構描述物件。

通用嵌入設定

連線內嵌設定

名稱 類型 說明 為必填項目 預設
連接 BaseConnection 與資源的連線。
deploymentName 字串
型號名稱 字串

IngestionError

擷取錯誤的詳細資料

名稱 類型 說明 為必填項目 預設
innerErrors 陣列
訊息 字串

IngestionJob

表示作業的詳細數據。

IngestionJob 的鑑別子

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

類型值 圖式
名稱 類型 說明 為必填項目 預設
jobId 字串
kind 處理工作類型 (IngestionJobType) 作業類型。 是的

IngestionJobList

表示擷取作業的清單。

名稱 類型 說明 為必填項目 預設
nextLink 字串 下一頁的連結。
價值 陣列 項目清單。

IngestionJobProgress

名稱 類型 說明 為必填項目 預設
stageProgress 陣列 是的

IngestionJobRun

作業執行的詳細資料

名稱 類型 說明 為必填項目 預設
錯誤 IngestionError 擷取錯誤的詳細資料
jobId 字串
進展 IngestionJobProgress
runId 字串
狀態 OperationState 作業或項目的狀態。
警告 陣列

IngestionJobRunList

表示擷取作業執行的清單。

名稱 類型 說明 為必填項目 預設
nextLink 字串 下一頁的連結。
價值 陣列 項目清單。

IngestionJobStageProgress

名稱 類型 說明 為必填項目 預設
名稱 字串
processedItems 整數
狀態 OperationState 作業或項目的狀態。
subStageProgress 陣列
totalItems 整數

IngestionJobSystemCompute

名稱 類型 說明 為必填項目 預設
completionAction CompletionAction 完成動作。
資料刷新間隔(小時) 整數
資料來源 SystemComputeDatasource
jobId 字串
kind 處理工作類型 (IngestionJobType) 作業類型。 是的
searchServiceConnection BaseConnection 與資源的連線。

IngestionJobType

作業類型。

房產 價值觀
說明 作業類型。
型別 字串
價值 SystemCompute
UserCompute

IngestionJobUserCompute

名稱 類型 說明 為必填項目 預設
計算 JobCompute 作業的計算設定。
資料刷新間隔(小時) 整數
資料來源 UserComputeDatasource
jobId 字串
kind 處理工作類型 (IngestionJobType) 作業類型。 是的
目標 TargetIndex 要建立之索引的相關資訊。
工作區ID 字串

InnerError

Microsoft REST 指導方針中所定義的內部錯誤。

名稱 類型 說明 為必填項目 預設
字碼 InnerErrorCode Microsoft REST 指導方針中所定義的內部錯誤碼。
innererror 內部錯誤 Microsoft REST 指導方針中所定義的內部錯誤。

內部錯誤代碼

Microsoft REST 指導方針中所定義的內部錯誤碼。

房產 價值觀
說明 Microsoft REST 指導方針中所定義的內部錯誤碼。
型別 字串
價值 invalidPayload

InputMessage

名稱 類型 說明 為必填項目 預設
內容 字串 訊息的內容。
id 字串 訊息的身分識別。
名稱 字串 參與者的選用名稱。 提供模型資訊以區分相同角色的參與者。
角色 字串 正在建立訊息的實體角色。

輸入文本內容

模型的文字輸入。

名稱 類型 說明 為必填項目 預設
收發簡訊 字串 模型的文字輸入。 是的
型別 列舉 輸入項目的型別。 一律為 input_text
可能的值:input_text
是的

整合類型

可用的微調整合清單。

房產 價值觀
說明 可用的微調整合清單。
型別 字串
價值 wandb

JobCompute

作業的計算設定。

JobCompute 的區別器

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

類型值 圖式
名稱 類型 說明 為必填項目 預設
kind ComputeType 計算類型。 是的

LifeCycleStatus

模型的生命週期狀態。

注意:模型可以從 preview 提升至 generally-available,但絕不會從 generally-available 提升至 preview

房產 價值觀
說明 模型的生命週期狀態。 注意:模型可以從 preview 提升至 generally-available,但絕不會從 generally-available 提升至 preview
型別 字串
價值 preview
generally-available
deprecating
deprecated

LogLevel

事件的詳細程度等級。

房產 價值觀
說明 事件的詳細程度等級。
型別 字串
價值 info
warning
error

Logprob

名稱 類型 說明 為必填項目 預設
logprob number 如果此權杖在前 20 個最有可能的權杖內,則為此權杖的記錄可能性。 否則,會使用 -9999.0 值來表示權杖不太可能。
Token 字串 權杖。

後設資料

可附加至物件的索引鍵/值組 (16 個為一組)。 這很適合用來以結構化格式儲存物件的其他資訊,以及透過 API 或儀錶板查詢物件。 索引鍵是長度上限為64個字元的字串。 值是長度上限為 512 個字元的字串。

未定義此元件的屬性。

型號

模型是基底模型或成功微調作業的結果。

名稱 類型 說明 為必填項目 預設
能力 能力 基本或微調模型的功能。 是的
created_at 整數 此作業或項目建立時間的時間戳記 (以 Unix Epoch 表示)。
淘汰 棄用 定義模型不同使用案例的淘汰日期。 通常基底模型在建立後支援 1 年的微調;推斷通常在基底或經微調模型建立後 2 年獲得支援。 確切的日期會指定於屬性中。 是的
fine_tune 字串 如果這是微調模型,則為微調作業身分識別 (fine-tune-id);否則為 null
id 字串 此項目的身分識別。
生命週期狀態 LifeCycleStatus 模型的生命週期狀態。 注意:模型可以從「預覽」升級為 generally-available,但絕不會從 generally-available 升級為「預覽」。 是的
型號 字串 如果這是微調模型,則為基本模型身分識別 (model-id);否則為 null
物件 TypeDiscriminator 定義物件的型別。
狀態 FineTuningState 微調物件或微調作業的狀態。

ModelList

表示模型的清單。

名稱 類型 說明 為必填項目 預設
資料 陣列 項目清單。
物件 TypeDiscriminator 定義物件的型別。

OperationState

作業或項目的狀態。

房產 價值觀
說明 作業或項目的狀態。
型別 字串
價值 notRunning
running
succeeded
failed

訂單

定義檔案的用途。

房產 價值觀
說明 定義檔案的用途。
型別 字串
價值 desc
asc

OrderByOrder

房產 價值觀
型別 字串
價值 asc
desc

松果指數

Pinecone 索引。

名稱 類型 說明 為必填項目 預設
connectionId 字串 指向 Pinecone 的連線識別碼。
kind 目標類型 目標型別。 是的

目標

已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。

房產 價值觀
說明 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。
型別 字串
價值 fine-tune
fine-tune-results
assistants
assistants_output
batch
batch_output
evals
evals_output

無伺服器計算

無伺服器計算。

名稱 類型 說明 為必填項目 預設
instanceCount 整數 要執行作業的執行個體計數。
kind ComputeType 計算類型。 是的
sku 字串 SKU 層級

StoredCompletion

名稱 類型 說明 為必填項目 預設
選擇 陣列 聊天完成選項的清單。 如果 n 大於 1,則可以有多個。
created 整數 建立聊天完成時的 Unix 時間戳記 (以秒為單位)。
frequency_penalty number 介於 -2.0 和 2.0 之間的數字。 正值會根據權杖迄今為止在文字中的出現頻率來打壓新權杖,降低模型重複完全相同行的可能性。
id 字串 預存完成的身分識別。
input_user 字串 此要求的輸入使用者。
中繼資料 物件 用來取得其他資訊的任意索引鍵/值組。
型號 字串 要使用的模型識別碼。
presence_penalty number 介於 -2.0 和 2.0 之間的數字。 正值會根據權杖迄今為止是否出現在文字中來打壓新權杖,提高模型討論新主題的可能性。
請求ID 字串 OpenAI API 要求的唯一標識符。 請連絡支援人員時包含此要求識別碼。
種子 整數 如果指定,我們的系統會盡最大努力以決定性方式取樣,讓具有相同 seed 和參數的重複要求應該傳回相同的結果。 決定性並不保證,而您應該參考
system_fingerprint 用來監視後端變更的響應參數。
服務層級 字串 指定要用於處理要求的延遲層。
system_fingerprint 字串 此指紋代表模型執行時使用的後端組態。 可以搭配 seed 要求參數使用,以了解可能會影響決定性的後端變更是何時進行。
溫度 number 要使用的取樣溫度,介於 0 到 2 之間。 0.8 之類的較高值會讓輸出更隨機,而 0.2 之類的較低值會使它更集中且具決定性。 一般會建議改變這個值或 top_p,但不建議同時改變。
工具選擇 字串 控制模型所呼叫的工具 (若有)。
工具 陣列 模型可呼叫的工具清單。 目前僅支援函式作為工具。 使用此參數可提供產生 JSON 輸入的函式清單。 最多支援 128 個函式。
top_p number 核取樣是溫度取樣的替代方法,在此方法中,模型會考慮包含 top_p 機率質量的權杖結果。 因此,0.1 表示只考慮組成前 10% 機率質量的權杖。 一般會建議改變這個值或 temperature,但不建議同時改變。
使用方式 使用方式

StoredCompletionDelete

名稱 類型 說明 為必填項目 預設
已刪除 boolean 指出是否已刪除預存完成的值。
id 字串 已刪除的預存完成識別碼。
物件 字串 如果已刪除預存完成。 是的

StoredCompletionList

名稱 類型 說明 為必填項目 預設
資料 陣列 擷取物件的清單。
first_id 字串 擷取的 list 中的第一個識別碼
has_more boolean has_more 屬性用於分頁,以指出還有其他結果。
last_id 字串 擷取的 list 中的最後一個識別碼
物件 字串 物件類型,一律為 list
total 整數 項目總數。

StoredCompletionMessages

名稱 類型 說明 為必填項目 預設
資料 陣列 擷取物件的清單。
first_id 字串 擷取的 list 中的第一個識別碼
has_more boolean has_more 屬性用於分頁,以指出還有其他結果。
last_id 字串 擷取的 list 中的最後一個識別碼
物件 字串 物件類型,一律為 list
total 整數 項目總數。

StoredCompletionResponse

名稱 類型 說明 為必填項目 預設
選擇 陣列 聊天完成選項的清單。 如果 n 大於 1,則可以有多個。
created 整數 建立聊天完成時的 Unix 時間戳記 (以秒為單位)。
frequency_penalty number 介於 -2.0 和 2.0 之間的數字。 正值會根據權杖迄今為止在文字中的出現頻率來打壓新權杖,降低模型重複完全相同行的可能性。
id 字串 預存完成的身分識別。
input_user 字串 此要求的輸入使用者。
中繼資料 物件 用來取得其他資訊的任意索引鍵/值組。
型號 字串 要使用的模型識別碼。
物件 字串 此物件的類型。
presence_penalty number 介於 -2.0 和 2.0 之間的數字。 正值會根據權杖迄今為止是否出現在文字中來打壓新權杖,提高模型討論新主題的可能性。
請求ID 字串 OpenAI API 要求的唯一標識符。 請連絡支援人員時包含此要求識別碼。
種子 整數 如果指定,我們的系統會盡最大努力以決定性方式取樣,如此一來,具有相同 seed和 參數的重複要求應該會傳回相同的結果。 不保證決定性,且您應參照 system_fingerprint 回應參數來監視後端的變更。
服務層級 字串 指定要用於處理要求的延遲層。
system_fingerprint 字串 此指紋代表模型執行時使用的後端組態。 可以搭配 seed 要求參數使用,以了解可能會影響決定性的後端變更是何時進行。
溫度 number 要使用的取樣溫度,介於 0 到 2 之間。 0.8 等較高的值會讓輸出更隨機,而較低的值,例如0.2會讓輸出更專注且具決定性。 一般會建議改變這個值或 top_p,但不建議同時改變。
工具選擇 字串 控制模型所呼叫的工具 (若有)。
工具 陣列 模型可呼叫的工具清單。 目前僅支援函式作為工具。 使用此參數可提供產生 JSON 輸入的函式清單。 最多支援 128 個函式。
top_p number 核取樣是溫度取樣的替代方法,在此方法中,模型會考慮包含 top_p 機率質量的權杖結果。 因此,0.1 表示只考慮組成前 10% 機率質量的權杖。 一般會建議改變這個值或 temperature,但不建議同時改變。
使用方式 使用方式

SupervisedMethod

用於受監督微調的方法

名稱 類型 說明 為必填項目 預設
型別 微調方法類型 是的

SupervisedMethodRequest

用於受監督微調的方法

名稱 類型 說明 為必填項目 預設
型別 微調方法類型 是的

SystemComputeDatasource

SystemComputeDatasource 的鑑別子

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

類型值 圖式
名稱 類型 說明 為必填項目 預設
kind SystemComputeDatasourceType 資料來源類型。 是的

系統計算數據來源類型

資料來源類型。

房產 價值觀
說明 資料來源類型。
型別 字串
價值 Storage
Urls

SystemComputeStorage

記憶體帳戶

名稱 類型 說明 為必填項目 預設
區塊化 ChunkingSettings 區塊化設定
連接 BaseConnection 與資源的連線。
容器名稱 字串 容器名稱
內嵌 陣列
kind SystemComputeDatasourceType 資料來源類型。 是的

SystemComputeUrl

URL

名稱 類型 說明 為必填項目 預設
區塊化 ChunkingSettings 區塊化設定
連接 BaseConnection 與資源的連線。
容器名稱 字串 容器名稱
編目 CrawlingSettings 編目設定
內嵌 陣列
kind SystemComputeDatasourceType 資料來源類型。 是的
網址 陣列

TargetIndex

要建立之索引的相關資訊。

TargetIndex 的鑑別子

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

類型值 圖式
名稱 類型 說明 為必填項目 預設
kind 目標類型 目標型別。 是的

目標類型

目標型別。

房產 價值觀
說明 目標型別。
型別 字串
價值 AzureAISearch
CosmosDB
Pinecone

工具

名稱 類型 說明 為必填項目 預設
函式 FunctionDefinition
型別 字串 工具呼叫的類型。 此類型的工具呼叫一律為 function

ToolCall

名稱 類型 說明 為必填項目 預設
函式 FunctionCallFunction
id 字串 工具呼叫的識別碼。
型別 字串 需要輸出的工具呼叫類型。 目前,這一律為 function

TypeDiscriminator

定義物件的型別。

房產 價值觀
說明 定義物件的型別。
型別 字串
價值 list
fine_tuning.job
file
fine_tuning.job.event
fine_tuning.job.checkpoint
model
upload
upload.part
batch
wandb

UpdateStoredCompletionRequest

名稱 類型 說明 為必填項目 預設
中繼資料 物件 用來取得其他資訊的任意索引鍵/值組。

UploadFileCompleteBody

名稱 類型 說明 為必填項目 預設
md5 字串
part_ids(零件識別碼) 陣列 是的

UploadFileStartBody

名稱 類型 說明 為必填項目 預設
位元組 整數 是的
檔名 字串 是的
MIME類型 字串 是的
目的 目的 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。 是的

UploadPartResource

名稱 類型 說明 為必填項目 預設
azure_block_id 字串
created_at 整數 此作業或項目建立時間的時間戳記 (以 Unix Epoch 表示)。
id 字串 此項目的身分識別。
物件 TypeDiscriminator 定義物件的型別。
upload_id 字串

UploadResource

名稱 類型 說明 為必填項目 預設
位元組 整數
created_at 整數 此作業或項目建立時間的時間戳記 (以 Unix Epoch 表示)。
到期時間 整數
檔案 檔案 檔案是可用於訓練和驗證的文件。 它也可以是具有結果詳細資料的服務產生文件。
檔名 字串
id 字串 此項目的身分識別。
物件 TypeDiscriminator 定義物件的型別。
目的 目的 已上傳文件的預定用途。 使用「fine-tune」進行微調。 這可讓我們驗證已上傳檔案的格式。
狀態 UploadStatus

上傳狀態

房產 價值觀
型別 字串
價值 pending
expired
completed
cancelled

用法

名稱 類型 說明 為必填項目 預設
completion_tokens 整數 已產生完成中的權杖數目。
prompt_tokens 整數 提示中的權杖數目。
總token數量 整數 要求中使用的權杖總數 (提示 + 完成)。

使用者計算數據集

記憶體帳戶

名稱 類型 說明 為必填項目 預設
區塊化 ChunkingSettings 區塊化設定
datasetId 字串
資料集類型 字串
內嵌 陣列
kind UserComputeDatasourceType 資料來源類型。 是的

使用者運算資料源

UserComputeDatasource 的鑑別子

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

類型值 圖式
名稱 類型 說明 為必填項目 預設
kind UserComputeDatasourceType 資料來源類型。 是的

使用者計算資料來源類型

資料來源類型。

房產 價值觀
說明 資料來源類型。
型別 字串
價值 Dataset
Urls

UserComputeUrl

URL

名稱 類型 說明 為必填項目 預設
區塊化 ChunkingSettings 區塊化設定
編目 CrawlingSettings 編目設定
內嵌 陣列
kind UserComputeDatasourceType 資料來源類型。 是的
網址 陣列

WandBIntegrationRequest

名稱 類型 說明 為必填項目 預設
實體 字串
名稱 字串
專案 字串 是的
標記 陣列

WandBIntegrationRequestWrapper

名稱 類型 說明 為必填項目 預設
型別 IntegrationTypes 可用的微調整合清單。 是的
wandb WandB整合請求 是的

WorkspaceConnection

AML 工作區連線。

名稱 類型 說明 為必填項目 預設
connectionId 字串 ConnectionId
kind 連接類型 連線類型。 是的

WorkspaceConnectionEmbeddingSettings

內嵌模型的連線識別碼

名稱 類型 說明 為必填項目 預設
connectionId 字串
deploymentName 字串
型號名稱 字串

後續步驟

深入了解模型,以及使用 REST API 進行微調。 深入了解驅動 Azure OpenAI 的基礎模型