nomnivore / ollama.nvim

A plugin for managing and integrating your ollama workflows in neovim.
MIT License
311 stars 22 forks source link

Remote connection fails with an error message: Error: model 'mistral' not found, try pulling it first #17

Closed goshng closed 4 months ago

goshng commented 5 months ago

My ollama.nvim setup in ubuntu works fine. Then, I want to use ollama in ubuntu from a mac. In the config of ollama.nvim,

  opts = {
    model = "mistral",
    url = "http://127.0.0.1:11434",
    ...

is edited so

url = "http://xxx.xxx.xx.xxx:11434",

where xxx.xxx.xx.xxx is the IP address of ubuntu.

Then, I did setup ollama.nvim in the mac and test a sample command of ollama.nvim, getting an error message:

Error: model 'mistral' not found, try pulling it first

In the server side at ubuntu, I ran the following command, which followed status message.

(ubuntu) $ OLLAMA_HOST=xxx.xxx.xx.xxx ollama serve
2024/01/12 15:28:28 images.go:834: total blobs: 0
2024/01/12 15:28:28 images.go:841: total unused blobs removed: 0
2024/01/12 15:28:28 routes.go:929: Listening on xxx.xxx.xx.xxx:11434 (version 0.1.18)
2024/01/12 15:28:29 shim_ext_server.go:142: Dynamic LLM variants [cuda rocm]
2024/01/12 15:28:29 gpu.go:34: Detecting GPU type
2024/01/12 15:28:29 gpu.go:53: Nvidia GPU detected
[GIN] 2024/01/12 - 15:30:05 | 404 |     472.458µs |  xxx.xxx.xx.xxx | POST     "/api/generate"
[GIN] 2024/01/12 - 15:33:14 | 404 |     262.088µs |  xxx.xxx.xx.xxx | POST     "/api/generate"

So, linux - mac setup does not work.

I went back to linux and only changed the url line above of ollama.nvim to get the same error, or I pretend that linux - linux connection even though it worked fine locally.

Any idea what might go wrong?

Thank you!

traverseda commented 5 months ago

Have you tried pulling the mistral model?

ollama serve

Then, in another terminal,

ollama pull mistral

This project doesn't deal with installing models or setting up ollama

nomnivore commented 4 months ago

Hi @goshng,

Has the above solution solved your issue?