Skip to contents

Send message to Ollama API and get response

Usage

send_ollama_message(
  message,
  model,
  temperature,
  num_ctx,
  top_k,
  top_p,
  system,
  messages
)

Arguments

message

Character string containing the user message

model

Character string specifying the model name

temperature

Numeric value specifying the temperature

num_ctx

Integer value specifying the number of contexts

top_k

Integer value specifying the top K

top_p

Numeric value specifying the top P

system

Character string specifying the system

messages

List of messages

Value

A list with elements `success` (logical) and either `response` (character) or `error` (character)