Cannot Read Context in Dialogflow Fulfillment (Suddenly Undefined)

后端 未结 3 1587
醉酒成梦
醉酒成梦 2021-01-13 07:57

We built a Dialogflow agent using google cloud functions as webhook which worked properly until yesterday evening. At that time I exported the agent and reimported it later

相关标签:
3条回答
  • 2021-01-13 08:10

    Actually I could fix it by the following 'magic' steps:

    • Copied my original function to a text file
    • Copy and pasted the original example code into the GUI fulfillment code editor (Code on GitHub)
    • Deployed the function
    • Created a minimal example for my info function:
    function info(agent) {
        store_context = agent.context.get('info_dialog_params_store');
    }
    
    • Tested it, and it worked
    • Copied back my original code
    • Everything was fine again
    0 讨论(0)
  • 2021-01-13 08:23

    I had the same issue, I resolved it updating dialogflow-fulfillment in package.json:

    from "dialogflow-fulfillment": "^0.5.0" to "dialogflow-fulfillment": "^0.6.0"

    0 讨论(0)
  • 2021-01-13 08:24

    I solved the problem by turning off "Beta features" enter image description here

    0 讨论(0)
提交回复
热议问题