Skip to content

Commit

Permalink
version bumps [v0.10.7] (#10981)
Browse files Browse the repository at this point in the history
  • Loading branch information
logan-markewich authored Feb 19, 2024
1 parent 68639a6 commit baf973f
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 23 deletions.
2 changes: 1 addition & 1 deletion llama-index-core/llama_index/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Init file of LlamaIndex."""

__version__ = "0.10.6"
__version__ = "0.10.7"

import logging
from logging import NullHandler
Expand Down
2 changes: 1 addition & 1 deletion llama-index-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ name = "llama-index-core"
packages = [{include = "llama_index"}]
readme = "README.md"
repository = "https://github.com/run-llama/llama_index"
version = "0.10.6.post1"
version = "0.10.7"

[tool.poetry.dependencies]
SQLAlchemy = {extras = ["asyncio"], version = ">=1.4.49"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ description = "llama-index embeddings clip integration"
license = "MIT"
name = "llama-index-embeddings-clip"
readme = "README.md"
version = "0.1.2"
version = "0.1.3"

[tool.poetry.dependencies]
python = ">=3.8.1,<3.12"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async def get_blob(
owner: str,
repo: str,
file_sha: str,
) -> GitBlobResponseModel:
) -> Optional[GitBlobResponseModel]:
...

async def get_commit(
Expand Down Expand Up @@ -405,7 +405,7 @@ async def get_blob(
repo: str,
file_sha: str,
timeout: Optional[int] = 5,
) -> GitBlobResponseModel:
) -> Optional[GitBlobResponseModel]:
"""
Get information about a blob. (Github API endpoint: getBlob).
Expand All @@ -421,18 +421,22 @@ async def get_blob(
Examples:
>>> blob_info = client.get_blob("owner", "repo", "file_sha")
"""
return GitBlobResponseModel.from_json(
(
await self.request(
"getBlob",
"GET",
owner=owner,
repo=repo,
file_sha=file_sha,
timeout=timeout,
)
).text
)
try:
return GitBlobResponseModel.from_json(
(
await self.request(
"getBlob",
"GET",
owner=owner,
repo=repo,
file_sha=file_sha,
timeout=timeout,
)
).text
)
except KeyError:
print(f"Failed to get blob for {owner}/{repo}/{file_sha}")
return None

async def get_commit(
self,
Expand Down Expand Up @@ -487,6 +491,6 @@ async def main() -> None:
blob_response = await client.get_blob(
owner="ahmetkca", repo="CommitAI", file_sha=obj.sha
)
print(blob_response.content)
print(blob_response.content if blob_response else "None")

asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import os
import time
from abc import ABC, abstractmethod
from typing import List, Tuple
from typing import List, Optional, Tuple

from llama_index.readers.github.repository.github_client import (
GitBlobResponseModel,
Expand Down Expand Up @@ -146,14 +146,17 @@ async def _fill_buffer(self) -> None:

if self._verbose:
start_t = time.time()
results: List[GitBlobResponseModel] = await asyncio.gather(
results: List[Optional[GitBlobResponseModel]] = await asyncio.gather(
*[
self._github_client.get_blob(self._owner, self._repo, blob.sha)
for blob, _ in self._blobs_and_paths[
start:end
] # TODO: use batch_size instead of buffer_size for concurrent requests
]
)

filtered_results = [result for result in results if result is not None]

if self._verbose:
end_t = time.time()
blob_names_and_sizes = [
Expand All @@ -167,5 +170,7 @@ async def _fill_buffer(self) -> None:

self._buffer = [
(result, path)
for result, (_, path) in zip(results, self._blobs_and_paths[start:end])
for result, (_, path) in zip(
filtered_results, self._blobs_and_paths[start:end]
)
]
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ license = "MIT"
maintainers = ["ahmetkca", "moncho", "rwood-97"]
name = "llama-index-readers-github"
readme = "README.md"
version = "0.1.4"
version = "0.1.5"

[tool.poetry.dependencies]
python = ">=3.8.1,<3.12"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ name = "llama-index"
packages = [{from = "_llama-index", include = "llama_index"}]
readme = "README.md"
repository = "https://github.com/run-llama/llama_index"
version = "0.10.6"
version = "0.10.7"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
Expand Down

0 comments on commit baf973f

Please sign in to comment.