Managed Database REST API
Running Vector Search in the Deep Lake Tensor Database using the REST API
How to Run Vector Search in the Deep Lake Tensor Database using the REST API
The REST API is currently in Alpha, and the syntax may change without announcement.
To use the REST API, Deep Lake data must be stored in the Managed Tensor Database by specifying the deeplake_path = hub://org_id/dataset_name
and runtime = {"tensor_db": True}
. Full details on path and storage management are available here.
Performing Vector Search Using the REST API
Let's query this Vector Store stored in the Managed Tensor Database using the REST API. The steps are:
Define the authentication tokens and search terms
Embed the search search term using OpenAI
Reformat the embedding to an
embedding_search
string that can be passed to the REST API request.Create the query string using Deep Lake TQL. The
dataset_path
andembedding_search
are a part of the query string.Submit the request and print the response data data
Congrats! You performed a vector search using the Deep Lake Managed Database! 🎉