test_connection: Test connection to Ollama server

View source: R/utils.R

test_connectionR Documentation

Test connection to Ollama server

Description

Tests whether the Ollama server is running or not.

Usage

test_connection(url = "http://localhost:11434", logical = FALSE)

Arguments

url

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

logical

Logical. If TRUE, returns a boolean value. Default is FALSE.

Value

Boolean value or httr2 response object, where status_code is either 200 (success) or 503 (error).

Examples

test_connection(logical = TRUE)
test_connection("http://localhost:11434") # default url
test_connection("http://127.0.0.1:11434")

ollamar documentation built on April 3, 2025, 8:31 p.m.