Document Models - Build Model
Skapar en anpassad modell för dokumentanalys.
POST {endpoint}/formrecognizer/documentModels:build?api-version=2023-07-31
URI-parametrar
Name | I | Obligatorisk | Typ | Description |
---|---|---|---|---|
endpoint
|
path | True |
string url |
Cognitive Services-slutpunkter som stöds (protokoll och värdnamn, till exempel: https://westus2.api.cognitive.microsoft.com). |
api-version
|
query | True |
string |
Begärd API-version. |
Begärandehuvud
Name | Obligatorisk | Typ | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Den hemliga nyckeln för din Azure Cognitive Services-prenumeration. |
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 placerats i kö. Headers Operation-Location: string |
|
Other Status Codes |
Ett fel påträffades. |
Säkerhet
Ocp-Apim-Subscription-Key
Den hemliga nyckeln för din Azure Cognitive Services-prenumeration.
Type:
apiKey
In:
header
Exempel
Build Document Model
Sample Request
POST https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentModels:build?api-version=2023-07-31
{
"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/formrecognizer/operations/b704bb00-d130-4f3f-a1d8-ca96de3eabb4?api-version=2023-07-31
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 |
Felinformation. |
Error |
Felsvarsobjekt. |
Inner |
Detaljerat fel. |
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 för träning. |
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
Felinformation.
Name | Typ | Description |
---|---|---|
code |
string |
Felkod. |
details |
Error[] |
Lista över detaljerade fel. |
innererror |
Detaljerat fel. |
|
message |
string |
Felmeddelande. |
target |
string |
Målet för felet. |
ErrorResponse
Felsvarsobjekt.
Name | Typ | Description |
---|---|---|
error |
Felinformation. |
InnerError
Detaljerat fel.
Name | Typ | Description |
---|---|---|
code |
string |
Felkod. |
innererror |
Detaljerat fel. |
|
message |
string |
Felmeddelande. |