Skip to content

How Load a premade LanceDB vector database with LangChain? #1068

Answered by raghavdixit99
asmith26 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi ,
We currently support adding connection object as an argument to our integration, we don't have a method inplace to directly load the full vectordb from local path(uri) yet we will be releasing additional features in our langchain integration soon, You can use the following to pass an pre-existing table for now:

db = lancedb.connect('./lancedb')
table = db.open_table('my_table')
vectorstore = LanceDB(table, embedding_function)
vectorstore.add_texts(['text1', 'text2'])
result = vectorstore.similarity_search('text1')

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by asmith26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants