重铸 AI 或 Sap 对话机器人
我想知道 recast ai 的回发意味着当有人点击快速回复时,它可以从 webhook 回答
const express = require('express')
const bodyParser = require('body-parser')
const app = express()
const port = 5000
app.use(bodyParser.json())
// response
app.post('/', (req, res) => {
console.log(req.body)
res.send({
replies: [{
type: 'quickReplies',
content: {
title: 'Sorry, but I could not find any results for your request :(',
buttons: [{ title: 'get quiz', value: 'quiz' }],
},
},)
})
app.post('/errors', (req, res) => {
console.log(req.body)
res.send()
})
app.listen(port, () => {
console.log('Server is running on port 5000')
})