Class: RubyLLM::Thinking::Config
- Inherits:
-
Object
- Object
- RubyLLM::Thinking::Config
- Defined in:
- lib/ruby_llm/thinking.rb
Overview
:nodoc: all
Instance Attribute Summary collapse
-
#budget ⇒ Object
readonly
Returns the value of attribute budget.
-
#display ⇒ Object
readonly
Returns the value of attribute display.
-
#effort ⇒ Object
readonly
Returns the value of attribute effort.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
Class Method Summary collapse
Instance Method Summary collapse
- #disabled? ⇒ Boolean
- #enabled? ⇒ Boolean
-
#initialize(effort: nil, budget: nil, display: nil, enabled: nil, intent: nil) ⇒ Config
constructor
A new instance of Config.
- #resolve(model) ⇒ Object
Constructor Details
#initialize(effort: nil, budget: nil, display: nil, enabled: nil, intent: nil) ⇒ Config
Returns a new instance of Config.
120 121 122 123 124 125 126 |
# File 'lib/ruby_llm/thinking.rb', line 120 def initialize(effort: nil, budget: nil, display: nil, enabled: nil, intent: nil) @effort = effort&.to_sym @budget = budget @display = display&.to_sym @enabled = enabled @intent = intent end |
Instance Attribute Details
#budget ⇒ Object (readonly)
Returns the value of attribute budget.
110 111 112 |
# File 'lib/ruby_llm/thinking.rb', line 110 def budget @budget end |
#display ⇒ Object (readonly)
Returns the value of attribute display.
110 111 112 |
# File 'lib/ruby_llm/thinking.rb', line 110 def display @display end |
#effort ⇒ Object (readonly)
Returns the value of attribute effort.
110 111 112 |
# File 'lib/ruby_llm/thinking.rb', line 110 def effort @effort end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
110 111 112 |
# File 'lib/ruby_llm/thinking.rb', line 110 def enabled @enabled end |
Class Method Details
.default ⇒ Object
112 113 114 |
# File 'lib/ruby_llm/thinking.rb', line 112 def self.default new(intent: :enable) end |
.disabled ⇒ Object
116 117 118 |
# File 'lib/ruby_llm/thinking.rb', line 116 def self.disabled new(intent: :disable) end |
Instance Method Details
#disabled? ⇒ Boolean
132 133 134 |
# File 'lib/ruby_llm/thinking.rb', line 132 def disabled? enabled == false || effort == :none end |
#enabled? ⇒ Boolean
128 129 130 |
# File 'lib/ruby_llm/thinking.rb', line 128 def enabled? !@intent.nil? || !enabled.nil? || !effort.nil? || !budget.nil? || !display.nil? end |