Skip to content

Commit

Permalink
fix: update assistants client import (#4150)
Browse files Browse the repository at this point in the history
  • Loading branch information
phact committed Oct 16, 2024
1 parent 06013ae commit 53a9fcd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ dependencies = [
"yfinance>=0.2.40",
"langchain-google-community==1.0.7",
"wolframalpha>=5.1.3",
"astra-assistants>=2.1.4",
"astra-assistants>=2.2.2",
"composio-langchain==0.5.9",
"spider-client>=0.0.27",
"nltk>=3.9.1",
Expand Down
4 changes: 2 additions & 2 deletions src/backend/base/langflow/base/astra_assistants/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import astra_assistants.tools as astra_assistants_tools
import requests
from astra_assistants import OpenAI, patch
from astra_assistants import OpenAIWithDefaultKey, patch
from astra_assistants.tools.tool_interface import ToolInterface

client_lock = threading.Lock()
Expand All @@ -18,7 +18,7 @@ def get_patched_openai_client(shared_component_cache):
os.environ["ASTRA_ASSISTANTS_QUIET"] = "true"
client = shared_component_cache.get("client")
if client is None:
client = patch(OpenAI())
client = patch(OpenAIWithDefaultKey())
shared_component_cache.set("client", client)
return client

Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 53a9fcd

Please sign in to comment.