Skip to content

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

fix query experiment 3

mogery65b987809ceb
diff --git a/apps/api/src/scraper/scrapeURL/transformers/query.ts b/apps/api/src/scraper/scrapeURL/transformers/query.ts
index 683b5450a..3dfa7fe54 100644
--- a/apps/api/src/scraper/scrapeURL/transformers/query.ts
+++ b/apps/api/src/scraper/scrapeURL/transformers/query.ts
@@ -386,7 +386,8 @@ ${escapePromptTags(indexedLines)}
outputTokens,
});
- const indices: number[] = JSON.parse(result.text);
+ const cleaned = result.text.replace(/^```[\w]*\n?|```$/g, "").trim();
+ const indices: number[] = JSON.parse(cleaned);
return assembleAnswer(sentences, indices);
} catch (error) {