Share via


Ingestion Jobs - Create

啟動作業,以將數據內嵌至 Azure 搜尋服務索引,以作為完成的數據源。 擷取作業的狀態會在完成之後保留 48 小時,之後將會刪除。

PUT {endpoint}/openai/extensions/on-your-data/ingestion-jobs/{jobId}?api-version=2023-10-01-preview

URI 參數

名稱 位於 必要 類型 Description
endpoint
path True

string

url

支援的認知服務端點 (通訊協定和主機名,例如: https://aoairesource.openai.azure.com。將 「aoairesource」 取代為您的 Azure OpenAI 帳戶名稱) 。

jobId
path True

string

擷取作業的標識碼。

api-version
query True

string

要求的 API 版本。

要求標頭

名稱 必要 類型 Description
api-key True

string

在這裡提供認知服務 Azure OpenAI 帳戶密鑰。

searchServiceEndpoint True

string

要在其中建立擷取資產之搜尋服務資源的端點。

searchServiceAdminKey

string

如果未設定受控識別,則搜尋服務資源的管理員密鑰。

storageConnectionString True

string

連接字串 至裝載要擷取之數據的 Blob 記憶體帳戶。

storageContainer True

string

裝載要擷取之數據的容器名稱。

embeddingEndpoint

string

啟用時,要用於內嵌計算的內嵌模型端點。

embeddingKey

string

如果已啟用且未設定受控識別,則用來存取內嵌模型的密鑰。

storageEndpoint

string

裝載要擷取之數據的 Blob 記憶體端點。 storageConnectionString 的 ResourceId 格式需要。

embeddingDeploymentName

string

用來存取內嵌模型之目前 Azure OpenAI 資源的內嵌部署名稱。

要求本文

名稱 必要 類型 Description
dataRefreshIntervalInMinutes True

integer

chunkSize

integer

此數目會定義擷取流程所產生之每個區塊中的令牌數目上限。

completionAction

IngestionJobCompletionAction

IngestionJobCompletionAction
擷取作業完成時要採取的動作。

id

string

progress

IngestionJobProgress

IngestionJobProgress

warnings

string[]

回應

名稱 類型 Description
200 OK

IngestionJob

Success

Other Status Codes

ErrorResponse

發生錯誤。

安全性

api-key

在這裡提供認知服務 Azure OpenAI 帳戶密鑰。

Type: apiKey
In: header

範例

Starting an ingestion job.

Sample Request

PUT https://aoairesource.openai.azure.com/openai/extensions/on-your-data/ingestion-jobs/test?api-version=2023-10-01-preview






{
  "dataRefreshIntervalInMinutes": 60,
  "completionAction": "cleanUpAssets"
}

Sample Response

{
  "id": "test",
  "dataRefreshIntervalInMinutes": 60,
  "completionAction": "cleanUpAssets",
  "status": "notRunning",
  "warnings": [],
  "progress": {
    "stageProgress": [
      {
        "name": "Preprocessing",
        "totalItems": 0,
        "processedItems": 0
      },
      {
        "name": "Indexing",
        "totalItems": 0,
        "processedItems": 0
      }
    ]
  }
}

定義

名稱 Description
Error

錯誤

ErrorCode

ErrorCode

ErrorResponse

ErrorResponse

IngestionJob

IngestionJob

IngestionJobCompletionAction

IngestionJobCompletionAction

IngestionJobProgress

IngestionJobProgress

InnerError

InnerError

InnerErrorCode

InnerErrorCode

OperationState

OperationState

StageProgress

Error

錯誤

名稱 類型 Description
code

ErrorCode

ErrorCode
Microsoft REST 指導方針中所定義的錯誤碼 (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses) 。

details

Error[]

如果有的話,錯誤詳細數據。

innererror

InnerError

InnerError
Microsoft REST 指導方針中所定義的內部錯誤 (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses) 。

message

string

此錯誤的訊息。

target

string

如果有的話,就會發生錯誤的位置。

ErrorCode

ErrorCode

名稱 類型 Description
conflict

string

要求的作業與目前的資源狀態衝突。

contentFilter

string

映射產生失敗,因為我們的安全系統。

fileImportFailed

string

匯入檔案失敗。

forbidden

string

目前使用者/API 金鑰禁止此作業。

internalFailure

string

內部錯誤。 請再試一次。

invalidPayload

string

此作業的要求數據無效。

itemDoesAlreadyExist

string

專案已經存在。

jsonlValidationFailed

string

jsonl 數據的驗證失敗。

notFound

string

找不到資源。

quotaExceeded

string

超過配額。

serviceUnavailable

string

服務目前無法使用。

tooManyRequests

string

太多要求。 請稍後重試。

unauthorized

string

目前的使用者/API 金鑰未獲授權進行作業。

unexpectedEntityState

string

作業無法以目前資源的狀態執行。

ErrorResponse

ErrorResponse

名稱 類型 Description
error

Error

錯誤
Microsoft REST 指導方針中所定義的錯誤內容 (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses) 。

IngestionJob

IngestionJob

名稱 類型 預設值 Description
chunkSize

integer

1024

此數目會定義擷取流程所產生之每個區塊中的令牌數目上限。

completionAction

IngestionJobCompletionAction

IngestionJobCompletionAction
擷取作業完成時要採取的動作。

dataRefreshIntervalInMinutes

integer

error

Error

錯誤
Microsoft REST 指導方針中所定義的錯誤內容 (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses) 。

id

string

progress

IngestionJobProgress

IngestionJobProgress

status

OperationState

OperationState
作業或項目的狀態。

warnings

string[]

IngestionJobCompletionAction

IngestionJobCompletionAction

名稱 類型 Description
cleanUpAssets

string

將會清除擷取程式期間建立的中繼資產。

keepAllAssets

string

不會清除在擷取程式期間建立的任何中繼資產。

IngestionJobProgress

IngestionJobProgress

名稱 類型 Description
stageProgress

StageProgress[]

InnerError

InnerError

名稱 類型 Description
code

InnerErrorCode

InnerErrorCode
Microsoft REST 指導方針中所定義的內部錯誤碼 (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses) 。

innererror

InnerError

InnerError
Microsoft REST 指導方針中所定義的內部錯誤 (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses) 。

InnerErrorCode

InnerErrorCode

名稱 類型 Description
invalidPayload

string

此作業的要求數據無效。

OperationState

OperationState

名稱 類型 Description
failed

string

作業已完成失敗的處理,無法進一步取用。

notRunning

string

作業尚未排入佇列,未來要處理。

running

string

作業已開始處理。

succeeded

string

作業已成功處理,並已準備好取用。

StageProgress

名稱 類型 Description
name

string

processedItems

integer

totalItems

integer