-
I’m trying to use the Document Understanding APIs for classification and extraction. Specifically, I want to use the generative classifier and generative extractor.
-
I sent this request with the classfierId as ‘generative-classifier’ via the API based on the documentation I found here and received an operationId in return.
SENT
curl --location ‘https://cloud.uipath.com/tenant/Development/du_/api/framework/projects/projectId/classifiers/generative-classifier/classification/start?api-version=1’
–header ‘Content-Type: application/json’
–header ‘Accept: text/plain’
–header ‘Authorization: Bearer tokenWasHere’
–data ‘{
“documentId”: “documentId”,
“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.”
}
]
}’
RESPONSE
{
“operationId”: “operationId”,
“resultUrl”: “https://cloud.uipath.com:443/someOtherId/anotherId/du_/api/framework/projects/projectId/classifiers/generative-classifier/classification/result/operationId?api-version=1.0”
}
- I used the operationId to get the result, but it says it has failed. Something similar happened when I tried to use the generative extractor for the extractorId.
SENT
curl --location ‘https://cloud.uipath.com/tenant/Development/du_/api/framework/projects/projectId/classifiers/generative-classifier/classification/result/operationId?api-version=1’
–header ‘Accept: text/plain’
–header ‘Authorization: tokenWasHere’
RESPONSE
{
“status”: “Failed”,
“createdAt”: “2024-08-19T20:07:16.2323489Z”,
“lastUpdatedAt”: “2024-08-19T20:07:16.47Z”,
“error”: {
“message”: “Classifier Id not found in the given project.”,
“severity”: “Error”,
“code”: “[ClassifierIdNotFound]”,
“parameters”:
}
}
- How do I get my DU project set up so that Generative Classifier and Extractor work as classifierIds?