Tag: watson

沃森发现服务 – 查询数据收集Node.js – 通道缺失

我对Watson发现服务的响应运行一个查询,我想在我的回应中包括这些段落(默认情况下,段落不包括,使用段落=真应该包括它,但我不明白。 var queryString = {'natural_language_query':searchString}; insert(cloudantDb,"9", "Call freie Textsuche ", queryString, "-", params); return new Promise ((resolve, reject) => { discovery.query({ environment_id: 'my env id', collection_id: 'my coll id', query: queryString, passages: true, count: 3 } 有人可以帮忙吗?

Python和Node.js不同的WPI v3结果

我正在使用Watson Personality Insights来获取文本的结果。 我从Node.js个性洞察演示获得的结果与使用Python SDK时得到的结果不同。 Python脚本: with open('input_file.txt', encoding='utf-8') as input_file: profile = personality_insights.profile( input_file.read(), content_type='text/plain;charset=utf-8', raw_scores=True, consumption_preferences=True) print(profile) Python输出:(仅添加适宜性分数以保持字符限制) { "trait_id": "big5_agreeableness", "name": "Agreeableness", "category": "personality", "percentile": 0.2641097108346445, "raw_score": 0.717124182764663, "children": [{ "trait_id": "facet_altruism", "name": "Altruism", "category": "personality", "percentile": 0.5930367181429955, "raw_score": 0.7133462509414262 }, { "trait_id": "facet_cooperation", "name": "Cooperation", "category": "personality", "percentile": 0.49207238025136585, "raw_score": 0.5781918028043768 […]

Watson视觉识别:如何查找分类内容的位置

在使用图像分类时,有没有办法让Watson Visual Recognition返回分类内容(汽车,树等)的位置? 这种能力存在于人脸识别服务中,对于一般的图像分类是非常有价值的。 当前的图像分类文档没有关于此主题的信息。

沃森的谈话总是从根开始

我正在使用node.js开发一个项目,并使用IBM的watson对话服务。 问题是当我发送一个正确的节点文本总是从根节点开始,并忽略正确的节点。 我使用文档中提供的代码: var watson = require('watson-developer-cloud'); var conversation = watson.conversation({ username: '{username}', password: '{password}', version: 'v1', version_date: '2016-09-20' }); conversation.message({ workspace_id: '25dfa8a0-0263-471b-8980-317e68c30488', input: {'text': 'Turn on the lights'}, context: context }, function(err, response) { if (err) console.log('error:', err); else console.log(JSON.stringify(response, null, 2)); }); 感谢您的帮助。

Slack-App-Watson:Watson从之前收到的消息中泄露意图

我正在写一个简单的Slack机器人,它可以查找给定位置的天气状况。 在沃森对话框中,沃森做得很好: 我:天气请 沃森(检测到#weather_asked):你想知道天气状况? 我:巴黎 Watson(检测到@location for intent #weather_asked):查找巴黎的天气状况… 但在我的node.js应用程序(连接到Slack),似乎沃森是“ 不记住,我提供了#weather_asked意图的位置 ”: 我:天气请 Watson(检测到#weather_asked):哪里? 我:巴黎 沃森(只检测@位置和意图#location_given):我很抱歉,我不明白。 (fallback anything_else) 这就像Watson,当通过我的NodeJS应用程序使用时,忘记了最初的意图#weather_asked,并重置为其主要的对话框。 我错过了什么? 我的Watson对话对话框configuration的屏幕截图: http : //imgur.com/a/vKo8P 编辑:我发现我的应用程序发送用户的input到Watson与一个新的对话ID。 如果它已经存在,我会尝试设置这个上下文。

为什么当我在节点js中创build一个post调用时,Watson-conversation对任何请求都返回相同的默认响应

我已经在对话服务中创build了一个示例训练数据,现在我正在尝试使用节点js创build一个聊天应用程序的后期调用。我创build了一个后期调用,它正在工作,但并不如预期的那样。给我任何呼叫的默认响应。 我开始知道我们需要将响应中获得的上下文值传递给下一个调用进行stream,但不知道该怎么做。 有人可以帮助我。 以下是我的代码 var express = require('express'); var conversationV1 = require('watson-developer-cloud/conversation/v1'); var bodyParser = require('body-parser'); var app = express(); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); var conversation = new conversationV1({ username: 'xxxxxx-1a06-4a90-xxxxx-xxxxxxxxxxx', password: 'xxxxxxxxxx', version_date: conversationV1.VERSION_DATE_2016_09_20 }); const updateMessage = (input, response) => { var responseText = null; if (!response.output) { response.output = {}; } […]

使用node.js在浏览器中启用麦克风,并捕获所说的信息

我一直在苦苦挣扎,一直在研究如何通过Node.js在浏览器中启用麦克风。 我已经看到了几个Javascript的例子,但是我不能从他们那里获得口头的内容,并把它存储在variables中。 如何使用Node.js启用麦克风? 我需要一个特定的npm包吗? 我目前正在使用IBM Watson Speech to Text API。 任何帮助表示赞赏! 提前致谢!

IBM Watson对话 – 无法将node.js连接到watson对话

我有一个IBM沃森对话应用程序的问题。 我有我的应用程序设置,并尝试将其连接到我的node.js应用程序。 我正在按照这个教程在这里: https : //github.com/watson-developer-cloud/node-sdk#conversation和我使用官方node.js api ibm提供。 不幸的是,它不起作用,我得到以下错误。 { Error: Not Authorized at Request._callback (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/lib/requestwrapper.js:87:15) at Request.self.callback (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/node_modules/request/request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/node_modules/request/request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage.<anonymous> (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/node_modules/request/request.js:1091:12) at IncomingMessage.g (events.js:291:16) at emitNone (events.js:91:20) code: 401, error: 'Not Authorized', description: '2017-06-01T08:57:57-04:00, Error ERCDPLTFRM-DNLKUPERR occurred when accessing […]

在watson会话中设置多个输出文本值

我在对话中有下面的节点。 我想提出的行动,并根据需要调用的API。 在成功的情况下,将显示output.text [0]和output.text [1] { "output": { "text": { "values": [ "I want to get this with success scenario", "I want to get this with error scenario" ], "selection_policy": "sequential" }, "action": "MyAction" } } 但是当我访问node.js中的这个会话节点时,它总是会给出第一个值,即'我想要成功获取这个场景',它永远不会给出像'我想得到这个错误场景'这样的输出。 如何解决这个问题?

在Node-RED中,如何上传到具有给定configuration的节点并稍后检索configuration?

我在Bluemix上使用Node-RED,我想让用户上传一个文档,这里是一个stream程的函数/模板中的相关代码片段 <form action="/upload" method="POST"> <h1>Upload PDF</h1> <input type="file" name="myFile" /> <input type="submit" /> </form> 当我运行它,我select了一个文件,然后按“提交”,但接着传来的消息Cannot POST /upload然后我去http://flows.nodered.org/node/node-red-contrib-http-multipart ,在这个例子中,它说 您可以使用以下configuration上传到节点: [{ "name": "myFile" }] 并使用节点的输出端口上的以下function访问文件 var fields = msg.req.fields; msg.fields = Object.keys(fields); var myFile = fields["myFile"][0]; msg.localFilename = myFile.path … 1)如何用configuration上传节点? 2)一旦我得到文件名,我如何检索它被发送到下一个服务? – 下一个服务是“转换” – 它需要文件名。