我在我的chatBot应用程序中有一个切换工作空间的流,它给了我SpelEvaluationException错误。
我有一个路由器工作区,用于确定客户端的初始缩进,一旦我知道了初始缩进,我就会将下一个请求路由到适当的工作区
Workspace Router :
Bot :- Hey this is an awesome bot, what do you need help with
1. Apples
2. Bananas
3. Oranges
Client :- I need help with my apples
--- I pass a custom JSON from the workspace with tells my app to route next request to apples workspace ----
Apple Workspace :
BOT: Hey what can I help you in apples . 流程运行良好,但当我向Apples工作区发送请求时。我在log_message中得到以下错误。
SpelEvaluationException when evaluating dialog node ID [node_2_1517933972148]. The syntax of condition [intents[0].confidence < 0.50] is valid, but cannot be evaluated. Check that objects in expression are not null or out of bounds.\nSpEL evaluation error: EL1025E: The collection has '0' elements, index '0' is invalid\n发布于 2018-06-07 05:01:58
因此,不知何故,您要求Watson在实际传递任何输入之前计算意图数组,因此没有返回意图数据,因此拼写表达式失败并抛出错误。
因此,无论您如何调用第二个Apples工作区,请确保您也发送了输入文本。
发布于 2020-05-28 04:44:06
同样的事情发生在我身上,您可以尝试通过响应跳转,这样条件就不会被求值,并检查您是否试图将意图保存在JSON内的变量中。也许你已经解决了这个问题,但我留下了我的建议,希望它能为其他人服务。
https://stackoverflow.com/questions/50687430
复制相似问题