내보내기 및 가져오기를 위한 JSON 형식 - Amazon Lex V1

Amazon Lex V2를 사용하는 경우 Amazon Lex V2 가이드를 대신 참조하십시오.

 

Amazon Lex V1을 사용하는 경우 봇을 Amazon Lex V2로 업그레이드하는하는 것이 좋습니다. 더 이상 V1에 새로운 기능을 추가하지 않으므로 모든 새 봇에 V2를 사용할 것을 강력히 권장합니다.

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

내보내기 및 가져오기를 위한 JSON 형식

다음 예에서는 Amazon Lex 형식의 봇, 의도 및 슬롯 유형을 내보내고 가져오기 위한 JSON 구조를 보여 줍니다.

슬롯 유형 구조

다음은 사용자 지정 슬롯 유형에 대한 JSON 구조입니다. 슬롯 유형을 가져오거나 내보낼 때 그리고 사용자 정의 슬롯 유형에 의존하는 의도를 내보낼 때 이 구조를 사용하세요.

{ "metadata": { "schemaVersion": "1.0", "importType": "LEX", "importFormat": "JSON" }, "resource": { "name": "slot type name", "version": "version number", "enumerationValues": [ { "value": "enumeration value", "synonyms": [] }, { "value": "enumeration value", "synonyms": [] } ], "valueSelectionStrategy": "ORIGINAL_VALUE or TOP_RESOLUTION" } }

의도 구조

다음은 의도에 대한 JSON 구조입니다. 의도 및 의도에 의존하는 봇을 가져오거나 내보낼 때 이 구조를 사용하십세요.

{ "metadata": { "schemaVersion": "1.0", "importType": "LEX", "importFormat": "JSON" }, "resource": { "description": "intent description", "rejectionStatement": { "messages": [ { "contentType": "PlainText or SSML or CustomPayload", "content": "string" } ] }, "name": "intent name", "version": "version number", "fulfillmentActivity": { "type": "ReturnIntent or CodeHook" }, "sampleUtterances": [ "string", "string" ], "slots": [ { "name": "slot name", "description": "slot description", "slotConstraint": "Required or Optional", "slotType": "slot type", "valueElicitationPrompt": { "messages": [ { "contentType": "PlainText or SSML or CustomPayload", "content": "string" } ], "maxAttempts": value }, "priority": value, "sampleUtterances": [] } ], "confirmationPrompt": { "messages": [ { "contentType": "PlainText or SSML or CustomPayload", "content": "string" }, { "contentType": "PlainText or SSML or CustomPayload", "content": "string" } ], "maxAttempts": value }, "slotTypes": [ List of slot type JSON structures. For more information, see 슬롯 유형 구조. ] } }

봇 구조

다음은 봇에 대한 JSON 구조입니다. 봇을 가져오거나 내보낼 때 이 구조를 사용하세요.

{ "metadata": { "schemaVersion": "1.0", "importType": "LEX", "importFormat": "JSON" }, "resource": { "name": "bot name", "version": "version number",, "nluIntentConfidenceThreshold": 0.00-1.00, "enableModelImprovements": true | false, "intents": [ List of intent JSON structures. For more information, see 의도 구조. ], "slotTypes": [ List of slot type JSON structures. For more information, see 슬롯 유형 구조. ], "voiceId": "output voice ID", "childDirected": boolean, "locale": "en-US", "idleSessionTTLInSeconds": timeout, "description": "bot description", "clarificationPrompt": { "messages": [ { "contentType": "PlainText or SSML or CustomPayload", "content": "string" } ], "maxAttempts": value }, "abortStatement": { "messages": [ { "contentType": "PlainText or SSML or CustomPayload", "content": "string" } ] } } }