Class: Ollama::ToolIntent
- Inherits:
-
Object
- Object
- Ollama::ToolIntent
- Defined in:
- lib/ollama/tool_intent.rb
Overview
Tool intent extraction helper.
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Instance Method Summary collapse
- #finish? ⇒ Boolean
-
#initialize(action, input = {}) ⇒ ToolIntent
constructor
A new instance of ToolIntent.
Constructor Details
#initialize(action, input = {}) ⇒ ToolIntent
Returns a new instance of ToolIntent.
10 11 12 13 |
# File 'lib/ollama/tool_intent.rb', line 10 def initialize(action, input = {}) @action = action @input = input.is_a?(Hash) ? input : {} end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
6 7 8 |
# File 'lib/ollama/tool_intent.rb', line 6 def action @action end |
#input ⇒ Object (readonly)
Returns the value of attribute input.
6 7 8 |
# File 'lib/ollama/tool_intent.rb', line 6 def input @input end |
Instance Method Details
#finish? ⇒ Boolean
15 16 17 |
# File 'lib/ollama/tool_intent.rb', line 15 def finish? @action == "finish" end |