Category : chatbot

I’m trying to storage the value of a JSON I receive from WatsonAssistantchat, here is the code: const element = document.querySelector(‘.chatElement’); window.watsonAssistantChatOptions = { integrationID: "xx", serviceInstanceID: "xx", onLoad: function (instance) { /* Handler functions able the */ function handler(event) { var response= event.data.output; ***json_response = JSON.stringify(response);***// JSON pack console.log(json_response); ***$.post("chat/home.html", json_response);*** } instance.on({ type: ..

Read more

I am not able to save token as a variable till the session end. this token will be used for further APIs. here is my code ‘use strict’; const axios = require(‘axios’); const functions = require(‘firebase-functions’); const {WebhookClient} = require(‘dialogflow-fulfillment’); const {Card, Suggestion} = require(‘dialogflow-fulfillment’); const {Payload} = require(‘dialogflow-fulfillment’); var token = ""; function login(agent) ..

Read more

I have the below webpage which embeds a chatbot window into it. https://lippert-web.firebaseapp.com/ I’m trying to change the bot name under a certain condition(for which I’m using an event of the bot framework). <!DOCTYPE html> <html> <head> <title>Web Channel</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" /> </head> <body> <script type="text/javascript"> var AvaamoChatBot = function (t) ..

Read more