test_connection()
tests whether the Ollama server is running or not.
Examples
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
test_connection("http://localhost:11434") # default url
#> 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
test_connection("http://127.0.0.1:11434")
#> 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://127.0.0.1:11434
#> Body: empty