tests/testthat/test-model_avail.R

library(testthat)
library(ollamar)

test_that("model_avail function works with basic input", {
    skip_if_not(test_connection(logical = TRUE), "Ollama server not available")

    expect_false(model_avail("test"))
    expect_true(model_avail("llama3"))
})

Try the ollamar package in your browser

Any scripts or data that you put into this service are public.

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