Generate Suggested Questions
Generate Suggested Questions
Based on the agent's response in the conversation, provide the user with several questions that can be used to continue the chat.
Request Method
GET
Request URL
https://api-${endpoint}.gptbots.ai/v1/next/question
Request Authentication
Refer to API Overview for authentication instructions.
Request
Request Example
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/next/question?answer_id=65deb0cb2bab4d7c8061d87d' \
-H 'Authorization: Bearer ${API Key}'
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/next/question?answer_id=65deb0cb2bab4d7c8061d87d' \
-H 'Authorization: Bearer ${API Key}'
Este bloque de código en una ventana flotante
Request Headers
| Field | Type | Description |
|---|---|---|
| Authorization | Bearer ${API Key} | Use Authorization: Bearer ${API Key} for authentication. Get API key from API Key page. |
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| answer_id | string | true | Message ID of the Agent's response. |
Response
Response Example
{
"questions": [
"What kind of support do you need about the product?",
"Do you have any questions about our service?",
"Do you have any advices about our product?"
]
}
{
"questions": [
"What kind of support do you need about the product?",
"Do you have any questions about our service?",
"Do you have any advices about our product?"
]
}
Este bloque de código en una ventana flotante
Suceess Response
| Field | Type | Description |
|---|---|---|
| questions | Array | Generated questions. |
Failure Response
| Field | Type | Description |
|---|---|---|
| code | int | Error code. |
| message | string | Error details. |
Error Codes
| Code | Message |
|---|---|
| 40000 | Invalid parameter |
| 40379 | Credit not enough |
| 200222 | Agent configuration does not support this feature. |
| 40378 | Agent deleted |
| 20055 | API is forbidden |
| 40127 | Developer authentication failed |
