Вы не можете сделать это с текстовым ответом по умолчанию, на самом деле, вам нужно включить вызов webhook для этого намерения в разделе выполнения.Я покажу вам, как выглядит мое намерение.![enter image description here](https://i.stack.imgur.com/50bii.png)
Здесь у вас есть код веб-крючка:
'use strict';
const http = require('http');
const request2 = require('request');
exports.dialogflowFirebaseFulfillment = (req, res) => {
console.log('Dialogflow Request body: ' + JSON.stringify(req.body));
let action = req.body.queryResult['intent']['displayName'];
switch(action){
case "work":
// Get the city from a database
let city="Randomcity";
// Get the job from a database
let job="randomjob";
res.send(JSON.stringify({ 'fulfillmentText': "I can offer you this fantastic job in "+city+" city, doing "+job}));
break;
//Add more cases if you have more intents
}
}
И вот результат:
![enter image description here](https://i.stack.imgur.com/ZbJcU.png)