ragna icon indicating copy to clipboard operation
ragna copied to clipboard

Pull Ollama models before use

Open smokestacklightnin opened this issue 7 months ago • 2 comments

Bug description

If the user has not run ollama pull <model-name>, they will get the error

ragna.core.RagnaException: API call failed, request_method=POST, request_url=http://localhost:11434/api/chat, response_status_code=404, response_content={'error': 'model "mistral" not found, try pulling it first'}

How to reproduce the bug?

Send a prompt to Ollama before running ollama pull <model-name>

Versions and dependencies used

No response

Anything else?

The fix is to run ollama pull <model-name> (or make the corresponding API call) sometime before sending the first prompt. The questions is when. That is, should we run it at the first prompt, or at the initialization of the assistant?

smokestacklightnin avatar May 17 '25 02:05 smokestacklightnin

@pmeier do you have any input?

smokestacklightnin avatar May 21 '25 02:05 smokestacklightnin

Go for it.

pmeier avatar May 22 '25 08:05 pmeier