mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
ollama.create not working properly
#183
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 @erlebach on GitHub (Dec 10, 2024).
Could somebody please provide a working python example using
ollama.create? so far I have been unsuccessful. I also noticed that there are no examples of this type in the examples/ folder. Thanks.@mustangs0786 commented on GitHub (Jan 9, 2025):
same i also facing issue here...
@iNLyze commented on GitHub (Jan 17, 2025):
Up until version 0.4.5 I wrapped it like so:
However, with the next version the API was completely changed. Can I ask, btw, why this was done (e.g. @pdevine )? Now you have to pass all parameters separately, see changes.
I have not found documentation on this yet, @erlebach.
@pdevine commented on GitHub (Jan 17, 2025):
Hey guys,
Sorry about the confusion here. We had a breaking change in the API for the create endpoint. This was because the Modelfile isn't a great way to serialize data and we wanted to simplify how it works and make it more RESTful. We should have bumped the version properly since it's a breaking change.
There is new documentation on how the format works in the main repo and the example in the
ollama-pythonrepo has been updated (admittedly this is still pretty sparse and could use more examples).@iNLyze for your example you can just send each of the args in
_create(), renameoptionstoparametersand you shouldn't needself.modelfileanymore.@mustangs0786 commented on GitHub (Jan 18, 2025):
HI @pdevine i tried latest way of creating model
ollama.create(model='example', from_='llama3.2', system="You are Mario from Super Mario Bros.")still i am getting below error
ResponseError: path or Modelfile are required
can you please look into this
@nodeMevK commented on GitHub (Jan 18, 2025):
Yea i'm having the same issue as well
@ParthSareen commented on GitHub (Jan 21, 2025):
@mustangs0786 @nodeMevK could you please provide your Ollama versions as well? Should not be running into that anymore...
@nodeMevK commented on GitHub (Jan 21, 2025):
@ParthSareen i'm using Ollama 0.4.6
I get this error when running the example/create.py
and also get the same error when running the example from the readme
@ParthSareen commented on GitHub (Jan 22, 2025):
@nodeMevK
The API changed recently - can you make sure the ollama version you're running is
v0.5.7you can check withollama -v@nodeMevK commented on GitHub (Jan 22, 2025):
@ParthSareen ah thank you I updated ollama-python version but not the actual ollama. this fixed my issue
@ParthSareen commented on GitHub (Jan 22, 2025):
@nodeMevK Glad to hear that! Sorry about the change, should've bumped the major version to show breaking change.