Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix: send the request to new mu version before the main one to achieve better sync

Thomas Kosmasf46f845efca3
diff --git a/apps/api/src/scraper/scrapeURL/engines/pdf/index.ts b/apps/api/src/scraper/scrapeURL/engines/pdf/index.ts
index 4f9569889..c9a323480 100644
--- a/apps/api/src/scraper/scrapeURL/engines/pdf/index.ts
+++ b/apps/api/src/scraper/scrapeURL/engines/pdf/index.ts
@@ -63,9 +63,10 @@ async function scrapePDFWithRunPodMU(
const abort = timeout ? AbortSignal.timeout(timeout) : undefined;
- const podStart = await robustFetch({
+ // testing the new version
+ robustFetch({
url:
- "https://api.runpod.ai/v2/" + process.env.RUNPOD_MUV2_POD_ID + "/runsync",
+ "https://api.runpod.ai/v2/" + process.env.RUNPOD_MU_POD_ID + "/runsync",
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RUNPOD_MU_API_KEY}`,
@@ -94,11 +95,9 @@ async function scrapePDFWithRunPodMU(
abort,
});
-
- // testing the new version
- robustFetch({
+ const podStart = await robustFetch({
url:
- "https://api.runpod.ai/v2/" + process.env.RUNPOD_MU_POD_ID + "/runsync",
+ "https://api.runpod.ai/v2/" + process.env.RUNPOD_MUV2_POD_ID + "/runsync",
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RUNPOD_MU_API_KEY}`,
@@ -127,6 +126,8 @@ async function scrapePDFWithRunPodMU(
abort,
});
+
+
let status: string = podStart.status;
let result: { markdown: string } | undefined = podStart.output;