How to add suggestion chips in webhook with actions sdk

142 views Asked by At

I am building an action with Google Actions SDK, and for a scene I am using a webhook for onEnter. My question is how do I add suggestion chips using the webhook function.

This is my webhook

app.handle('startSceneOnEnter',conv=>{
    conv.add('its the on enter of the scene');   
});

I could not find how to add suggestion chips with conversation, any help would be great.

1

There are 1 answers

1
Nick Felker On BEST ANSWER

A suggestion chips can be added with the Suggestion class.

const {Suggestion} = require('@assistant/conversation');

app.handle('startSceneOnEnter', conv => {
    conv.add('its the on enter of the scene');
    conv.add(new Suggestion({ title: 'My Suggestion' }));
});