Skip to contents

Create an Ollama Object

Usage

create_Ollama(
  model_name,
  system_prompt = SYSTEM_PROMPT_DEFAULT,
  temperature = TEMPERATURE_DEFAULT,
  output_schema = NULL,
  name = NULL,
  base_url = OLLAMA_URL_DEFAULT,
  think = NULL
)

Arguments

model_name

Character: The name of the LLM model to use. Must be an Ollama model.

system_prompt

Character: The system prompt to use.

temperature

Numeric: The temperature for the model.

output_schema

Optional Schema: An optional output schema created using schema.

name

Character or NULL: An optional name for the Ollama object.

base_url

Character: Base URL of Ollama server.

think

Optional Logical or Character {"low", "medium", "high"}: Default thinking mode. Logical values target models like deepseek or qwen3; character values target gpt-oss.

Value

Ollama LLM object

Author

EDG

Examples

# Requires running Ollama server and gemma4:e4b model
if (FALSE) { # \dontrun{
  llm <- create_Ollama(
    model_name = "gemma4:e4b",
    system_prompt = "You are professor of Drum and Bass at the Institute of Advanced Beat Studies.",
    temperature = 1.0
  )
  generate(llm, "What is your name and who made you?")
} # }