You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> test_connection()
Ollama local server running
<httr2_response>
GET http://localhost:11434/
Status: 200 OK
Content-Type: text/plain
Body: In memory (17 bytes)
Note: this is a httr2_response object
When the server is not running, I get
> test_connection()
Ollama local server not running or wrong server.
Download and launch Ollama app to run the server. Visit https://ollama.com or https://github.com/ollama/ollama
<httr2_request>
GET http://localhost:11434
Body: empty
Note: this is httr2_request object.
The documentation states that:
Value
A httr2 response object.
I'd expect the function to return an object of the same class in both cases, and the documentation to match the behavior.
A related note: it would be great to add another function, or maybe an argument (e.g. logical = TRUE), so that the function would return TRUE/FALSE. This would simplify testing in the code whether the server is running. Even if the result would correspond to the documentation, I need to test it using httr2 functionality, which is (slightly) more complex. There could also be another option (eg quietly = TRUE) to suppress the messages on screen.
The text was updated successfully, but these errors were encountered:
When the server is running, I get
Note: this is a httr2_response object
When the server is not running, I get
Note: this is httr2_request object.
The documentation states that:
I'd expect the function to return an object of the same class in both cases, and the documentation to match the behavior.
A related note: it would be great to add another function, or maybe an argument (e.g. logical = TRUE), so that the function would return TRUE/FALSE. This would simplify testing in the code whether the server is running. Even if the result would correspond to the documentation, I need to test it using httr2 functionality, which is (slightly) more complex. There could also be another option (eg quietly = TRUE) to suppress the messages on screen.
The text was updated successfully, but these errors were encountered: