错误:给定当前插槽和sessionAttribute设置,没有可用的消息 [英] error: No usable messages given the current slot and sessionAttribute set

查看:46
本文介绍了错误:给定当前插槽和sessionAttribute设置,没有可用的消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在lex中创建了一个聊天机器人,出于某种特殊目的,Lex抛出了错误,

I made a chatbot in lex and for one particular intent, Lex is throwing the error,

An error has occurred: Invalid Bot Configuration: No usable messages 
given the current slot and sessionAttribute set.

无论出于何种目的输入,都会出现此错误. 目前,我没有为此目的使用任何lambda函数. 有人可以指导我这是什么意思吗?我是lex的新手,但没有找到关于此错误的参考.

This error comes regardless of the input in case of that intent. I am not using any lambda functions at this point for this intent. Can someone guide me what this means? I am new to lex and I did not find references to what this error is about.

推荐答案

最近,保存一些更改后,我的bot测试出现了相同的错误.一段时间后,终于,我发现这是因为我的确认消息使用了当时未定义的某些插槽.

Recently I got the same error with the test of my bot after saving some changes. After a while, finally, I found out that it was because my confirmation message was using some slots not defined at that point.

示例:

假设我们有:

  • 一个必需的插槽{name}
  • 一个可选插槽{age}
  • ,确认消息为"Your name is {name} and your age is {age}, is that right?"
  • one required slot {name}
  • one optional slot {age}
  • and the confirmation message is "Your name is {name} and your age is {age}, is that right?"

如果Lex到达要求用户确认的地步,并且无论是发话还是使用lambda函数,都不会分配{age},那么Lex将返回此错误.

If Lex reaches the point to ask for the user confirmation and {age} was never assigned whether in any utterance or a lambda function, then Lex will return this error.

您必须确保定义了消息中使用的所有插槽.

You must ensure that all slots used in messages are defined.

这篇关于错误:给定当前插槽和sessionAttribute设置,没有可用的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆