Ingestion Jobs - Create
使用指定的作業標識碼建立擷取作業。
PUT {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-02-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 |
---|---|
Ingestion |
|
Ingestion |
IngestionJobSystemCompute
名稱 | 必要 | 類型 | Description |
---|---|---|---|
kind | True |
string:
System |
IngestionJobType |
completionAction |
完成動作。 |
||
dataRefreshIntervalInHours |
integer |
||
datasource | SystemComputeDatasource: |
SystemComputeDatasource |
|
jobId |
string |
||
searchServiceConnection | BaseConnection: |
BaseConnection |
IngestionJobUserCompute
名稱 | 必要 | 類型 | Description |
---|---|---|---|
kind | True |
string:
User |
IngestionJobType |
workspaceId | True |
string |
|
compute | JobCompute: |
JobCompute |
|
dataRefreshIntervalInHours |
integer |
||
datasource | UserComputeDatasource: |
UserComputeDatasource |
|
jobId |
string |
||
target | TargetIndex: |
TargetIndex |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK | IngestionJob: |
成功 |
Other Status Codes |
發生錯誤。 |
安全性
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=2025-02-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=2025-02-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=2025-02-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=2025-02-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 |
---|---|
Azure |
Azure AI 搜尋索引。 |
Chunking |
ChunkingSettings |
Compute |
計算類型。 |
Connection |
連接字串連線。 |
Connection |
連接類型。 |
Cosmos |
CosmosDB 索引。 |
Crawling |
CrawlingSettings |
Custom |
自訂計算。 |
Deployment |
相對部署連線。 |
Endpoint |
端點金鑰連線。 |
Endpoint |
端點受控識別連線。 |
Error |
錯誤 |
Error |
ErrorCode |
Error |
ErrorResponse |
Generic |
ConnectionEmbeddingSettings |
Ingestion |
完成動作。 |
Ingestion |
|
Ingestion |
IngestionJobType |
Ingestion |
|
Inner |
InnerError |
Inner |
InnerErrorCode |
Pinecone |
Pinecone Index。 |
Serverless |
無伺服器計算。 |
System |
數據源類型。 |
System |
SystemComputeStorage |
System |
SystemComputeUrl |
Target |
目標類型。 |
User |
UserComputeStorage |
User |
數據源類型。 |
User |
UserComputeUrl |
Workspace |
AML 工作區連線。 |
Workspace |
WorkspaceConnectionEmbeddingSettings |
AzureAISearchIndex
Azure AI 搜尋索引。
名稱 | 類型 | Description |
---|---|---|
connectionId |
string |
指向 Azure AI 搜尋索引的連接標識碼。 |
kind |
string:
Azure |
目標類型。 |
ChunkingSettings
ChunkingSettings
名稱 | 類型 | Description |
---|---|---|
maxChunkSizeInTokens |
integer |
ComputeType
計算類型。
值 | Description |
---|---|
CustomCompute |
自訂用戶計算。 |
ServerlessCompute |
無伺服器用戶計算。 |
ConnectionStringConnection
連接字串連線。
名稱 | 類型 | Description |
---|---|---|
connectionString |
string |
連接字串 |
kind |
string:
Connection |
連接類型。 |
ConnectionType
連接類型。
值 | Description |
---|---|
ConnectionString |
連接字串。 |
EndpointWithKey |
端點和金鑰連線。 |
EndpointWithManagedIdentity |
端點和受控識別。 |
RelativeConnection |
相對部署 |
WorkspaceConnection |
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: |
計算類型。 |
DeploymentConnection
相對部署連線。
名稱 | 類型 | Description |
---|---|---|
kind |
string:
Relative |
連接類型。 |
EndpointKeyConnection
端點金鑰連線。
名稱 | 類型 | Description |
---|---|---|
endpoint |
string |
端點 |
key |
string |
鑰匙 |
kind |
string:
Endpoint |
連接類型。 |
EndpointMIConnection
端點受控識別連線。
名稱 | 類型 | Description |
---|---|---|
endpoint |
string |
端點 |
kind |
string:
Endpoint |
連接類型。 |
resourceId |
string |
資源標識碼 |
Error
錯誤
名稱 | 類型 | Description |
---|---|---|
code |
ErrorCode |
|
details |
Error[] |
如果有的話,錯誤詳細數據。 |
innererror |
InnerError |
|
message |
string minLength: 1 |
此錯誤的訊息。 |
target |
string |
如果有的話,就會發生錯誤的位置。 |
ErrorCode
ErrorCode
值 | Description |
---|---|
conflict |
要求的作業與目前的資源狀態衝突。 |
contentFilter |
映射產生因我們的安全系統而失敗。 |
fileImportFailed |
匯入檔案失敗。 |
forbidden |
目前使用者/API 金鑰禁止此作業。 |
internalFailure |
內部錯誤。 請重試。 |
invalidPayload |
此作業的要求數據無效。 |
itemDoesAlreadyExist |
專案已經存在。 |
jsonlValidationFailed |
jsonl 數據的驗證失敗。 |
notFound |
找不到資源。 |
quotaExceeded |
超過配額。 |
serviceUnavailable |
服務目前無法使用。 |
tooManyRequests |
要求太多。 請稍後再試一次。 |
unauthorized |
目前的使用者/API 金鑰未獲授權進行作業。 |
unexpectedEntityState |
作業無法以目前資源的狀態執行。 |
ErrorResponse
ErrorResponse
名稱 | 類型 | Description |
---|---|---|
error |
錯誤 |
GenericEmbeddingSettings
ConnectionEmbeddingSettings
名稱 | 類型 | Description |
---|---|---|
connection | BaseConnection: |
BaseConnection |
deploymentName |
string |
|
modelName |
string |
IngestionJobCompletionAction
完成動作。
值 | Description |
---|---|
cleanUpTempAssets |
將會清除擷取程式期間建立的中繼資產。 |
keepAllAssets |
不會清除擷取程式期間所建立的任何中繼資產。 |
IngestionJobSystemCompute
名稱 | 類型 | Description |
---|---|---|
completionAction |
完成動作。 |
|
dataRefreshIntervalInHours |
integer |
|
datasource | SystemComputeDatasource: |
SystemComputeDatasource |
jobId |
string |
|
kind |
string:
System |
IngestionJobType |
searchServiceConnection | BaseConnection: |
BaseConnection |
IngestionJobType
IngestionJobType
值 | Description |
---|---|
SystemCompute |
在服務擁有的資源上執行的作業。 |
UserCompute |
在用戶擁有的工作區上執行的作業。 |
IngestionJobUserCompute
名稱 | 類型 | Description |
---|---|---|
compute | JobCompute: |
JobCompute |
dataRefreshIntervalInHours |
integer |
|
datasource | UserComputeDatasource: |
UserComputeDatasource |
jobId |
string |
|
kind |
string:
User |
IngestionJobType |
target | TargetIndex: |
TargetIndex |
workspaceId |
string |
InnerError
InnerError
名稱 | 類型 | Description |
---|---|---|
code |
InnerErrorCode |
|
innererror |
InnerError |
InnerErrorCode
InnerErrorCode
值 | Description |
---|---|
invalidPayload |
此作業的要求數據無效。 |
PineconeIndex
Pinecone Index。
名稱 | 類型 | Description |
---|---|---|
connectionId |
string |
指向 pinecone 的連接標識碼。 |
kind |
string:
Pinecone |
目標類型。 |
ServerlessCompute
無伺服器計算。
名稱 | 類型 | Description |
---|---|---|
instanceCount |
integer |
要執行作業的實例計數。 |
kind | string: |
計算類型。 |
sku |
string |
SKU 層級 |
SystemComputeDatasourceType
數據源類型。
值 | Description |
---|---|
Storage |
Azure 記憶體帳戶。 |
Urls |
URL。 |
SystemComputeStorage
SystemComputeStorage
名稱 | 類型 | Description |
---|---|---|
chunking |
ChunkingSettings |
|
connection | BaseConnection: |
BaseConnection |
containerName |
string |
容器名稱 |
embeddings |
ConnectionEmbeddingSettings |
|
kind |
string:
Storage |
數據源類型。 |
SystemComputeUrl
SystemComputeUrl
名稱 | 類型 | Description |
---|---|---|
chunking |
ChunkingSettings |
|
connection | BaseConnection: |
BaseConnection |
containerName |
string |
容器名稱 |
crawling |
CrawlingSettings |
|
embeddings |
ConnectionEmbeddingSettings |
|
kind |
string:
Urls |
數據源類型。 |
urls |
string[] |
TargetType
目標類型。
值 | Description |
---|---|
AzureAISearch |
Azure AI 搜尋索引。 |
CosmosDB |
CosmosDB 索引。 |
Pinecone |
Pinecone Index。 |
UserComputeDataset
UserComputeStorage
名稱 | 類型 | Description |
---|---|---|
chunking |
ChunkingSettings |
|
datasetId |
string |
|
datasetType |
string |
|
embeddings |
WorkspaceConnectionEmbeddingSettings |
|
kind |
string:
Dataset |
數據源類型。 |
UserComputeDatasourceType
數據源類型。
值 | Description |
---|---|
Dataset |
工作區數據集。 |
Urls |
URL。 |
UserComputeUrl
UserComputeUrl
名稱 | 類型 | Description |
---|---|---|
chunking |
ChunkingSettings |
|
crawling |
CrawlingSettings |
|
embeddings |
WorkspaceConnectionEmbeddingSettings |
|
kind |
string:
Urls |
數據源類型。 |
urls |
string[] |
WorkspaceConnection
AML 工作區連線。
名稱 | 類型 | Description |
---|---|---|
connectionId |
string |
ConnectionId |
kind | string: |
連接類型。 |
WorkspaceConnectionEmbeddingSettings
WorkspaceConnectionEmbeddingSettings
名稱 | 類型 | Description |
---|---|---|
connectionId |
string |
|
deploymentName |
string |
|
modelName |
string |