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.
Apache License 2.0
1.88k stars 116 forks source link

Killer app! LInux / Gnome - no command flags work nor keybindings, only `elia` and `elia --help` solved #56

Closed shaneholloman closed 4 months ago

shaneholloman commented 6 months ago
  shadmin @ kea ❯ ~ elia -i -m gemini/gemini-1.5-flash-latest "How do I call Rust code from Python?"
Usage: elia [OPTIONS] COMMAND [ARGS]...
Try 'elia --help' for help.

Error: No such option: -i
  shadmin @ kea ❯ ~  elia --model claude-3-opus-20240229
Usage: elia [OPTIONS] COMMAND [ARGS]...
Try 'elia --help' for help.

Error: No such option: --model Did you mean --help?
  shadmin @ kea ❯ ~  elia -m claude-3-opus-20240229
Usage: elia [OPTIONS] COMMAND [ARGS]...
Try 'elia --help' for help.

Error: No such option: -m
  shadmin @ kea ❯ ~  elia -m gpt-4o
Usage: elia [OPTIONS] COMMAND [ARGS]...
Try 'elia --help' for help.

Error: No such option: -m
  shadmin @ kea ❯ ~  elia -i "vim or nano?"
Usage: elia [OPTIONS] COMMAND [ARGS]...
Try 'elia --help' for help.

Error: No such option: -i
  shadmin @ kea ❯ ~  elia -h
Usage: elia [OPTIONS] COMMAND [ARGS]...
Try 'elia --help' for help.

Error: No such option: -h
  shadmin @ kea ❯ ~  elia --help
Usage: elia [OPTIONS] COMMAND [ARGS]...

  Elia: A terminal ChatGPT client built with Textual

Options:
  --help  Show this message and exit.

Commands:
  chat    Start Elia with a chat message
  import  Import ChatGPT Conversations
  reset   Reset the database
  shadmin @ kea ❯ ~ 
  shadmin @ kea ❯ ~ neofetch
            .-/+oossssoo+/-.               shadmin@kea 
        `:+ssssssssssssssssss+:`           ----------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 22.04.4 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: Dell G15 5511 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 6.5.0-35-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 2 hours, 1 min 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2775 (dpkg), 11 (brew), 7 (flatpak), 28 (snap) 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.1.16 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 3840x2160, 3840x2160 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 42.9 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Yaru-magenta-dark [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Yaru-magenta [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: 11th Gen Intel i7-11800H (16) @ 4.600GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA GeForce RTX 3060 Mobile / Max-Q 
      -+sssssssssssssssssyyyssss+-         GPU: Intel TigerLake-H GT1 [UHD Graphics] 
        `:+ssssssssssssssssss+:`           Memory: 10663MiB / 15710MiB 
            .-/+oossssoo+/-.

  shadmin @ kea ❯ ~ 
  shadmin @ kea ❯ ~ pipx --version
1.0.0
  shadmin @ kea ❯ ~ 

I have set var in .bashrc

...
## LLM vendor api keys
export OPENAI_API_KEY=sk-****************************
export ANTHROPIC_API_KEY=sk-*************************
export GEMINI_API_KEY=AI*****************************
...
darrenburns commented 6 months ago

Looks like you're getting an old version of Elia - it requires Python 3.11+

Hopefully this thread helps: https://github.com/darrenburns/elia/issues/53#issuecomment-2131954056

shaneholloman commented 6 months ago

solved. here's a none venv/conda method for Ubuntu 22.04 users this won't break your base system install.

Install Python 3.11 on Ubuntu 22.04 (if not already installed):

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11

Install pipx using Python 3.11:

python3.11 -m pip install --user pipx
python3.11 -m pipx ensurepath

That will install pipx using Python 3.11 and add the necessary directory to your PATH.

Install the 'elia' app using pipx with Python 3.11:

python3.11 -m pipx install elia-chat

dont forget to add the api keys to you bash or zsh runtime command file.

nano .bashrc

add some keys to bottom of your rc file:

...
## LLM vendor api keys
export OPENAI_API_KEY=sk-****************************
export ANTHROPIC_API_KEY=sk-*************************
export GEMINI_API_KEY=AI*****************************
...
elia

image