mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Add an error message when Ollama server isn't running #69
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 @shivakanthsujit on GitHub (Apr 18, 2024).
The Ollama app returns an error message if the connection is refused pointing out that the server might not be running.
https://github.com/ollama/ollama/blob/8645076a71941d78a996e52cff65c794df6cdbcb/cmd/cmd.go#L893
This package does not have a similar error handling. Might be good to add it. Can be done by adding a check after initialising
self._clientas followsI can open a PR for this if you think it is worthwhile.