Dialogflow es 设置上下文时出错。。。无法读取属性';输入';未定义的';

Dialogflow es 设置上下文时出错。。。无法读取属性';输入';未定义的';,dialogflow-es,actions-on-google,Dialogflow Es,Actions On Google,错误是: TypeError:无法读取未定义的属性“input” 我是这样设置上下文的: conv.contexts.set('pgnotes',1000, { 'pg':pgContext.pg, 'notes':response, 'lastReferencedPage':-1 }

错误是:

TypeError:无法读取未定义的属性“input”

我是这样设置上下文的:

conv.contexts.set('pgnotes',1000, 
                    {   'pg':pgContext.pg,
                        'notes':response,
                        'lastReferencedPage':-1
                    }
                );
我已经在其他领域成功地使用相同的通用代码设置了上下文。我不知道为什么这里会出错

我已经将这个问题提交给谷歌支持行动,但我不希望他们做出回应。希望这里有人能提供一个想法

一些周围的代码

APIGetNotes(pgContext.pg, uniqname).then(
            response=>{
                console.log("conv.contexts %O", conv.contexts);
                console.log("pgContext.pg: "+pgContext.pg);
                console.log("notes: %O",response);
                console.log("About to set context");
                conv.contexts.set('pgnotes',1000, 
                    {   'pg':pgContext.pg,
                        'notes':response,
                        'lastReferencedPage':-1
                    }
                );
                respondBrowseNote(conv);
            }
        ).catch(
            error=>{
                console.log("ERROR getting notes for pg '"+pgContext.pg+"'  Error:'"+error+"'");
                conv.ask("There was an error getting notes, try again later");
            }
        )

这似乎特别奇怪,因为在您的代码或
上下文中都没有显示
输入
属性。set()
。您是否可以更新该问题以包括完整的堆栈跟踪、更多的周围代码,以及可能如何定义
pgContext
?我不知道如何获取堆栈跟踪。这是在firebase中运行的。pgContext和response在价值观方面对我来说都很好。