Document Models - Build Model
Skapar en anpassad modell för dokumentanalys.
POST {endpoint}/documentintelligence/documentModels:build?api-version=2024-02-29-preview
URI-parametrar
Name | I | Obligatorisk | Typ | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Slutpunkten för dokumentinformationstjänsten. |
api-version
|
query | True |
string |
Den API-version som ska användas för den här åtgärden. |
Begärandetext
Name | Obligatorisk | Typ | Description |
---|---|---|---|
buildMode | True |
Byggläge för anpassad dokumentmodell. |
|
modelId | True |
string |
Unikt namn på dokumentmodell. |
azureBlobFileListSource |
Azure Blob Storage fillista som anger träningsdata. Antingen azureBlobSource eller azureBlobFileListSource måste anges. |
||
azureBlobSource |
Azure Blob Storage plats som innehåller träningsdata. Antingen azureBlobSource eller azureBlobFileListSource måste anges. |
||
description |
string |
Beskrivning av dokumentmodell. |
|
tags |
object |
Lista över nyckel/värde-taggattribut som är associerade med dokumentmodellen. |
Svar
Name | Typ | Description |
---|---|---|
202 Accepted |
Begäran har godkänts för bearbetning, men bearbetningen har ännu inte slutförts. Headers
|
|
Other Status Codes |
Ett oväntat felsvar. |
Säkerhet
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 |
Exempel
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
Definitioner
Name | Description |
---|---|
Azure |
Azure Blob Storage innehåll. |
Azure |
Fillista i Azure Blob Storage. |
Build |
Begär brödtext för att skapa en ny anpassad dokumentmodell. |
Document |
Byggläge för anpassad dokumentmodell. |
Error |
Felobjektet. |
Error |
Felsvarsobjekt. |
Inner |
Ett objekt som innehåller mer specifik information om felet. |
AzureBlobContentSource
Azure Blob Storage innehåll.
Name | Typ | Description |
---|---|---|
containerUrl |
string |
Azure Blob Storage container-URL. |
prefix |
string |
Prefix för blobnamn. |
AzureBlobFileListContentSource
Fillista i Azure Blob Storage.
Name | Typ | Description |
---|---|---|
containerUrl |
string |
Azure Blob Storage container-URL. |
fileList |
string |
Sökväg till en JSONL-fil i containern som anger en delmängd av dokument. |
BuildDocumentModelRequest
Begär brödtext för att skapa en ny anpassad dokumentmodell.
Name | Typ | Description |
---|---|---|
azureBlobFileListSource |
Azure Blob Storage fillista som anger träningsdata. Antingen azureBlobSource eller azureBlobFileListSource måste anges. |
|
azureBlobSource |
Azure Blob Storage plats som innehåller träningsdata. Antingen azureBlobSource eller azureBlobFileListSource måste anges. |
|
buildMode |
Byggläge för anpassad dokumentmodell. |
|
description |
string |
Beskrivning av dokumentmodell. |
modelId |
string |
Unikt namn på dokumentmodell. |
tags |
object |
Lista över nyckel/värde-taggattribut som är associerade med dokumentmodellen. |
DocumentBuildMode
Byggläge för anpassad dokumentmodell.
Name | Typ | Description |
---|---|---|
neural |
string |
Stöd för dokument med olika visuella mallar. |
template |
string |
Måldokument med liknande visuella mallar. |
Error
Felobjektet.
Name | Typ | Description |
---|---|---|
code |
string |
En av en serverdefinierad uppsättning felkoder. |
details |
Error[] |
En matris med information om specifika fel som ledde till det rapporterade felet. |
innererror |
Ett objekt som innehåller mer specifik information än det aktuella objektet om felet. |
|
message |
string |
En mänsklig läsbar representation av felet. |
target |
string |
Målet för felet. |
ErrorResponse
Felsvarsobjekt.
Name | Typ | Description |
---|---|---|
error |
Felinformation. |
InnerError
Ett objekt som innehåller mer specifik information om felet.
Name | Typ | Description |
---|---|---|
code |
string |
En av en serverdefinierad uppsättning felkoder. |
innererror |
Inre fel. |
|
message |
string |
En mänsklig läsbar representation av felet. |