Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class Conversation {
//Intent facts_drinking_water
getFactForDrinkingWater() {
const waterFact = this.factsRepository.getRandomWaterFact();
let speechResponse;
if (this._isScreenAvailable()) {
speechResponse = this.factsRepository.getWaterFactRichResponse(waterFact);
} else {
speechResponse = this.factsRepository.getWaterFactAudioTextResponse(waterFact);
_isScreenAvailable() {
return this.dialogflowApp.hasSurfaceCapability(this.dialogflowApp.SurfaceCapabilities.SCREEN_OUTPUT);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.