Class: BotBaseModuleSkillModel
- Inherits:
-
Object
- Object
- BotBaseModuleSkillModel
- Includes:
- RXFRead
- Defined in:
- lib/botbase-module-skillmodel.rb
Instance Method Summary collapse
-
#initialize(file: nil, invocation: nil, userid: nil, callback: nil, debug: false) ⇒ BotBaseModuleSkillModel
constructor
A new instance of BotBaseModuleSkillModel.
- #query(sender = 'user01', msg, mode: :voicechat, echo_node: 'node1') ⇒ Object
Constructor Details
#initialize(file: nil, invocation: nil, userid: nil, callback: nil, debug: false) ⇒ BotBaseModuleSkillModel
Returns a new instance of BotBaseModuleSkillModel.
15 16 17 18 19 20 21 22 |
# File 'lib/botbase-module-skillmodel.rb', line 15 def initialize(file: nil, invocation: nil, userid: nil, callback: nil, debug: false) @invocation, @debug = invocation, debug amb = AlexaModelBuilder.new(FileX.read file) @skillbot = AskIO.new(amb.to_manifest, amb.to_model, userid: userid) end |
Instance Method Details
#query(sender = 'user01', msg, mode: :voicechat, echo_node: 'node1') ⇒ Object
24 25 26 |
# File 'lib/botbase-module-skillmodel.rb', line 24 def query(sender='user01', msg, mode: :voicechat, echo_node: 'node1') @skillbot.ask msg end |