Class: Ollama::Params::CreateModel

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

Overview

Model creation parameters

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#merge, #to_h

Constructor Details

#initialize(model:, from: nil, modelfile: nil, path: nil, system: nil, template: nil, license: nil, parameters: nil, messages: nil, quantize: nil, stream: false) ⇒ CreateModel

rubocop:disable Metrics/ParameterLists



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/ollama/params.rb', line 88

def initialize(model:, from: nil, modelfile: nil, path: nil, system: nil,
               template: nil, license: nil, parameters: nil, messages: nil,
               quantize: nil, stream: false)
  # rubocop:enable Metrics/ParameterLists
  super()
  @model = model
  @from = from
  @modelfile = modelfile
  @path = path
  @system = system
  @template = template
  @license = license
  @parameters = parameters
  @messages = messages
  @quantize = quantize
  @stream = stream
end

Instance Attribute Details

#fromObject

Returns the value of attribute from.



84
85
86
# File 'lib/ollama/params.rb', line 84

def from
  @from
end

#licenseObject

Returns the value of attribute license.



84
85
86
# File 'lib/ollama/params.rb', line 84

def license
  @license
end

#messagesObject

Returns the value of attribute messages.



84
85
86
# File 'lib/ollama/params.rb', line 84

def messages
  @messages
end

#modelObject

Returns the value of attribute model.



84
85
86
# File 'lib/ollama/params.rb', line 84

def model
  @model
end

#modelfileObject

Returns the value of attribute modelfile.



84
85
86
# File 'lib/ollama/params.rb', line 84

def modelfile
  @modelfile
end

#parametersObject

Returns the value of attribute parameters.



84
85
86
# File 'lib/ollama/params.rb', line 84

def parameters
  @parameters
end

#pathObject

Returns the value of attribute path.



84
85
86
# File 'lib/ollama/params.rb', line 84

def path
  @path
end

#quantizeObject

Returns the value of attribute quantize.



84
85
86
# File 'lib/ollama/params.rb', line 84

def quantize
  @quantize
end

#streamObject

Returns the value of attribute stream.



84
85
86
# File 'lib/ollama/params.rb', line 84

def stream
  @stream
end

#systemObject

Returns the value of attribute system.



84
85
86
# File 'lib/ollama/params.rb', line 84

def system
  @system
end

#templateObject

Returns the value of attribute template.



84
85
86
# File 'lib/ollama/params.rb', line 84

def template
  @template
end

Class Method Details

.from_kwargs(kwargs) ⇒ Object



106
107
108
# File 'lib/ollama/params.rb', line 106

def self.from_kwargs(kwargs)
  new(**kwargs)
end