Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After triggering eventRequest successfully, i do get proper response but my bot(Google assistant) doesnt say anything #98

Open
mike1011 opened this issue Nov 22, 2017 · 0 comments

Comments

@mike1011
Copy link

i am adding a small logic of delay of 10 seconds and then triggering my event so that it can trigger my newly added intent to show updated message to the user.I am testing this will Google assistant and Nodejs SDK - api.

Below is my response after calling app.eventRequest(provided in the samples folder)


{ id: '9333180c-bb2e-4305-9a78-04ba89325936',
  timestamp: '2017-11-22T07:24:21.244Z',
  lang: 'en',
  result: 
   { source: 'agent',
     resolvedQuery: 'SHOW_RESULT',
     action: '',
     actionIncomplete: false,
     parameters: { name: [ 'Anand' ], state: [ 'Dispacthed' ] },
     contexts: 
      [ { name: 'location',
          parameters: 
           { 'name.original': '',
             date: '2017-11-23',
             'geo_city.original': 'Mountain View',
             'date.original': 'tomorrow',
             'state.original': '',
             name: [ 'Anand' ],
             geo_city: 'Mountain View',
             state: [ 'Dispacthed' ] },
          lifespan: 4 } ],
     metadata: 
      { intentId: '66b05cca-09de-4864-9685-37ea4ce6cb58',
        webhookUsed: 'false',
        webhookForSlotFillingUsed: 'false',
        intentName: 'result' },
     fulfillment: 
      { speech: 'Hi Anand, the status of the order is Dispacthed',
        messages: 
         [ { type: 'simple_response',
             platform: 'google',
             textToSpeech: 'Hi Anand, the status of the order is Dispacthed' },
           { type: 0,
             speech: 'Hi Anand, the status of the order is Dispacthed' } ] },
     score: 1 },
  status: { code: 200, errorType: 'success', webhookTimedOut: false },
  sessionId: '1511334800328' }

EventRequest code that triggers the above response.


var new_event = {

      "name":"SHOW_RESULT",
      "data":{
         "name":"Anand",
         "state":"Dispacthed"
      }

};

var options2 = {
    sessionId: sessionId
};

var request = api.eventRequest(new_event, options2);

request.on('response', function(response) {
    console.log(util.inspect(response, false, null));
});

request.on('error', function(error) {
    console.log(error);
});

request.end();

i can see the speech added but why this speech is not spoken or displayed on the Google Assistant.Everything is being displayed and spoken but not this eventRequest response.

Any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant