-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathA_Chatbot.py
25 lines (21 loc) · 1.13 KB
/
A_Chatbot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# ##############################################################################
# CHATBOT PROGRAM.AB SERVICE
# ##############################################################################
# ##############################################################################
# PERSONNAL PARAMETERS
# ##############################################################################
#read current service part config based on file name
def initChatBot():
i01_chatBot.getConfig()
# ##############################################################################
# MRL SERVICE CALL
# ##############################################################################
if runtime.isStarted('i01.chatBot'):
initChatBot()
# This is also done via the welcomeMessage()
if str(i01_chatBot.getPredicate("human","firstinit"))=="unknown" or str(i01_chatBot.getPredicate("human","firstinit"))=="started":
i01_chatBot.setPredicate("human","topic","default")
i01_chatBot.getResponse("FIRST_INIT")
else:
i01_chatBot.startSession(str(i01_chatBot.getPredicate("human","lastUsername")))
i01_chatBot.getResponse("WAKE_UP")