Compare commits

...

1 Commits

Author SHA1 Message Date
Logan Markewich 7cb6a15959 support llama parse audio 2025-08-11 12:17:52 -07:00
5 changed files with 18 additions and 3 deletions
+7 -1
View File
@@ -112,7 +112,7 @@ class ChartItem(BaseModel):
class Page(BaseModel):
"""A page of the document."""
page: int = Field(description="The page number.")
page: int = Field(default=0, description="The page number.")
text: Optional[str] = Field(default=None, description="The text of the page.")
md: Optional[str] = Field(default=None, description="The markdown of the page.")
images: List[ImageItem] = Field(
@@ -153,6 +153,12 @@ class Page(BaseModel):
noTextContent: bool = Field(
default=False, description="Whether the page has no text content."
)
isAudioTranscript: bool = Field(
default=False, description="Whether the page is an audio transcript."
)
durationInSeconds: Optional[float] = Field(
default=None, description="The duration of the audio transcript in seconds."
)
class JobResult(BaseModel):
+1 -1
View File
@@ -11,7 +11,7 @@ dev = [
[project]
name = "llama-parse"
version = "0.6.56"
version = "0.6.57"
description = "Parse files into RAG-Optimized formats."
authors = [{name = "Logan Markewich", email = "logan@llamaindex.ai"}]
requires-python = ">=3.9,<4.0"
+1 -1
View File
@@ -18,7 +18,7 @@ dev = [
[project]
name = "llama-cloud-services"
version = "0.6.56"
version = "0.6.57"
description = "Tailored SDK clients for LlamaCloud services."
authors = [{name = "Logan Markewich", email = "logan@runllama.ai"}]
requires-python = ">=3.9,<4.0"
+9
View File
@@ -202,3 +202,12 @@ async def test_get_result(markdown_parser: LlamaParse) -> None:
result = await markdown_parser.aget_result(expected.job_id)
assert result.job_id == expected.job_id
assert len(result.pages) == len(expected.pages)
@pytest.mark.asyncio
async def test_parse_audio() -> None:
parser = LlamaParse()
filepath = "tests/test_files/hello_world.m4a"
result = await parser.aparse(filepath)
assert result.job_id is not None
Binary file not shown.