ollama / ollama-python

Ollama Python library
https://ollama.com
MIT License
2.64k stars 214 forks source link

Full features of rest api #190

Open MikeyBeez opened 1 week ago

MikeyBeez commented 1 week ago

Does ollama-python have less functionality than the rest api? If so, you should say so at the top. I want to send embedded context, and it isn't working, and the documentation isn't helping. I can find the answer in the REST API, but not here; so I guess I'll switch, but I wasted a lot of time here. I program in python, so I prefer this, but WTH? If I need to use the REST API I will.

mxyng commented 1 week ago

can you expand on what you mean by "embedded context"? this python client library aims to implement the complete ollama api. if this isn't the case, it would be helpful to know what's missing so it can be added

MikeyBeez commented 1 week ago

I was trying to send embeddings as additional context with my prompt for generation. The REST API has a context entry in the json, but I didn't see a corresponding argument in the python function signature. I also couldn't find keep_alive argument in the python docs. If you've implemented every feature of the REST API, perhaps it's just your documentation that is missing features. You might take a look at what's in the REST API docs and add anything that's missing. BTW, thank you for all your hard work. I love Ollama. You have made a really important contribution to all the people of the world whether they realize it or not. Cheers!