Class: OxAiWorkers::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/ox-ai-workers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/ox-ai-workers.rb', line 47

def initialize
  @access_token = nil
  @model = DEFAULT_MODEL
  @max_tokens = DEFAULT_MAX_TOKEN
  @temperature = DEFAULT_TEMPERATURE
  @auto_execute = true
  @wait_for_complete = true

  [Array, NilClass, String, Symbol, Hash].each do |c|
    c.send(:include, OxAiWorkers::PresentCompat) unless c.method_defined?(:present?)
  end
  String.include OxAiWorkers::CamelizeCompat unless String.method_defined?(:camelize)
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



45
46
47
# File 'lib/ox-ai-workers.rb', line 45

def access_token
  @access_token
end

#auto_executeObject

Returns the value of attribute auto_execute.



45
46
47
# File 'lib/ox-ai-workers.rb', line 45

def auto_execute
  @auto_execute
end

#max_tokensObject

Returns the value of attribute max_tokens.



45
46
47
# File 'lib/ox-ai-workers.rb', line 45

def max_tokens
  @max_tokens
end

#modelObject

Returns the value of attribute model.



45
46
47
# File 'lib/ox-ai-workers.rb', line 45

def model
  @model
end

#temperatureObject

Returns the value of attribute temperature.



45
46
47
# File 'lib/ox-ai-workers.rb', line 45

def temperature
  @temperature
end

#wait_for_completeObject

Returns the value of attribute wait_for_complete.



45
46
47
# File 'lib/ox-ai-workers.rb', line 45

def wait_for_complete
  @wait_for_complete
end