Skip to content

Commit

Permalink
add new mode
Browse files Browse the repository at this point in the history
  • Loading branch information
logan-markewich committed May 13, 2024
1 parent 9ed2081 commit cf155ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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."
)
gpt4o_mode: bool = Field(
default=False,
description="Whether to use gpt-4o extract text from documents.",
)
gpt4o_api_key: Optional[str] = Field(
default=None,
description="The API key for the GPT-4o API. Lowers the cost of parsing.",
)
ignore_errors: bool = Field(
default=True,
description="Whether or not to ignore and skip errors raised during parsing.",
Expand Down Expand Up @@ -113,6 +121,8 @@ async def _create_job(
data={
"language": self.language.value,
"parsing_instruction": self.parsing_instruction,
"gpt4o_mode": self.gpt4o_mode,
"gpt4o_api_key": self.gpt4o_api_key,
},
)
if not response.is_success:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "llama-parse"
version = "0.4.2"
version = "0.4.3"
description = "Parse files into RAG-Optimized formats."
authors = ["Logan Markewich <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit cf155ea

Please sign in to comment.