Class: FuncBot::Functions::BaseFunction
- Inherits:
-
Object
- Object
- FuncBot::Functions::BaseFunction
- Defined in:
- lib/func_bot/functions/base_function.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bot ⇒ Object
readonly
Returns the value of attribute bot.
Instance Method Summary collapse
-
#initialize(bot) ⇒ BaseFunction
constructor
A new instance of BaseFunction.
- #parsed_response ⇒ Object
Constructor Details
#initialize(bot) ⇒ BaseFunction
Returns a new instance of BaseFunction.
8 9 10 |
# File 'lib/func_bot/functions/base_function.rb', line 8 def initialize(bot) @bot = bot end |
Instance Attribute Details
#bot ⇒ Object (readonly)
Returns the value of attribute bot.
6 7 8 |
# File 'lib/func_bot/functions/base_function.rb', line 6 def bot @bot end |
Instance Method Details
#parsed_response ⇒ Object
12 13 14 15 16 |
# File 'lib/func_bot/functions/base_function.rb', line 12 def parsed_response JSON.parse( bot.response.dig("choices", 0, "message", "function_call", "arguments") ) end |