diff --git a/.changeset/polite-kids-approve.md b/.changeset/polite-kids-approve.md new file mode 100644 index 000000000..34a94986d --- /dev/null +++ b/.changeset/polite-kids-approve.md @@ -0,0 +1,5 @@ +--- +"llamaindex": patch +--- + +Fix IngestionPipeline not working without vectorStores diff --git a/packages/llamaindex/src/ingestion/IngestionPipeline.ts b/packages/llamaindex/src/ingestion/IngestionPipeline.ts index b133377b3..2b2a5e54d 100644 --- a/packages/llamaindex/src/ingestion/IngestionPipeline.ts +++ b/packages/llamaindex/src/ingestion/IngestionPipeline.ts @@ -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();