Class: RubyLLM::Thinking::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_llm/thinking.rb

Overview

Normalized config for thinking across providers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(effort: nil, budget: nil) ⇒ Config

Returns a new instance of Config.



39
40
41
42
# File 'lib/ruby_llm/thinking.rb', line 39

def initialize(effort: nil, budget: nil)
  @effort = effort.is_a?(Symbol) ? effort.to_s : effort
  @budget = budget
end

Instance Attribute Details

#budgetObject (readonly)

Returns the value of attribute budget.



37
38
39
# File 'lib/ruby_llm/thinking.rb', line 37

def budget
  @budget
end

#effortObject (readonly)

Returns the value of attribute effort.



37
38
39
# File 'lib/ruby_llm/thinking.rb', line 37

def effort
  @effort
end

Instance Method Details

#enabled?Boolean

Returns:



44
45
46
# File 'lib/ruby_llm/thinking.rb', line 44

def enabled?
  !effort.nil? || !budget.nil?
end