mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 17:15:23 -04:00
BUG: ollama.create() fails with ollama server message indicating missing path or modelfile, but CLI cclient works with same information #226
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @anadon on GitHub (Feb 23, 2025).
On NixOS branch 24.11 with ollama 0.3.12 for the client and server and the python module ollama 0.4.7 I and receiving the following from executing my program in it's traceback:
The input immediately preceding the failure is:
The following is printed from the server logs:
This error does not occur when using the CLI utility. There are two points of redress. The first is that, according to documentation, my call is valid and should not result in error. The other is that the error produced is too vague to fix my code on my own.
@anadon commented on GitHub (Feb 23, 2025):
Working Modelfile is attached for reference.
@ParthSareen commented on GitHub (Feb 24, 2025):
Are you trying to create a model? Based on your kwargs it seems that you are looking for https://github.com/ollama/ollama-python/blob/main/examples/chat.py
@anadon commented on GitHub (Feb 24, 2025):
I can't speak to the internal workings. I just know that, yes, I am trying
to make a model. I am using
ollama.create()as described in the README,and this is the end result and backtrace.
On Mon, Feb 24, 2025, 12:55 PM Parth Sareen @.***>
wrote:
@anadon commented on GitHub (Feb 24, 2025):
To be clear, I am not using
ollama.chat()as shown in the example youlinked and do not want to.
On Mon, Feb 24, 2025, 7:11 PM Josh Marshall <
@.***> wrote:
@ParthSareen commented on GitHub (Feb 24, 2025):
Think I see the issue - can you make sure your ollama version is at 0.5.12? - https://github.com/ollama/ollama/releases/tag/v0.5.12
@maglore9900 commented on GitHub (Feb 26, 2025):
The ollama chat and chatResponse functions are broken after Ollama has been updated recently. so far only Client works, I see a bunch of issues here all related to this bug. Please ping me so I can confirm it for you, and you can associate all the open issues under one.
I also reached out in the discord.
@maglore9900 commented on GitHub (Feb 26, 2025):
If it wasnt clear, this issue is related, hence why I am commenting here