Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LexV2 specialtybotrouting fixes and enhancements. #575

Conversation

bobpskier
Copy link
Contributor

Bot Routing is broken for LexV2 bots and returns errors to the clients. This fix updates Bot routing implementation to support LexV2 bots.

In addition, this fix adds several key features for bot routing. The first allows the input utterance triggering bot routing to be sent to the target bot. This can be set to a configured string value or can be set to pass the input utterance which triggered bot routing. The second change allows session attributes to be captured from the target LexV2 bot and saved as session attributes for the user of QnABot.

Description of changes:

botrouting readme was updated
qna.js was updated to add the new configuration parameters
3_query.js was changed to manage internal session attributes for bot routing
lambda/es-proxy-layer/lib/query.js was changed to not process conditional chaining while botrouting is underway

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@bobpskier bobpskier changed the title LexV2 specialtybotrouting fixex and enhancements. LexV2 specialtybotrouting fixes and enhancements. Apr 1, 2023
@marcburnie marcburnie self-requested a review July 18, 2023 13:03
@marcburnie
Copy link
Member

@bobpskier - thanks for your contribution. I wanted to provide you an update - I've deployed your changes and we're currently looking into integrating them. I'll get back to you once we have a plan for release.

@marcburnie
Copy link
Member

@bobpskier - thanks again for contributing these changes. We've merged your code with a few changes:

  1. There didn't appear to be a mechanism for receiving and merging the session attributes into the session object. I've contributed code to filter and merge in any session attributes to the designated namespace from the specialty bot.
  2. ${utterance} is used instead of ${relay} as an input string to specify the input utterance should be passed to the specialty bot.
  3. Provided a default namespace in cases where the user leaves the field empty.

These enhancements will be publicly available at the next minor release (currently planned in a few months). I will mark this PR as merged at that time.

Copy link
Member

@marcburnie marcburnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There didn't appear to be a mechanism for receiving and merging the session attributes into the session object. I've contributed code to filter and merge in any session attributes to the designated namespace from the specialty bot.
${utterance} is used instead of ${relay} as an input string to specify the input utterance should be passed to the specialty bot.
Provided a default namespace in cases where the user leaves the field empty.
These enhancements will be publicly available at the next minor release (currently planned in a few months). I will mark this PR as merged at that time.

@marcburnie
Copy link
Member

These changes have been merged as part of the v5.5.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants