v47

latestOpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2024-06-17465244.2 KB
AI Dataset Management

Run a Context and Meaning Based Search on Trained Datasets

Run a Context and Meaning Based Search on Trained Datasets. You can run a Context and Meaning Based Search on Trained Datasets using this endpoint. You can pass in the Dataset ID and the Search Query and we will run the search for you. This is mostly used in cases where you want to build a recommendation engine or suggest people based on meaning and emotional ideas.

post/api/ai/search/v3/{datasetId}

Path parameters

datasetIdstring required

The ID of the dataset to search.

Request body

questionstring

The Search Query that you want to search for.

search_countinteger

The number of results that you want to return.

Example request

{
  "question": "What is the capital of India?",
  "search_count": 10
}

Response

Successful response

statusstring

Status indicating the success of the request.

processing_timeinteger

The time taken to process the request, in milliseconds.

processing_idstring

A universally unique identifier for the request. This can be used to track the request in the logs.

processing_countinteger

The number of times the request has been processed. This is what is considered in the Billing Process.

Example response

{
  "status": "success",
  "result": [
    {
      "results": {
        "sId": "07743dc2-2c1f-4b15-919e-7f7aae66586c",
        "type": "donut",
        "name": "Old Fashioned",
        "ppu": "0.55"
      },
      "distance": 0.1902
    },
    {
      "results": {
        "sId": "59183537-9324-44fd-a1e9-023f6acefc52",
        "type": "donut",
        "name": "Cake",
        "ppu": "0.55"
      },
      "distance": 0.2543
    },
    {
      "results": {
        "sId": "b29b523e-f5c3-4402-8080-9f3416837a00",
        "type": "donut",
        "name": "Raised",
        "ppu": "0.55"
      },
      "distance": 0.268
    }
  ],
  "processing_time": 3323,
  "processing_id": "4e553b00-1898-4337-8003-291cab2f8a2b",
  "processing_count": 4
}