Document Models - Build Model
建置自定義檔分析模型。
POST {endpoint}/documentintelligence/documentModels:build?api-version=2024-02-29-preview
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Document Intelligence 服務端點。 |
api-version
|
query | True |
string |
用於此作業的 API 版本。 |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
buildMode | True |
自訂檔案模型建置模式。 |
|
modelId | True |
string |
唯一的檔模型名稱。 |
azureBlobFileListSource |
Azure Blob 儲存體 指定定型資料的檔案清單。 必須指定 azureBlobSource 或 azureBlobFileListSource。 |
||
azureBlobSource |
包含定型數據 Azure Blob 儲存體 位置。 必須指定 azureBlobSource 或 azureBlobFileListSource。 |
||
description |
string |
檔模型描述。 |
|
tags |
object |
與檔模型相關聯的索引鍵/值標籤屬性清單。 |
回應
名稱 | 類型 | Description |
---|---|---|
202 Accepted |
要求已接受進行處理,但尚未完成處理。 Headers
|
|
Other Status Codes |
未預期的錯誤回應。 |
安全性
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
OAuth2Auth
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Token URL:
https://login.microsoftonline.com/common/oauth2/token
Scopes
名稱 | Description |
---|---|
https://cognitiveservices.azure.com/.default |
範例
Build Document Model
Sample Request
POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels:build?api-version=2024-02-29-preview
{
"modelId": "myCustomModel",
"description": "Custom model description",
"buildMode": "template",
"azureBlobSource": {
"containerUrl": "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken",
"prefix": "trainingDocs/"
},
"tags": {
"createdBy": "myUserId"
}
}
Sample Response
Operation-Location: https://myendpoint.cognitiveservices.azure.com/documentintelligence/operations/b704bb00-d130-4f3f-a1d8-ca96de3eabb4?api-version=2024-02-29-preview
定義
名稱 | Description |
---|---|
Azure |
Azure Blob 儲存體 內容。 |
Azure |
Azure Blob 儲存體 中的檔案清單。 |
Build |
要求本文以建置新的自定義檔模型。 |
Document |
自訂檔案模型建置模式。 |
Error |
錯誤物件。 |
Error |
錯誤回應物件。 |
Inner |
物件,包含有關錯誤的更特定資訊。 |
AzureBlobContentSource
Azure Blob 儲存體 內容。
名稱 | 類型 | Description |
---|---|---|
containerUrl |
string |
Azure Blob 儲存體 容器 URL。 |
prefix |
string |
Blob 名稱前置詞。 |
AzureBlobFileListContentSource
Azure Blob 儲存體 中的檔案清單。
名稱 | 類型 | Description |
---|---|---|
containerUrl |
string |
Azure Blob 儲存體 容器 URL。 |
fileList |
string |
指定文件子集之容器內的 JSONL 檔案路徑。 |
BuildDocumentModelRequest
要求本文以建置新的自定義檔模型。
名稱 | 類型 | Description |
---|---|---|
azureBlobFileListSource |
Azure Blob 儲存體 指定定型資料的檔案清單。 必須指定 azureBlobSource 或 azureBlobFileListSource。 |
|
azureBlobSource |
包含定型數據 Azure Blob 儲存體 位置。 必須指定 azureBlobSource 或 azureBlobFileListSource。 |
|
buildMode |
自訂檔案模型建置模式。 |
|
description |
string |
檔模型描述。 |
modelId |
string |
唯一的檔模型名稱。 |
tags |
object |
與檔模型相關聯的索引鍵/值標籤屬性清單。 |
DocumentBuildMode
自訂檔案模型建置模式。
名稱 | 類型 | Description |
---|---|---|
neural |
string |
支援具有各種視覺效果範本的檔。 |
template |
string |
以類似視覺範本為目標的檔。 |
Error
錯誤物件。
名稱 | 類型 | Description |
---|---|---|
code |
string |
其中一組伺服器定義的錯誤碼。 |
details |
Error[] |
導致此錯誤之特定錯誤的詳細數據陣列。 |
innererror |
物件,包含比目前對象有關錯誤的更特定資訊。 |
|
message |
string |
人類看得懂的錯誤表示法。 |
target |
string |
錯誤的目標。 |
ErrorResponse
錯誤回應物件。
名稱 | 類型 | Description |
---|---|---|
error |
錯誤資訊。 |
InnerError
物件,包含有關錯誤的更特定資訊。
名稱 | 類型 | Description |
---|---|---|
code |
string |
其中一組伺服器定義的錯誤碼。 |
innererror |
內部錯誤。 |
|
message |
string |
人類看得懂的錯誤表示法。 |