Compare commits

...

3 Commits

Author SHA1 Message Date
Logan Markewich 124f9787d4 vbump 2025-07-08 12:04:57 -06:00
Logan Markewich 1c1ed77f4c Merge branch 'main' into logan/relax_pydantic_job_object 2025-07-08 12:04:00 -06:00
Logan Markewich 307042c875 relax job result requirements 2025-07-08 12:03:41 -06:00
3 changed files with 19 additions and 10 deletions
+16 -7
View File
@@ -14,11 +14,14 @@ PAGE_REGEX = r"page[-_](\d+)\.jpg$"
class JobMetadata(BaseModel):
"""Metadata about the job."""
job_pages: int = Field(description="The number of pages in the job.")
job_pages: int = Field(default=0, description="The number of pages in the job.")
job_auto_mode_triggered_pages: Optional[int] = Field(
description="The number of pages that triggered auto mode (thus increasing the cost)."
default=None,
description="The number of pages that triggered auto mode (thus increasing the cost).",
)
job_is_cache_hit: bool = Field(
default=False, description="Whether the job was a cache hit."
)
job_is_cache_hit: bool = Field(description="Whether the job was a cache hit.")
class BBox(BaseModel):
@@ -151,10 +154,16 @@ class Page(BaseModel):
class JobResult(BaseModel):
"""The raw JSON result from the LlamaParse API."""
pages: List[Page] = Field(description="The pages of the document.")
job_metadata: JobMetadata = Field(description="The metadata of the job.")
file_name: str = Field(description="The path to the file that was parsed.")
job_id: str = Field(description="The ID of the job.")
pages: List[Page] = Field(
default_factory=list, description="The pages of the document."
)
job_metadata: JobMetadata = Field(
default_factory=JobMetadata, description="The metadata of the job."
)
file_name: str = Field(
default="", description="The path to the file that was parsed."
)
job_id: str = Field(default="", description="The ID of the job.")
is_done: bool = Field(default=False, description="Whether the job is done.")
error: Optional[str] = Field(
default=None, description="The error message if the job failed."
+2 -2
View File
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "llama-parse"
version = "0.6.42"
version = "0.6.43"
description = "Parse files into RAG-Optimized formats."
authors = ["Logan Markewich <logan@llamaindex.ai>"]
license = "MIT"
@@ -13,7 +13,7 @@ packages = [{include = "llama_parse"}]
[tool.poetry.dependencies]
python = ">=3.9,<4.0"
llama-cloud-services = ">=0.6.42"
llama-cloud-services = ">=0.6.43"
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
+1 -1
View File
@@ -8,7 +8,7 @@ python_version = "3.10"
[tool.poetry]
name = "llama-cloud-services"
version = "0.6.42"
version = "0.6.43"
description = "Tailored SDK clients for LlamaCloud services."
authors = ["Logan Markewich <logan@runllama.ai>"]
license = "MIT"