首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用户存储不持久

用户存储不持久
EN

Stack Overflow用户
提问于 2019-05-21 19:39:03
回答 1查看 94关注 0票数 0

我正在尝试保持在对话期间获取的值,并使用用户存储使其在流的下一次对话中可用。然而,在我的下一个意图中,我看到了空的用户存储。有人能给点建议吗?

代码语言:javascript
复制
  function askAccountNumber(agent){

      var number = agent.parameters.account_number;   

      let conv = agent.conv();      
      conv.user.storage.account_number = number;                  

      agent.add('Great, your account number is ' + tmp);      
      agent.add('Welcome to the Enacomm banking application. What would you like to do?')      
  }


function askService(agent){

    let conv = agent.conv();
    agent.add(JSON.stringify(conv.user.storage));    //THIS IS BLANK {}      

    var service_type = agent.parameters.service_type; 
    agent.add('Good! You asked for ' + service_type);    
  }
EN

回答 1

Stack Overflow用户

发布于 2019-05-22 16:32:11

这是dialogflow-fulfillment nodejs库上的一个开放问题。

我将我的库从dialogflow-fulfillment nodejs改为actions-on-google-nodejs,它的效果非常好。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56237477

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档