Vector Store Basics
Creating the Deep Lake Vector Store
How to Create a Deep Lake Vector Store
Downloading and Preprocessing the Data
from deeplake.core.vectorstore import VectorStore
import openai
import os!git clone https://github.com/twitter/the-algorithmvector_store_path = '/vector_store_getting_started'
repo_path = '/the-algorithm'CHUNK_SIZE = 1000
chunked_text = []
metadata = []
for dirpath, dirnames, filenames in os.walk(repo_path):
for file in filenames:
try:
full_path = os.path.join(dirpath,file)
with open(full_path, 'r') as f:
text = f.read()
new_chunkned_text = [text[i:i+CHUNK_SIZE] for i in range(0,len(text), CHUNK_SIZE)]
chunked_text += new_chunkned_text
metadata += [{'filepath': full_path} for i in range(len(new_chunkned_text))]
except Exception as e:
print(e)
passPerforming Vector Search
Customization of Vector Search
Full Customization of Vector Search
Deep Lake also offers a variety of search options depending on where data is stored (load, cloud, Deep Lake storage, etc.) and where query execution should take place (client side or server side)
Last updated
Was this helpful?