You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure what would cause this exactly but sounds like a bug. I don’t have much time to check on this but if you figure out the specific part in the codebase the problem is I can take a look, and maybe some more details to reproduce the problem
I am running into an error: AssertionError: openai package is not installed or the API key is not set.
I am certain that both the openai package is installed and I have the API set as environment variable OPENAI_API_KEY.
openai version 1.11.1
chatarena version 0.1.18
When I run the following code in the same environment 'is_openai_available' resolves to True.
try:
import openai
except ImportError:
is_openai_available = False
# logging.warning("openai package is not installed")
else:
try:
client = openai.OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
is_openai_available = True
except openai.OpenAIError:
# logging.warning("OpenAI API key is not set. Please set the environment variable OPENAI_API_KEY")
is_openai_available = False
Any ideas what could be causing this?
The text was updated successfully, but these errors were encountered: