Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Key error "openai.OpenAIError" #84

Open
tsktech opened this issue May 6, 2024 · 1 comment
Open

API Key error "openai.OpenAIError" #84

tsktech opened this issue May 6, 2024 · 1 comment

Comments

@tsktech
Copy link

tsktech commented May 6, 2024

unable to get it working, is something broken..?

(openui) ➜  backend git:(main) python -m openui                                                            
Traceback (most recent call last):
  File "/config/miniconda3/envs/openui/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/config/miniconda3/envs/openui/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/config/workspace/openui/backend/openui/__main__.py", line 3, in <module>
    from . import server
  File "/config/workspace/openui/backend/openui/server.py", line 68, in <module>
    openai = AsyncOpenAI() # AsyncOpenAI(base_url="http://127.0.0.1:11434/v1")
  File "/config/miniconda3/envs/openui/lib/python3.10/site-packages/openai/_client.py", line 316, in __init__
    raise OpenAIError(
openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

verified the api_key > echo $OPENAI_API_KEY > sk-proj-tnz***XXXX,

Any help ..?

following following Mathew Burman https://youtu.be/zzw2OSFw9xI?si=B0UGFEbkGX3M4gsV

@dan1471
Copy link

dan1471 commented May 10, 2024

openai api key usage was updated 2024 go and look out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants