Skip to content

Commit

Permalink
Merge branch 'release/v1.9.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
patrinhani-ciandt committed Jan 24, 2018
2 parents eb1d952 + e77e2b4 commit d27ec15
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
21 changes: 12 additions & 9 deletions lib/nlpProviders/apiai/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,27 @@ module.exports = class extends BaseProcessor {
this.logger.debug(`[eventRequest][api-ai-botkit] -> created new session...`);
}

let requestOpts = {
let eventParam = {
name: eventData.name,
};

if (eventData.params) {
requestOpts.data = eventData.params;
}

let request = this.apiai.apiaiService.eventRequest(requestOpts,
{
let eventOpts = {
sessionId: this.apiai.sessionIds[eventData.channel],
originalRequest: {
source: "api-ai-abbott"
}
});
};

if (eventData.params) {
eventParam.data = eventData.params;
}

let request = this.apiai.apiaiService.eventRequest(eventParam, eventOpts);

request.on('response', (response) => {
this.logger.debug(`[eventRequest][apiaiService] -> receiving event request response for [${eventData.name}]...`);
if (eventData.params) {
response.eventParams = eventData.params;
}
resolve(response);
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@abbott-platform/abbott-framework",
"version": "1.9.2",
"version": "1.9.3",
"description": "Abbott Framework is a framework to bring productivity and abstractions to help you to build awesome chatbots.",
"main": "index.js",
"engines": {
Expand Down

0 comments on commit d27ec15

Please sign in to comment.