Facebook、Telegram などの他のプラットフォームでカルーセル、画像のペイロードをカスタマイズする方法をお聞きしたいと思います。
情報
- DialogFlow API バージョン: V2 API
- ノードのバージョン: v8.10.0
- 本体パーサーのバージョン: ^1.18.3
- エクスプレス: ^4.16.4
return res.json({
payload: {
google: {
expectUserResponse: true,
systemIntent: {
intent: "actions.intent.OPTION",
data: {
"@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
carouselSelect: {
items: [{
optionInfo: {
key: "car",
synonyms: ["automobile", "vehicle"]
},
description: "A four wheel vehicle",
title: "Car"
},
{
optionInfo: {
key: "plane",
synonyms: ["aeroplane", "jet"]
},
description: "A flying machine",
title: "Plane"
}
]
}
}
},
richResponse: {
items: [{
simpleResponse: {
textToSpeech: "Category List"
}
}]
}
},
telegram: {
text: "Category list",
expectUserResponse: true,
systemIntent: {
intent: "actions.intent.OPTION",
data: {
"@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
carouselSelect: {
items: [{
optionInfo: {
key: "car",
synonyms: ["automobile", "vehicle"]
},
description: "A four wheel vehicle",
title: "Car"
},
{
optionInfo: {
key: "plane",
synonyms: ["aeroplane", "jet"]
},
description: "A flying machine",
title: "Plane"
}
]
}
}
}
}
},
outputContexts: []
});
これは、Telegram と Google にカルーセル応答を返すコード スニペットです。Google アシスタントでは機能しましたが、Telegram でカルーセル リストを表示できませんでした。テレグラムでは「カテゴリ一覧」というテキストしか表示されませんでした。
Telegram のペイロードに誤りはありませんか? 誰でもこれに関するガイダンスを提供できますか?