Module: OllamaChat::ThinkControl
- Included in:
- Chat
- Defined in:
- lib/ollama_chat/think_control.rb
Overview
A module that provides thinking control functionality for OllamaChat.
The ThinkControl module encapsulates methods for managing the ‘think’ mode setting in OllamaChat sessions. It handles the selection of different thinking modes, checking the current state, and displaying the current think mode status.
Instance Method Summary collapse
-
#think ⇒ String
The think method returns the current think mode selection.
-
#think? ⇒ TrueClass, FalseClass
The think? method checks if the think mode is enabled.
-
#think_loud? ⇒ TrueClass, FalseClass
The think_loud? method checks if both think mode and think loud mode are enabled.
Instance Method Details
#think ⇒ String
The think method returns the current think mode selection.
11 12 13 14 15 16 17 18 19 |
# File 'lib/ollama_chat/think_control.rb', line 11 def think if think_mode.off? false elsif think_mode.selected == 'enabled' true else think_mode.selected end end |
#think? ⇒ TrueClass, FalseClass
The think? method checks if the think mode is enabled.
24 25 26 |
# File 'lib/ollama_chat/think_control.rb', line 24 def think? think_mode.on? end |
#think_loud? ⇒ TrueClass, FalseClass
The think_loud? method checks if both think mode and think loud mode are enabled.
33 34 35 |
# File 'lib/ollama_chat/think_control.rb', line 33 def think_loud? think? && think_loud.on? end |