aws-solutions / qnabot-on-aws

AWS QnABot is a multi-channel, multi-language conversational interface (chatbot) that responds to your customer's questions, answers, and feedback. The solution allows you to deploy a fully functional chatbot across multiple channels including chat, voice, SMS and Amazon Alexa.
https://aws.amazon.com/solutions/implementations/aws-qnabot
Apache License 2.0
392 stars 251 forks source link

LexV2BotLocaleIds = "ko_KR" don't work #391

Closed fromcloud closed 2 years ago

fromcloud commented 2 years ago

Describe the bug When I set the LexV2BotLocaleIds variable to "ko_KR", stack deployment fail.

To Reproduce Set LexV2BotLocaleIds variable to value including "ko_KR" like "en_US,es_US,fr_CA,ko_KR". Deploy qnabot stack.

Expected behavior Successful deployment.

Please complete the following information about the solution:

To get the version of the solution, you can look at the description of the created CloudFormation stack. For example, "(SO0189) QnABot [...] v0.0.1".

Screenshots If applicable, add screenshots to help explain your problem (please DO NOT include sensitive information). image

Additional context Setting LexV2BotLocaleIds as "ja_JP", stack is successfully deployed.

froguin commented 2 years ago

I think this may cause the problem: https://github.com/aws-solutions/aws-qnabot/blob/main/lambda/lexv2-build/handler.py

When lambda "QnABot-Lexv2BotLambda" runs to translate slot type values, there're no ko_KR attribute defined like in LEXV2_BOT_LOCALE_VOICE LEXV2_BOT_LOCALE_VOICES = { "de_DE": "Hans", "en_AU": "Nicole", "en_GB": "Amy", "en_US": "Joanna", "es_419": "Mia", "es_ES": "Conchita", "es_US": "Lupe", "fr_CA": "Chantal", "fr_FR": "Mathieu", "it_IT": "Bianca", "ja_JP": "Mizuki" }

jjk-dev commented 2 years ago

Do not put ko_KR in LexV2BotLocaleIds variable and deploy with just default settings. Then go to content designer website and change setting - "enable_multi_language_support" parameter to "true". If you refresh client page then Lex will understand Korean by using Amazon Translate.

froguin commented 2 years ago

Lex occurred a build failure in Korean language version. I think some utterances that type is AMAZON.AlphaNumeric caused internal build failure in CloudFormation Template.

https://docs.aws.amazon.com/lexv2/latest/dg/howitworks-builtins-slots.html

rajc-aws commented 2 years ago

Thanks for raising this issue, and sorry for the delay in responding back.

This was addressed as part of QnABot release 5.1.1. More details: https://github.com/aws-solutions/aws-qnabot/blob/main/CHANGELOG.md#511---2022-02-04

Closing this issue.