Code Monkey home page Code Monkey logo

ibm / watson-banking-chatbot Goto Github PK

View Code? Open in Web Editor NEW
261.0 42.0 373.0 22.86 MB

A chatbot for banking that uses the Watson Assistant, Discovery, Natural Language Understanding and Tone Analyzer services.

Home Page: https://developer.ibm.com/patterns/create-cognitive-banking-chatbot/

License: Apache License 2.0

JavaScript 85.73% CSS 8.25% HTML 5.91% Dockerfile 0.11%
watson-conversation watson-tone-analyzer watson-natural-language watson-discovery chatbot ibmcode ibm-developer-technology-cognitive ibm-cloud watson-assistant

watson-banking-chatbot's Introduction

WARNING: This repository is no longer maintained โš ๏ธ

This repository will not be updated. The repository will be kept available in read-only mode.

Create a banking chatbot with FAQ discovery, anger detection and natural language understanding

In this code pattern, we will create a chatbot using Node.js and Watson Assistant. The Assistant flow will detect customer emotions and be enhanced by using Natural Language Understanding to identify location entities. For FAQs, a call to the Discovery service will use passage retrieval to pull answers from a collection of documents.

When the reader has completed this pattern, they will understand how to:

  • Create a chatbot that converses via a web UI using Watson Assistant and Node.js
  • Use Watson Discovery with passage retrieval to find answers in FAQ documents
  • Identify location entities with Watson Natural Language Understanding

NOTE: This code pattern has been updated to include instructions for accessing Watson services running on IBM Cloud Pak for Data. These updates can be found in the specific instructions for deploying your app locally, or deploying your app to OpenShift on IBM Cloud. The main change required is that your application will need additional credentials to access the IBM Cloud Pak for Data cluster that is hosting the Watson services.

Click here for more information about IBM Cloud Pak for Data.

architecture

Flow

  1. The FAQ documents are added to the Discovery collection.
  2. The user interacts with a chatbot via the app UI.
  3. User input is processed with Natural Language Understanding (NLU). The context is enriched with NLU-detected entities and keywords (e.g., a location).
  4. The input and enriched context is sent to Assistant. Assistant recognizes intent, entities and dialog paths. It responds with a reply and/or action.
  5. Optionally, a requested action is performed by the app. This may include one of the following:
    • Lookup additional information from bank services to append to the reply
    • Use Discovery to reply with an answer from the FAQ documents

Included components

  • IBM Watson Assistant: Build, test and deploy a bot or virtual agent across mobile devices, messaging platforms, or even on a physical robot.
  • IBM Watson Discovery: A cognitive search and content analytics engine for applications to identify patterns, trends, and actionable insights.
  • IBM Watson Natural Language Understanding: Analyze text to extract meta-data from content such as concepts, entities, keywords, categories, sentiment, emotion, relations, semantic roles, using natural language understanding.

Featured technologies

  • Node.js: An asynchronous event driven JavaScript runtime, designed to build scalable applications.

Steps

  1. Clone the repo
  2. Create Watson services
  3. Customize the Watson Assistant skill
  4. Load Discovery documents
  5. Deploy the application
  6. Use the web app

1. Clone the repo

Clone the watson-banking-chatbot locally. In a terminal, run:

git clone https://github.com/IBM/watson-banking-chatbot

2. Create Watson services

Provision the following services:

  • Watson Assistant
  • Watson Discovery
  • Watson Natural Language Understanding

NOTE: If you will be using the Deploy to Cloud Foundry on IBM Cloud deployment option, then you can skip these next steps and jump right to the Deploy the Application section. That deployment option automatically creates the services and links them to your application.

The instructions will depend on whether you are provisioning services using IBM Cloud Pak for Data or on IBM Cloud.

Click to expand one:

IBM Cloud Pak for Data

Use the following instructions for each of the three services.

Install and provision service instances

The services are not available by default. An administrator must install them on the IBM Cloud Pak for Data platform, and you must be given access to the service. To determine whether the service is installed, Click the Services icon (services_icon) and check whether the service is enabled.

IBM Cloud

Create the service instances
  • If you do not have an IBM Cloud account, register for a free trial account here.
  • Click here to create a Watson Assistant instance.
  • Click here to create a Discovery instance.
  • Click here to create a Natural Language Understanding instance.

3. Customize the Watson Assistant skill

The following instructions will depend on if you are provisioning Assistant from IBM Cloud or from an IBM Cloud Pak for Data cluster. Choose one:

Provision on IBM Cloud Pak for Data

  • Find the Assistant service in your list of Provisioned Instances in your IBM Cloud Pak for Data Dashboard.
  • Click on View Details from the options menu associated with your Assistant service.
  • Click on Open Watson Assistant.
  • Go to the Skills tab.
  • Click Create skill
  • Select the Dialog skill option and then click Next.
  • Click the Import skill tab.
  • Click Choose JSON file, go to your cloned repo dir, and Open the JSON file in data/conversation/workspaces/banking_US.json (or use the old full version in full_banking.json). banking_IN.json is used for content for banking in India and banking_US.json is used for content for banking in United States.
  • Select Everything and click Import.

Provision on IBM Cloud

  • Find the Assistant service in your IBM Cloud Dashboard.
  • Click on the service and then click on Launch tool.
  • Go to the Skills tab.
  • Click Create skill.
  • Select the Dialog skill option and then click Next.
  • Click the Import skill tab.
  • Click Choose JSON file, go to your cloned repo dir, and Open the JSON file in data/conversation/workspaces/banking_US.json (or use the old full version in full_banking.json). banking_IN.json is used for content for banking in India and banking_US.json is used for content for banking in United States.
  • Select Everything and click Import.

To find the Skill ID for Watson Assistant:

  • Go back to the Skills tab.

  • Click on the three dots in the upper right-hand corner of a card and select View API Details.

  • Copy the Skill ID GUID. Use this value when setting up your run-time environment.

  • By default the application will import and use the skill named watson-banking-chatbot, but you can configure it to use another skill by setting the run-time environment variable SKILL_ID.

    view_api_details

To view the Assistant dialog, click on the skill and choose the Dialog tab. Here's a snippet of the dialog:

dialog

4. Load Discovery documents

By default, the application will create a collection named watson-banking-chatbot, but you can configure it to use another collection by setting the run-time environment variables DISCOVERY_COLLECTION_ID and DISCOVERY_ENVIRONMENT_ID.

The following instructions will depend on if you are provisioning Discovery from IBM Cloud or from an IBM Cloud Pak for Data cluster. Choose one:

Provision on IBM Cloud Pak for Data

  • Find the Discovery service in your list of Provisioned Instances in your IBM Cloud Pak for Data Dashboard.
  • Click on View Details from the options menu associated with your Discovery service.
  • Click on Open Watson Discovery.
  • Click on an existing Discovery Project, or create a new one.
  • From your Project panel, click the Collections tab.
  • Click on New Collection +.
  • Select the Upload data option and click Next.
  • Provide a collection name.
  • Select English language.
  • Click Finish to create the collection.
  • Use Drag and drop your documents here or select documents to seed the content with the five documents in data/discovery/docs of your cloned repo.
  • Click on the Integrate and deploy option from the left-side menu of the Discovery panel. Then select the View API Details tab to view the Project Id. Use this as the Collection ID value when setting up your run-time environment.

NOTE: The Environment Id for Cloud Pak for Data collections is always set to default.

disco_cpd_projectid

Provision on IBM Cloud

  • Find the Discovery service in your IBM Cloud Dashboard.

  • Click on the service and then click on Launch tool.

  • Create a new data collection by hitting the Upload your own data button.

    new_collection

    • Provide a collection name
    • Select English language
    • Click Create
  • Use Drag and drop your documents here or select documents to seed the content with the five documents in data/discovery/docs of your cloned repo.

  • Click on the upper-right api icon and save the Environment ID and Collection ID as they will be required when setting up your run-time environment.

    disco_guids

5. Deploy the application

Click on one of the options below for instructions on deploying the Node.js server.

local openshift public

6. Use the web app

The web app presents a customer service chatbot. Interact with the chatbot by pressing the buttons when prompted or use the Type something box. The chatbot is powered by Watson Assistant with additional information coming from Discovery and Natural Language Understanding.

demo

Troubleshooting

  • Error: Unable to list workspaces for Watson Assistant: Forbidden: Access is denied due to invalid credentials.

    This error occurs with Deploy to IBM Cloud button. Configure a runtime environment variable for ASSISTANT_APIKEY to allow automatic configuration of the default skill or configure SKILL_ID to use another skill.

  • Fail: An operation for service instance wbc-discovery-service is in progress.

    This error occurs when starting the app before the service is ready. It is currently common behavior with the Deploy to IBM Cloud button. In this case, click the Run button to restart the application. It will succeed when the service is ready.

  • Error: Environment {GUID} is still not active, retry once status is active

    This is common during the first run. The app tries to start before the Discovery environment is fully created. Wait a few minutes and click the Run button to restart the application.

  • Error: Only one free environment is allowed per organization

    To work with a free trial, a small free Discovery environment is created. If you already have a Discovery environment, this will fail. If you are not using Discovery, check for an old service thay you may want to delete. Otherwise use the .env DISCOVERY_ENVIRONMENT_ID to tell the app which environment you want it to use. A collection will be created in this environment using the default configuration.

Links

License

This code pattern is licensed under the Apache License, Version 2. Separate third-party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 and the Apache License, Version 2.

Apache License FAQ

watson-banking-chatbot's People

Contributors

dependabot[bot] avatar dolph avatar iamdanlih avatar ikr0m avatar imgbot[bot] avatar imgbotapp avatar jacob7182 avatar justinmccoy avatar kant avatar ljbennett62 avatar markstur avatar rhagarty avatar riyamroy04 avatar sanjeevghimire avatar sauravraiguru avatar scottdangelo avatar stevemar avatar stevemart avatar tomcli avatar wwalisa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

watson-banking-chatbot's Issues

Issue with Credentials file when downloading project

For a small error, on step 5 of the knowledge guide, it states "Rename the .env.example file to be .env and update it with valid credentials."
When downloading the zip, there is a file called env.example (missing the . at the beginning)

More important error here:
The following credentials are asked when replacing the environment variables:
However, these credentials don't exist

# Replace the credentials here with your own.
# Rename this file to .env before starting the app.

# Watson conversation
CONVERSATION_USERNAME=<add_conversation_username>
CONVERSATION_PASSWORD=<add_conversation_password>
WORKSPACE_ID=<add_conversation_workspace>

# Watson Discovery
DISCOVERY_USERNAME=<add_discovery_username>
DISCOVERY_PASSWORD=<add_discovery_password>
DISCOVERY_ENVIRONMENT_ID=<add_discovery_environment>
DISCOVERY_COLLECTION_ID=<add_discovery_collection>

# Watson Natural Language Understanding
NATURAL_LANGUAGE_UNDERSTANDING_USERNAME=<add_nlu_username>
NATURAL_LANGUAGE_UNDERSTANDING_PASSWORD=<add_nlu_password>

# Watson Tone Analyzer
TONE_ANALYZER_USERNAME=<add_tone_analyzer_username>
TONE_ANALYZER_PASSWORD=<add_tone_analyzer_password>

# Run locally on a non-default port (default is 3000)
# PORT=3000

deploy fails if you already have a Discovery in your org

The auto-deploy is trying to create a free Discovery environment (which is important if you only have a free trial), but you only get one of those in an org.

If it fails, see the troubleshooting tips in the README. You could set DISCOVERY_ENVIRONMENT_ID in your .env or your bluemix env to just use an existing one or one you created.

But this is kind of a hassle. Should we try creating pay-as-you-go instance or somehow make this easier to work-around?

How to integrate this app with the speech to text and Text to speech services??

Here is what I added in app.js file:

// ADD SPEECH TO TEXT INTEGRATION CODE HERE

var sttEndpoint = vcap.speech_to_text[0].credentials.url;
var stt_credentials = Object.assign({
username: process.env.SPEECH_TO_TEXT_USERNAME || 'aaa',
password: process.env.SPEECH_TO_TEXT_PASSWORD || 'bbb',
url: process.env.SPEECH_TO_TEXT_URL ||
'https://stream.watsonplatform.net/speech-to-text/api',
version: 'v1',},vcap.speech_to_text[0].credentials);

// ADD TEXT TO SPEECH INTEGRATION CODE HERE

var ttsEndpoint = vcap.text_to_speech[0].credentials.url;
var tts_credentials = Object.assign({
username: process.env.TEXT_TO_SPEECH_USERNAME || 'xxx',
password: process.env.TEXT_TO_SPEECH_PASSWORD || 'yyy',
url: process.env.TEXT_TO_SPEECH_URL ||
'https://stream.watsonplatform.net/text-to-speech/api',
version: 'v1',
},vcap.text_to_speech[0].credentials);
// Endpoint to be call from the client side
app.post('/api/message', function(req, res) {
	var workspace = process.env.WORKSPACE_ID || '<workspace-id>';
	if (!workspace || workspace === '<workspace-id>') {
		return res.json({
			'output': {
				'text': 'The app has not been configured with a <b>WORKSPACE_ID</b> environment variable. Please refer to the ' + '<a href="https://github.com/watson-developer-cloud/conversation-simple">README</a> documentation on how to set this variable. <br>' + 'Once a workspace has been defined the intents may be imported from ' + '<a href="https://github.com/watson-developer-cloud/conversation-simple/blob/master/training/car_workspace.json">here</a> in order to get a working application.'
			}
		});
	}

//ADD TEXT TO SPEECH GET TOKEN ENDPOINT HERE
app.get('/api/text-to-speech/token', function(req, res, next){
watson.authorization(tts_credentials).getToken({ url:
tts_credentials.url }, function(error, token){
if (error) {
if (error.code !== 401)
return next(error);
} else {
res.send(token);
}
});
});

//ADD SPEECH TO TEXT GET TOKEN ENDPOINT HERE

app.get('/api/speech-to-text/token', function(req, res, next){
watson.authorization(stt_credentials).getToken({ url:
stt_credentials.url }, function(error, token){
if (error) {
if (error.code !== 401)
return next(error);
} else {
res.send(token);
}
});
});`

Error: Missing required parameters: apikey

I followed every step described in the README file to deploy it locally, env file is the only one that I've modified in order to put the key values of the data requested:

  • ASSISTANT_AUTH_TYPE

  • ASSISTANT_APIKEY

  • ASSISTANT_URL

  • SKILL_ID

  • NATURAL_LANGUAGE_UNDERSTANDING_AUTH_TYPE

  • NATURAL_LANGUAGE_UNDERSTANDING_APIKEY

  • NATURAL_LANGUAGE_UNDERSTANDING_URL

  • DISCOVERY_AUTH_TYPE

  • DISCOVERY_APIKEY

  • DISCOVERY_URL

  • DISCOVERY_ENVIRONMENT_ID

  • DISCOVERY_COLLECTION_ID

Then I run npm install and npm start:

Error: Missing required parameters: apikey
    at Object.getMissingParams (/Users/myuser/behind/watson-banking-chatbot/node_modules/ibm-cloud-sdk-core/lib/helper.js:102:11)
    at Object.validateInput (/Users/myuser/behind/watson-banking-chatbot/node_modules/ibm-cloud-sdk-core/auth/utils/helpers.js:61:39)
    at new IamAuthenticator (/Users/myuser/behind/watson-banking-chatbot/node_modules/ibm-cloud-sdk-core/auth/authenticators/iam-authenticator.js:47:17)
    at getAuthenticatorFromEnvironment (/Users/myuser/behind/watson-banking-chatbot/node_modules/ibm-cloud-sdk-core/auth/utils/get-authenticator-from-environment.js:63:29)
    at Object.<anonymous> (/Users/myuser/behind/watson-banking-chatbot/app.js:50:10)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19)

I even tried to do it again (deleting repo), but the same result is printed.

Conversation is responding instead of Discovery

I am finding it hard for the Chatbot to answer any Discovery Questions from the docs. Ant tips?

See examples below - it is using the Conversation answers based in Confidence level even though I am typing in questions straight from the docs

It is picking up the Conversation intent and responding

Demo Github Issues.docx

Error invalid credentials

It appears that this tutorial is suffering from the same incorrect api key credentials to the Watson Assistant as several of the other tutorials on the site. The same error message appears in the logs as in this linked issue, and the same fix needs to be applied after the app is built by the pipeline.

IBM/watson-google-assistant#36

create a demo video

the video should show:

  • how to deploy the app with the deploy to bluemix button
  • basic interaction with the app

Upgrade conversation workspace

Watson says I should "Upgrade to the latest version to enable new features" with the current workspace loaded from JSON. I'm assuming it should be upgraded, tested, exported so that we can get rid of that message and also validate with latest version.

travis fail on repo name

Skipping a deployment with the script provider because this repo's name does not match one specified in .travis.yml's deploy.on.repo: IBM/conversational-banking

Starter Kit: Create ChatBot project fails

Attempted to create a Wealth Management Chatbot project from the FinTech Starter kit. The creation of the project failed with no error information. See attached screen capture.

chatbotprojectfailed

RnR

Retrieve and Rank , docs do not upload ,except the docx ones. Any ideas ? I have the conversion service too

deprecation warnings

6/1/2018 5:08:46 PM ERR undefined WARNING: This method of instantiating the Watson services has been deprecated beginning with Version 3.0.0 of the Node SDK. Please refer to the Node SDK documentation for information on how to instantiate Watson services. This form of service instantiaion will be removed in a future release of the SDK.
6/1/2018 5:08:46 PM ERR undefined WARNING: getEnvironments() was renamed to listEnvironments(). Support for getEnvironments() will be removed in the next major release
6/1/2018 5:08:46 PM ERR undefined WARNING: This method of instantiating the Watson services has been deprecated beginning with Version 3.0.0 of the Node SDK. Please refer to the Node SDK documentation for information on how to instantiate Watson services. This form of service instantiaion will be removed in a future release of the SDK.
6/1/2018 5:08:46 PM ERR undefined WARNING: This method of instantiating the Watson services has been deprecated beginning with Version 3.0.0 of the Node SDK. Please refer to the Node SDK documentation for information on how to instantiate Watson services. This form of service instantiaion will be removed in a future release of the SDK.

Readme needs updating ...

In step 2 (Create Config Map), it says...
The other settings for Assistant and Discovery were collected during the earlier setup steps (DISCOVERY_COLLECTION_ID, DISCOVERY_ENVIRONMENT_ID and SKILL_ID).
There is no setup step in either this document or in the parent tutorial document (https://github.com/IBM/watson-banking-chatbot/blob/master/README.md). Please add a link to the "earlier setup step".

In step 2 config map screen shot, it shows key and value for TONE_ANALYZER_APIKEY and TONE_ANALYZER_URL but the chatbot tutorial step 2 (https://github.com/IBM/watson-banking-chatbot/blob/master/README.md) doesn't indicate adding TONE_ANALYZER service ... nor does the table above this screen shot.

Discovery parsing is broken (and more...)

Mark and Saurav,

I saw you names on the code pattern for "Create a cognitive banking chatbot".

I am trying to install this and seem to have most of it working. But I cannot seem to get the responses correct for Watson Discovery or Natural Language Understanding. Has something changed?

I am running this local so I can see the log messages go by. Here is what I get when I ask the following in chat:
"can use atm in any city" - response: "Sorry, I cannot understand that. Please rephrase the question." It does not look like it is getting parsed and run in Discovery.
"can I use an atm in any city" - response: "Sorry I currently do not have an appropriate response for your query. Our customer care executive will call you in 24 hours." But it does look like it is getting into Discovery.
"do you have branch in mumbai" - response: "Sorry, I cannot understand that. Please rephrase the question." Looks like it recognizes this as a location, but it seems to go back to Assistant.

I installed this with the "Run locally" option. Initially when I just did the "Deploy to IBM Cloud" option, it seems to do something strange with the Discovery and NLU service. So I dropped both of those services and recreated them.

It seems like Coversation Assistant and Tone Analyzer are working fine for the pattern.

Is there any way to help me diagnose the problem? I am willing to set up a Web Session at any time to run through this with you.

Thanks for any help.
Brendan

CF deploy button is broken

The stored assistant dialog JSON was updated. It was tweaked to work in the UI, but is now the API upload needs fixing.

Also, quick test got this "Service offering 'assistant' not found." -- so it looks like the manifest.yml is wrong now too???

branch info lookup is broken

"do you have branch in mumbai" - response: "Sorry, I cannot understand that. Please rephrase the question." Looks like it recognizes this as a location, but it seems to go back to Assistant.

This probably broke when the dialog was pruned to work with a light plan.

Workspace exceeds lite plan limit of 100 dialog nodes

This pattern can not be executed with a lite plan Watson Assistant instance due to the lite plan limit of 100 dialog nodes. Is it possible to reduce the number of dialog nodes in banking.json to enable folks with lite accounts to benefit from this code pattern?

How can I implement speech to text ?

I am using chrome webkit for speech recognition since it works much better for my purposes. But how can I implement this tool in the right way ? My text does not get analysed by watson by doing it like this...

 if(finalTranscripts.includes('?')){
           API.sendRequest(finalTranscripts, this);


          }

Can someone help me out ?

README needs...

Better description of how the stuff is auto-uploaded, then add the custom upload instructions as optional at the end.

Better description of what you can ask the bot. The Disco retrieval is tricky.

Deploy to cloud button fails. Can't find banking.json to upload

2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR fs.js:114
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR throw err;
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR ^
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR Error: ENOENT: no such file or directory, open 'data/conversation/workspaces/banking.json'
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR at Object.openSync (fs.js:443:3)
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR at Object.readFileSync (fs.js:343:35)
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR at Object. (/home/vcap/app/app.js:93:37)
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR at Module._compile (internal/modules/cjs/loader.js:776:30)
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR at Module.load (internal/modules/cjs/loader.js:653:32)
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR at Function.Module._load (internal/modules/cjs/loader.js:585:3)
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR at Module.require (internal/modules/cjs/loader.js:690:17)
2019-08-23T14:00:56.16-0700 [APP/PROC/WEB/0]ERR at require (internal/modules/cjs/helpers.js:25:18)
2019-08-23T14:00:56.17-0700 [APP/PROC/WEB/0]ERR npm ERR! code ELIFECYCLE
2019-08-23T14:00:56.17-0700 [APP/PROC/WEB/0]ERR npm ERR! errno 1
2019-08-23T14:00:56.17-0700 [APP/PROC/WEB/0]ERR npm ERR! [email protected] start: node server.js
2019-08-23T14:00:56.17-0700 [APP/PROC/WEB/0]ERR npm ERR! Exit status 1
2019-08-23T14:00:56.17-0700 [APP/PROC/WEB/0]ERR npm ERR!
2019-08-23T14:00:56.17-0700 [APP/PROC/WEB/0]ERR npm ERR! Failed at the [email protected] start script.
2019-08-23T14:00:56.17-0700 [APP/PROC/WEB/0]ERR npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-08-23T14:00:56.20-0700 [APP/PROC/WEB/0]ERR npm ERR! A complete log of this run can be found in:
2019-08-23T14:00:56.20-0700 [APP/PROC/WEB/0]ERR npm ERR! /home/vcap/app/.npm/_logs/2019-08-23T21_00_56_175Z-debug.log

Discovery parsing is broken

Mark and Saurav,

I saw you names on the code pattern for "Create a cognitive banking chatbot".

I am trying to install this and seem to have most of it working. But I cannot seem to get the responses correct for Watson Discovery or Natural Language Understanding. Has something changed?

I am running this local so I can see the log messages go by. Here is what I get when I ask the following in chat:
"can use atm in any city" - response: "Sorry, I cannot understand that. Please rephrase the question." It does not look like it is getting parsed and run in Discovery.
"can I use an atm in any city" - response: "Sorry I currently do not have an appropriate response for your query. Our customer care executive will call you in 24 hours." But it does look like it is getting into Discovery.
"do you have branch in mumbai" - response: "Sorry, I cannot understand that. Please rephrase the question." Looks like it recognizes this as a location, but it seems to go back to Assistant.

I installed this with the "Run locally" option. Initially when I just did the "Deploy to IBM Cloud" option, it seems to do something strange with the Discovery and NLU service. So I dropped both of those services and recreated them.

It seems like Coversation Assistant and Tone Analyzer are working fine for the pattern.

Is there any way to help me diagnose the problem? I am willing to set up a Web Session at any time to run through this with you.

Thanks for any help.
Brendan

Errors in deploying the faq bot locally

I am trying to deploy the FAQ bot but I am facing a few challenges. I have a few questions too

  1. Importing a skill with the banking.json file is failing after multiple retries with an error "We could not import your Skill. Unable to fetch access token for account: 382fd61942c14fa287c5f95e3c1b5274"
  2. Can this FAQ bot be tweaked for a different domain by changing the documents uploaded for the discovery service (and not having any intents, entities and dialogs)?

Thanks!

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.