Giter Club home page Giter Club logo

aws-solutions / qnabot-on-aws Goto Github PK

View Code? Open in Web Editor NEW
376.0 51.0 245.0 181.64 MB

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.

Home Page: https://aws.amazon.com/solutions/implementations/aws-qnabot

License: Apache License 2.0

Makefile 0.31% Shell 0.76% JavaScript 78.65% CSS 0.13% HTML 0.21% Vue 4.35% Python 15.47% Handlebars 0.02% SCSS 0.08% Pug 0.02% Stylus 0.01% EJS 0.01%
machine-learning artificial-intelligence amazon-lex

qnabot-on-aws's Issues

change lex static messages

add ability to edit:

  • lex-clarrification
  • lex-hangup
  • qna empty response
  • qna error response

steps)

  1. add crud methods to /bot/messages resource in api, will need to have lambda to make changes to both Lex messages and Lambda enviromental variables
  2. add page to UI for bot management

Import Error Issue

When attempting an import with a local file, if that file is not formatted properly, an error message (Invalid JSON) is displayed properly. However, from that point on, attempting to reimport will never try to load the file. The page must be reloaded before the import feature will work again. This was confusing as I worked to get the import file format correct, and couldn't understand what was happening even after I got the format right.

Remember context and apply to subsequent follow-up questions

Add new optional item field 'Topic' to Content Designer UI ("t":"string")
When user asks unambiguous question, such as "What is Amazon Redshift", the context will be set (via session attribute) to the topic value of the matching document.
When user asks a follow up question, such as "What price is it?", the elasticsearch query will have an additional query field on matching the topic tag to the remembered context.
We need to correctly respond to a new unambiguous question that would force a change of topic, such as "What is Amazon Athena service". If the best answer comes from a new topic (in this example, Athena) we should reset the remembered topic context.

Lambda Arn in Designer UI

Add an optional field in the designer UI to specify the Question Handler lambda for a QnA document

Develop Branch: Content Designer UI - New Account sign up doesn't create functioning account.

Expected Behavior

Content Designer UI should not allow public users to sign up for an account. Access to Content designer must be restricted to content administrators only.

Suugest we allow new accounts to be created only by an existing Admin user.
I.e. remove the 'sign up' feature on the login page, but add a new 'Add/remove users' feature accessible only to existing authorized users.

Actual Behavior

Using the 'sign up' feature creates an account OK, but after logging in with the new account, Content designer doesn't work.

Steps to Reproduce the Problem

  1. Use the 'sign up' link in the login page to create a new account
  2. Login and try to use that new account

image

Specifications

  • Version:
  • Platform:

Microsoft Edge not signing request

Edge on windows 10 gives the following error after logging into Desginer UI:

request was: GET (apigateway endpoint)?from=0&filter=&perpage=15
response was: 403: MissingAuthenticationToken

The ApiGateway generated sdk is not sigv4 signing request to api.

Adding a new question to a QnA item can change response to an existing question

Expected Behavior

Adding new questions to an item should not adversely affect any answers that were previously correctly matched.

Actual Behavior

Adding a new question can actually weaken the score of an existing good match, sometimes causing another item to have a stronger score. See example below.

Steps to Reproduce the Problem

Import two items in attached file:
test.txt

Switch to 'test' tab, and test question "tell me about snorkeling" - observe that the expected item is 'test.001' has the higher score (though by a slim margin)

image

Now edit 'test.001' and add a second question: "what should I know about snorkeling"
Rerun the test with the same question.. Now the other answer has the higher score.

image

It is counter intuitive, and undesirable, that adding the second question would change the answer.

Analysis

The QnABot uses elastic search ‘full text search’ capability to create ‘relevance scores’ for each QnA item. Relevance scores are computed by weighting a number of different factors in an effort to get the best match – see What is relevance

There are three factors to the scoring a) term frequency, b) inverse document frequency, and 3) field length norm.. I believe it is this third factor that is biting us here.

This is because the effect of adding the second question to the first item was to make the whole ‘question’ field longer, which reduced the relevance score of the match of item 1 (die to the ‘field length norm’ behavior aforementioned). The score was reduced to the point where it was slightly lower than the first item.

NOTE: This situation really only arises when the question results in very similar scores on multiple items.. Ie when similarilties between the questions prevent a strong unique match.

Options

A shortterm workaround can be to duplicate the question in order to increase the 'terms frequency' part of the scoring equation. ie adding a 3rd question to 'test.001' duplicating the initial question "tell me about snorkelling" once again results in this item having the highest score. Despite the fact that the 3rd question also lengthened the field further, the fact that it was a strong match to the question had the net effect of strengthening the overall score.
However, while this technique might be useful for avoiding this specific problem, I do worry that it could introduce new problems by weakening the score of other question variants. Could become a game of 'whack-a-mole'!

Better if we can fix a fix in the code

  1. (preferred) find a way to construct the doctype mapping or the query to negate the problematic 'field length norm' factor when matching on the question lists. The total number of or length of the questions should ideally not affect the scoring of a match. See disable field-length norm in mapping
  • UPDATE: disabling 'field-length norm' did resolve this issue but created a new issue.. namely with it disabled, the question "tell me about snorkeling" returned identical relevance scores for the two test items "tell me about snorkeling' and 'tell me about snorkel prices' since after stemming (snorkeling=snorkel) the matches were identical. So back to the drawing board. Next up - see if mapping the question array as a nested datatype will help.
  1. alternatively, enhance the elastic search document structure to model each question independently, either by duplicating answers where there are multiple questions, or using a parent/child nested mapping to next questions as separate documents under the parent answer.

QnABot Lambda Extension Hooks

Purpose: Support (a) item navigation and (b) dynamic content in responses through QnABot extension hooks implemented as AWS lambda functions.
Implementation:

  1. Content Designer UI supports (optional) selection and assignment of existing Lambda function to any item. Function selection pick list filterable by function name substring or tag.
  2. When extension hook function is specified, QnABot handler will call the referenced function, passing as input:
    a. full session/intent context (utterance, session attributes, etc.)
    b. elasticsearch response containing all fields of all matched items
  3. The function will return a response object containing one of the following response types:
    a. reply: { <Lex/Alexa response object>}
    This gives complete control of bot response to the extension hook function, including voice, text, attachments, and session attributes.
    Use cases are many:
  • Dynamic responses of all sorts, for example: “When is the next race?”, “Will there be an event tomorrow?”, etc.
  • Navigate through ordered items, for example: “Where can I go now?”, “What’s the next topic?”, etc.
  • Dynamically look up answers from external sources
  • Log and respond to user feedback, eg: “That answer was no good”
  • Perform actions, eg: “Email me me a copy of that answer”
  • and much more – the possibilities are endless.
    b. redirect: { }
    This allows the extension hook function to redirect the QnABot handler to a different item, rather than providing a direct response to the current item.
    Use cases:
  • Auto navigation through guided content, for example: “Next item please” could redirect QnAbot to automatically query the next question in an ordered list of questions corresponding to a guided curriculum or tour.
  1. QnABot handler will
    a. passback a ‘reply’ response object from an extension hook to Lex/Alexa
    b. reenter handler with a new question contained in a ‘redirect’ response object
  2. QnABot handler should also preserve most recent previously asked question + matched item response in a session attribute, so that extension hook functions can access previous Q&A details for feedback logging and navigation purposes.
  3. Provide QnABot Lambda Extension hook ‘function blueprints’ to simplify and standardize:
    a. Logging of inputs and outputs
    b. Normalizing Lex and Alexa request objects
    c. Creating Lex and Alexa response objects

Export All Error

I tried to build a backup by Exporting all
What I got instead was an empty JSON file contests = {}

After attempting to use the export filter option all questions were erased from the GUI
and now I'm unable to import or create any questions.

Repeated display of image attachment

Observed that when lex web ui is configured with: reInitSessionAttributesOnRestart: false, any image attachment provided by an answer is repeatedly re-displayed for subsequent (different) answers that do not have images attached.

QnABot should explicitly clear the ‘appContext’ sessionAttribute if an answer has no attachments.

Microsoft Edge Compatability

QnABot currently does not work in Edge.
next steps)

  1. DesignerUI should detect browser and alert user to incompatibility
  2. This should be fixed

ElasticSearch 6.0

Upgrade ElasticSearch from 5.1 => 6.0

why?
best practice to use newest version if possible

env variable SKIP_LINK_PARSING has no effect

Expected Behavior

When environement variable SKIP_LINK_PARSING is set to TRUE on QNA-master-1-master-***-Handler-1- function, responses can include URLs

Actual Behavior

URL's are parsed and throw error as seen in logs below, instead of passing through, as expected from code on lambda/handler/lib/response.js line 38

Steps to Reproduce the Problem

  1. Set environment variable SKIP_LINK_PARSING = TRUE on the handler lambda.
  2. Create test question where answer includes:
    <a href="http://www.google.com">ask google!! </a>
  3. Trigger question.

Specifications

  • Version: master
  • Platform: Amazon Linux running on EC2

error log:

{ DependencyFailedException: Invalid Lambda Response: Received invalid response from Lambda: Can not construct instance of GenericAttachment$Builder, problem: Attachment Url is not in range <1,2048> at [Source: {"sessionAttributes":{"":"STRING_VALUE","appContext":"{"responseCard":{"version":1,"contentType":"application/vnd.amazonaws.card.generic","genericAttachments":[{"title":"Additional Information","attachmentLinkUrl":"http://www.google.com\">ask"}]}}"},"dialogAction":{"type":"Close","fulfillmentState":"Fulfilled","message":{"contentType":"PlainText","content":"

\n\n <a href=" google!! "},"responseCard":{"version":1,"contentType":"application/vnd.amazonaws.card.generic","genericAttachments":[{"title":"Additional Information","attachmentLinkUrl":"http://www.google.com">ask"}]}}}; line: 1, column: 985]

Implement Alexa AMAZON.StopIntent

Expected Behavior

The Alexa skill associated with QnABot should support the Cancel intent to close the skill.

Actual Behavior

Currently the QnABot skill remains open until it times out, even after a cancel request, which can cause issues if user attempts to invoke another skill.

Development branch - Alexa instructions - Interaction model

Refers to button below, but there is no button on this page. (Buttons seem to appear on next page)
Also, maybe use 'courier' / monospaced font instead on inverted color for text to be entered.

Suggest revisit of Alexa instructions to ensure instructions match developer console steps, page by page.

image

Alexa built in intents

QnABot should support the following built in alexa intents:

AMAZON.CancelIntent
AMAZON.HelpIntent
AMAZON.RepeatIntent
AMAZON.StopIntent

and may also:

AMAZON.NextIntent
AMAZON.NoIntent
AMAZON.YesIntent
AMAZON.PreviousIntent
AMAZON.MoreIntent

Bot does not operate with Facebook messenger

Expected Behavior

After publishing the bot as a Facebook messenger bot, I should receive replies for queries that result in matches.

Actual Behavior

No reply received in messenger. Looking at the CloudWatch logs for the handler reveals the following error:

2017-12-01T00:10:49.253Z	159d39bc-d62c-11e7-aca4-39e3bde501a4	TypeError: Cannot convert undefined or null to object
at Object.exports.success (/var/task/lib/response.js:197:19)
at es.ping.tap.then.then.msg (/var/task/index.js:42:39)
at tryCatcher (/var/task/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/var/task/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/var/task/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/var/task/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/var/task/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/var/task/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/var/task/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/var/task/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)

This error is because when using a Lex bot as a Facebook messenger bot, params.Session is not set (i.e. null) per http://docs.aws.amazon.com/lex/latest/dg/ex1-sch-appt-info-flow-details.html

Steps to Reproduce the Problem

  1. Deploy the bot as a Facebook messenger bot per http://docs.aws.amazon.com/lex/latest/dg/fb-bot-association.html
  2. Send a query that matches one of the questions.

Backup to S3

Support Backup (export) and restore (import) using S3 bucket to store backups.
Add ability to schedule backups.

mailto URIs not supported

Expected Behavior

[email link](mailto:[email protected])

should result in a mailto link

Actual Behavior

No link. Maybe #29 will help address this?

Steps to Reproduce the Problem

  1. Create a mailto link in markdown for a response
  2. Send a query that triggers that response

Update CF template to support Fault Tolerant Elastic Search domain (2xinstances)

Expected Behavior

Customer lost QnA Content after node failure on default single instance ES domain.

While the blog does state that the dafault ES domain should be increased to 2 instances for production deployments, we could increase awareness if QnABot CF template supported provisioning fault tolerant elastic search domain (2 x Instances) by default. User should still be allowed to provision single node non-fault-tolerant domain for non-production / non-critical deployments.

Question Handler Lambda

Provide a hook for a lambda function, specified in QnA document, to be called with response object and whose response is returned by handler lambda. This will help implement more active and dynamic behavior

Add support for video files in response

Would love to have video file support for Show devices as part of the response (just like we do images today). I'm thinking we could continue to use the image link as-is, but augment it so that if it sees a .mp4 extension it will render as video instead of picture on the Echo Show.

Link Parsing Behavior

Expected Behavior

www.google.com => says like that
link => behavior depends on format needed

Actual Behavior

does not parse urls with percent signs correctly.
does not recognize urls correctly

Specifications

  • Version: development
  • Platform:

solution

either
remove all link parsing from QnABot and let the client handle it
or
improve current behavior

my opinion: remove link parsing behavior, QnABot is responsible for content/format and the client is responsible for the representation of the content.

Add code of conduct

Should add a code of conduct document. I am not sure what would be the best choice

Support SSML

Please add the ability to support SSML in the responses.

Cfn-user lambda update handler

The update event should delete the old user and create a new.

This would be the easiest way without parsing differences and using different signup/edit flows. since the user is used just for logging into the designer ui, there should be no side effects from a delete/create cycle.

Guided Navigation

Purpose: Use extension hook mechanism to support guided navigation, forward and backward, through an ordered list of items. Example use cases:

  • Using QnABot for a guided virtual tour or facilities or artifacts, user can say “next room please”, or “next item please”, and the extension function will redirect QnABot to answer the next question in the ordered list. Or “go back”, “Previous item” item to navigate backward in the list.
  • Using QnABot for training curricula, user can say “next topic please”, and the extension function will redirect QnABot to answer the next question in the ordered list of topic questions.

Implementation:

  1. Automatically derive default question order from list of items sorted by ID.
  2. Provide easy mechanism for user to supply custom ordered list of questions
    a. One way this could be done it to leverage the existing content designer to specifiy the ordered list of questions in a well-known QnA item ID, eg: ‘RESERVED.QnA.Question.Order” that can be queried by the navigation function to retrieve the ordered list of questions.. Other methods are also possible, but may require extra implementation effort.

Not able to finish upload stage of setup, module not found.

I am attempting to setup the Q and A Bot on an EC2 t2.micro instance, with 2 GB of swap added on the EBS. I initially had some trouble when running "npm install", but after installing "chromedriver" beforehand, it completed successfully. However, when running "npm run upload", I get several errors for resources that seem to be missing or can't be found (I have omitted the working sections with [OMITTED WORKING SECTION]:

$ npm run upload

> [email protected] upload /home/ec2-user/aws-ai-qna-bot
> npm run build; make upload -j 4


> [email protected] build /home/ec2-user/aws-ai-qna-bot
> make website -B

mkdir -p build; mkdir -p build/lambda; mkdir -p build/templates;mkdir -p build/documents
node_modules/.bin/webpack --config ./website/admin/config/webpack.config.js
Hash: 3611870128cf05f4c24c
Version: webpack 2.7.0

[OMITTED WORKING SECTION]

ERROR in ./website/admin/entry.js
Module not found: Error: Can't resolve 'hint.css' in '/home/ec2-user/aws-ai-qna-bot/website/admin'
 @ ./website/admin/entry.js 16:9-28

ERROR in ./website/admin/entry.js
Module not found: Error: Can't resolve 'hint.css/hint.css' in '/home/ec2-user/aws-ai-qna-bot/website/admin'
 @ ./website/admin/entry.js 17:9-37

ERROR in ./website/admin/js/client.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js'
 @ ./website/admin/js/client.js 15:10-26

ERROR in ./website/admin/js/admin.js
Module not found: Error: Can't resolve 'idle-js' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js'
 @ ./website/admin/js/admin.js 23:9-27
 @ ./website/admin/entry.js

ERROR in ./website/admin/js/lib/api.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js/lib'
 @ ./website/admin/js/lib/api.js 15:10-26
 @ ./website/admin/js/lib/auth.js
 @ ./website/admin/js/lib/router.js
 @ ./website/admin/js/lib/index.js
 @ ./website/admin/js/admin.js
 @ ./website/admin/entry.js

ERROR in ./website/admin/js/lib/cognito.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js/lib'
 @ ./website/admin/js/lib/cognito.js 15:10-26
 @ ./website/admin/js/lib/auth.js
 @ ./website/admin/js/lib/router.js
 @ ./website/admin/js/lib/index.js
 @ ./website/admin/js/admin.js
 @ ./website/admin/entry.js

ERROR in ./website/admin/js/lib/store/actions.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js/lib/store'
 @ ./website/admin/js/lib/store/actions.js 16:10-26
 @ ./website/admin/js/lib/store/index.js
 @ ./website/admin/js/lib/index.js
 @ ./website/admin/js/admin.js
 @ ./website/admin/entry.js

ERROR in ./website/admin/js/lib/sdk/lib/apiGatewayCore/sigV4Client.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js/lib/sdk/lib/apiGatewayCore'
 @ ./website/admin/js/lib/sdk/lib/apiGatewayCore/sigV4Client.js 28:10-26
 @ ./website/admin/js/lib/sdk/lib/apiGatewayCore/index.js
 @ ./website/admin/js/lib/sdk/index.js
 @ ./website/admin/js/lib/api.js
 @ ./website/admin/js/lib/auth.js
 @ ./website/admin/js/lib/router.js
 @ ./website/admin/js/lib/index.js
 @ ./website/admin/js/admin.js
 @ ./website/admin/entry.js

ERROR in ./website/admin/js/lib/sdk/lib/apiGatewayCore/simpleHttpClient.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js/lib/sdk/lib/apiGatewayCore'
 @ ./website/admin/js/lib/sdk/lib/apiGatewayCore/simpleHttpClient.js 29:10-26
 @ ./website/admin/js/lib/sdk/lib/apiGatewayCore/index.js
 @ ./website/admin/js/lib/sdk/index.js
 @ ./website/admin/js/lib/api.js
 @ ./website/admin/js/lib/auth.js
 @ ./website/admin/js/lib/router.js
 @ ./website/admin/js/lib/index.js
 @ ./website/admin/js/admin.js
 @ ./website/admin/entry.js

 
[OMITTED WORKING SECTION]

 
 make: *** [website] Error 2

npm ERR! Linux 4.9.51-10.52.amzn1.x86_64
npm ERR! argv "/home/ec2-user/.nvm/versions/node/v4.4.5/bin/node" "/home/ec2-user/.nvm/versions/node/v4.4.5/bin/npm" "run" "build"
npm ERR! node v4.4.5
npm ERR! npm  v2.15.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `make website -B`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script 'make website -B'.
npm ERR! This is most likely a problem with the aws-ai-qna-bot package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     make website -B
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs aws-ai-qna-bot
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls aws-ai-qna-bot
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ec2-user/aws-ai-qna-bot/npm-debug.log
node_modules/.bin/webpack --config ./website/admin/config/webpack.config.js
Hash: 3611870128cf05f4c24c
Version: webpack 2.7.0

[OMITTED WORKING SECTION]

ERROR in ./website/admin/entry.js
Module not found: Error: Can't resolve 'hint.css' in '/home/ec2-user/aws-ai-qna-bot/website/admin'
 @ ./website/admin/entry.js 16:9-28

ERROR in ./website/admin/entry.js
Module not found: Error: Can't resolve 'hint.css/hint.css' in '/home/ec2-user/aws-ai-qna-bot/website/admin'
 @ ./website/admin/entry.js 17:9-37

ERROR in ./website/admin/js/client.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js'
 @ ./website/admin/js/client.js 15:10-26

ERROR in ./website/admin/js/admin.js
Module not found: Error: Can't resolve 'idle-js' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js'
 @ ./website/admin/js/admin.js 23:9-27
 @ ./website/admin/entry.js

ERROR in ./website/admin/js/lib/api.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js/lib'
 @ ./website/admin/js/lib/api.js 15:10-26
 @ ./website/admin/js/lib/auth.js
 @ ./website/admin/js/lib/router.js
 @ ./website/admin/js/lib/index.js
 @ ./website/admin/js/admin.js
 @ ./website/admin/entry.js

ERROR in ./website/admin/js/lib/cognito.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js/lib'
 @ ./website/admin/js/lib/cognito.js 15:10-26
 @ ./website/admin/js/lib/auth.js
 @ ./website/admin/js/lib/router.js
 @ ./website/admin/js/lib/index.js
 @ ./website/admin/js/admin.js
 @ ./website/admin/entry.js

ERROR in ./website/admin/js/lib/store/actions.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js/lib/store'
 @ ./website/admin/js/lib/store/actions.js 16:10-26
 @ ./website/admin/js/lib/store/index.js
 @ ./website/admin/js/lib/index.js
 @ ./website/admin/js/admin.js
 @ ./website/admin/entry.js

ERROR in ./website/admin/js/lib/sdk/lib/apiGatewayCore/sigV4Client.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js/lib/sdk/lib/apiGatewayCore'
 @ ./website/admin/js/lib/sdk/lib/apiGatewayCore/sigV4Client.js 28:10-26
 @ ./website/admin/js/lib/sdk/lib/apiGatewayCore/index.js
 @ ./website/admin/js/lib/sdk/index.js
 @ ./website/admin/js/lib/api.js
 @ ./website/admin/js/lib/auth.js
 @ ./website/admin/js/lib/router.js
 @ ./website/admin/js/lib/index.js
 @ ./website/admin/js/admin.js
 @ ./website/admin/entry.js

ERROR in ./website/admin/js/lib/sdk/lib/apiGatewayCore/simpleHttpClient.js
Module not found: Error: Can't resolve 'axios' in '/home/ec2-user/aws-ai-qna-bot/website/admin/js/lib/sdk/lib/apiGatewayCore'
 @ ./website/admin/js/lib/sdk/lib/apiGatewayCore/simpleHttpClient.js 29:10-26
 @ ./website/admin/js/lib/sdk/lib/apiGatewayCore/index.js
 @ ./website/admin/js/lib/sdk/index.js
 @ ./website/admin/js/lib/api.js
 @ ./website/admin/js/lib/auth.js
 @ ./website/admin/js/lib/router.js
 @ ./website/admin/js/lib/index.js
 @ ./website/admin/js/admin.js
 @ ./website/admin/entry.js

 
[OMITTED WORKING SECTION]

 
 make: *** [website] Error 2

npm ERR! Linux 4.9.51-10.52.amzn1.x86_64
npm ERR! argv "/home/ec2-user/.nvm/versions/node/v4.4.5/bin/node" "/home/ec2-user/.nvm/versions/node/v4.4.5/bin/npm" "run" "upload"
npm ERR! node v4.4.5
npm ERR! npm  v2.15.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] upload: `npm run build; make upload -j 4`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] upload script 'npm run build; make upload -j 4'.
npm ERR! This is most likely a problem with the aws-ai-qna-bot package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build; make upload -j 4
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs aws-ai-qna-bot
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls aws-ai-qna-bot
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ec2-user/aws-ai-qna-bot/npm-debug.log

Long questions (>140chars) break 'Rebuild Lex Bot' action

Any question longer that 140 characters prevents "Rebuild Lex Bot" action from having any effect, though UI nevertheless reports 'Success".

Two aspects to this issue:

  1. The Content Designer UI should detect and report bot rebuild failures.

  2. QnABot should enforce the Lex slot type length limit by disallowing entry of questions longer than 140 characters.

Steps to reproduce

  1. Add a long question to an item (> 140 characters), save item
  2. Rebuild bot from ContentDesigner console
  3. Observe Content designer reports 'Success'. Observe failures logged by Lambda 'Handler' function. Observe from Lex console that Lex bot is not actually rebuilt.

Import large files fails

Expected Behavior

Be able to import a large file

Actual Behavior

Currently the api fails with a "timeout or 10000s" error

Steps to Reproduce the Problem

  1. create a large import file( i used 888kb)
  2. try and upload through UI

Specifications

  • Version:dev

Bulk delete

add delete method to /questions to delete multiple questions in a single request, body of request would be a list of qids to delete.

Development branch: Alexa instructions - Skill information page errors

  1. Typo - should be 'Custom Interaction Model'
  2. Don't invert font colors for skill and invokation names (makes it look like these are buttons to be clicked (per usage of this style on previous page). Suggest using monospaced (courier) font for text to be entered.
  3. This page in the developer console has a 'Save' button, not a 'next' button

image

document the API

What I'd like to do is to use the API from other software (in this case https://github.com/MSFREACH/msf-reach ) for updating the list of questions and answers in JSON format, to match new events and reporting links in that software. I've been able to reverse engineer an understanding from the code and Chrome developer tools running on the chatbot designer, but API docs would be nice.

Log User Feedback

Purpose: Use extension hook mechanism to support ability for users to provide and log feedback on the quality of the answer received from previous question. Example use cases:

  • User can say “That did not answer my question”, or “That answer is wrong”, etc. (Utterances supported to be determined by content designer). Utterance matched to item created in content designer, which calls this Lambda extension function, which in turn logs the feedback in CloudWatch metrics and CloudWatch logs, making it easy for Content Administrator to assess user satisfaction with the answers, and therefore make informed adjustments to the content as needed.

Restrict Access

Create a way to restrict access to client ui.
first) get proper credentials, could use cognito hosted login
second) send credentials to lex web ui

Hosted User Management

Switch Designer UI login to use Cognito Hosted Login. this will allow users to use the full features of Congito include password forgot/reset.

Development branch: refreshing page should not cause log out

Expected Behavior

browser refresh should simply refresh, while keeping login context

Actual Behavior

browser refresh is logging out the session

image

Steps to Reproduce the Problem

  1. Login
  2. Hit browser refresh
  3. Observe how it makes you log in again

Handler Lambda incorrectly parses Alexa events

Error reported from customer:
"Alexa is logging this error TypeError: Cannot read property 'slots' of undefined at module.exports (/var/task/lib/parse.js:33:39)"

I think the problem is that the handler lambda does not parse the alexa LaunchRequest and SessionEndedRequest revents correctly.

first, replicate this problem.
second, added test cases for these events
third, added additional parsing logic to lambda function
last, verify fix

Twitter DM bot (?)

Short of AWS supporting Twitter DM APIs (now in beta, https://developer.twitter.com/en/docs/direct-messages/beta-features ) directly, perhaps support for Twitter DMs could be added to this project? I have done some work on that https://github.com/MSFREACH/msf-reach-chatbot/commit/b0d950f6a6d76ed970b9ec928797986be36f20de albeit using serverless rather than CloudFormation directly. Note this code isn't tested yet (so consider it beta) as I'm waiting on beta access to be approved for one of the Twitter accounts I run, however it's based on some code that does work.

Develop Branch: Admin user email is hardcoded in build/templates/test/master.json

Expected Behavior

Admin email address should not be hardcoded in build/templates/test/master.json
Suggest prompt for email address, and/or require email address as environment var or parameter.

Actual Behavior

Admin email address is hardcoded to:
"Email": "[email protected]",
When stack is created non interactively by a different user (using "npm run stack test/master up"), the Cognito QnABot signup email is not received.

Steps to Reproduce the Problem

  1. As a user that is not jcalho, create stack from cloned repo (develop branch) using 'npm run stack test/master up'
  2. try to log in to Content Designer UI

Specifications

  • Version:
  • Platform:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.