Skip to content
Snippets Groups Projects
Commit 8bb1024d authored by Sam Cheng Hung's avatar Sam Cheng Hung
Browse files

fix: qdrant store init parameters

parent 988bfc2a
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