Skip to contents

Create a model from another model, a safetensors directory (not implemented), or a GGUF file (not implemented).

Usage

create(
  model,
  from,
  system = NULL,
  stream = FALSE,
  endpoint = "/api/create",
  host = NULL
)

Arguments

model

Name of the model to create.

from

Name of an existing model to create the new model from.

system

System prompt for the model. Default is NULL.

stream

Enable response streaming. Default is FALSE.

endpoint

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

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(logical = TRUE)
create("mario", "deepseek-r1:1.5b", system = "You are Mario from Super Mario Bros.")
model_avail("mario")  # check mario model has been created
list_models()  # mario model has been created
generate("mario", "who are you?", output = "text")  # model should say it's Mario
delete("mario")  # delete the model created above
model_avail("mario")  # model no longer exists
}