在使用 Node.js 模块apiai
(\n
request.on('response', function (response) {
var textResponse = response.result.fulfillment.speech;
// ...
})
在使用 Node.js 模块apiai
(\n
request.on('response', function (response) {
var textResponse = response.result.fulfillment.speech;
// ...
})
使用断线<\br>
代替\n
例如:
<div>This is with break line<br>this is after break line</div>
<div>This is with break line \n this is after new line</div>
I was using the agent.add() method in the dialogflow inline editor and wanted a newline between some text.
so I used " \n"
( Two spaces followed by \n
), and it gave the output as required on my dialogflow messenger integration.
eg.
agent.add(firstName + " " + lastName + " \n" + phoneno);
When entering a response, press Shift + Enter to input a newline or just Enter to input another text response.
The following limitations apply:
Max of 300 text entries per text response