Cannot Read Context in Dialogflow Fulfillment (Suddenly Undefined)

后端 未结 3 1580
醉酒成梦
醉酒成梦 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

提交回复
热议问题