DialogFlow-调用意图而无需训练短语并保存响应

kin*_*ng1 0 actions-on-google dialogflow-es

我正在尝试使用DialogFlow在Actions中构建一个基本的“问题/答案”应用程序。现在,我有两个意图:

意图1:用户说“问我一个问题”,意图回答“告诉我你自己”

目的2:我想捕捉用户对“告诉我自己的看法”的反馈,但是坦率地说,没有办法写出足够的培训短语来掩盖它。

我尝试遵循此建议,并让Intent 1发送了一个称为的输出上下文,save_response而Intent 2的输入上下文为save_response。然后我用的训练短语@sys.any:save_response

当我尝试此操作时,它每次都只会调用默认的后备意图。关于我可能在哪里出错的想法?

sid*_*491 5

You need to create 2 intents, in the first intent your training phrase would be Ask me a question, output context will be save_response and response will be the question which you want to throw at the user.

Then in intent 2, you need to do following:

  • Set input context to save_response, so that it will only be triggered when this is present in the contexts

语境

  • Go to actions and parameters section and create a parameter named answer, give entity type as @sys.any

参数

  • Then go to training phrases section and add any training phrase, then highlight it all, and select the parameter you just created

训练短语

  • After that, your training phrases and entity section will be looking like something like below image

职位选择

  • Save the intent and you are done

结果1 结果2

Hope it helps.

  • 标记为正确,因为这回答了我的具体问题 (2认同)