end-4 / dots-hyprland

Modern, feature-rich and accessible desktop configuration.
https://end-4.github.io/dots-hyprland-wiki/en/
GNU General Public License v3.0
3.06k stars 196 forks source link

How to add Ollama api key? #631

Closed LotEep closed 1 week ago

LotEep commented 1 week ago

I wand to use the AI API features with ollama, but I don't know how to get the correct API key for it. I'm locally hosting ollama, so I could just use the regular ollama interface in the terminal, but i want it to be accessible with the AI tab thing that these dots come with. I have tried using ollama serve in the terminal with the model I want to use (llama3), which I read is supposed to give me an API key, and it did give me some sort of key, but when I entered that key, using /key, after trying to send a message, I get this error: {"error":{"message":"model 'llama3:instruct' not found, try pulling it first","type":"api_error","param":null,"code":null}}

I have already pulled the model with ollama, but the key that ollama serve gave me did not work no matter how I parsed it . So does anyone know how to properly use the ollama API with the AI assistant feature? Thanks.

Basic system info: OS : Arch Linux x86_64 Kernel : Linux 6.9.5-zen1-1-zen

end-4 commented 1 week ago

idk i dont even use ollama iirc i didnt have to when i tried it

sudoxyz commented 1 week ago

you should be able to just run ollama run llama3:instruct and not need any api key.

LotEep commented 1 week ago

you should be able to just run ollama run llama3:instruct and not need any api key.

Well yeah I knew that but I want a way to put ollama in the API section in the top left corner or when you do super+A where all the other AI assistants are so I can talk to it quickly without needing to open up a terminal and type a command. If it's not possible or too hard than that's fine I can deal with it.

LotEep commented 1 week ago

Nevermind I got it to work when I typed in that ollama run llama3:instruct command and closed the terminal I think because now the sidebar assistant is working