From 9ba1ae9ae13c7b4892712504f9f3bb7b274fa173 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Fri, 18 Apr 2025 01:28:31 -0700 Subject: [PATCH] Nick: --- apps/api/src/routes/v1.ts | 4 ++-- apps/python-sdk/firecrawl/firecrawl.py | 32 ++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/apps/api/src/routes/v1.ts b/apps/api/src/routes/v1.ts index 185a70de..271f2b17 100644 --- a/apps/api/src/routes/v1.ts +++ b/apps/api/src/routes/v1.ts @@ -278,14 +278,14 @@ v1Router.get( v1Router.post( "/deep-research", - authMiddleware(RateLimiterMode.Extract), + authMiddleware(RateLimiterMode.Crawl), checkCreditsMiddleware(1), wrap(deepResearchController), ); v1Router.get( "/deep-research/:jobId", - authMiddleware(RateLimiterMode.ExtractStatus), + authMiddleware(RateLimiterMode.CrawlStatus), wrap(deepResearchStatusController), ); diff --git a/apps/python-sdk/firecrawl/firecrawl.py b/apps/python-sdk/firecrawl/firecrawl.py index 1442894e..76816a1d 100644 --- a/apps/python-sdk/firecrawl/firecrawl.py +++ b/apps/python-sdk/firecrawl/firecrawl.py @@ -1843,7 +1843,12 @@ class FirecrawlApp: __experimental_stream=experimental_stream ) - response = self.async_generate_llms_text(url, params) + response = self.async_generate_llms_text( + url, + max_urls=max_urls, + show_full_text=show_full_text, + experimental_stream=experimental_stream + ) if not response.get('success') or 'id' not in response: return response @@ -2219,7 +2224,14 @@ class FirecrawlApp: research_params['__experimental_streamSteps'] = __experimental_stream_steps research_params = DeepResearchParams(**research_params) - response = self.async_deep_research(query, research_params) + response = self.async_deep_research( + query, + max_depth=max_depth, + time_limit=time_limit, + max_urls=max_urls, + analysis_prompt=analysis_prompt, + system_prompt=system_prompt + ) if not response.get('success') or 'id' not in response: return response @@ -3529,7 +3541,12 @@ class AsyncFirecrawlApp(FirecrawlApp): if experimental_stream is not None: params['__experimental_stream'] = experimental_stream - response = await self.async_generate_llms_text(url, params) + response = await self.async_generate_llms_text( + url, + max_urls=max_urls, + show_full_text=show_full_text, + experimental_stream=experimental_stream + ) if not response.get('success') or 'id' not in response: return response @@ -3678,7 +3695,14 @@ class AsyncFirecrawlApp(FirecrawlApp): research_params['__experimental_streamSteps'] = __experimental_stream_steps research_params = DeepResearchParams(**research_params) - response = await self.async_deep_research(query, research_params) + response = await self.async_deep_research( + query, + max_depth=max_depth, + time_limit=time_limit, + max_urls=max_urls, + analysis_prompt=analysis_prompt, + system_prompt=system_prompt + ) if not response.get('success') or 'id' not in response: return response