@ibm-watson/assistant-intermediate
Advanced tools
Comparing version 2.0.2 to 2.1.0
{ | ||
"name": "@ibm-watson/assistant-intermediate", | ||
"description": "A simple Node.js based web app which shows how to use the Watson Assistant API to recognize user intents.", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"main": "server.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -255,6 +255,9 @@ // The ConversationPanel module is designed to handle | ||
function getResponse(responses, gen) { | ||
var title = ''; | ||
var title = '', description = ''; | ||
if (gen.hasOwnProperty('title')) { | ||
title = gen.title; | ||
} | ||
if (gen.hasOwnProperty('description')) { | ||
description = '<div>' + gen.description + '</div>'; | ||
} | ||
if (gen.response_type === 'image') { | ||
@@ -264,3 +267,3 @@ var img = '<div><img src="' + gen.source + '" width="300"></div>'; | ||
type: gen.response_type, | ||
innerhtml: title + img | ||
innerhtml: title + description + img | ||
}); | ||
@@ -287,3 +290,3 @@ } else if (gen.response_type === 'text') { | ||
type: gen.response_type, | ||
innerhtml: title + list | ||
innerhtml: title + description + list | ||
}); | ||
@@ -290,0 +293,0 @@ } else if (gen.response_type === 'search') { |
59145659
14112