Skip to content

Instantly share code, notes, and snippets.

request({
method: "POST",
uri: `${LINE_MESSAGING_API}/reply`,
headers: LINE_HEADER,
body: JSON.stringify({
replyToken: event.replyToken,
messages: replyMessage
})
})
request({
method: "POST",
uri: `${LINE_MESSAGING_API}/reply`,
headers: LINE_HEADER,
body: JSON.stringify({
replyToken: event.replyToken,
messages: replyMessage
})
})
const intentResponse = await detectIntent(userId, message, 'th')
const responses = await sessionClient.detectIntent(request)
return responses[0]
const request = {
session: sessionPath,
queryInput: {
text: {
text: message,
languageCode: languageCode,
},
},
}
const sessionPath = sessionClient.sessionPath(projectId, userId)
const sessionClient = new dialogflow.SessionsClient({
projectId,
keyFilename: 'dialogflow-service-account.json',
})
{
"type": "bubble",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "bubble",
"size": "giga",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "box",
"layout": "horizontal",
{
"type": "bubble",
"size": "mega",
"header": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "box",
"layout": "vertical",