diff --git a/llama_parse/base.py b/llama_parse/base.py index 3279ba2..7fd7a06 100644 --- a/llama_parse/base.py +++ b/llama_parse/base.py @@ -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.", @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 72cf0c7..74c12ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] license = "MIT"