Skip to content

Commit

Permalink
New option skip diagonal text and invalidate cache (#178)
Browse files Browse the repository at this point in the history
* New option skip diagonal text and invalidate cache
  • Loading branch information
hexapode authored May 23, 2024
1 parent d19b35c commit 173060d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions llama_parse/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ class LlamaParse(BasePydanticReader):
parsing_instruction: Optional[str] = Field(
default="", description="The parsing instruction for the parser."
)
skip_diagonal_text: Optional[bool] = Field(
default=False,
description="If set to true, the parser will ignore diagonal text (when the text rotation in degrees modulo 90 is not 0).",
)
invalidate_cache: Optional[bool] = Field(
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.",
)
gpt4o_mode: bool = Field(
default=False,
description="Whether to use gpt-4o extract text from documents.",
Expand Down Expand Up @@ -121,6 +129,8 @@ async def _create_job(
data={
"language": self.language.value,
"parsing_instruction": self.parsing_instruction,
"invalidate_cache": self.invalidate_cache,
"skip_diagonal_text": self.skip_diagonal_text,
"gpt4o_mode": self.gpt4o_mode,
"gpt4o_api_key": self.gpt4o_api_key,
},
Expand Down

0 comments on commit 173060d

Please sign in to comment.