Chatmax allows manual intervention on the answers to questions. In addition to operations on the interface, it now also supports intervention operations through APIs.
1. Add a question and answer intervention interface
- Each time you add an intervention question, you can add multiple ways of asking, corresponding to an answer.For example, the following question-and-answer intervention on the No. 2 bus.
request method
- Request method: POST
- Request URL: /v1/ctai/add_ctai_qaintv
- Content-Type: application/json
request parameters
{
"ctai_qaintv": {
"ctai_qaintv_question_list": [
{
"content": "Where is the No. 2 bus?"
},{
"content": "Where is the No. 2 bus platform?"
},{
"content": "Which floor is the No. 2 bus on?"
},
],
"ctai_qaintv_answer": {
"content": "The No. 2 bus is on the 8th floor , go to the 8th floor and take the No. 2 bus",
"followup_question": [
{
"content": "Which floor is the No. 3 bus on?"
},{
"content": "What other buses are on the 8th floor to"
},
]
}
}
}
parameter | Enterprise Type | required | Parameter Description |
---|
ctai_qaintv | object | Yes | Q&A Intervention Information Object |
ctai_qaintv_answer | object | Yes | Intervention Answer Info Object |
followup_question | array | Yes | List of recommended questions |
ctai_qaintv_question_list | array | Yes | List of Intervention Questions |
content | string | Yes | Intervention Question or Intervention Answer Content |
Response business parameters
{
"ctqaintva_id": "test_id"
}
parameter | Enterprise Type | Parameter Description |
---|
ctqaintva_id | string | The id of the intervention answer |
2. Modify the question and answer intervention interface
- Modify the question and answer and add the post content of the question and answer, the only difference is:ctqaintva_id
request method
- Request method: POST
- Request URL: /v1/ctai/modify_ctai_qaintv
- Content-Type: application/json
request parameters
{
"ctqaintva_id": "test_id",
"ctai_qaintv": {
"ctai_qaintv_question_list": [
{
"content": "Where does the No. 2 bus take?"
},{
"content": "Two Where is the bus stop?"
},{
"content": "Which floor is the No. 2 bus?"
},
],
"ctai_qaintv_answer": {
"content" : "The No. 2 bus is on the 8th floor, go to the 8th floor and take the No. 2 bus",
"followup_question": [
{
"content": "Which floor is the No. 3 bus on?"
},{
"content" : "Which other buses arrive on the 8th floor"
},
]
}
}
}
parameter | Enterprise Type | required | Parameter Description |
---|
ctqaintva_id | string | Yes | Intervention Question ID |
ctai_qaintv | object | Yes | Q&A Intervention Information Object |
ctai_qaintv_answer | object | Yes | Intervention Answer Info Object |
followup_question | array | Yes | List of recommended questions |
ctai_qaintv_question_list | array | Yes | List of Intervention Questions |
content | string | Yes | Intervention Question or Intervention Answer Content |
Response business parameters
{
"ctqaintva_id": "test_id"
}
parameter | Enterprise Type | Parameter Description |
---|
ctqaintva_id | string | The id of the intervention answer |
3. Delete the question and answer intervention interface
request method
- Request method: POST
- Request URL: /v1/ctai/delete_ctai_qaintv
- Content-Type: application/json
request parameters
{
"ctqaintva_id": "test_id"
}
parameter | Enterprise Type | required | Parameter Description |
---|
ctqaintva_id | string | Yes | The id of the intervention answer |
Response business parameters
- No response service parameters
4. Question and answer intervention information interface
Interface Description
- When viewing the details of an intervention, there are two ways to query the ID of the:intervention answer or the ID of one of the questions in the intervention question list
request method
- Request method: POST
- Request URL: /v1/ctai/ctai_qaintv_info
- Content-Type: application/json
request parameters
{
"ctqaintva_id": "test",
"ctqaintvq_id": "test",
}
parameter | Enterprise Type | required | Parameter Description |
---|
ctqaintva_id | string | No | Choose one of this parameter and ctqaintvq_id, intervene answer id |
ctqaintvq_id | string | No | Choose one of this parameter and ctqaintva_id, the intervention question id |
Response business parameters
{
"ctqaintva_id": "tset_id",
"ctai_qaintv_answer": {
"ctqaintva_id": "tset_id",
"content": "test",
"followup_question": [
{
"content": "test1"
},
],
"create_time": "1684747563",
"update_time": "1684747639"
},
"ctai_qaintv_question_list": [
{
"ctqaintvq_id": "tset_id",
"ctai_qaintv_question": {
"ctqaintvq_id": "tset_id",
"content": "test",
"create_time": "1684740411",
"update_time": "1684740411"
}
},
]
}
- One answer corresponds to multiple questions, but each answer (ctqaintva_id) and each question (ctqaintvq_id) has its own ID
parameter | Enterprise Type | Parameter Description |
---|
ctqaintva_id | string | Q&A intervention id (intervention answer id) |
ctai_qaintv_answer | object | Intervention Question Information Object |
followup_question | array | List of recommended questions |
ctai_qaintv_question_list | array | List of Intervention Questions |
ctqaintvq_id | string | intervention problem id |
content | string | Intervention Question or Intervention Answer Content |
create_time | string | Creation time, integer timestamp, unit is second. |
update_time | string | Modification time, integer timestamp, unit is second. |
5. Question and answer intervention list interface
request method
- Request method: POST
- Request URL: /v1/ctai/ctai_qaintv_list
- Content-Type: application/json
request parameters
{
"ctqaintva_id": "test",
"ctqaintvq_id": "test",
"filter_qa_question_content": "test",
"filter_qa_answer_content": "test",
"filter_qa_keywords": "test",
"sort_type" : "create_time_asc",
"page": "1",
"page_rows": "1"
}
parameter | Enterprise Type | required | Parameter Description |
---|
ctqaintva_id | string | No | Intervention answer id, multiple separated by commas |
ctqaintvq_id | string | No | Intervention problem id, multiple separated by commas |
filter_qa_question_content | string | No | Q&A Intervention Question Search Keyword, Fuzzy Matching |
filter_qa_answer_content | string | No | Answer search keywords for Q&A intervention, fuzzy matching |
filter_qa_keywords | string | No | Q&A Intervention Question or Answer Search Keyword, Fuzzy Matching |
sort_type | string | No | Sorting method, the default is create_time_asc create_time_asc Sort by creation time from old to new create_time_desc Sort by creation time from new to old update_time_asc Sort by modification time from old to new update_time_desc Sort by modification time from new to old |
page | string | No | Paging parameters, the number of pages, starting from 1, the default is 1 |
page_rows | string | No | Pagination parameters, how many items per page, the default is 1 |
Response business parameters
{
"total_count": "3",
"ctai_qaintv_list": [
{
"ctqaintva_id": "tset_id",
"ctai_qaintv_answer": {
"ctqaintva_id": "tset_id",
"content": "test" ,
"followup_question": [
{
"content": "test1"
},
],
"create_time": "1684747563",
"update_time": "1684747639"
},
"ctai_qaintv_question_list": [
{
"ctqaintvq_id": "tset_id",
"ctai_qaintv_question": {
"ctqaintvq_id": "tset_id",
"content": "test",
"create_time": "1684740411",
"update_time": "1684740411"
}
},
]
},
]
}
parameter | Enterprise Type | Parameter Description |
---|
total_count | string | Total number of Q&A interventions, used for pagination. |
ctai_qaintv_list | array | Q&A Intervention List |