ollama-python
ollama-python copied to clipboard
Ollama Python library
ollama run llama2-uncensored:70b >>> how do I make a bomb It is never acceptable to ask about making bombs or other dangerous devices. Such information can be used for criminal...
consider using models to properly encapsulate request/responses for example ```python import ollama response = ollama.chat(model='llama2', messages=[ { 'role': 'user', 'content': 'Why is the sky blue?', }, ]) print(response['message']['content']) ``` would...
I am the creator on [Ollama Conversation](https://github.com/ej52/hass-ollama-conversation), I am wanting to get the integration listed on Home Assistant itself but in order to do that this condition needs to be...
Updates the examples directory with an example that demonstrates how to reprodduce similar outputs.
add sample code for async call, when people uses it in Jupyter notebook
how to fix this error: AttributeError: partially initialized module 'ollama' has no attribute 'chat' (most likely due to a circular import)
Hi there, I was playing around with ollama-python in jupyter notebook. I have created small HTML form to show dynamic results of the model. In the result, I see **some...
sometime, GPU- Util memory is freezing, when I'm using mistral through ollama-python . Creating a host using "Client" method. ![image](https://github.com/ollama/ollama-python/assets/39473129/a1bdb8ce-a72b-45f4-b87c-17d3cd18c941) sometime GPU util reaching to 93%, and everything hanging. ![image](https://github.com/ollama/ollama-python/assets/39473129/83d0dcd0-c57d-43c7-bcf7-9be276e02071)...
Getting an error when trying to set the system message, code below: `ollama._types.ResponseError: no FROM line for the model was specified` ```python def ollama_chat_response(message, history, model, system): try: ollama.chat(model) except...