共用方式為


Ingestion Jobs - Create

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

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

URI 參數

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

string

url

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

job-id
path True

string

將要建立之作業的標識碼。

api-version
query True

string

要求的 API 版本。

要求標頭

名稱 必要 類型 Description
mgmt-user-token

string

用來存取工作區的令牌(僅適用於使用者計算作業)。

aml-user-token

string

用來存取工作區中作業內資源的令牌(僅適用於使用者計算作業)。

要求本文

要求主體可以是下列其中一項:

名稱 Description
IngestionJobSystemCompute
IngestionJobUserCompute

IngestionJobSystemCompute

名稱 必要 類型 Description
kind True string:

SystemCompute

IngestionJobType
作業類型。

completionAction

IngestionJobCompletionAction

完成動作。

dataRefreshIntervalInHours

integer

datasource SystemComputeDatasource:

SystemComputeDatasource

jobId

string

searchServiceConnection BaseConnection:

BaseConnection
與資源的連線。

IngestionJobUserCompute

名稱 必要 類型 Description
kind True string:

UserCompute

IngestionJobType
作業類型。

workspaceId True

string

compute JobCompute:

JobCompute
作業的計算設定。

dataRefreshIntervalInHours

integer

datasource UserComputeDatasource:

UserComputeDatasource

jobId

string

target TargetIndex:

TargetIndex
要建立之索引的相關信息。

回應

名稱 類型 Description
200 OK IngestionJob:

成功

Other Status Codes

ErrorResponse

發生錯誤。

安全性

api-key

API 金鑰驗證

類型: apiKey
位於: header

OAuth2Auth

OAuth2 驗證

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize

範圍

名稱 Description
https://cognitiveservices.azure.com/.default

範例

Create a system-compute ingestion job
Create a user-compute ingestion job

Create a system-compute ingestion job

範例要求

PUT {endpoint}/openai/ingestion/jobs/ingestion-job?api-version=2024-05-01-preview

{
  "kind": "SystemCompute",
  "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"
}

範例回覆

operation-location: https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2024-05-01-preview
{
  "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"
}

Create a user-compute ingestion job

範例要求

PUT {endpoint}/openai/ingestion/jobs/ingestion-job?api-version=2024-05-01-preview

{
  "kind": "UserCompute",
  "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"
  }
}

範例回覆

operation-location: https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2024-05-01-preview
{
  "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"
  }
}

定義

名稱 Description
AzureAISearchIndex

Azure AI 搜尋索引。

ChunkingSettings

ChunkingSettings

ComputeType

計算類型。

ConnectionStringConnection

連接字串連線。

ConnectionType

連接類型。

CosmosDBIndex

CosmosDB 索引。

CrawlingSettings

CrawlingSettings

CustomCompute

自訂計算。

DeploymentConnection

相對部署連線。

EndpointKeyConnection

端點金鑰連線。

EndpointMIConnection

端點受控識別連線。

Error

錯誤

ErrorCode

ErrorCode

ErrorResponse

ErrorResponse

GenericEmbeddingSettings

ConnectionEmbeddingSettings

IngestionJobCompletionAction

完成動作。

IngestionJobSystemCompute
IngestionJobType

IngestionJobType

IngestionJobUserCompute
InnerError

InnerError

InnerErrorCode

InnerErrorCode

PineconeIndex

Pinecone Index。

ServerlessCompute

無伺服器計算。

SystemComputeDatasourceType

數據源類型。

SystemComputeStorage

SystemComputeStorage

SystemComputeUrl

SystemComputeUrl

TargetType

目標類型。

UserComputeDataset

UserComputeStorage

UserComputeDatasourceType

數據源類型。

UserComputeUrl

UserComputeUrl

WorkspaceConnection

AML 工作區連線。

WorkspaceConnectionEmbeddingSettings

WorkspaceConnectionEmbeddingSettings

AzureAISearchIndex

Azure AI 搜尋索引。

名稱 類型 Description
connectionId

string

指向 Azure AI 搜尋索引的連接標識碼。

kind string:

AzureAISearch

目標類型。

ChunkingSettings

ChunkingSettings

名稱 類型 Description
maxChunkSizeInTokens

integer

ComputeType

計算類型。

名稱 類型 Description
CustomCompute

string

自訂用戶計算。

ServerlessCompute

string

無伺服器用戶計算。

ConnectionStringConnection

連接字串連線。

名稱 類型 Description
connectionString

string

連接字串

kind string:

ConnectionString

連接類型。

ConnectionType

連接類型。

名稱 類型 Description
ConnectionString

string

連接字串。

EndpointWithKey

string

端點和金鑰連線。

EndpointWithManagedIdentity

string

端點和受控識別。

RelativeConnection

string

相對部署

WorkspaceConnection

string

AML 工作區連線。

CosmosDBIndex

CosmosDB 索引。

名稱 類型 Description
collectionName

string

cosmos DB 集合的名稱。

connectionId

string

指向cosmos DB的連接標識碼。

databaseName

string

cosmos DB 資料庫的名稱。

kind string:

CosmosDB

目標類型。

CrawlingSettings

CrawlingSettings

名稱 類型 Description
maxCrawlDepth

integer

maxCrawlTimeInMins

integer

maxDownloadTimeInMins

integer

maxFileSize

integer

maxFiles

integer

maxRedirects

integer

CustomCompute

自訂計算。

名稱 類型 Description
computeId

string

自訂計算的識別碼

kind string:

CustomCompute

計算類型。

DeploymentConnection

相對部署連線。

名稱 類型 Description
kind string:

RelativeConnection

連接類型。

EndpointKeyConnection

端點金鑰連線。

名稱 類型 Description
endpoint

string

端點

key

string

鑰匙

kind string:

EndpointWithKey

連接類型。

EndpointMIConnection

端點受控識別連線。

名稱 類型 Description
endpoint

string

端點

kind string:

EndpointWithManagedIdentity

連接類型。

resourceId

string

資源標識碼

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)。

GenericEmbeddingSettings

ConnectionEmbeddingSettings

名稱 類型 Description
connection BaseConnection:

BaseConnection
與資源的連線。

deploymentName

string

modelName

string

IngestionJobCompletionAction

完成動作。

名稱 類型 Description
cleanUpTempAssets

string

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

keepAllAssets

string

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

IngestionJobSystemCompute

名稱 類型 Description
completionAction

IngestionJobCompletionAction

完成動作。

dataRefreshIntervalInHours

integer

datasource SystemComputeDatasource:

SystemComputeDatasource

jobId

string

kind string:

SystemCompute

IngestionJobType
作業類型。

searchServiceConnection BaseConnection:

BaseConnection
與資源的連線。

IngestionJobType

IngestionJobType

名稱 類型 Description
SystemCompute

string

在服務擁有的資源上執行的作業。

UserCompute

string

在用戶擁有的工作區上執行的作業。

IngestionJobUserCompute

名稱 類型 Description
compute JobCompute:

JobCompute
作業的計算設定。

dataRefreshIntervalInHours

integer

datasource UserComputeDatasource:

UserComputeDatasource

jobId

string

kind string:

UserCompute

IngestionJobType
作業類型。

target TargetIndex:

TargetIndex
要建立之索引的相關信息。

workspaceId

string

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

此作業的要求數據無效。

PineconeIndex

Pinecone Index。

名稱 類型 Description
connectionId

string

指向 pinecone 的連接標識碼。

kind string:

Pinecone

目標類型。

ServerlessCompute

無伺服器計算。

名稱 類型 Description
instanceCount

integer

要執行作業的實例計數。

kind string:

ServerlessCompute

計算類型。

sku

string

SKU 層級

SystemComputeDatasourceType

數據源類型。

名稱 類型 Description
Storage

string

Azure 記憶體帳戶。

Urls

string

URL。

SystemComputeStorage

SystemComputeStorage

名稱 類型 Description
chunking

ChunkingSettings

ChunkingSettings
區塊化設定

connection BaseConnection:

BaseConnection
與資源的連線。

containerName

string

容器名稱

embeddings

GenericEmbeddingSettings[]

ConnectionEmbeddingSettings
線上內嵌設定

kind string:

Storage

數據源類型。

SystemComputeUrl

SystemComputeUrl

名稱 類型 Description
chunking

ChunkingSettings

ChunkingSettings
區塊化設定

connection BaseConnection:

BaseConnection
與資源的連線。

containerName

string

容器名稱

crawling

CrawlingSettings

CrawlingSettings
編目設定

embeddings

GenericEmbeddingSettings[]

ConnectionEmbeddingSettings
線上內嵌設定

kind string:

Urls

數據源類型。

urls

string[]

TargetType

目標類型。

名稱 類型 Description
AzureAISearch

string

Azure AI 搜尋索引。

CosmosDB

string

CosmosDB 索引。

Pinecone

string

Pinecone Index。

UserComputeDataset

UserComputeStorage

名稱 類型 Description
chunking

ChunkingSettings

ChunkingSettings
區塊化設定

datasetId

string

datasetType

string

embeddings

WorkspaceConnectionEmbeddingSettings[]

WorkspaceConnectionEmbeddingSettings
內嵌模型的連線標識碼

kind string:

Dataset

數據源類型。

UserComputeDatasourceType

數據源類型。

名稱 類型 Description
Dataset

string

工作區數據集。

Urls

string

URL。

UserComputeUrl

UserComputeUrl

名稱 類型 Description
chunking

ChunkingSettings

ChunkingSettings
區塊化設定

crawling

CrawlingSettings

CrawlingSettings
編目設定

embeddings

WorkspaceConnectionEmbeddingSettings[]

WorkspaceConnectionEmbeddingSettings
內嵌模型的連線標識碼

kind string:

Urls

數據源類型。

urls

string[]

WorkspaceConnection

AML 工作區連線。

名稱 類型 Description
connectionId

string

ConnectionId

kind string:

WorkspaceConnection

連接類型。

WorkspaceConnectionEmbeddingSettings

WorkspaceConnectionEmbeddingSettings

名稱 類型 Description
connectionId

string

deploymentName

string

modelName

string