mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Provide request timeout option #245
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 @Saya47 on GitHub (Mar 25, 2025).
Hello I found out that my generate request was hanging for 4 hours until I had to Ctrl+C it:
I presume Ollama uses the python Requests library and it is not possible to set a global timeout, so it would be really nice to have an option to set timeout in the generate function as an argument. Thanks a lot.
@nazariitaran commented on GitHub (Apr 1, 2025):
You can specify the timeout by providing a custom
Clientobject: