How do I specify key-value pair detection when using document intelligence prebuilt-layout model (Java SDK)?

Nauhar 0 Reputation points
2023-12-23T01:47:52.62+00:00

The Document Intelligence general document model is now deprecated with the 2023-10-31 preview, and the documentation specifies that I should use the Layout model with the optional query string parameter features=keyValuePairs enabled if I want to extract key-value pairs, selection marks, text, tables, and structure from documents. I'm using the Java SDK, and I am trying to do the following :

SyncPoller < OperationResult, AnalyzeResult > analyzeDocumentPoller =        client.beginAnalyzeDocumentFromUrl("prebuilt-layout", "insert-document-url-here");


where can I specify features=keyValuePairs so that the model can detect the key value pairs of the document as well? the above code does not detect the key value pairs. I tried doing something like this, but I get an error saying the requested model was not found:

SyncPoller < OperationResult, AnalyzeResult > analyzeDocumentPoller =        client.beginAnalyzeDocumentFromUrl("prebuilt-layout?features=keyValuePairs", "insert-document-url-here");
Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
2,107 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.