Commit f01e8385 authored by Marco Boers's avatar Marco Boers

Parameter action

parent 65d822de
......@@ -7,7 +7,7 @@ const net = require('net');
const dialogflow = require('dialogflow');
const WebSocket = require('ws');
const wss = new WebSocket.Server({port: 8081});
const wss = new WebSocket.Server({port: 8088});
let ws = null;
// You can find your project ID in your Dialogflow agent settings
const projectId = 'notia-667c2'; //https://dialogflow.com/docs/agents#settings
......@@ -65,7 +65,8 @@ function createDetectStream() {
console.log(`Detected intent:`);
console.log(data.queryResult);
socketData = {
action: data.queryResult.action,
action: data.queryResult.parameters.fields.action,
intent: data.queryResult.action,
queryText: data.queryResult.queryText
};
const stringifiedData = JSON.stringify(socketData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment