A BaseQiChatbotExecutor allows you to define a piece of code that will be triggered from a QiChat topic thanks to an
For Further details, see: ^execute.
How to use it¶
topic: ~execute() u: (raise your _[right left] arm) I raise my $parameter1 arm ^execute(myExecutor, $parameter1, constantParameter2) then I resume talking
When reaching the ^execute in the conversation, myExecutor’s runWith(List<String> params) method will be called passing $parameter1 and constantParameter2. You can have as many parameters as you want.
Mapping the QiChatExecutor to QiChatbot¶
^execute then make a
Add one or more executors using different keywords used in the topic. Finally run the chat asynchronously.
QiChatExecutor class implementation¶
Create a class MyQiChatExecutor that extends from
BaseQiChatExecutor, and implements
- runWith will be called when
^executeis reached in the
- stop will be called when the chat that handles the qiChatbot is canceled.