From cbf8d79cce175e1a70c6b245e0b9af7bd05586cd Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 4 Jun 2024 00:13:37 -0700 Subject: [PATCH] Update pdfProcessor.ts --- apps/api/src/scraper/WebScraper/utils/pdfProcessor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/scraper/WebScraper/utils/pdfProcessor.ts b/apps/api/src/scraper/WebScraper/utils/pdfProcessor.ts index 7c57007..71984f2 100644 --- a/apps/api/src/scraper/WebScraper/utils/pdfProcessor.ts +++ b/apps/api/src/scraper/WebScraper/utils/pdfProcessor.ts @@ -80,7 +80,7 @@ export async function processPdfToText(filePath: string): Promise { await new Promise((resolve) => setTimeout(resolve, 500)); // Wait for 0.5 seconds } } catch (error) { - console.error("Error fetching result:", error || ''); + console.error("Error fetching result w/ LlamaIndex"); attempt++; await new Promise((resolve) => setTimeout(resolve, 500)); // Wait for 0.5 seconds before retrying // You may want to handle specific errors differently @@ -92,7 +92,7 @@ export async function processPdfToText(filePath: string): Promise { } content = resultResponse.data[resultType]; } catch (error) { - console.error("Error processing document:", filePath, error); + console.error("Error processing pdf document w/ LlamaIndex(2)"); content = await processPdf(filePath); } } else {