Generative Classifier API not yielding classification result

  • 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?

Just figured out from this page that we use the Project ID “00000000-0000-0000-0000-000000000000” to get access to the Generative Classifier and ML Classification!

Just for others’ understanding around Start Classification v. Get Classification Result:

  • I get an operationId when I send ‘generative-classifier’ as the classifierId, but when I ask for the classification result of that operationId, I am told that ‘generative-classifier’ is not a classifierId.
  • I get an operationId and a classification result when I send ‘generative_classifier’ as the classifierId.
  • Seems like this is a 2-part process, where you can Start Classification with basically anything as the classifierId, but you will only get something back from the Get Classification Result if the classifierId you used is actually part of your project.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.