wandb / openui

OpenUI let's you describe UI using your imagination, then see it rendered live.
https://openui.fly.dev
Apache License 2.0
16.86k stars 1.47k forks source link

API Key error "openai.OpenAIError" #84

Open tsktech opened 1 month ago

tsktech commented 1 month ago

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 commented 1 month ago

openai api key usage was updated 2024 go and look out