Method
Extract fields from a document using a large language model.
REQUIRED |
KEY |
TYPE |
DESCRIPTION |
Yes |
fieldDescriptors |
list[FieldDescriptor] |
A list of fields to extract from the document.
|
No |
documentId |
str |
The ID of the document to query.
|
No |
documentText |
str |
The text of the document to query. Only used if document_id is not provided.
|
No |
llmName |
LLMName |
The name of the language model to use. If not provided, the default language model is used.
|
Note: The arguments for the API methods follow camelCase but for Python SDK underscore_case is followed.
KEY |
TYPE |
DESCRIPTION |
success |
Boolean |
true if the call succeeded, false if there was an error |
result |
ExtractedFields |
|
TYPE |
WHEN |
DataNotFoundError |
documentId is not found.
|
InvalidEnumParameterError |
An invalid value is passed for llmName . |