我们正在使用Flask和Dialogflow构建一个聊天机器人。当前,我们使用flask_login来检测当前登录用户的名称和ID,并且我们希望Dialogflow代理知道当前登录用户的信息,因此我们尝试将current_user.name作为参数提供给装饰器下的responses函数。 '@application.route('/webhook',methods=['GET', 'POST'])'
,
但这给了我们这个错误。
我不知道为什么current_user.name
不存在。
这是我们的回复功能
这是错误