Class: DSPy::Tools::Tool
- Inherits:
-
Object
- Object
- DSPy::Tools::Tool
- Defined in:
- lib/dspy/tools.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #call(input) ⇒ Object
-
#initialize(name, description) ⇒ Tool
constructor
A new instance of Tool.
Constructor Details
#initialize(name, description) ⇒ Tool
Returns a new instance of Tool.
12 13 14 15 |
# File 'lib/dspy/tools.rb', line 12 def initialize(name, description) @name = name @description = description end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
10 11 12 |
# File 'lib/dspy/tools.rb', line 10 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/dspy/tools.rb', line 10 def name @name end |
Instance Method Details
#call(input) ⇒ Object
17 18 19 |
# File 'lib/dspy/tools.rb', line 17 def call(input) raise NotImplementedError, "Subclasses must implement the call method" end |