我现在想通过rasa实现以下功能
User:How is the weather in New York today?
Bot:New York today is sunny.
User:How about Washington?
Bot:Washington today is rain
User:How about London
Bot:London today is cloudy
User:What about tomorrow?
Bot:London tomorrow is sunny
User:How about New York?
Bot:New York tomorrow is rain
......
这个对话可以继续循环,直到用户的意图改变。我使用的是rasa中的表单,但是该表单只能循环一轮。当所有槽都被填满后,它被停用。那么有没有更好的方法来实现这个功能呢?谢谢!
最佳答案
每次都停用表单应该没问题;当用户提供相关输入时,它将被重新激活。在表单的最后一个操作中,您可以将您想要的任何插槽重置为None
。然后,如果用户再次提出相同类型的问题,表单将以空槽重新开始。即使不重置槽,如果用户提供了一个用新值填充槽的输入,则表单将使用该新值。
关于rasa-nlu - rasa form如何不断循环提问?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65405194/