From 13335a339dd7d679ead54ddbddc91006be176ffe Mon Sep 17 00:00:00 2001 From: Thomas Kosmas Date: Mon, 7 Jul 2025 15:41:47 +0300 Subject: [PATCH] feat: test RunPod MU new version (#1771) * feat: test RunPod MU new version integration * ignore errors --- .../scraper/scrapeURL/engines/pdf/index.ts | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/apps/api/src/scraper/scrapeURL/engines/pdf/index.ts b/apps/api/src/scraper/scrapeURL/engines/pdf/index.ts index 6649c735..ab20413d 100644 --- a/apps/api/src/scraper/scrapeURL/engines/pdf/index.ts +++ b/apps/api/src/scraper/scrapeURL/engines/pdf/index.ts @@ -61,6 +61,38 @@ async function scrapePDFWithRunPodMU( const abort = timeout ? AbortSignal.timeout(timeout) : undefined; + // test runpod mu new version + robustFetch({ + url: + "https://api.runpod.ai/v2/" + process.env.RUNPOD_MU_POD_ID + "/runsync", + method: "POST", + headers: { + Authorization: `Bearer ${process.env.RUNPOD_MU_API_KEY}`, + }, + body: { + input: { + file_content: base64Content, + filename: path.basename(tempFilePath) + ".pdf", + timeout, + created_at: Date.now(), + }, + }, + logger: meta.logger.child({ + method: "scrapePDFWithRunPodMU/runsync/robustFetch", + }), + schema: z.object({ + id: z.string(), + status: z.string(), + output: z + .object({ + markdown: z.string(), + }) + .optional(), + }), + mock: meta.mock, + abort, + }).catch(() => { + }); const podStart = await robustFetch({ url: "https://api.runpod.ai/v2/" + process.env.RUNPOD_MUV2_POD_ID + "/runsync",