Skip to content

Commit

Permalink
fix: IngestionPipeline not working without vectorStores (#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusschiesser committed Jun 26, 2024
1 parent 4b59ffe commit 42eb73a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/polite-kids-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"llamaindex": patch
---

Fix IngestionPipeline not working without vectorStores
10 changes: 6 additions & 4 deletions packages/llamaindex/src/ingestion/IngestionPipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 42eb73a

Please sign in to comment.