darrenburns / elia

A snappy, keyboard-centric terminal user interface for interacting with large language models. Chat with ChatGPT, Claude, Llama 3, Phi 3, Mistral, Gemma and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error even after setting my OPENAI_API_KEY

m1chae1bx opened this issue · comments

Hi,

I just installed elia on my laptop but I couldn't get past the OpenAI validation despite having set the required environment variable. By the way, I'm using a Mac and I'm using pyenv to manage my python versions. Currently, I'm on 3.10.0 if any of that matters. Your app looks super cool and I'm looking forward to try it! Thanks!

% echo $OPENAI_API_KEY
***************************

% elia
Traceback (most recent call last):
  File "/Users/mbonon/.local/bin/elia", line 5, in <module>
    from elia_chat.__main__ import cli
  File "/Users/mbonon/.local/pipx/venvs/elia-chat/lib/python3.10/site-packages/elia_chat/__main__.py", line 10, in <module>
    from elia_chat.app import Elia
  File "/Users/mbonon/.local/pipx/venvs/elia-chat/lib/python3.10/site-packages/elia_chat/app.py", line 8, in <module>
    from elia_chat.models import EliaContext
  File "/Users/mbonon/.local/pipx/venvs/elia-chat/lib/python3.10/site-packages/elia_chat/models.py", line 9, in <module>
    from elia_chat.widgets.chat_options import GPTModel, MODEL_MAPPING, DEFAULT_MODEL
  File "/Users/mbonon/.local/pipx/venvs/elia-chat/lib/python3.10/site-packages/elia_chat/widgets/chat_options.py", line 44, in <module>
    model=ChatOpenAI(
  File "/Users/mbonon/.local/pipx/venvs/elia-chat/lib/python3.10/site-packages/langchain/load/serializable.py", line 97, in __init__
    super().__init__(**kwargs)
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for ChatOpenAI
__root__
  Did not find openai_api_key, please add an environment variable `OPENAI_API_KEY` which contains it, or pass  `openai_api_key` as a named parameter. (type=value_error)