Skip to contents

List models that are available locally

Usage

list_models(
  output = c("df", "resp", "jsonlist", "raw", "text"),
  endpoint = "/api/tags",
  host = NULL
)

Arguments

output

The output format. Default is "df". Other options are "resp", "jsonlist", "raw", "text".

endpoint

The endpoint to get the models. Default is "/api/tags".

host

The base URL to use. Default is NULL, which uses Ollama's default base URL.

Value

A response in the format specified in the output parameter.

References

API documentation

Examples

if (FALSE) { # test_connection()$status_code == 200
list_models() # returns dataframe
list_models("df") # returns dataframe
list_models("resp") # httr2 response object
list_models("jsonlist")
list_models("raw")
}