dongtu7567 2018-02-26 04:02
浏览 47

互动模型不会在输入中获取无关的广告位值

I'm trying to build an Alexa skill that connects to Jira. A while back when I started The interaction model in the Alexa Skills Kit was working fine and picked up multiple slot values in one statement, even if it wasn't asked for. For example, "Open a user story in the BLAH project and assign it to Blah" would work and pick up the {ticketType}, {project}, and {assignee} slot values flawlessly. Now I've started using the Dialog.Delegate directive in ASK to allow the interaction model to figure out what it doesn't yet have and keep asking questions until all required slots are filled. Some time after I implemented this, the interaction model stopped recognizing other slot values in utterances that were intended for just one slot value to be filled. If I open the skill with a request like the above, it then asks me what the ticket type is, like I didn't already give it. I have defined sample utterances for my intent in the interaction model and all start with "Open a {TicketType}", so the fact that it still asks me for the ticket type when it's given in the input makes no sense to me.

My suspicion is that it has something to do with the way I'm returning the Dialog.Delegate directive. In my code linked below, I'm calling a function AddDialogDirective func(dialogType string, intent *Intent) which is in an open source framework I am using called alexa-skills-kit-golang. I can confirm that the Dialog.Delegate directive is actually called correctly because in the response from my lambda function I am seeing the Dialog.Delegate directive set.

{
    "body": {
        "version": "1.0",
        "response": {
            "directives": [
                {
                    "type": "Dialog.Delegate"
                }
            ],
            "shouldEndSession": false
        }
    }
}

I've tried modifying the AddDialogDirective function to be func(dialogType string, slotToIllicit *string, slotToConfirm *string, intent *Intent) instead, thinking that the framework was somehow returning empty strings in the SlotToIllicit and SlotToConfirm JSON fields instead of not returning those fields, but no luck. I was thinking that returning empty strings here might be making the interaction model that it should be illiciting only one slot at a time and ignoring the dialog model. Do you think this is the issue or could it be something completely different?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 基于卷积神经网络的声纹识别
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 stm32开发clion时遇到的编译问题