How do documents get sent to HITL for manual inspection?
Atharex opened this issue · 2 comments
I've recently started using Document AI with the python SDK and the general parsers are giving quite decent results.
The HITL feature is something I would also like to try, but I did not find a way yet to do it.
I've been looking through the Python SDK documentation and there is a config mentioned, however I did not find a way to generate it/use it.
https://cloud.google.com/document-ai/docs/reference/rest/v1/projects.locations.processors.humanReviewConfig/reviewDocument#path-parameters
How do I generate this humanReviewConfig and how do I later use it with my original batch requests?
My requests look like this:
request = documentai.types.document_processor_service.BatchProcessRequest(name=name, input_documents=input_config, document_output_config=output_config, skip_human_review=False)
Then I thought this might work, but it throws an error that this is an invalid constructor input for ReviewDocumentRequest.
request = documentai.types.document_processor_service.ReviewDocumentRequest(documentai.GcsDocument(gcs_uri=f"gs://{gcs_folder}/my-document.pdf", mime_type="application/pdf"))
What would be the correct approach to use this API?
Hello @Atharex , you might review the reference documentation for this client library, specifically for the review_document()
method.
Thank you for filing this issue. We asked some clarifying questions a week ago and never heard back from you. We are unable to proceed with this issue until then, so we are closing it. Please feel free to re-open this issue with more information.