Search Context

Search Context

post
Authorizations
Body
project_idstringRequired

Identifier of the project where you want to run the similarity search.

query_textstringRequired

Text to search for similar contexts.

decrypt_resultsbooleanOptional

Whether to decrypt the results before returning them. If true, you must provide the encryption keys used to encrypt the input texts. The encryption keys are used to decrypt the results before returning them. If you do not provide the correct encryption keys, the results will not be decrypted.

Default: false
encryption_keysstring[]Optional

Encryption keys used to encrypt the input texts. The encryption keys are used to decrypt the results before returning them. If you do not provide the correct encryption keys, the results will not be decrypted.

summarize_resultsbooleanOptional

Whether to return concise summary of results instead of a list of matching snippets.

Default: false
Responses
200

Success

application/json
post
POST /search HTTP/1.1
Host: api.unibrain.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 176

{
  "project_id": "text",
  "filters": {
    "metadata": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    }
  },
  "query_text": "text",
  "decrypt_results": false,
  "encryption_keys": [
    "text"
  ],
  "summarize_results": false
}
{
  "context": {
    "status": 1,
    "message": "Error",
    "timestamp": 1
  },
  "data": [
    {
      "document_id": "123e4567-e89b-12d3-a456-426614174000",
      "distance": 1,
      "snippet": "text"
    }
  ]
}

Last updated