Check if ollama server is running or not #197

Closed
opened 2026-02-15 16:28:39 -05:00 by yindo · 1 comment
Owner

Originally created by @emilioMaddalena on GitHub (Jan 3, 2025).

Wouldn't it be useful to have a method to check if ollama is running (if the server is active) or not?

IMO it would make more sense to call it before say ollama.chat, instead of directly calling ollama.chat and having it throw a "httpx.ConnectError: [Errno 61] Connection refused".

Originally created by @emilioMaddalena on GitHub (Jan 3, 2025). Wouldn't it be useful to have a method to check if ollama is running (if the server is active) or not? IMO it would make more sense to call it before say ollama.chat, instead of directly calling ollama.chat and having it throw a "httpx.ConnectError: [Errno 61] Connection refused".
yindo closed this issue 2026-02-15 16:28:39 -05:00
Author
Owner

@ParthSareen commented on GitHub (Jan 3, 2025):

I have a PR WIP for a better error message (https://github.com/ollama/ollama-python/pull/398) but I don't think we need to have a full method around it. You can also request curl/request http://localhost:11434 to see if Ollama is running

@ParthSareen commented on GitHub (Jan 3, 2025): I have a PR WIP for a better error message (https://github.com/ollama/ollama-python/pull/398) but I don't think we need to have a full method around it. You can also request curl/request `http://localhost:11434` to see if Ollama is running
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#197