Skip to content

Commit

Permalink
fix(agents-api): Fix tests related to executions
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
  • Loading branch information
creatorrr committed Oct 18, 2024
1 parent dc5f2ef commit 7fddbc1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion agents-api/agents_api/common/storage_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@


def store_in_blob_store_if_large(x: Any) -> RemoteObject | Any:
if not use_blob_store_for_temporal:
return x

s3.setup()

serialized = serialize(x)
Expand All @@ -28,6 +31,9 @@ def store_in_blob_store_if_large(x: Any) -> RemoteObject | Any:


def load_from_blob_store_if_remote(x: Any | RemoteObject) -> Any:
if not use_blob_store_for_temporal:
return x

s3.setup()

if isinstance(x, RemoteObject):
Expand Down Expand Up @@ -143,4 +149,4 @@ async def wrapper(*args, **kwargs) -> Any:

return result

return wrapper
return wrapper if use_blob_store_for_temporal else f
6 changes: 6 additions & 0 deletions agents-api/agents_api/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@
temporal_worker_url=temporal_worker_url,
temporal_namespace=temporal_namespace,
embedding_model_id=embedding_model_id,
use_blob_store_for_temporal=use_blob_store_for_temporal,
blob_store_bucket=blob_store_bucket,
blob_store_cutoff_kb=blob_store_cutoff_kb,
s3_endpoint=s3_endpoint,
s3_access_key=s3_access_key,
s3_secret_key=s3_secret_key,
testing=testing,
)

Expand Down
1 change: 0 additions & 1 deletion agents-api/agents_api/models/docs/search_docs_by_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def search_docs_by_text(
[owner_type, str(owner_id)] for owner_type, owner_id in owners
]

# Need to use NEAR/3($query) to search for arbitrary text within 3 words of each other
# See: https://docs.cozodb.org/en/latest/vector.html#full-text-search-fts
fts_queries = paragraph_to_custom_queries(query) or [
re.sub(r"[^\w\s\-_]+", "", query)
Expand Down

0 comments on commit 7fddbc1

Please sign in to comment.