mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
feat: Enable on-disk storage for Qdrant vectors and HNSW index (#7182)
This commit is contained in:
parent
934bfd0a54
commit
11c454ffa2
2 changed files with 30 additions and 2 deletions
|
|
@ -532,6 +532,12 @@ describe("QdrantVectorStore", () => {
|
|||
vectors: {
|
||||
size: mockVectorSize,
|
||||
distance: "Cosine", // Assuming 'Cosine' is the DISTANCE_METRIC
|
||||
on_disk: true,
|
||||
},
|
||||
hnsw_config: {
|
||||
m: 64,
|
||||
ef_construct: 512,
|
||||
on_disk: true,
|
||||
},
|
||||
})
|
||||
expect(mockQdrantClientInstance.deleteCollection).not.toHaveBeenCalled()
|
||||
|
|
@ -610,6 +616,12 @@ describe("QdrantVectorStore", () => {
|
|||
vectors: {
|
||||
size: mockVectorSize, // Should use the new, correct vector size
|
||||
distance: "Cosine",
|
||||
on_disk: true,
|
||||
},
|
||||
hnsw_config: {
|
||||
m: 64,
|
||||
ef_construct: 512,
|
||||
on_disk: true,
|
||||
},
|
||||
})
|
||||
|
||||
|
|
@ -903,6 +915,12 @@ describe("QdrantVectorStore", () => {
|
|||
vectors: {
|
||||
size: newVectorSize, // Should create with new 768 dimensions
|
||||
distance: "Cosine",
|
||||
on_disk: true,
|
||||
},
|
||||
hnsw_config: {
|
||||
m: 64,
|
||||
ef_construct: 512,
|
||||
on_disk: true,
|
||||
},
|
||||
})
|
||||
expect(mockQdrantClientInstance.createPayloadIndex).toHaveBeenCalledTimes(5)
|
||||
|
|
|
|||
|
|
@ -155,6 +155,12 @@ export class QdrantVectorStore implements IVectorStore {
|
|||
vectors: {
|
||||
size: this.vectorSize,
|
||||
distance: this.DISTANCE_METRIC,
|
||||
on_disk: true,
|
||||
},
|
||||
hnsw_config: {
|
||||
m: 64,
|
||||
ef_construct: 512,
|
||||
on_disk: true,
|
||||
},
|
||||
})
|
||||
created = true
|
||||
|
|
@ -244,6 +250,12 @@ export class QdrantVectorStore implements IVectorStore {
|
|||
vectors: {
|
||||
size: this.vectorSize,
|
||||
distance: this.DISTANCE_METRIC,
|
||||
on_disk: true,
|
||||
},
|
||||
hnsw_config: {
|
||||
m: 64,
|
||||
ef_construct: 512,
|
||||
on_disk: true,
|
||||
},
|
||||
})
|
||||
console.log(`[QdrantVectorStore] Successfully created new collection ${this.collectionName}`)
|
||||
|
|
@ -491,8 +503,6 @@ export class QdrantVectorStore implements IVectorStore {
|
|||
// Include first few file paths for debugging (avoid logging too many)
|
||||
samplePaths: filePaths.slice(0, 3),
|
||||
})
|
||||
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue