Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix(scrape): don't double-bill for scrape
Gergo Moricz1ab119c874cb
diff --git a/apps/api/src/controllers/scrape.ts b/apps/api/src/controllers/scrape.tsindex 7e3840e16..aa17d6285 100644--- a/apps/api/src/controllers/scrape.ts+++ b/apps/api/src/controllers/scrape.ts@@ -134,7 +134,7 @@ export async function scrapeController(req: Request, res: Response) {const numTokens = (result.data && result.data.markdown) ? numTokensFromString(result.data.markdown, "gpt-3.5-turbo") : 0;if (result.success) {- let creditsToBeBilled = 1; // Assuming 1 credit per document+ let creditsToBeBilled = 0; // billing for doc done on queue endconst creditsPerLLMExtract = 50;if (extractorOptions.mode.includes("llm-extraction")) {