Compare commits

...

3 Commits

Author SHA1 Message Date
Logan Markewich 3aeff5f52e make text and md optional 2025-04-29 08:42:18 -06:00
Logan Markewich f4e792150d bump versions 2025-04-29 08:40:17 -06:00
Logan Markewich 375abcaf46 update release workflow 2025-04-29 08:39:39 -06:00
5 changed files with 3107 additions and 8 deletions
+9 -1
View File
@@ -39,10 +39,18 @@ jobs:
pypi_token: ${{ secrets.LLAMA_PARSE_PYPI_TOKEN }}
poetry_install_options: "--without dev"
- name: Wait for PyPI to update
run: |
sleep 60
- name: Update llama-parse lock file
run: |
cd llama_parse && poetry lock
- name: Build and publish llama-parse
uses: JRubics/poetry-publish@v2.1
with:
working_directory: "llama_parse"
package_directory: "./llama_parse"
pypi_token: ${{ secrets.LLAMA_PARSE_PYPI_TOKEN }}
poetry_install_options: "--without dev"
+8 -4
View File
@@ -93,8 +93,8 @@ class Page(BaseModel):
"""A page of the document."""
page: int = Field(description="The page number.")
text: str = Field(description="The text of the page.")
md: str = Field(description="The markdown of the page.")
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(
default_factory=list,
description="The names of the image IDs in the page, including both objects and page screenshots.",
@@ -189,7 +189,9 @@ class JobResult(BaseModel):
for page in self.pages
]
else:
text = self._page_separator.join([page.text for page in self.pages])
text = self._page_separator.join(
[page.text if page.text is not None else "" for page in self.pages]
)
return [Document(text=text, metadata={"file_name": self.file_name})]
async def aget_text_documents(self, split_by_page: bool = False) -> List[Document]:
@@ -234,7 +236,9 @@ class JobResult(BaseModel):
else:
return [
Document(
text=self._page_separator.join([page.md for page in self.pages]),
text=self._page_separator.join(
[page.md if page.md is not None else "" for page in self.pages]
),
metadata={"file_name": self.file_name},
)
]
+3087
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "llama-parse"
version = "0.6.19"
version = "0.6.20"
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.19"
llama-cloud-services = ">=0.6.20"
[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.19"
version = "0.6.20"
description = "Tailored SDK clients for LlamaCloud services."
authors = ["Logan Markewich <logan@runllama.ai>"]
license = "MIT"