Skip to contents

See https://ollama.com/library for a list of available models. Use the list_models() function to get the list of models already downloaded/installed on your machine. Cancelled pulls are resumed from where they left off, and multiple calls will share the same download progress.

Usage

pull(
  name,
  stream = FALSE,
  insecure = FALSE,
  endpoint = "/api/pull",
  host = NULL
)

Arguments

name

A character string of the model name to download/pull, such as "llama3".

stream

Enable response streaming. Default is FALSE.

insecure

Allow insecure connections Only use this if you are pulling from your own library during development. Default is FALSE.

endpoint

The endpoint to pull the model. Default is "/api/pull".

host

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

Value

A httr2 response object.

References

API documentation

Examples

if (FALSE) { # test_connection()$status_code == 200
pull("llama3")
pull("all-minilm", stream = FALSE)
}