Get Correlated Document
Última actualización:

Get Correlated Document

Gets the document data referenced by the Bot's answer.

Request Method

POST

Request URL

https://api.gptbots.ai/v1/bot/data/references

Request Authentication

See Overview for authentication details.

Request

Request Example

curl -X POST -H 'Authorization: Bearer your_apikey' -H 'Content-Type: application/json' -d '{"message_id": "xxxxx"}' "https://api.gptbots.ai/v1/bot/data/references"
          curl -X POST 
    -H 'Authorization: Bearer your_apikey' 		
    -H 'Content-Type: application/json'
    -d '{"message_id": "xxxxx"}'
    "https://api.gptbots.ai/v1/bot/data/references"

        
Este bloque de código en la ventana flotante

Request Headers

Field Type Description
Authorization Bearer ${token} UseAuthorization: Bearer ${token}for authentication. Get the key from the API Keys page as token.
Content-Type application/json Data type, set to application/json.

Request Body

Field Type Required Description
message_id string true Message ID of Bot's response.

Response

Response Example

{ "code": 0, "msg": "success", "data": { "conversationId": "65dc320df07244300b25b993", "questionId": "65dc323ef07244300b25b9c5", "answerId": "65dc323ef07244300b25b9c6", "refDoc": [ { "dataId": "65dc3234f07244300b25b9b9", "dataName": "中国的历史", "sourceUrl": "https://www.example.com/chinese-history" } ] } }
          {
    "code": 0,
    "msg": "success",
    "data": {
        "conversationId": "65dc320df07244300b25b993",
        "questionId": "65dc323ef07244300b25b9c5",
        "answerId": "65dc323ef07244300b25b9c6",
        "refDoc": [
            {
                "dataId": "65dc3234f07244300b25b9b9",
                "dataName": "中国的历史",
                "sourceUrl": "https://www.example.com/chinese-history"
            }
        ]
    }
}

        
Este bloque de código en la ventana flotante

Suceess Response

Field Type Description
conversationId string Conversation ID
questionId string Message ID of user question
answerId string Message ID of Bot response
refDoc JSON Array Referenced Document Data
dataId string Document ID
dataName string Document Name
sourceUrl string Document source URL

Failure Response

Field Type Description
code int Error code.
msg string Error details.

Error Codes

Code Message
40000 Invalid parameter
40379 Credit not enough
40378 Bot deleted
20055 API is forbidden
40127 Developer authentication failed