尝试以相同的请求在Chatbase中发送两条消息,如下所示:
{
"messages" : [{
"api_key" : "XXX",
"type" : "user",
"user_id" : 1287,
"time_stamp" : 1544782312,
"platform" : "Telegram",
"message" : "",
"intent" : "Screen2",
"version" : "1.1"
}, {
"api_key" : "XXX",
"type" : "agent",
"user_id" : 1287,
"time_stamp" : 1544782312,
"platform" : "Telegram",
"intent" : "Screen2",
"version" : "1.1"
}
]
}
但是出现响应错误
{
"reason" : "Error fetching parameter 'user_id': Field was empty.",
"status" : 400
}
您有什么想法吗?
答案 0 :(得分:2)
我发现了 user_id 字段的问题。
在Chatbase API中, user_id 字段接受 string 类型的值,并且您已经在 user_id中传递了 integer 类型的值字段。