Get Correlated Dataset
Última actualización:2024-03-01

Get Correlated Dataset

Retrieve the knowledge base data referenced by the Bot's answer.

Request Method

GET

Request URL

https://api.gptbots.ai/v1/correlate/dataset

Request Authentication

See Overview for authentication details.

Request

Request Example

curl -X GET -H 'Authorization: Bearer your_apikey' "https://api.gptbots.ai/v1/correlate/dataset?message_id=65e04591a0e1e42392696d78"
          curl -X GET 
    -H 'Authorization: Bearer your_apikey' 		
    "https://api.gptbots.ai/v1/correlate/dataset?message_id=65e04591a0e1e42392696d78"

        
Este bloque de código en la ventana flotante

Request Headers

Field Type Description
Authorization Bearer ${token} Use Authorization: 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

{ "conversation_id": "65dc320df07244300b25b993", "question_id": "65dc323ef07244300b25b9c5", "answer_id": "65dc323ef07244300b25b9c6", "correlate_dataset": [ { "content": "The Great Wall of China was built to resist the invasion of northern nomadic tribes.", "data_id": "65dc3234f07244300b25b9b9", "data_name": "Chinese History", "source_url": "https://www.example.com/chinese-history", "score": 0.93492633 } ] }
          {
    "conversation_id": "65dc320df07244300b25b993",
    "question_id": "65dc323ef07244300b25b9c5",
    "answer_id": "65dc323ef07244300b25b9c6",
    "correlate_dataset": [
        {
            "content": "The Great Wall of China was built to resist the invasion of northern nomadic tribes.",
            "data_id": "65dc3234f07244300b25b9b9",
            "data_name": "Chinese History",
            "source_url": "https://www.example.com/chinese-history",
            "score": 0.93492633
        }
    ]
}

        
Este bloque de código en la ventana flotante

Suceess Response

Field Type Description
conversation_id string Conversation ID
question_id string Message ID of user question
answer_id string Message ID of Bot response
correlate_dataset JSON Array Correlate Dataset
content string Content of knowledge slice
data_id string Document ID
data_name string Document name
source_url string Document source URL
score string The semantic relevance of knowledge slices and problems.

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 Bot configuration does not support this feature.
40378 Bot deleted
20055 API is forbidden
40127 Developer authentication failed