API Overview
Message Callbacks
Status Codes
Overview
Generates a smart reply.
Request
Authentication: Add authentication headers to the request. See Authentication
Method:
POST
Rate limit:
100 requests/second
Endpoint: https://API domain/jim/assistants/answer
Content-Type:
application/json
Request parameters
| Parameter | Data type | Required | Description | |
|---|---|---|---|---|
| conver_id | string | Yes | conversationid | |
| channel_type | int | Yes | Conversation type: 1 for private chat; 2 for group chat. | |
| prompt_id | string | No | Prompt ID | |
| msgs | array | No | The latest n messages in the conversation. |
Request example
POST /jim/assistants/answer HTTP/1.1
appkey: appkey
Authorization: xxxxxxxxxxxxxxxxxx
Content-Type: application/json
{
"conver_id":"xx",
"channel_type":1,
"prompt_id":"xxx",
"msgs":[
{
"sender_id":"xx",
"content":"xxxxx",
"msg_time":1741234567893
}
]
}
Response example
{
"code":0,
"msg":"sucess",
"data":{
"answer":"xxxxxxxxx"
}
}
Response codes
| Response codes | Description |
|---|