我希望我的Rasa机器人仅用有效载荷数据对象(类似于常见的JSON对象)进行回复,而不是发任何东西(在这种情况下,不重要)。
自定义操作可以执行此操作吗?我该如何实现?
答案 0 :(得分:0)
也许这会对您有所帮助。该代码应放在actions.py
中。您的json有效负载应作为buttons
传递。
dispatcher.utter_button_message(
'some text that can be ignored', buttons
)
您还可以在此处查看如何实现此功能:rasa-sdk on GitHub
答案 1 :(得分:0)
是的,RASA具有[Error] Refused to execute http://127.0.0.1:19001/assets/src/Graphics/TitleDetail/TVChart/Resources/Utils.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute http://127.0.0.1:19001/assets/src/Graphics/TitleDetail/TVChart/Resources/WebViewBridge.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute http://127.0.0.1:19001/assets/src/Graphics/TitleDetail/TVChart/Resources/TVScriptSummary.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
方法,您可以通过自定义操作调用该方法。
请在此处查看utter_custom_json()
类code。
RASA论坛上有same question