Class: Ollama::Options

Inherits:
Object
  • Object
show all
Includes:
DTO
Defined in:
lib/ollama/options.rb

Overview

Options are explained in the parameters for the modelfile: https://github.com/ollama/ollama/blob/main/docs/modelfile.md#parameter

Constant Summary collapse

@@types =
{
  numa:              [ false, true ],
  num_ctx:           Integer,
  num_batch:         Integer,
  num_gpu:           Integer,
  main_gpu:          Integer,
  low_vram:          [ false, true ],
  f16_kv:            [ false, true ],
  logits_all:        [ false, true ],
  vocab_only:        [ false, true ],
  use_mmap:          [ false, true ],
  use_mlock:         [ false, true ],
  num_thread:        Integer,
  num_keep:          Integer,
  seed:              Integer,
  num_predict:       Integer,
  top_k:             Integer,
  top_p:             Float,
  min_p:             Float,
  tfs_z:             Float,
  typical_p:         Float,
  repeat_last_n:     Integer,
  temperature:       Float,
  repeat_penalty:    Float,
  presence_penalty:  Float,
  frequency_penalty: Float,
  mirostat:          Integer,
  mirostat_tau:      Float,
  mirostat_eta:      Float,
  penalize_newline:  [ false, true ],
  stop:              Array,
}

Class Method Summary collapse

Methods included from DTO

#as_array_of_hashes, #as_json, #empty?, #to_json

Class Method Details

.[](value) ⇒ Object



69
70
71
# File 'lib/ollama/options.rb', line 69

def self.[](value)
  new(**value.to_h)
end