Skip to content

Commit

Permalink
fix: Restore env.py and fix storage_handler
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr committed Nov 29, 2024
1 parent a0ce527 commit 73b9321
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions agents-api/agents_api/common/storage_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def load_args(
new_args = await asyncio.gather(
*[load_from_blob_store_if_remote(arg) for arg in args]
)
kwargs_keys, kwargs_values = zip(*kwargs.items())
kwargs_keys, kwargs_values = list(zip(*kwargs.items())) or ([], [])
new_kwargs = await asyncio.gather(
*[load_from_blob_store_if_remote(v) for v in kwargs_values]
)
Expand All @@ -87,7 +87,7 @@ async def load_args(
)
)
elif isinstance(arg, dict):
keys, values = zip(*arg.items())
keys, values = list(zip(*arg.items())) or ([], [])
values = await asyncio.gather(
*[load_from_blob_store_if_remote(value) for value in values]
)
Expand Down Expand Up @@ -138,7 +138,7 @@ async def load_args(
)

elif isinstance(v, dict):
keys, values = zip(*v.items())
keys, values = list(zip(*v.items())) or ([], [])
values = await asyncio.gather(
*[load_from_blob_store_if_remote(value) for value in values]
)
Expand Down
10 changes: 4 additions & 6 deletions agents-api/agents_api/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@

# Blob Store
# ----------
use_blob_store_for_temporal: bool = True
# use_blob_store_for_temporal: bool = (
# env.bool("USE_BLOB_STORE_FOR_TEMPORAL", default=False) if not testing else False
# )
use_blob_store_for_temporal: bool = (
env.bool("USE_BLOB_STORE_FOR_TEMPORAL", default=False) if not testing else False
)

blob_store_bucket: str = env.str("BLOB_STORE_BUCKET", default="agents-api")
blob_store_cutoff_kb: int = 0
# blob_store_cutoff_kb: int = env.int("BLOB_STORE_CUTOFF_KB", default=64)
blob_store_cutoff_kb: int = env.int("BLOB_STORE_CUTOFF_KB", default=64)
s3_endpoint: str = env.str("S3_ENDPOINT", default="http://seaweedfs:8333")
s3_access_key: str | None = env.str("S3_ACCESS_KEY", default=None)
s3_secret_key: str | None = env.str("S3_SECRET_KEY", default=None)
Expand Down

0 comments on commit 73b9321

Please sign in to comment.