create_model {rollama}R Documentation

Create a model from a Modelfile

Description

Create a model from a Modelfile

Usage

create_model(model, modelfile, server = NULL)

Arguments

model

name of the model to create

modelfile

either a path to a model file to be read or the contents of the model file as a character vector.

server

URL to an Ollama server (not the API). Defaults to "http://localhost:11434".

Details

Custom models are the way to save your system message and model parameters in a dedicated shareable way. If you use show_model(), you can look at the configuration of a model in the column modelfile. To get more information and a list of valid parameters, check out https://github.com/ollama/ollama/blob/main/docs/modelfile.md. Most options are also available through the query and chat functions, yet are not persistent over sessions.

Value

Nothing. Called to create a model on the Ollama server.

Examples

modelfile <- system.file("extdata", "modelfile.txt", package = "rollama")
## Not run: create_model("mario", modelfile)
modelfile <- "FROM llama3\nSYSTEM You are mario from Super Mario Bros."
## Not run: create_model("mario", modelfile)

[Package rollama version 0.1.0 Index]