Document Models - Get Model

Získá podrobné informace o modelu dokumentu.

GET {endpoint}/documentintelligence/documentModels/{modelId}?api-version=2024-02-29-preview

Parametry identifikátoru URI

Name V Vyžadováno Typ Description
endpoint
path True

string

Koncový bod služby Document Intelligence.

modelId
path True

string

Jedinečný název modelu dokumentu.

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$

api-version
query True

string

Verze rozhraní API, která se má použít pro tuto operaci.

Hlavička požadavku

Name Vyžadováno Typ Description
x-ms-client-request-id

string

uuid

Globálně jedinečný identifikátor řetězce vygenerovaný klientem pro požadavek.

Odpovědi

Name Typ Description
200 OK

DocumentModelDetails

Žádost byla úspěšná.

Headers

x-ms-client-request-id: string

Other Status Codes

ErrorResponse

Neočekávaná chybová odpověď.

Zabezpečení

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

Name Description
https://cognitiveservices.azure.com/.default

Příklady

Get Custom Document Model
Get Prebuilt Document Model

Get Custom Document Model

Sample Request

GET https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/myCustomModel?api-version=2024-02-29-preview

Sample Response

{
  "modelId": "myCustomModel",
  "description": "Custom model description",
  "createdDateTime": "2021-09-24T12:54:35Z",
  "expirationDateTime": "2023-01-01T00:00:00Z",
  "apiVersion": "2024-02-29-preview",
  "docTypes": {
    "myForm": {
      "fieldSchema": {
        "Name": {
          "type": "string"
        },
        "Date": {
          "type": "date"
        },
        "Amount": {
          "type": "number"
        }
      },
      "buildMode": "template",
      "fieldConfidence": {
        "Name": 0.9,
        "Date": 0.95,
        "Amount": 0.93
      }
    }
  },
  "tags": {
    "createdBy": "myUserId"
  }
}

Get Prebuilt Document Model

Sample Request

GET https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/prebuilt-invoice?api-version=2024-02-29-preview

Sample Response

{
  "modelId": "prebuilt-invoice",
  "description": "Prebuilt model to extract key information from English invoices, including customer, vendor, invoice ID, due date, total, and more.",
  "createdDateTime": "2021-07-30T00:00:00Z",
  "apiVersion": "2024-02-29-preview",
  "docTypes": {
    "prebuilt:invoice": {
      "fieldSchema": {
        "CustomerName": {
          "type": "string"
        },
        "CustomerId": {
          "type": "string"
        },
        "PurchaseOrder": {
          "type": "string"
        },
        "InvoiceId": {
          "type": "string"
        },
        "InvoiceDate": {
          "type": "date"
        },
        "DueDate": {
          "type": "date"
        },
        "VendorName": {
          "type": "string"
        },
        "VendorAddress": {
          "type": "string"
        },
        "VendorAddressRecipient": {
          "type": "string"
        },
        "CustomerAddress": {
          "type": "string"
        },
        "CustomerAddressRecipient": {
          "type": "string"
        },
        "BillingAddress": {
          "type": "string"
        },
        "BillingAddressRecipient": {
          "type": "string"
        },
        "ShippingAddress": {
          "type": "string"
        },
        "ShippingAddressRecipient": {
          "type": "string"
        },
        "SubTotal": {
          "type": "number"
        },
        "TotalTax": {
          "type": "number"
        },
        "InvoiceTotal": {
          "type": "number"
        },
        "AmountDue": {
          "type": "number"
        },
        "PreviousUnpaidBalance": {
          "type": "number"
        },
        "RemittanceAddress": {
          "type": "string"
        },
        "RemittanceAddressRecipient": {
          "type": "string"
        },
        "ServiceAddress": {
          "type": "string"
        },
        "ServiceAddressRecipient": {
          "type": "string"
        },
        "ServiceStartDate": {
          "type": "date"
        },
        "ServiceEndDate": {
          "type": "date"
        },
        "Items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "Amount": {
                "type": "number"
              },
              "Date": {
                "type": "date"
              },
              "Description": {
                "type": "string"
              },
              "Quantity": {
                "type": "number"
              },
              "ProductCode": {
                "type": "string"
              },
              "Tax": {
                "type": "number"
              },
              "Unit": {
                "type": "string"
              },
              "UnitPrice": {
                "type": "number"
              }
            }
          }
        }
      }
    }
  },
  "tags": {}
}

Definice

Name Description
AzureBlobContentSource

Azure Blob Storage obsah.

AzureBlobFileListContentSource

Seznam souborů v Azure Blob Storage.

DocumentBuildMode

Režim sestavení vlastního modelu dokumentu

DocumentFieldSchema

Popis sémantického schématu pole pomocí syntaxe stylu schématu JSON.

DocumentFieldType

Sémantický datový typ hodnoty pole.

DocumentModelDetails

Informace o modelu dokumentu

DocumentTypeDetails

Informace o typu dokumentu.

Error

Objekt chyby.

ErrorResponse

Objekt odpovědi na chybu.

InnerError

Objekt obsahující konkrétnější informace o chybě.

Warning

Objekt chyby.

AzureBlobContentSource

Azure Blob Storage obsah.

Name Typ Description
containerUrl

string

Azure Blob Storage adresu URL kontejneru.

prefix

string

Předpona názvu objektu blob.

AzureBlobFileListContentSource

Seznam souborů v Azure Blob Storage.

Name Typ Description
containerUrl

string

Azure Blob Storage adresu URL kontejneru.

fileList

string

Cesta k souboru JSONL v kontejneru určující podmnožinu dokumentů

DocumentBuildMode

Režim sestavení vlastního modelu dokumentu

Name Typ Description
neural

string

Podpořte dokumenty s různými vizuálními šablonami.

template

string

Zaměřte se na dokumenty s podobnými vizuálními šablonami.

DocumentFieldSchema

Popis sémantického schématu pole pomocí syntaxe stylu schématu JSON.

Name Typ Description
description

string

Popis pole

example

string

Příklad obsahu pole

items

DocumentFieldSchema

Schéma typu pole pro každý prvek pole.

properties

<string,  DocumentFieldSchema>

Pojmenovaná dílčí pole pole objektu.

type

DocumentFieldType

Sémantický datový typ hodnoty pole.

DocumentFieldType

Sémantický datový typ hodnoty pole.

Name Typ Description
address

string

Parsovaná adresa.

array

string

Seznam dílčích polí stejného typu

boolean

string

Logická hodnota normalizovaná na hodnotu true nebo false.

countryRegion

string

Země/oblast normalizované na formát ISO 3166-1 alfa-3 (např. USA).

currency

string

Částka měny s volitelným symbolem měny a jednotkou.

date

string

Datum, normalizované do formátu ISO 8601 (RRRR-MM-DD).

integer

string

Celočíselné číslo normalizované na 64bitové celé číslo se signoum

number

string

Číslo s plovoucí desetinou čárkou normalizované na hodnotu s plovoucí desetinou čárkou s dvojitou přesností.

object

string

Pojmenovaný seznam dílčích polí potenciálně různých typů

phoneNumber

string

Telefonní číslo normalizované do formátu E.164 (+{Kód země}{SubscriberNumber}).

selectionGroup

string

Pole vybraných řetězcových hodnot.

selectionMark

string

Je pole vybrané?

signature

string

Je podpis k dispozici?

string

string

Prostý text.

time

string

Čas normalizovaný do formátu ISO 8601 (hh:mm:ss).

DocumentModelDetails

Informace o modelu dokumentu

Name Typ Description
apiVersion

string

Verze rozhraní API použitá k vytvoření tohoto modelu dokumentu.

azureBlobFileListSource

AzureBlobFileListContentSource

Azure Blob Storage seznam souborů určující trénovací data. Je nutné zadat azureBlobSource nebo azureBlobFileListSource.

azureBlobSource

AzureBlobContentSource

Azure Blob Storage umístění obsahující trénovací data. Je nutné zadat azureBlobSource nebo azureBlobFileListSource.

buildMode

DocumentBuildMode

Režim sestavení vlastního modelu dokumentu

createdDateTime

string

Datum a čas (UTC) vytvoření modelu dokumentu

description

string

Popis modelu dokumentu

docTypes

<string,  DocumentTypeDetails>

Podporované typy dokumentů.

expirationDateTime

string

Datum a čas (UTC), kdy vyprší platnost modelu dokumentu

modelId

string

Jedinečný název modelu dokumentu.

tags

object

Seznam atributů značky klíč-hodnota přidružených k modelu dokumentu

warnings

Warning[]

Seznam upozornění, ke kterým došlo při vytváření modelu

DocumentTypeDetails

Informace o typu dokumentu.

Name Typ Description
buildMode

DocumentBuildMode

Režim sestavení vlastního modelu dokumentu

description

string

Popis modelu dokumentu

fieldConfidence

object

Odhadovaná spolehlivost pro každé pole

fieldSchema

<string,  DocumentFieldSchema>

Popis sémantického schématu dokumentu pomocí syntaxe stylu schématu JSON.

Error

Objekt chyby.

Name Typ Description
code

string

Jeden ze serverem definovaných chybových kódů.

details

Error[]

Pole podrobností o konkrétních chybách, které vedly k této nahlášené chybě.

innererror

InnerError

Objekt obsahující konkrétnější informace o chybě než aktuální objekt.

message

string

Lidsky čitelná reprezentace chyby.

target

string

Cíl chyby.

ErrorResponse

Objekt odpovědi na chybu.

Name Typ Description
error

Error

Informace o chybě.

InnerError

Objekt obsahující konkrétnější informace o chybě.

Name Typ Description
code

string

Jeden ze serverem definovaných chybových kódů.

innererror

InnerError

Vnitřní chyba.

message

string

Lidsky čitelná reprezentace chyby.

Warning

Objekt chyby.

Name Typ Description
code

string

Jeden ze serverem definovaných kódů upozornění.

message

string

Pro člověka čitelná reprezentace varování.

target

string

Cíl chyby.