mirror of
https://github.com/run-llama/llama-hub.git
synced 2025-08-15 20:21:14 +00:00
DeepLake Reader
The DeepLake loader returns a set of texts corresponding to embeddings retrieved from a DeepLake vector store. The user initializes the loader with an auth token. They then pass in a query vector.
Usage
Here's an example usage of the DeepLake reader.
from llama_index import download_loader
import os
DeepLakeReader = download_loader("DeepLakeReader")
reader = DeepLakeReader(token="<token>")
# the query_vector is an embedding representation of your query_vector
# Example query vector:
# query_vector=[0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3]
query_vector=[n1, n2, n3, ...]
# NOTE: Required args are query_vector, dataset_path.
documents = reader.load_data(
query_vector=query_vector,
dataset_path="<dataset_path>",
limit=5
)
This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent. See here for examples.