Skip to content

Commit

Permalink
New option skip diagonal text and invalidate cache
Browse files Browse the repository at this point in the history
  • Loading branch information
hexapode committed May 13, 2024
1 parent 9ed2081 commit b97159d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions llama_parse/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ 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."
)
ignore_errors: bool = Field(
default=True,
description="Whether or not to ignore and skip errors raised during parsing.",
Expand Down Expand Up @@ -113,6 +119,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,
},
)
if not response.is_success:
Expand Down

0 comments on commit b97159d

Please sign in to comment.