firecrawl 1.14.0__tar.gz → 1.15.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of firecrawl might be problematic. Click here for more details.
- {firecrawl-1.14.0 → firecrawl-1.15.0}/PKG-INFO +1 -1
- {firecrawl-1.14.0 → firecrawl-1.15.0}/firecrawl/__init__.py +1 -1
- {firecrawl-1.14.0 → firecrawl-1.15.0}/firecrawl/firecrawl.py +13 -1
- {firecrawl-1.14.0 → firecrawl-1.15.0}/firecrawl.egg-info/PKG-INFO +1 -1
- {firecrawl-1.14.0 → firecrawl-1.15.0}/LICENSE +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/README.md +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/firecrawl/__tests__/e2e_withAuth/__init__.py +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/firecrawl/__tests__/e2e_withAuth/test.py +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/firecrawl/__tests__/v1/e2e_withAuth/__init__.py +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/firecrawl/__tests__/v1/e2e_withAuth/test.py +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/firecrawl.egg-info/SOURCES.txt +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/firecrawl.egg-info/dependency_links.txt +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/firecrawl.egg-info/requires.txt +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/firecrawl.egg-info/top_level.txt +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/pyproject.toml +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/setup.cfg +0 -0
- {firecrawl-1.14.0 → firecrawl-1.15.0}/setup.py +0 -0
|
@@ -48,6 +48,8 @@ class DeepResearchParams(pydantic.BaseModel):
|
|
|
48
48
|
maxDepth: Optional[int] = 7
|
|
49
49
|
timeLimit: Optional[int] = 270
|
|
50
50
|
maxUrls: Optional[int] = 20
|
|
51
|
+
analysisPrompt: Optional[str] = None
|
|
52
|
+
systemPrompt: Optional[str] = None
|
|
51
53
|
__experimental_streamSteps: Optional[bool] = None
|
|
52
54
|
|
|
53
55
|
class DeepResearchResponse(pydantic.BaseModel):
|
|
@@ -681,6 +683,8 @@ class FirecrawlApp:
|
|
|
681
683
|
'origin': 'api-sdk'
|
|
682
684
|
}
|
|
683
685
|
|
|
686
|
+
if not request_data['urls']:
|
|
687
|
+
request_data['urls'] = []
|
|
684
688
|
# Only add prompt and systemPrompt if they exist
|
|
685
689
|
if params.get('prompt'):
|
|
686
690
|
request_data['prompt'] = params['prompt']
|
|
@@ -1096,6 +1100,8 @@ class FirecrawlApp:
|
|
|
1096
1100
|
|
|
1097
1101
|
if response.status_code == 402:
|
|
1098
1102
|
message = f"Payment Required: Failed to {action}. {error_message} - {error_details}"
|
|
1103
|
+
elif response.status_code == 403:
|
|
1104
|
+
message = f"Website Not Supported: Failed to {action}. {error_message} - {error_details}"
|
|
1099
1105
|
elif response.status_code == 408:
|
|
1100
1106
|
message = f"Request Timeout: Failed to {action} as the request timed out. {error_message} - {error_details}"
|
|
1101
1107
|
elif response.status_code == 409:
|
|
@@ -1166,7 +1172,6 @@ class FirecrawlApp:
|
|
|
1166
1172
|
time.sleep(2) # Polling interval
|
|
1167
1173
|
|
|
1168
1174
|
return {'success': False, 'error': 'Deep research job terminated unexpectedly'}
|
|
1169
|
-
|
|
1170
1175
|
def async_deep_research(self, query: str, params: Optional[Union[Dict[str, Any], DeepResearchParams]] = None) -> Dict[str, Any]:
|
|
1171
1176
|
"""
|
|
1172
1177
|
Initiates an asynchronous deep research operation.
|
|
@@ -1190,8 +1195,15 @@ class FirecrawlApp:
|
|
|
1190
1195
|
research_params = params
|
|
1191
1196
|
|
|
1192
1197
|
headers = self._prepare_headers()
|
|
1198
|
+
|
|
1193
1199
|
json_data = {'query': query, **research_params.dict(exclude_none=True)}
|
|
1194
1200
|
|
|
1201
|
+
# Handle json options schema if present
|
|
1202
|
+
if 'jsonOptions' in json_data:
|
|
1203
|
+
json_opts = json_data['jsonOptions']
|
|
1204
|
+
if json_opts and 'schema' in json_opts and hasattr(json_opts['schema'], 'schema'):
|
|
1205
|
+
json_data['jsonOptions']['schema'] = json_opts['schema'].schema()
|
|
1206
|
+
|
|
1195
1207
|
try:
|
|
1196
1208
|
response = self._post_request(f'{self.api_url}/v1/deep-research', json_data, headers)
|
|
1197
1209
|
if response.status_code == 200:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|