Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "ping" on client for the health endpoint #121

Open
jpmcb opened this issue Apr 18, 2024 · 0 comments
Open

Support "ping" on client for the health endpoint #121

jpmcb opened this issue Apr 18, 2024 · 0 comments

Comments

@jpmcb
Copy link

jpmcb commented Apr 18, 2024

Ollama supports a "health" endpoint at the root of the running server:

❯ curl localhost:11434 -vvv
*   Trying 127.0.0.1:11434...
* Connected to localhost (127.0.0.1) port 11434 (#0)
> GET / HTTP/1.1
> Host: localhost:11434
> User-Agent: curl/7.87.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: text/plain; charset=utf-8
< Date: Thu, 18 Apr 2024 19:20:47 GMT
< Content-Length: 17
<
* Connection #0 to host localhost left intact
Ollama is running

The biggest thing to note here is the 200 response and the returned "Ollama is running" response.

Also related:


Can ollama-python support a "ping" member on the client? I'd imagine this would hit the above endpoint and simply continue if 200 is returned. Otherwise, raise an error.

Happy to work on this if 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant