Class: Legion::Extensions::Llm::Thinking::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/legion/extensions/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.



41
42
43
44
# File 'lib/legion/extensions/llm/thinking.rb', line 41

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.



39
40
41
# File 'lib/legion/extensions/llm/thinking.rb', line 39

def budget
  @budget
end

#effortObject (readonly)

Returns the value of attribute effort.



39
40
41
# File 'lib/legion/extensions/llm/thinking.rb', line 39

def effort
  @effort
end

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/legion/extensions/llm/thinking.rb', line 46

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