我从 rasa 开始,我想制作一个在用户面前开始说话的聊天机器人,我附上了一个例子:
Bot: Hello, how can I help you?
User: Hello, what time is it?
Bot: It's 5:23 p.m.
我知道如何让用户先写,但我不知道如何反过来。我一直在寻找信息并看到这个链接:https ://forum.rasa.com/t/how-to-let-bot-start-the-conversation/20866/5但它仍然取决于用户写第一的
我有这个:
故事.yml:
- story: greet
steps:
- action: action_utter_supply_greet_user
- intention: greet
.... (continues)
动作.py:
class ActionGreetUser(Action):
def name(self) -> Text:
return "action_utter_supply_greet_user"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
dispatcher.utter_message("Hello! How can I help you?")
return[UserUtternanceReverted()]
域.yml:
actions:
- action_utter_supply_greet_user
怎么了?我该怎么做?
谢谢!