2017-12-22 14 views
0

먼저, 시뮬레이터를 alexa 앱 개발 페이지에서 사용하면 요청이 다르게 보일지라도 모든 것이 잘 작동합니다. Alexa 장치에 "appName {x}과 {y}에게 물어보십시오."라고 말하면 웹 서비스가 "스킬 요청을 처리하는 동안 예외가 발생했습니다"라는 오류 메시지가 표시됩니다. {X}와 {Y}는 내 의도 슬롯입니다.Alexa 기술 스킬에 대한 요청을 디스패치하는 중에 예외가 발생했습니다.

이것은 Alexa와 직접 대화하고 시뮬레이터가 완벽하게 작동 할 때만 발생합니다.

다음은 Amazon Echo와 통화 할 때받은 요청입니다.

{ 
    "version": "1.0", 
    "session": { 
     "new": false, 
     "sessionId": "amzn1.echo-api.session.6a13f2db-a9f6-43a9-bc4d-x063b86905b6c", 
     "application": { 
      "applicationId": "amzn1.ask.skill.ef8bd603-cc39-406e-bed8-a8f9xc94abba2" 
     }, 
     "user": { 
      "userId": "xxx" 
     } 
    }, 
    "context": { 
     "AudioPlayer": { 
      "playerActivity": "STOPPED" 
     }, 
     "System": { 
      "application": { 
       "applicationId": "amzn1.ask.skill.ef8bd603-cc39-406e-bed8-a8f9c94abba2" 
      }, 
      "user": { 
       "userId": "xxxx" 
      }, 
      "device": { 
       "deviceId": "xx", 
       "supportedInterfaces": { 
        "AudioPlayer": {} 
       } 
      }, 
      "apiEndpoint": "https://api.eu.amazonalexa.com", 
      "apiAccessToken": "xxxx" 
     } 
    }, 
    "request": { 
     "type": "SessionEndedRequest", 
     "requestId": "amzn1.echo-api.request.2a993410-e7a8-4f37-87d7-a5063ef185b5", 
     "timestamp": "2017-12-22T00:11:45Z", 
     "locale": "en-GB", 
     "reason": "ERROR", 
     "error": { 
      "type": "INVALID_RESPONSE", 
      "message": "An exception occurred while dispatching the request to the skill." 
     } 
    } 
} 

다음은 내 의도 스키마

{ 
    "intents": [ 
    { 
     "intent": "StartGameIntent" 
    }, 
    { 
     "slots": [ 
     { 
      "name": "playerOne", 
      "type": "AMAZON.US_FIRST_NAME" 
     }, 
     { 
      "name": "playerTwo", 
      "type": "AMAZON.US_FIRST_NAME" 
     } 
     ], 
     "intent": "PlayTheGame" 
    }, 
    { 
     "intent": "StopTheGame" 
    }, 
    { 
     "slots": [ 
     { 
      "name": "damage", 
      "type": "AMAZON.NUMBER" 
     }, 
     { 
      "name": "player", 
      "type": "AMAZON.US_FIRST_NAME" 
     } 
     ], 
     "intent": "PlayerTakesDamage" 
    }, 
    { 
     "slots": [ 
     { 
      "name": "health", 
      "type": "AMAZON.NUMBER" 
     }, 
     { 
      "name": "player", 
      "type": "AMAZON.US_FIRST_NAME" 
     } 
     ], 
     "intent": "PlayerHeals" 
    } 
    ] 
} 

내가 어떤 슬롯없이 의도를 묻는다면 그것은 잘 작동합니다. 슬롯이있을 때 내 의도를 찾지 못하는 이유는 무엇입니까?

저는 영국의 언어로이 앱을 실행합니다.

답변

1

나는 영국과 미국의 두 언어를 만들었고, 새로운 의도와 예제 발언을 편집/추가 한 후에 모델을 저장하고 구축하는 새로운 기술 작성기를 사용했습니다.

enter image description here

는 또한 I는 AMAZON.GB_FIRST_NAME 사용 대신 AMAZON.US_FIRST_NAME의 다른 타임 슬롯 유형을 사용 하였다. 다음은

나는 내 알렉사 기술이 바로이 상호 작용 모드에 문제가 있었다 지적

를 작동하게하는 데 사용 내 기술 빌더 페이지의 설정의 스크린 샷이다, 현재 베타 버전 새로운 빌더 듯 이 문제를 해결하기 위해

enter image description here

0

AWS 람다 로그에서 요청과 관련된 오류를 확인하십시오. 실패한 모듈 이름 (예 : index.js)과 예외의 행 번호를 제공해야합니다.

람다 코드에 console.log() 메시지를 추가하여 오류가 발생한 위치를 좁힐 수 있습니다.