Compare commits

...

10 Commits

Author SHA1 Message Date
Logan Markewich ed363fbea5 fix import 2025-09-08 09:26:09 -06:00
Logan Markewich b2bb7a179e more linting 2025-09-08 09:12:43 -06:00
Logan Markewich c0b9c23bb0 more linting 2025-09-08 09:12:35 -06:00
Logan Markewich 399076d253 more linting 2025-09-08 09:12:16 -06:00
Logan Markewich 5b43f0d63b lint 2025-09-08 09:05:46 -06:00
Logan Markewich a76aeac498 bump ts 2025-09-08 09:04:28 -06:00
Pierre-Loic doulcet 5250244113 nits trailing spaces 2025-09-08 17:01:32 +02:00
Pierre-Loic doulcet b57cd0dcbc generated files 2025-09-08 16:54:40 +02:00
Pierre-Loic doulcet df9bfeed67 TSpackageUpdate 2025-09-08 16:51:09 +02:00
Pierre-Loic doulcet ef4596cf14 update python parse package 2025-09-08 16:42:56 +02:00
11 changed files with 6265 additions and 3442 deletions
@@ -9,7 +9,6 @@ from llama_cloud.types import (
ClassifyJobResults,
ClassifyParsingConfiguration,
StatusEnum,
ClassifyJobWithStatus,
File,
)
from llama_cloud.resources.classifier.client import OMIT
@@ -229,7 +228,7 @@ class ClassifyClient:
)
)
async def wait_for_job_completion(self, job_id: str) -> ClassifyJobWithStatus:
async def wait_for_job_completion(self, job_id: str) -> ClassifyJob:
"""
Wait for a classify job to complete.
Meant to expose lower level access to classifier jobs for advanced use cases.
+32 -1
View File
@@ -396,6 +396,10 @@ class LlamaParse(BasePydanticReader):
default=False,
description="If set, the parser will try to preserve very small text lines. This can be useful for documents containing vector graphics with very small text lines that may not be recognized by OCR or a vision model (such as in CAD drawings).",
)
precise_bounding_box: Optional[bool] = Field(
default=False,
description="If set to true, the parser will use a more precise bounding box to extract text from documents. This will increase the accuracy of the parsing job, but reduce the speed.",
)
replace_failed_page_mode: Optional[FailedPageMode] = Field(
default=None,
description="The mode to use to replace the failed page, see FailedPageMode enum for possible value. If set, the parser will replace the failed page with the specified mode. If not set, the default mode (raw_text) will be used.",
@@ -416,7 +420,18 @@ class LlamaParse(BasePydanticReader):
default=False,
description="If set to true, the parser will extract sub-tables from the spreadsheet when possible (more than one table per sheet).",
)
specialized_chart_parsing_agentic: Optional[bool] = Field(
default=False,
description="If set to true, the parser will use a specialized agentic chart parsing model to extract data from charts. This model is able to understand the chart type and extract the data accordingly.",
)
specialized_chart_parsing_efficient: Optional[bool] = Field(
default=False,
description="If set to true, the parser will use a specialized efficient chart parsing model to extract data from charts. This model is faster and cheaper than the agentic model, but may be less accurate.",
)
specialized_chart_parsing_plus: Optional[bool] = Field(
default=False,
description="If set to true, the parser will use a specialized one-shot chart parsing model to extract data from charts. This model is able to understand the chart type and extract the data accordingly. It is more accurate than the efficient model, but also more expensive.",
)
strict_mode_buggy_font: Optional[bool] = Field(
default=False,
description="If set to true, the parser will fail if it can't extract text from a document because of a buggy font.",
@@ -928,6 +943,9 @@ class LlamaParse(BasePydanticReader):
if self.preset is not None:
data["preset"] = self.preset
if self.precise_bounding_box:
data["precise_bounding_box"] = self.precise_bounding_box
if self.replace_failed_page_mode is not None:
data["replace_failed_page_mode"] = self.replace_failed_page_mode.value
@@ -947,6 +965,19 @@ class LlamaParse(BasePydanticReader):
if self.spreadsheet_extract_sub_tables:
data["spreadsheet_extract_sub_tables"] = self.spreadsheet_extract_sub_tables
if self.specialized_chart_parsing_agentic:
data[
"specialized_chart_parsing_agentic"
] = self.specialized_chart_parsing_agentic
if self.specialized_chart_parsing_efficient:
data[
"specialized_chart_parsing_efficient"
] = self.specialized_chart_parsing_efficient
if self.specialized_chart_parsing_plus:
data["specialized_chart_parsing_plus"] = self.specialized_chart_parsing_plus
if self.strict_mode_buggy_font:
data["strict_mode_buggy_font"] = self.strict_mode_buggy_font
+1 -1
View File
@@ -11,7 +11,7 @@ dev = [
[project]
name = "llama-parse"
version = "0.6.64"
version = "0.6.65"
description = "Parse files into RAG-Optimized formats."
authors = [{name = "Logan Markewich", email = "logan@llamaindex.ai"}]
requires-python = ">=3.9,<4.0"
+1 -1
View File
@@ -19,7 +19,7 @@ dev = [
[project]
name = "llama-cloud-services"
version = "0.6.64"
version = "0.6.65"
description = "Tailored SDK clients for LlamaCloud services."
authors = [{name = "Logan Markewich", email = "logan@runllama.ai"}]
requires-python = ">=3.9,<4.0"
Generated
+1 -1
View File
@@ -1596,7 +1596,7 @@ wheels = [
[[package]]
name = "llama-cloud-services"
version = "0.6.64"
version = "0.6.65"
source = { editable = "." }
dependencies = [
{ name = "click", version = "8.1.8", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" },
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "llama-cloud-services",
"version": "0.3.4",
"version": "0.3.5",
"type": "module",
"license": "MIT",
"scripts": {
@@ -16350,7 +16350,7 @@ export const PromptConfSchema = {
default: `
Provide a brief explanation for how you arrived at the extracted value based on the source text provided.
- For inferred values, explain the reasoning behind the extraction briefly.
- For simple verbatim extraction, output 'VERBATIM EXTRACTION'.
- For simple verbatim extraction, output 'VERBATIM EXTRACTION'.
- When supporting data is not present in the source text, output 'INSUFFICIENT DATA' and emit blank or null values for the value__ field.
`,
},
@@ -17689,7 +17689,7 @@ export const StructParseConfSchema = {
reasoning_prompt: `
Provide a brief explanation for how you arrived at the extracted value based on the source text provided.
- For inferred values, explain the reasoning behind the extraction briefly.
- For simple verbatim extraction, output 'VERBATIM EXTRACTION'.
- For simple verbatim extraction, output 'VERBATIM EXTRACTION'.
- When supporting data is not present in the source text, output 'INSUFFICIENT DATA' and emit blank or null values for the value__ field.
`,
cite_sources_prompt: {
@@ -3219,7 +3219,7 @@ export const zPromptConf = z.object({
reasoning_prompt: z.string().optional().default(`
Provide a brief explanation for how you arrived at the extracted value based on the source text provided.
- For inferred values, explain the reasoning behind the extraction briefly.
- For simple verbatim extraction, output 'VERBATIM EXTRACTION'.
- For simple verbatim extraction, output 'VERBATIM EXTRACTION'.
- When supporting data is not present in the source text, output 'INSUFFICIENT DATA' and emit blank or null values for the value__ field.
`),
cite_sources_prompt: z
+9
View File
@@ -147,6 +147,10 @@ export class LlamaParseReader extends FileReader {
output_s3_region?: string | undefined;
preserve_layout_alignment_across_pages?: boolean | undefined;
spreadsheet_extract_sub_tables?: boolean | undefined;
specialized_chart_parsing_agentic?: boolean | undefined;
specialized_chart_parsing_efficient?: boolean | undefined;
specialized_chart_parsing_plus?: boolean | undefined;
precise_bounding_box?: boolean | undefined;
formatting_instruction?: string | undefined;
parse_mode?: ParsingMode | undefined;
system_prompt?: string | undefined;
@@ -331,6 +335,11 @@ export class LlamaParseReader extends FileReader {
preserve_layout_alignment_across_pages:
this.preserve_layout_alignment_across_pages,
spreadsheet_extract_sub_tables: this.spreadsheet_extract_sub_tables,
specialized_chart_parsing_agentic: this.specialized_chart_parsing_agentic,
specialized_chart_parsing_efficient:
this.specialized_chart_parsing_efficient,
specialized_chart_parsing_plus: this.specialized_chart_parsing_plus,
precise_bounding_box: this.precise_bounding_box,
formatting_instruction: this.formatting_instruction,
parse_mode: this.parse_mode,
system_prompt: this.system_prompt,
+4
View File
@@ -87,6 +87,10 @@ export const parseFormSchema = z.object({
preserve_layout_alignment_across_pages: z.boolean().optional(),
skip_diagonal_text: z.boolean().optional(),
spreadsheet_extract_sub_tables: z.boolean().optional(),
specialized_chart_parsing_agentic: z.boolean().optional(),
specialized_chart_parsing_efficient: z.boolean().optional(),
specialized_chart_parsing_plus: z.boolean().optional(),
precise_bounding_box: z.boolean().optional(),
structured_output: z.boolean().optional(),
structured_output_json_schema: z.string().optional(),
structured_output_json_schema_name: z.string().optional(),