Q&A Intervention Interface

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?"
            },
            // Other intervention questions
        ],
        "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"
                },
                // other recommended questions
            ]
        }
    }
}
parameterEnterprise TyperequiredParameter Description
ctai_qaintvobjectYesQ&A Intervention Information Object
ctai_qaintv_answerobjectYesIntervention Answer Info Object
followup_questionarrayYesList of recommended questions
ctai_qaintv_question_listarrayYesList of Intervention Questions
contentstringYesIntervention Question or Intervention Answer Content

Response business parameters

{
    "ctqaintva_id": "test_id"
}
parameterEnterprise TypeParameter Description
ctqaintva_idstringThe 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?"
            },
            // Other intervention questions
        ],
        "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"
                },
                // Other recommended questions
            ]
        }
    }
}
parameterEnterprise TyperequiredParameter Description
ctqaintva_idstringYesIntervention Question ID
ctai_qaintvobjectYesQ&A Intervention Information Object
ctai_qaintv_answerobjectYesIntervention Answer Info Object
followup_questionarrayYesList of recommended questions
ctai_qaintv_question_listarrayYesList of Intervention Questions
contentstringYesIntervention Question or Intervention Answer Content

Response business parameters

{
    "ctqaintva_id": "test_id"
}
parameterEnterprise TypeParameter Description
ctqaintva_idstringThe 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"
}
parameterEnterprise TyperequiredParameter Description
ctqaintva_idstringYesThe 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",
}
parameterEnterprise TyperequiredParameter Description
ctqaintva_idstringNoChoose one of this parameter and ctqaintvq_id, intervene answer id
ctqaintvq_idstringNoChoose 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"
            },
            // Other recommended questions
        ],
        "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"
            }
        },
        // other interventions Question
    ]
}
  • One answer corresponds to multiple questions, but each answer (ctqaintva_id) and each question (ctqaintvq_id) has its own ID
parameterEnterprise TypeParameter Description
ctqaintva_idstringQ&A intervention id (intervention answer id)
ctai_qaintv_answerobjectIntervention Question Information Object
followup_questionarrayList of recommended questions
ctai_qaintv_question_listarrayList of Intervention Questions
ctqaintvq_idstringintervention problem id
contentstringIntervention Question or Intervention Answer Content
create_timestringCreation time, integer timestamp, unit is second.
update_timestringModification 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"
}
parameterEnterprise TyperequiredParameter Description
ctqaintva_idstringNoIntervention answer id, multiple separated by commas
ctqaintvq_idstringNoIntervention problem id, multiple separated by commas
filter_qa_question_contentstringNoQ&A Intervention Question Search Keyword, Fuzzy Matching
filter_qa_answer_contentstringNoAnswer search keywords for Q&A intervention, fuzzy matching
filter_qa_keywordsstringNoQ&A Intervention Question or Answer Search Keyword, Fuzzy Matching
sort_typestringNoSorting 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
pagestringNoPaging parameters, the number of pages, starting from 1, the default is 1
page_rowsstringNoPagination 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"
                    },
                    // Other recommended questions
                ],
                "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"
                    }
                },
                // other intervention questions
            ]
        },
        // other question answering interventions
    ]
}
parameterEnterprise TypeParameter Description
total_countstringTotal number of Q&A interventions, used for pagination.
ctai_qaintv_listarrayQ&A Intervention List