Skip to content

Commit

Permalink
change defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
hexapode committed Dec 4, 2024
1 parent 8fb9183 commit c3c2f17
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions llama_parse/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
nest_asyncio_err,
nest_asyncio_msg,
ResultType,
Language,
SUPPORTED_FILE_TYPES,
)
from copy import deepcopy
Expand Down Expand Up @@ -186,8 +185,8 @@ class LlamaParse(BasePydanticReader):
default=False,
description="Allow the parsing instruction to also format the output. Disable to have a cleaner markdown output.",
)
language: Language = Field(
default=Language.ENGLISH, description="The language of the text to parse."
language: Optional[str] = Field(
default="en", description="The language of the text to parse."
)
max_pages: Optional[int] = Field(
default=None,
Expand Down Expand Up @@ -266,7 +265,7 @@ class LlamaParse(BasePydanticReader):
default=None,
description="The bounding box to use to extract text from documents describe as a string containing the bounding box margins",
)
gpt4o_mode: bool = Field(
gpt4o_mode: Optional[bool] = Field(
default=False,
description="Whether to use gpt-4o extract text from documents.",
)
Expand Down Expand Up @@ -568,7 +567,9 @@ async def _create_job(
data=data,
)
if not response.is_success:
raise Exception(f"Failed to parse the file: {response.text}")
raise Exception(
f"Failed to parse the file: {response.text} with parameters: {data}"
)
job_id = response.json()["id"]
return job_id
finally:
Expand Down

0 comments on commit c3c2f17

Please sign in to comment.