s-kostyaev / ellama

Ellama is a tool for interacting with large language models from Emacs.
GNU General Public License v3.0
378 stars 27 forks source link

ellama throws error #24

Closed tvraman closed 7 months ago

tvraman commented 7 months ago
  1. I have llm-0.7 installed from elpa alongside ellama.
  2. I have ellama from melpa (dec 15).
  3. I have ollama installed with zephyr as the model: :NAME ID SIZE MODIFIED
    :ollama.ai/library/zephyr:latest 03af36d860cc 4.1 GB 12 hours ago

When I try M-x ellama-chat I get the following backtrace.

ollama serve is running and is being started by systemd. Opening localhost:11434 shows ollama to be running.

Backtrace:

Debugger entered--Lisp error: (wrong-number-of-arguments (2 . 2) 1) (#f(compiled-function ( msg) #<bytecode 0x134c2bc95d6c88e0>) "Unknown error calling ollama") (apply #f(compiled-function ( msg) #<bytecode 0x134c2bc95d6c88e0>) "Unknown error calling ollama") (llm-request-callback-in-buffer #<buffer ellama> #f(compiled-function ( msg) #<bytecode 0x134c2bc95d6c88e0>) "Unknown error calling ollama") (#f(compiled-function ( ) #<bytecode 0xe4b2f6d9425bce8>) 404 ((error . "model 'zephyr' not found, try pulling it first"))) (#f(compiled-function ( on-success on-error) #<bytecode 0x1bb4bbf88b5b9e85>) (:error (error http 404)) nil #f(compiled-function ( ) #<bytecode 0xe4b2f6d9425bce8>)) (apply #f(compiled-function ( on-success on-error) #<bytecode 0x1bb4bbf88b5b9e85>) ((:error (error http 404)) nil #f(compiled-function ( _) #<bytecode 0xe4b2f6d9425bce8>))) (url-http-activate-callback) (url-http-content-length-after-change-function 125 184 59) (url-http-wait-for-headers-change-function 1 189 188) (url-http-generic-filter # "HTTP/1.1 404 Not Found\15\nContent-Type: application/json; charset=utf-8\15\nDate: Thu, 21 Dec 2023 15:57:13 GMT\15\nContent-Length: 58\15\n\15\n{\"error\":\"model 'zephyr' not found, try pulling it first\"}")

s-kostyaev commented 7 months ago

Try pulling zephyr model. In console:

ollama pull zephyr
ahyatt commented 7 months ago

The wrong number of arguments is concerning, and I noticed a compile warning about it last time I rebooted emacs. There may be an issue with the llm library. But, yes, the real problem is not having the zephyr model.

s-kostyaev commented 7 months ago

If you run in console:

ollama run zephyr

Does it work?

s-kostyaev commented 7 months ago

Try update ellama.

s-kostyaev commented 7 months ago

Also, @ahyatt, I saw your comment in ollama provider that ollama doesn't return errors. I think missing model is the case for it.

tvraman commented 7 months ago

issue what: I was using the long name of the model in one place and the short name in the other -- all works now