Class: Ollama::Client::Configuration::Config

Inherits:
Object
  • Object
show all
Extended by:
JSONLoader
Defined in:
lib/ollama/client/configuration/config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from JSONLoader

load_from_json

Constructor Details

#initialize(**attributes) ⇒ Config



7
8
9
10
# File 'lib/ollama/client/configuration/config.rb', line 7

def initialize(**attributes)
  attributes.each { |k, v| send("#{k}=", v) }
  self.output ||= $stdout
end

Instance Attribute Details

#base_urlObject

Returns the value of attribute base_url.



16
17
18
# File 'lib/ollama/client/configuration/config.rb', line 16

def base_url
  @base_url
end

#connect_timeoutObject

Returns the value of attribute connect_timeout.



16
17
18
# File 'lib/ollama/client/configuration/config.rb', line 16

def connect_timeout
  @connect_timeout
end

#debugObject

Returns the value of attribute debug.



16
17
18
# File 'lib/ollama/client/configuration/config.rb', line 16

def debug
  @debug
end

#outputObject

Returns the value of attribute output.



16
17
18
# File 'lib/ollama/client/configuration/config.rb', line 16

def output
  @output
end

#read_timeoutObject

Returns the value of attribute read_timeout.



16
17
18
# File 'lib/ollama/client/configuration/config.rb', line 16

def read_timeout
  @read_timeout
end

#user_agentObject

Returns the value of attribute user_agent.



16
17
18
# File 'lib/ollama/client/configuration/config.rb', line 16

def user_agent
  @user_agent
end

#write_timeoutObject

Returns the value of attribute write_timeout.



16
17
18
# File 'lib/ollama/client/configuration/config.rb', line 16

def write_timeout
  @write_timeout
end

Class Method Details

.[](value) ⇒ Object



12
13
14
# File 'lib/ollama/client/configuration/config.rb', line 12

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