Core Features

The core RelevanceAI specs can be found in this section.

For the RelevanceAI client, we want to ensure the SDK mirrors the API client.

For example:

## To instantiate the client
from relevanceai import Client
client = Client()

To use the following endpoint:

/datasets/bulk_insert

You can run:

# Bulk insert documents
client.datasets.bulk_insert(dataset_id, documents)

Or similarly, when you are trying to run

/services/search/vector

You then write:

# Vector search in a dataset
client.services.search.vector(...)

Batch client to allow for batch insertions/retrieval and encoding

class relevanceai.api.client.BatchAPIClient(project, api_key)

Batch API client

batch_get_and_edit(dataset_id, chunk_size, bulk_edit)

Batch get the documents and return the documents