Share via


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

ComponentDocumentModelDetails[]

要撰寫的元件檔案模型清單。

modelId True

string

唯一的檔模型名稱。

description

string

檔模型描述。

tags

object

與檔模型相關聯的索引鍵/值標籤屬性清單。

回應

名稱 類型 Description
202 Accepted

已接受要求進行處理,但尚未完成處理。

Headers

  • Operation-Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

非預期的錯誤回應。

安全性

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

範例

Compose Document Model

Sample Request

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"
    }
  ]
}

Sample Response

Operation-Location: https://myendpoint.cognitiveservices.azure.com/documentintelligence/operations/b704bb00-d130-4f3f-a1d8-ca96de3eabb4?api-version=2024-02-29-preview

定義

名稱 Description
ComponentDocumentModelDetails

撰寫檔模型的元件。

ComposeDocumentModelRequest

要求本文從元件檔模型建立撰寫的檔模型。

Error

error 物件。

ErrorResponse

錯誤回應物件。

InnerError

物件,包含錯誤的詳細資訊。

ComponentDocumentModelDetails

撰寫檔模型的元件。

名稱 類型 Description
modelId

string

唯一的檔模型名稱。

ComposeDocumentModelRequest

要求本文從元件檔模型建立撰寫的檔模型。

名稱 類型 Description
componentModels

ComponentDocumentModelDetails[]

要撰寫的元件檔案模型清單。

description

string

檔模型描述。

modelId

string

唯一的檔模型名稱。

tags

object

與檔模型相關聯的索引鍵/值標籤屬性清單。

Error

error 物件。

名稱 類型 Description
code

string

其中一組伺服器定義的錯誤碼。

details

Error[]

導致此錯誤之特定錯誤的詳細數據陣列。

innererror

InnerError

物件,包含比目前對象有關錯誤更具體的資訊。

message

string

人類可讀取的錯誤表示法。

target

string

錯誤的目標。

ErrorResponse

錯誤回應物件。

名稱 類型 Description
error

Error

錯誤資訊。

InnerError

物件,包含錯誤的詳細資訊。

名稱 類型 Description
code

string

其中一組伺服器定義的錯誤碼。

innererror

InnerError

內部錯誤。

message

string

人類可讀取的錯誤表示法。