ollama-python
ollama-python copied to clipboard
Unable to set keep_alive parameter
Hi, I am using ollama.AsyncClient() for parallel processing of documents. I am setting keep_alive parameter from ollama.AsyncClient().chat(keep_alive=-1).
I have also tried setting env variable, os.environ["OLLAMA_KEEP_ALIVE"] = "-1"
While checking ollama ps from the terminal, I see connective alive UNTIL 5 minutes (which is default). While running python script, after 5 minutes the code is getting stuck because ollama models running using ollama python client is getting stopped.
How can I resolve this issue?
It should be staying in memory hmm. Will check it out. Have you tried setting it to a larger integer value? does that work?