Skip to content

Commit

Permalink
do not override openai client outside of assistants
Browse files Browse the repository at this point in the history
  • Loading branch information
phact committed Oct 15, 2024
1 parent db2c121 commit f9d7586
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 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,8 @@

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

client_lock = threading.Lock()
Expand All @@ -18,7 +19,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(AstraOpenAI())
shared_component_cache.set("client", client)
return client

Expand Down

0 comments on commit f9d7586

Please sign in to comment.