Find answers from the community

Updated 3 weeks ago

Where Is The Structured Output Json Stored In The Documents Object?

If asking for structure outoput from LlamaParse, where is the JSON stored in the Documents object?

parser = LlamaParse(
verbose=True,
parse_mode="parse_page_with_llm",
disable_image_extraction=True,
structured_output=True,
structured_output_json_schema=cv_schema
)

Path to your PDF file

pdf_file_path = "./CV.pdf"

Load and parse the PDF file

documents = await parser.aload_data(pdf_file_path)

Print the structured output

for document in documents:
print(document.text)
M
1 comment
Even when using one of the pre-defined schemas I don't see how to get the structured JSON output

parser = LlamaParse(
#result_type="markdown",
verbose=True,
parse_mode="parse_page_with_llm",
disable_image_extraction=True,
structured_output=True,
#structured_output_json_schema=cv_schema
structured_output_json_schema_name="invoice"
)
Add a reply
Sign up and join the conversation on Discord