fix: IngestionPipeline not working without vectorStores (#976)

This commit is contained in:
Marcus Schiesser
2024-06-26 09:30:58 +02:00
committed by GitHub
parent 4b59ffee45
commit 42eb73a08f
2 changed files with 11 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"llamaindex": patch
---
Fix IngestionPipeline not working without vectorStores
@@ -77,13 +77,15 @@ export class IngestionPipeline {
if (!this.docStore) {
this.docStoreStrategy = DocStoreStrategy.NONE;
}
this.vectorStores = this.vectorStores ?? {
[ModalityType.TEXT]: this.vectorStore,
};
this.vectorStores =
this.vectorStores ??
(this.vectorStore
? { [ModalityType.TEXT]: this.vectorStore }
: undefined);
this._docStoreStrategy = createDocStoreStrategy(
this.docStoreStrategy,
this.docStore,
Object.values(this.vectorStores),
this.vectorStores ? Object.values(this.vectorStores) : undefined,
);
if (!this.disableCache) {
this.cache = new IngestionCache();