diff --git a/agency_swarm/util/oai.py b/agency_swarm/util/oai.py index 6b85864c..88f9bf68 100644 --- a/agency_swarm/util/oai.py +++ b/agency_swarm/util/oai.py @@ -34,3 +34,6 @@ def set_openai_key(key): if not key: raise ValueError("Invalid API key. The API key cannot be empty.") openai.api_key = key + global client + with client_lock: + client = None