0

尝试在同一请求中在 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
}

您有什么想法吗?

4

1 回答 1

2

我发现了user_id字段的问题。

在 Chatbase API 中,user_id字段接受字符串类型的值,并且您在user_id字段中传递了整数类型的值。

于 2018-12-14T10:40:03.643 回答