fix: update assistants client import (#4150)

This commit is contained in:
Sebastián Estévez 2024-10-16 08:22:38 -04:00 • committed by GitHub
commit 9213ee21ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View file

@ -7,7 +7,7 @@ import threading
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()
@ -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