document-understanding
latest
false
Guía de la API de Document Understanding
- Primeros pasos
- Ejemplos de uso de Document Understanding™ Cloud API v1
- Licencia
- Solución de problemas
Importante :
La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.
Ejemplo de API para utilizar el clasificador generativo con Document Understanding, incluida una solicitud curl de muestra utilizando un ID de proyecto.
Comienza a clasificar un documento utilizando el clasificador generativo
Consejo:
El ID del proyecto se obtiene de la respuesta recibida de la llamada Obtener Information del Proyecto.
curl -X 'POST' \
'{AutomationCloudURL}/<Organization_Name>/<Tenant_Name>/du_/api/framework/projects/<Project_ID>/classifiers/generative_classifier/classification?api-version=1' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"documentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
"prompts": [
{
"name": "Invoice",
"description": "A detailed statement of goods or services provided, with individual prices, the total charge, and payment terms."
},
{
"name": "Receipt",
"description": "A written acknowledgment of having received a specified amount of money, goods, or services."
}
]
}'
curl -X 'POST' \
'{AutomationCloudURL}/<Organization_Name>/<Tenant_Name>/du_/api/framework/projects/<Project_ID>/classifiers/generative_classifier/classification?api-version=1' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"documentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
"prompts": [
{
"name": "Invoice",
"description": "A detailed statement of goods or services provided, with individual prices, the total charge, and payment terms."
},
{
"name": "Receipt",
"description": "A written acknowledgment of having received a specified amount of money, goods, or services."
}
]
}'
Respuesta de la clasificación de un documento utilizando el clasificador generativo
{
"classificationResults": [
{
"DocumentTypeId": "Invoice",
"DocumentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
"Confidence": 0.9,
"OcrConfidence": -1,
"Reference": {
"TextStartIndex": 0,
"TextLength": 0,
"Tokens": []
},
"DocumentBounds": {
"StartPage": 0,
"PageCount": 1,
"TextStartIndex": 0,
"TextLength": 864
},
"ClassifierName": "Generative Classifier"
}
]
}
{
"classificationResults": [
{
"DocumentTypeId": "Invoice",
"DocumentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
"Confidence": 0.9,
"OcrConfidence": -1,
"Reference": {
"TextStartIndex": 0,
"TextLength": 0,
"Tokens": []
},
"DocumentBounds": {
"StartPage": 0,
"PageCount": 1,
"TextStartIndex": 0,
"TextLength": 864
},
"ClassifierName": "Generative Classifier"
}
]
}