Skip to content

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

Merge branch 'main' into rafa/sessionIdsExtract

Nicolas51967c7c3d8e
diff --cc apps/api/src/scraper/scrapeURL/lib/extractSmartScrape.ts
index f642383a3,a20c5d2ca..b6f19d173
--- a/apps/api/src/scraper/scrapeURL/lib/extractSmartScrape.ts
+++ b/apps/api/src/scraper/scrapeURL/lib/extractSmartScrape.ts
@@@ -186,13 -185,13 +186,15 @@@ export async function extractData(
urls,
useAgent,
extractId,
- sessionId
++ sessionId,
+ scrapeId,
}: {
extractOptions: GenerateCompletionsOptions;
urls: string[];
useAgent: boolean;
extractId?: string;
+ sessionId?: string;
+ scrapeId?: string;
}): Promise<{
extractedDataArray: any[];
warning: any;
@@@ -278,7 -274,7 +277,7 @@@
let smartscrapeResults: SmartScrapeResult[];
if (isSingleUrl) {
smartscrapeResults = [
- await smartScrape(urls[0], extract?.smartscrape_prompt, sessionId, extractId),
- await smartScrape(urls[0], extract?.smartscrape_prompt, undefined, extractId, scrapeId),
++ await smartScrape(urls[0], extract?.smartscrape_prompt, sessionId, extractId, scrapeId),
];
smartScrapeCost += smartscrapeResults[0].tokenUsage;
smartScrapeCallCount++;