Skip to content

Commit

Permalink
Update to version v5.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemlin committed Sep 29, 2023
1 parent 7fb99e0 commit 2737f5e
Show file tree
Hide file tree
Showing 580 changed files with 53,563 additions and 30,925 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
env: {
node: true
},
extends: ['eslint:recommended'],
extends: ['eslint:recommended', 'plugin:vue/recommended', 'airbnb-base'],
rules: {
indent: ['warn', 4],
quotes: ['warn', 'single']
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To get the version of the solution, you can look at the description of the creat
- [ ] Region: [e.g. us-east-1]
- [ ] Was the solution modified from the version published on this repository?
- [ ] If the answer to the previous question was yes, are the changes available on GitHub?
- [ ] Have you checked your [service quotas](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) for the sevices this solution uses?
- [ ] Have you checked your [service quotas](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) for the services this solution uses?
- [ ] Were there any errors in the CloudWatch Logs?

**Screenshots**
Expand Down
30 changes: 25 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.4.2] - 2023-09-30
### Added
- Self-hosting web fonts. Font files used by QnABot UI are now served from QnABot server instead of using third party font provider.

### Updated

- Security patches for npm and pip packages
- Lambda runtimes updated to NodeJS 18 for CFN Bootstrap Lambda
- SonarQube Quality Gates fix
- Bluebird Promise Migration (Partial)
- Utilize native promises supported in JavaScript
- Full migration planned for v5.5.0. Done as a prerequisite for JavaScript SDK v3 migration planned for v6.0.0
- Remaining changes to be implemented in v5.5.0 include ./website, ./cfn, & ./templates

### Fixed
- Fixed request signing issue when using Custom domain ([issue #605](https://github.com/aws-solutions/qnabot-on-aws/issues/605))
- Fixed voice integration with LLM response
- Fixed unsupported SSML tags
- Fixed Kendra API retrieval bug

## [5.4.1] - 2023-07-27
### Updated

Expand Down Expand Up @@ -122,7 +142,7 @@ __*Note: we recommend that you first deploy these changes in a non-production en
### Updated

- Security patches for npm and pip packages
- Added Support for latest LexV2 languages (see [Multi-language Support](docs/multilanguage_support.md))
- Added Support for latest LexV2 languages (see [Multi-language Support](docs/multilanguage_support/README.md))
- Updated:
- English (IN), Spanish (LATAM), Portuguese (PR), Mandarin (PRC) to use neural voice
- New languages:
Expand Down Expand Up @@ -192,10 +212,10 @@ __*Note: we recommend that you first deploy these changes in a non-production en

- Intent and Slot matching (an early implementation). This new capability supports creating dedicated custom Intents for a QnABot {Item ID}. You can extend QnABot to support one or more related intents. For example, you might create an intent that makes a car reservation, or assists an agent during a live chat or call (via Amazon Connect). More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/intent_slot_matching/README.md
- Support for using custom domain names for QnABot Designer and Client interfaces. More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/custom_domain_name_setup/README.md
- AWS QnABot Command Line Interface (CLI) - the AWS QnABot CLI supports the capability to import and export questions and answers via command line. More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/qnabot_cli.md
- AWS QnABot Command Line Interface (CLI) - the AWS QnABot CLI supports the capability to import and export questions and answers via command line. More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/qnabot_cli/README.md
- Kendra Redirect - with the Kendra Redirect feature, you can now include a Kendra query within a Item ID. More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/kendra_redirect/README.md
- Integration with Canvas LMS (an early example implementation). Students use their schools' learning management system (LMS) to keep track of their assignments, grades, and their course work. With this integration, students will be able to ask QnABot about their grades, syllabus, enrollments, assignments, and announcements.
More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/canvaslms_integration.md
More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/canvaslms_integration/README.md
- Updated import functionality to support importing of QnABot questions and answers from a Excel file when uploaded to S3 data folder.
- Added support for importing session attributes via Excel.
- Updated runtime of Lambda functions (using Python runtime) to use Python runtime version 3.9.
Expand Down Expand Up @@ -236,10 +256,10 @@ __*Note: we recommend that you first deploy these changes in a non-production en

### Added

- Expanded language support for voice and text interactions. Also included support for Neural voices for Lex language locales. See [supported languages](docs/multilanguage_support.md#supported-languages).
- Expanded language support for voice and text interactions. Also included support for Neural voices for Lex language locales. See [supported languages](docs/multilanguage_support/README.md#supported-languages).
- Expanded `config.json` to support `LexV2BotLocaleIds` parameter.
- Updated `LexV2BotLocaleIds` parameter in CloudFormation template to include link to supported languages.
- Updated [Multi Language Support readme](docs/multilanguage_support.md#supported-languages) and added supported languages section.
- Updated [Multi Language Support readme](docs/multilanguage_support/README.md#supported-languages) and added supported languages section.
- Updated `ENABLE_MULTI_LANGUAGE_SUPPORT` setting in [Settings readme](docs/settings.md) with link to supported languages.

### Fixed
Expand Down
28 changes: 4 additions & 24 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
# Amazon Open Source Code of Conduct

This code of conduct provides guidance on participation in Amazon-managed open source communities, and outlines the process for reporting unacceptable behavior. As an organization and community, we are committed to providing an inclusive environment for everyone. Anyone violating this code of conduct may be removed and banned from the community.

**Our open source communities endeavor to:**
* Use welcoming and inclusive language;
* Be respectful of differing viewpoints at all times;
* Accept constructive criticism and work together toward decisions;
* Focus on what is best for the community and users.

**Our Responsibility.** As contributors, members, or bystanders we each individually have the responsibility to behave professionally and respectfully at all times. Disrespectful and unacceptable behaviors include, but are not limited to:
The use of violent threats, abusive, discriminatory, or derogatory language;
* Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, race, political or religious affiliation;
* Posting of sexually explicit or violent content;
* The use of sexualized language and unwelcome sexual attention or advances;
* Public or private [harassment](http://todogroup.org/opencodeofconduct/#definitions) of any kind;
* Publishing private information, such as physical or electronic address, without permission;
* Other conduct which could reasonably be considered inappropriate in a professional setting;
* Advocating for or encouraging any of the above behaviors.

**Enforcement and Reporting Code of Conduct Issues.**
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting [email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.

**Attribution.** _This code of conduct is based on the [template](http://todogroup.org/opencodeofconduct) established by the [TODO Group](http://todogroup.org/) and the Scope section from the [Contributor Covenant version 1.4](http://contributor-covenant.org/version/1/4/)._
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
[email protected] with any additional questions or comments.
9 changes: 8 additions & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ This software includes third party software subject to the following copyrights:
@babel/plugin-transform-runtime under the Massachusetts Institute of Technology (MIT) license
@babel/preset-env under the Massachusetts Institute of Technology (MIT) license
@babel/preset-stage-2 under the Massachusetts Institute of Technology (MIT) license
@fontsource/material-icons under the Apache License Version 2.0
@fontsource/roboto under the Apache License Version 2.0
@fontsource/varela-round under the Open Font License (OFL) 1.1
ajv under the Massachusetts Institute of Technology (MIT) license
alexa-sdk under the Apache License Version 2.0
arrow under the Apache License Version 2.0
Expand Down Expand Up @@ -61,6 +64,7 @@ elasticsearch under the Apache License Version 2.0
exports-loader under the Massachusetts Institute of Technology (MIT) license
express under the Massachusetts Institute of Technology (MIT) license
faker under the Massachusetts Institute of Technology (MIT) license
file-loader under the Massachusetts Institute of Technology (MIT) license
file-saver under the Massachusetts Institute of Technology (MIT) license
filelock under the Unlicense license
handlebars under the Massachusetts Institute of Technology (MIT) license
Expand Down Expand Up @@ -143,4 +147,7 @@ webpack-bundle-analyzer under the Massachusetts Institute of Technology (MIT) li
webpack-cli under the Massachusetts Institute of Technology (MIT) license
webpack-dev-server under the Massachusetts Institute of Technology (MIT) license
webpack-merge under the Massachusetts Institute of Technology (MIT) license
webpack-s3-plugin under the Massachusetts Institute of Technology (MIT) license
webpack-s3-plugin under the Massachusetts Institute of Technology (MIT) license
typing_extensions under Python Software Foundation License
boolean.py under BSD-2-Clause
license-expression under Apache License Version 2.0
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Alternatively, if you want to custom deploy QnABot on AWS, refer to the details

Navigate to the root directory of QnABot (directory will be created once you have cloned this repo).

Install node.js moodules of QnABot:
Install node.js modules of QnABot:

```shell
npm install
Expand Down Expand Up @@ -117,8 +117,12 @@ Refer to [LICENSE.txt](LICENSE.txt) file for details.

Refer to [CHANGELOG.md](CHANGELOG.md) file for details of new features in each version.

A [workshop](https://qnabot.workshop.aws) is also available
that walks you through QnABot features.
A [workshop](https://qnabot.workshop.aws) is also available that walks you through QnABot features.

## Anonymous Metrics
This solution collects anonymous operational metrics to help AWS improve the
quality of features of the solution. For more information, including how to disable
this capability, please see the [implementation guide](https://docs.aws.amazon.com/solutions/latest/qnabot-on-aws/general-reference.html).

---

Expand Down
2 changes: 1 addition & 1 deletion assets/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DST=../build/assets.zip
$(DST): ./*
echo "Building Assets"; zip -r -x Makefile -q $(DST) .
echo "Building Assets"; zip -FSr -x Makefile -q $(DST) .
2 changes: 1 addition & 1 deletion assets/examples/documents/blog-samples-final.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
"t": "QnABot",
"alt": {
"markdown": "# QnaBot\nThe Q and A Bot uses [Amazon Lex](https://aws.amazon.com/lex) and [Alexa](https://developer.amazon.com/alexa) to provide a natural language interface for your FAQ knowledge base. Now your users can just ask a *question* and get a quick and relevant *answer*.",
"ssml": "<speak>QnABot is <emphasis level=\"strong\">great</emphasis>. But I want to tell you a secret. <amazon:effect name=\"whispered\">I am not a real human.</amazon:effect>. Can you believe it? </speak>"
"ssml": "<speak>AWS <sub alias=\"Q and A\">QnA</sub> Bot is <amazon:effect name=\"drc\">great</amazon:effect>. <sub alias=\"Q and A\">QnA</sub> Bot supports <sub alias=\"Speech Synthesis Markup Language\">SSML</sub> using Polly's neural voice. <prosody rate=\"150%\">I can speak very fast</prosody>, <prosody rate=\"75%\">or very slowly</prosody>. <prosody volume=\"-16dB\">I can speak quietly</prosody>, <amazon:effect name=\"drc\">or speak loud and clear</amazon:effect>. I can say <phoneme alphabet=\"ipa\" ph=\"təˈmɑːtəʊ\">tomato</phoneme> and tomato. Visit docs.aws.amazon.com/polly/latest/dg/supportedtags for more information.</speak>"
},
"l": "",
"qid": "QnABot.001",
Expand Down
92 changes: 47 additions & 45 deletions bin/build.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
#! /usr/bin/env node
var Promise=require('bluebird')
var fs=Promise.promisifyAll(require('fs'))
process.env.AWS_PROFILE=require('../config.json').profile
process.env.AWS_DEFAULT_REGION=require('../config.json').profile
var aws=require('aws-sdk')
var chalk=require('chalk')
aws.config.setPromisesDependency(Promise)
aws.config.region=require('../config.json').region
var cf=new aws.CloudFormation()
var s3=new aws.S3()
var stringify=require("json-stringify-pretty-compact")
var check=require('./check')
var fs = require('fs');
var outputs=require('./exports')
/*********************************************************************************************************************
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. *
* *
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance *
* with the License. A copy of the License is located at *
* *
* http://www.apache.org/licenses/ *
* *
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES *
* OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions *
* and limitations under the License. *
*********************************************************************************************************************/

if(!module.parent){
var argv=require('commander')
var ran
var args=argv.version('1.0')
process.env.AWS_PROFILE = require('../config.json').profile;
process.env.AWS_DEFAULT_REGION = require('../config.json').profile;
const aws = require('aws-sdk');
const chalk = require('chalk');
aws.config.region = require('../config.json').region;
const stringify = require('json-stringify-pretty-compact');
const check = require('./check');
const fs = require('fs').promises;

if (!module.parent) {
const argv = require('commander');
const args = argv.version('1.0')
.name(process.argv[1].split('/').reverse()[0])
.option('--verbose',"silent")
.option('--stack <stack>',"stack to build")
.option('--input <input>',"input file")
.option('--output <output>',"output file")
.parse(process.argv)
.option('--verbose', 'silent')
.option('--stack <stack>', 'stack to build')
.option('--input <input>', 'input file')
.option('--output <output>', 'output file')
.parse(process.argv);

const options = argv.opts();
if (options.stack || (options.input && options.output)) {
Expand All @@ -34,36 +40,32 @@ if(!module.parent){
stack: options.stack,
});
} else {
console.log(`error: required options not specified`);
console.log('error: required options not specified');
argv.outputHelp();
process.exit(1);
}
}
module.exports=create
async function create(options){
var stack=options.stack
log('building '+(options.stack || options.input),stack,!options.silent)
var file=options.input || __dirname+'/../templates/'+stack
var output=options.output || `${__dirname}/../build/templates/${stack}.json`
module.exports = create;
async function create(options) {
const { stack } = options;
log(`building ${options.stack || options.input}`, stack, !options.silent);
const file = options.input || `${__dirname}/../templates/${stack}`;
const output = options.output || `${__dirname}/../build/templates/${stack}.json`;
try {
var temp=await Promise.resolve(require(file))
var template_string=typeof temp ==="object" ? JSON.stringify(temp) : temp
const temp = await require(file);
const template_string = typeof temp === 'object' ? JSON.stringify(temp) : temp;

log("writing to "+output,!options.silent)
log(`writing to ${output}`, !options.silent);

await fs.writeFileAsync(output,stringify(JSON.parse(template_string)))
await check(stack,{file:output})
log(chalk.green(stack+" is valid"),!options.silent)
log('finished building '+stack,!options.silent)
}catch(error){
log(chalk.red(stack+" failed:"+error),!options.silent)
await fs.writeFile(output, stringify(JSON.parse(template_string)));
await check(stack, { file: output });
log(chalk.green(`${stack} is valid`), !options.silent);
log(`finished building ${stack}`, !options.silent);
} catch (error) {
log(chalk.red(`${stack} failed:${error}`), !options.silent);
}
}

function log(message,show){
if(show){console.log(message)}
function log(message, show) {
if (show) { console.log(message); }
}




Loading

0 comments on commit 2737f5e

Please sign in to comment.