Compare commits

...

2 Commits

Author SHA1 Message Date
Emanuel Ferreira ffb0f99763 changeset 2024-03-28 15:13:27 -03:00
Emanuel Ferreira 9e261663f8 fix: fix throw error if pipeline not found 2024-03-28 14:59:28 -03:00
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"llamaindex": patch
---
fix: throw error when no pipelines exist for the retriever
@@ -65,7 +65,7 @@ export class LlamaCloudRetriever implements BaseRetriever {
projectName: this.projectName,
pipelineName: this.pipelineName,
});
if (pipelines.length !== 1 && !pipelines[0].id) {
if (pipelines.length !== 1 && !pipelines[0]?.id) {
throw new Error(
`No pipeline found with name ${this.pipelineName} in project ${this.projectName}`,
);