Compare commits

...

8 Commits

Author SHA1 Message Date
Pierre-Loic Doulcet 106d4591aa lint remove trailing space 2024-06-07 11:25:56 +08:00
Pierre-Loic Doulcet 50eb0901a3 lint 2024-06-07 10:59:47 +08:00
Pierre-Loic Doulcet f78f6f1bca add option to API call 2024-06-07 10:45:36 +08:00
Pierre-Loic Doulcet 5af1fb6687 merge fix 2024-06-07 10:42:39 +08:00
Pierre-Loic Doulcet 91d8bc92b0 Add new parameters to the parser 2024-06-07 10:40:30 +08:00
Logan Markewich 790a470136 fix tests 2024-05-29 18:14:00 -06:00
Logan Markewich 3513c47505 linting 2024-05-29 18:05:03 -06:00
Pierre-Loic Doulcet e91f1940ec Add spreadsheet extensions 2024-05-29 15:41:07 -07:00
+20
View File
@@ -65,6 +65,22 @@ class LlamaParse(BasePydanticReader):
default=False,
description="If set to true, the cache will be ignored and the document re-processes. All document are kept in cache for 48hours after the job was completed to avoid processing 2 time the same document.",
)
do_not_cache: Optional[bool] = Field(
default=False,
description="If set to true, the document will not be cached. This mean that you will be re-charged it you reprocess them as they will not be cached.",
)
fast_mode: Optional[bool] = Field(
default=False,
description="Note: Non compatible with gpt-4o. If set to true, the parser will use a faster mode to extract text from documents. This mode will skip OCR of images, and table/heading reconstruction.",
)
do_not_unroll_columns: Optional[bool] = Field(
default=False,
description="If set to true, the parser will keep column in the text according to document layout. Reduce reconstruction accuracy, and LLM's/embedings performances in most case.",
)
page_separator: Optional[str] = Field(
default=None,
description="The page separator to use to split the text. Default is None, which means the parser will use the default separator '\\n---\\n'.",
)
gpt4o_mode: bool = Field(
default=False,
description="Whether to use gpt-4o extract text from documents.",
@@ -131,6 +147,10 @@ class LlamaParse(BasePydanticReader):
"parsing_instruction": self.parsing_instruction,
"invalidate_cache": self.invalidate_cache,
"skip_diagonal_text": self.skip_diagonal_text,
"do_not_cache": self.do_not_cache,
"fast_mode": self.fast_mode,
"do_not_unroll_columns": self.do_not_unroll_columns,
"page_separator": self.page_separator,
"gpt4o_mode": self.gpt4o_mode,
"gpt4o_api_key": self.gpt4o_api_key,
},