fix: use collection deletion instead of reset, add embedding retry, slow down indexing
- semantic-cache.clearCache: delete collection instead of client.reset() to avoid 403 Forbidden on newer ChromaDB versions - vault-vector-store.clearIndex: same collection deletion approach - ContentVectorizer: add 3-attempt retry with exponential backoff (1s, 2s, 4s) - main.ts: reduce indexing batch size from 5 to 2, increase delay from 100ms to 500ms - Update semantic-cache tests for deleteCollection
This commit is contained in:
@@ -155,13 +155,15 @@ describe('SemanticCacheService', () => {
|
||||
|
||||
await disabledCacheService.clearCache();
|
||||
|
||||
expect(mockChromaClient.reset).not.toHaveBeenCalled();
|
||||
expect(mockChromaClient.deleteCollection).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should clear the cache via the ChromaClient', async () => {
|
||||
it('should clear the cache via deleteCollection', async () => {
|
||||
await cacheService.clearCache();
|
||||
|
||||
expect(mockChromaClient.reset).toHaveBeenCalled();
|
||||
expect(mockChromaClient.deleteCollection).toHaveBeenCalledWith({
|
||||
name: mockCacheConfig.collectionName,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user