Skip to content
Snippets Groups Projects
Unverified Commit 6fe240b8 authored by Huu Le (Lee)'s avatar Huu Le (Lee) Committed by GitHub
Browse files

Merge pull request #81 from sagech/fix/store-qdrant-init

fix: qdrant store init parameters
parents 988bfc2a 8bb1024d
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,10 @@ async function loadAndIndex() {
const documents = await getDocuments();
// Connect to Qdrant
const vectorStore = new QdrantVectorStore(collectionName, getQdrantClient());
const vectorStore = new QdrantVectorStore({
collectionName,
client: getQdrantClient(),
});
const storageContext = await storageContextFromDefaults({ vectorStore });
await VectorStoreIndex.fromDocuments(documents, {
......
......@@ -7,7 +7,10 @@ dotenv.config();
export async function getDataSource() {
checkRequiredEnvVars();
const collectionName = process.env.QDRANT_COLLECTION;
const store = new QdrantVectorStore(collectionName, getQdrantClient());
const store = new QdrantVectorStore({
collectionName,
client: getQdrantClient(),
});
return await VectorStoreIndex.fromVectorStore(store);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment