Document Models - Compose Model
從現有檔模型的文件類型建立新的檔模型。
POST {endpoint}/documentintelligence/documentModels:compose?api-version=2024-02-29-preview
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Document Intelligence 服務端點。 |
api-version
|
query | True |
string |
用於此作業的 API 版本。 |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
componentModels | True |
要撰寫的元件檔案模型清單。 |
|
modelId | True |
string |
唯一的檔模型名稱。 |
description |
string |
檔模型描述。 |
|
tags |
object |
與檔模型相關聯的索引鍵/值標籤屬性清單。 |
回應
名稱 | 類型 | Description |
---|---|---|
202 Accepted |
已接受要求進行處理,但尚未完成處理。 標題
|
|
Other Status Codes |
非預期的錯誤回應。 |
安全性
Ocp-Apim-Subscription-Key
類型:
apiKey
位於:
header
OAuth2Auth
類型:
oauth2
Flow:
accessCode
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
權杖 URL:
https://login.microsoftonline.com/common/oauth2/token
範圍
名稱 | Description |
---|---|
https://cognitiveservices.azure.com/.default |
範例
Compose Document Model
範例要求
POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels:compose?api-version=2024-02-29-preview
{
"modelId": "composedModel",
"description": "Composed model description",
"componentModels": [
{
"modelId": "model1"
},
{
"modelId": "model2"
}
]
}
範例回覆
Operation-Location: https://myendpoint.cognitiveservices.azure.com/documentintelligence/operations/b704bb00-d130-4f3f-a1d8-ca96de3eabb4?api-version=2024-02-29-preview
定義
名稱 | Description |
---|---|
Component |
撰寫檔模型的元件。 |
Compose |
要求本文從元件檔模型建立撰寫的檔模型。 |
Error |
error 物件。 |
Error |
錯誤回應物件。 |
Inner |
物件,包含錯誤的詳細資訊。 |
ComponentDocumentModelDetails
撰寫檔模型的元件。
名稱 | 類型 | Description |
---|---|---|
modelId |
string |
唯一的檔模型名稱。 |
ComposeDocumentModelRequest
要求本文從元件檔模型建立撰寫的檔模型。
名稱 | 類型 | Description |
---|---|---|
componentModels |
要撰寫的元件檔案模型清單。 |
|
description |
string |
檔模型描述。 |
modelId |
string |
唯一的檔模型名稱。 |
tags |
object |
與檔模型相關聯的索引鍵/值標籤屬性清單。 |
Error
error 物件。
名稱 | 類型 | Description |
---|---|---|
code |
string |
其中一組伺服器定義的錯誤碼。 |
details |
Error[] |
導致此錯誤之特定錯誤的詳細數據陣列。 |
innererror |
物件,包含比目前對象有關錯誤更具體的資訊。 |
|
message |
string |
人類可讀取的錯誤表示法。 |
target |
string |
錯誤的目標。 |
ErrorResponse
錯誤回應物件。
名稱 | 類型 | Description |
---|---|---|
error |
錯誤資訊。 |
InnerError
物件,包含錯誤的詳細資訊。
名稱 | 類型 | Description |
---|---|---|
code |
string |
其中一組伺服器定義的錯誤碼。 |
innererror |
內部錯誤。 |
|
message |
string |
人類可讀取的錯誤表示法。 |