Giter Site home page Giter Site logo

Question - How are watson-conversation-setup.js and watson-discovery-setup.js used to setup Watson services in IBM cloud? about watson-banking-chatbot HOT 2 CLOSED

ibm avatar ibm commented on July 28, 2024
Question - How are watson-conversation-setup.js and watson-discovery-setup.js used to setup Watson services in IBM cloud?

from watson-banking-chatbot.

Comments (2)

stevemar avatar stevemar commented on July 28, 2024

Hi @lee-zhg we use watson-conversation-setup.js when the app is initialized for the first time. See

const WatsonConversationSetup = require('./lib/watson-conversation-setup');

and

const conversationSetup = new WatsonConversationSetup(conversation);
const workspaceJson = JSON.parse(fs.readFileSync('data/conversation/workspaces/banking.json'));
const conversationSetupParams = { default_name: DEFAULT_NAME, workspace_json: workspaceJson };
conversationSetup.setupConversationWorkspace(conversationSetupParams, (err, data) => {
if (err) {
handleSetupError(err);
} else {
console.log('Watson Assistant is ready!');
workspaceID = data;
}
});

The intention, for watson-conversation-setup.js, is to upload the conversation dialog (https://github.com/IBM/watson-banking-chatbot/blob/master/data/conversation/workspaces/banking.json) using the Node SDK.

We mainly do this so the user doesn't have to: 1) clone the repo, 2) go through IBM Cloud find their service, 3) launch Watson Assistant tooling, 4) upload the workspace, 5) reload the app. They should be able to just run it, and we do some smart setup in the background.

It's particularly useful when showing demos of this chatbot.

from watson-banking-chatbot.

stevemar avatar stevemar commented on July 28, 2024

Oh, and watson-discovery-setup.js accomplishes the same thing (except we push documents to discovery instead of a conversation dialog), and is used around the same time.

The conversation logic works much more cleanly since it's only uploading a single JSON file. For discovery, we've had some issues since discovery supports configuration and data files too.

from watson-banking-chatbot.

Related Issues (20)

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.