Generative Extractor or Generative Classifier activities fail with Unauthorized request error when job runs in unattended mode

How to Resolve Unauthorized Request Error with Generative Extractor/Generative Classifier

Issue Description

When running the Generative Extractor/Generative Classifier in unattended mode, users may encounter an error related to an unauthorized request. This issue is often accompanied by an HTTP response code: 401.


Error message:

Request CorrelationId: XXXXX Request PredictionId: XXXXXXXXX Request is unauthorized. Please make sure that a correct API Key was provided. Http Response Code: 401 Http Response Content: Cloudfare CF-RAY: XXXXxORD AppId:

Root Cause

This error generally occurs due to a bug in the UiPath.documentunderstanding.ML activities package version 1.28.1.

Resolution

  1. Upgrade the UiPath.documentunderstanding.ML activities package to its latest version, which is currently 1.28.5. This package is available on UiPath's official package source.
  2. Along with this, also upgrade the UiPath.Intelligent.Activities and UiPath.PDF.Activities packages to their latest versions as the UiPath.documentunderstanding.ML activities package is dependent on these two packages.