Skip to contents

test_connection() tests whether the Ollama server is running or not.

Usage

test_connection(url = "http://localhost:11434")

Arguments

url

The URL of the Ollama server. Default is http://localhost:11434

Value

A httr2 response object.

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