Class: Ollama::Params::Generate

Inherits:
Base
  • Object
show all
Defined in:
lib/ollama/params.rb

Overview

Generate completion parameters

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#merge, #to_h

Constructor Details

#initialize(prompt:, context: nil, schema: nil, model: nil, strict: nil, return_meta: false, system: nil, images: nil, think: nil, return_reasoning: false, keep_alive: nil, suffix: nil, raw: nil, options: nil, hooks: {}, tools: nil) ⇒ Generate

rubocop:disable Metrics/ParameterLists



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/ollama/params.rb', line 57

def initialize(prompt:, context: nil, schema: nil, model: nil, strict: nil,
               return_meta: false, system: nil, images: nil, think: nil,
               return_reasoning: false, keep_alive: nil, suffix: nil,
               raw: nil, options: nil, hooks: {}, tools: nil)
  # rubocop:enable Metrics/ParameterLists
  super()
  @prompt = prompt
  @context = context
  @schema = schema
  @model = model
  @strict = strict
  @return_meta = return_meta
  @system = system
  @images = images
  @think = think
  @return_reasoning = return_reasoning
  @keep_alive = keep_alive
  @suffix = suffix
  @raw = raw
  @options = options
  @hooks = hooks
  @tools = tools
end

Instance Attribute Details

#contextObject

Returns the value of attribute context.



52
53
54
# File 'lib/ollama/params.rb', line 52

def context
  @context
end

#hooksObject

Returns the value of attribute hooks.



52
53
54
# File 'lib/ollama/params.rb', line 52

def hooks
  @hooks
end

#imagesObject

Returns the value of attribute images.



52
53
54
# File 'lib/ollama/params.rb', line 52

def images
  @images
end

#keep_aliveObject

Returns the value of attribute keep_alive.



52
53
54
# File 'lib/ollama/params.rb', line 52

def keep_alive
  @keep_alive
end

#modelObject

Returns the value of attribute model.



52
53
54
# File 'lib/ollama/params.rb', line 52

def model
  @model
end

#optionsObject

Returns the value of attribute options.



52
53
54
# File 'lib/ollama/params.rb', line 52

def options
  @options
end

#promptObject

Returns the value of attribute prompt.



52
53
54
# File 'lib/ollama/params.rb', line 52

def prompt
  @prompt
end

#rawObject

Returns the value of attribute raw.



52
53
54
# File 'lib/ollama/params.rb', line 52

def raw
  @raw
end

#return_metaObject

Returns the value of attribute return_meta.



52
53
54
# File 'lib/ollama/params.rb', line 52

def return_meta
  @return_meta
end

#return_reasoningObject

Returns the value of attribute return_reasoning.



52
53
54
# File 'lib/ollama/params.rb', line 52

def return_reasoning
  @return_reasoning
end

#schemaObject

Returns the value of attribute schema.



52
53
54
# File 'lib/ollama/params.rb', line 52

def schema
  @schema
end

#strictObject

Returns the value of attribute strict.



52
53
54
# File 'lib/ollama/params.rb', line 52

def strict
  @strict
end

#suffixObject

Returns the value of attribute suffix.



52
53
54
# File 'lib/ollama/params.rb', line 52

def suffix
  @suffix
end

#systemObject

Returns the value of attribute system.



52
53
54
# File 'lib/ollama/params.rb', line 52

def system
  @system
end

#thinkObject

Returns the value of attribute think.



52
53
54
# File 'lib/ollama/params.rb', line 52

def think
  @think
end

#toolsObject

Returns the value of attribute tools.



52
53
54
# File 'lib/ollama/params.rb', line 52

def tools
  @tools
end