spiderforce4ai 2.5.5__py3-none-any.whl → 2.5.7__py3-none-any.whl
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.
- spiderforce4ai/__init__.py +4 -1
- spiderforce4ai/post_extraction_agent.py +3 -8
- {spiderforce4ai-2.5.5.dist-info → spiderforce4ai-2.5.7.dist-info}/METADATA +1 -1
- spiderforce4ai-2.5.7.dist-info/RECORD +7 -0
- spiderforce4ai-2.5.5.dist-info/RECORD +0 -7
- {spiderforce4ai-2.5.5.dist-info → spiderforce4ai-2.5.7.dist-info}/WHEEL +0 -0
- {spiderforce4ai-2.5.5.dist-info → spiderforce4ai-2.5.7.dist-info}/entry_points.txt +0 -0
- {spiderforce4ai-2.5.5.dist-info → spiderforce4ai-2.5.7.dist-info}/top_level.txt +0 -0
spiderforce4ai/__init__.py
CHANGED
@@ -750,7 +750,10 @@ class SpiderForce4AI:
|
|
750
750
|
for result in successful_results:
|
751
751
|
try:
|
752
752
|
# Process content synchronously since it's not an async method
|
753
|
-
|
753
|
+
extraction_result = agent.process_content(result.url, result.markdown)
|
754
|
+
if extraction_result:
|
755
|
+
result.extraction_result = extraction_result
|
756
|
+
logger.info(f"Successfully processed and transformed content for {result.url}")
|
754
757
|
progress.update(llm_task, advance=1)
|
755
758
|
except Exception as e:
|
756
759
|
console.print(f"[red]Error in post-extraction processing for {result.url}: {str(e)}[/red]")
|
@@ -299,16 +299,11 @@ class PostExtractionAgent:
|
|
299
299
|
# Add URL to result before transformation
|
300
300
|
result['url'] = url
|
301
301
|
|
302
|
-
# Check for required fields and set to None if missing
|
303
|
-
required_fields = ['ContactInformation', 'CallToAction', 'KeyPoints', 'Title', 'Description', 'CanonicalUrl']
|
304
|
-
for field in required_fields:
|
305
|
-
if field not in result:
|
306
|
-
logger.warning(f"Missing field '{field}' in LLM response for {url}, setting to None")
|
307
|
-
result[field] = None
|
308
|
-
|
309
302
|
logger.info(f"Executing custom transformer function for {url}")
|
310
|
-
|
303
|
+
transformed_result = self.config.custom_transform_function(result)
|
311
304
|
logger.info(f"Successfully applied custom transformation for {url}")
|
305
|
+
logger.info(f"Webhook response sent for {url}")
|
306
|
+
return transformed_result # Return the transformed result
|
312
307
|
except Exception as e:
|
313
308
|
error_msg = f"Warning: Issue in custom transform for {url}: {str(e)}"
|
314
309
|
logger.warning(error_msg)
|
@@ -0,0 +1,7 @@
|
|
1
|
+
spiderforce4ai/__init__.py,sha256=BlrRIrtpDUHjmDedqgXP1KbAAsAH9vwFPncUR5VGGyM,44804
|
2
|
+
spiderforce4ai/post_extraction_agent.py,sha256=e7_f5Fd1BYCvqYAQ9D2jypVt8ScXw55FkX9SOeRA8Co,15812
|
3
|
+
spiderforce4ai-2.5.7.dist-info/METADATA,sha256=F4raYf8aoAlbV7f-YFkCNWfoOlhv2q7voSLzQF9k6s0,9012
|
4
|
+
spiderforce4ai-2.5.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
5
|
+
spiderforce4ai-2.5.7.dist-info/entry_points.txt,sha256=ibARQxOlDiL1ho12zbDZt4Uq5RKSIk_qk159ZlZ46hc,59
|
6
|
+
spiderforce4ai-2.5.7.dist-info/top_level.txt,sha256=Kth7A21Js7DCp0j5XBBi-FE45SCLouZkeNZU__Yr9Yk,15
|
7
|
+
spiderforce4ai-2.5.7.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
spiderforce4ai/__init__.py,sha256=Pk1rZXjAWxAaKAFu0pa-lB-020U4vxXP8p9-sFhPDb8,44584
|
2
|
-
spiderforce4ai/post_extraction_agent.py,sha256=6Bq8hVMnOarvOKpRHd5ncWV9G0fwwWJ63wZM0IJHXm8,16160
|
3
|
-
spiderforce4ai-2.5.5.dist-info/METADATA,sha256=KSkwhmJ2E9y4shyahGPMszdCMGHw0RGba1wh64111BY,9012
|
4
|
-
spiderforce4ai-2.5.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
5
|
-
spiderforce4ai-2.5.5.dist-info/entry_points.txt,sha256=ibARQxOlDiL1ho12zbDZt4Uq5RKSIk_qk159ZlZ46hc,59
|
6
|
-
spiderforce4ai-2.5.5.dist-info/top_level.txt,sha256=Kth7A21Js7DCp0j5XBBi-FE45SCLouZkeNZU__Yr9Yk,15
|
7
|
-
spiderforce4ai-2.5.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|