mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
Update pdfProcessor.ts
This commit is contained in:
parent
3fc9004ba8
commit
cbf8d79cce
|
@ -80,7 +80,7 @@ export async function processPdfToText(filePath: string): Promise<string> {
|
|||
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<string> {
|
|||
}
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user