From 5729bd92fd639d11dd17ca011249ce3de33d3a96 Mon Sep 17 00:00:00 2001 From: Marcus Schiesser <mail@marcusschiesser.de> Date: Tue, 15 Oct 2024 11:21:35 +0700 Subject: [PATCH] fix: LlamaCloud API calls for ensuring and index and for file uploads (#1332) --- .changeset/bright-bags-grin.md | 5 +++++ packages/llamaindex/src/cloud/LLamaCloudFileService.ts | 2 +- packages/llamaindex/src/cloud/LlamaCloudIndex.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/bright-bags-grin.md diff --git a/.changeset/bright-bags-grin.md b/.changeset/bright-bags-grin.md new file mode 100644 index 000000000..c82e150a9 --- /dev/null +++ b/.changeset/bright-bags-grin.md @@ -0,0 +1,5 @@ +--- +"llamaindex": patch +--- + +Fix LlamaCloud API calls for ensuring an index and for file uploads diff --git a/packages/llamaindex/src/cloud/LLamaCloudFileService.ts b/packages/llamaindex/src/cloud/LLamaCloudFileService.ts index 2ee76e2ea..55fa9657d 100644 --- a/packages/llamaindex/src/cloud/LLamaCloudFileService.ts +++ b/packages/llamaindex/src/cloud/LLamaCloudFileService.ts @@ -41,7 +41,7 @@ export class LLamaCloudFileService { ) { initService(); const { data: file } = await FilesService.uploadFileApiV1FilesPost({ - path: { project_id: projectId }, + query: { project_id: projectId }, body: { upload_file: uploadFile, }, diff --git a/packages/llamaindex/src/cloud/LlamaCloudIndex.ts b/packages/llamaindex/src/cloud/LlamaCloudIndex.ts index a3e827ea9..97e199de4 100644 --- a/packages/llamaindex/src/cloud/LlamaCloudIndex.ts +++ b/packages/llamaindex/src/cloud/LlamaCloudIndex.ts @@ -378,7 +378,7 @@ export class LlamaCloudIndex { const { data: pipeline } = await PipelinesService.upsertPipelineApiV1PipelinesPut({ - path: { + query: { project_id: projectId, }, body: { -- GitLab