target_pages parameter not affecting llama_parse behavior #215

Closed
opened 2026-02-16 00:17:10 -05:00 by yindo · 1 comment
Owner

Originally created by @dregules on GitHub (Jul 29, 2024).

Originally assigned to: @hexapode on GitHub.

def llama_parser(): # from llama_index.core.schema import ImageDocument from llama_parse import LlamaParse os.environ["LLAMA_CLOUD_API_KEY"] = api_key instructions = "The provided document is an academic/scientific article. Some pages may contain figures, tables and/or formulas." parser = LlamaParse( # result_type="json", parsing_instructions=instructions, target_pages=[3,5,6], # also tried "3,5,6" language="en", verbose=True ) return parser

Returns all the pages no matter whether it's target_pages=[3,5,6] or target_pages="3,5,6"
In the UI it seems to work fine and extract only as instructed per the target_pages. Python client not.

Originally created by @dregules on GitHub (Jul 29, 2024). Originally assigned to: @hexapode on GitHub. `def llama_parser(): # from llama_index.core.schema import ImageDocument from llama_parse import LlamaParse os.environ["LLAMA_CLOUD_API_KEY"] = api_key instructions = "The provided document is an academic/scientific article. Some pages may contain figures, tables and/or formulas." parser = LlamaParse( # result_type="json", parsing_instructions=instructions, target_pages=[3,5,6], # also tried "3,5,6" language="en", verbose=True ) return parser` Returns all the pages no matter whether it's `target_pages=[3,5,6]` or `target_pages="3,5,6"` In the UI it seems to work fine and extract only as instructed per the target_pages. Python client not.
yindo added the bug label 2026-02-16 00:17:10 -05:00
yindo closed this issue 2026-02-16 00:17:10 -05:00
Author
Owner

@BinaryBrain commented on GitHub (Oct 25, 2024):

This is now fixed

@BinaryBrain commented on GitHub (Oct 25, 2024): This is now fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#215