gpt4 book ai didi

alexa - 错误代码 : InvalidIntentSamplePhraseSlot -

转载 作者:行者123 更新时间:2023-12-04 23:13:48 26 4
gpt4 key购买 nike

我收到错误代码 Error code: InvalidIntentSamplePhraseSlot当我使用新技能控制台构建模型时。
完整的错误信息是

Sample utterance "AddBookmarkIntent i am at {pageno} of {mybook}" in intent "AddBookmarkIntent" cannot include both a phrase slot and another intent slot. Error code: InvalidIntentSamplePhraseSlot - 

哪里 {pageno}AMAZON.NUMBER{mybook}AMAZON.SearchQuery
错误是什么,我该如何解决?

编辑:为 intent 添加 JSON
{
"name": "AddBookmarkIntent",
"slots": [
{
"name": "mybook",
"type": "AMAZON.SearchQuery"
},
{
"name": "pageno",
"type": "AMAZON.NUMBER"
}
],
"samples": [
"i am at {pageno} of the book {mybook}",
"save page {pageno} to the book {mybook}",
"save page {pageno} to {mybook}",
"i am at {pageno} of {mybook}"
]
}

最佳答案

不允许有类型为 AMAZON.SearchQuery 的插槽在与另一个插槽相同的话语中,在您的情况下 AMAZON.NUMBER .

根据需要标记其中一个插槽并单独询问它们。

一个小例子:

创建放入话语和槽位的 Intent:

"intents": [
{
"name": "AddBookmarkIntent",
"samples": [
"I am at {pageno}"
],
"slots": [
{
"name": "mybook",
"type": "AMAZON.SearchQuery",
"samples": [
"For {mybook}"
]
},
{
"name": "pageno",
"type": "AMAZON.NUMBER"
}
]
}

根据需要标记特定插槽,以便 Alexa 自动请求它:
"dialog": {
"intents": [
{
"name": "AddBookmarkIntent",
"confirmationRequired": false,
"prompts": {},
"slots": [
{
"name": "mybook",
"type": "AMAZON.SearchQuery",
"elicitationRequired": true,
"confirmationRequired": false,
"prompts": {
"elicitation": "Elicit.Intent-AddBookmarkIntent.IntentSlot-mybook"
}
}
]
}
]
}

并创建请求插槽的提示:
"prompts": [
{
"id": "Elicit.Intent-AddBookmarkIntent.IntentSlot-mybook",
"variations": [
{
"type": "PlainText",
"value": "For which book you like to save the page?"
}
]
}
]

使用技能构建器 BETA 而不是它的编辑器,这可能会容易得多,因为它会在后台自动创建 JSON。

关于alexa - 错误代码 : InvalidIntentSamplePhraseSlot -,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48892968/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com