spiderforce4ai 2.5.3__tar.gz → 2.5.4__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: spiderforce4ai
3
- Version: 2.5.3
3
+ Version: 2.5.4
4
4
  Summary: Python wrapper for SpiderForce4AI HTML-to-Markdown conversion service with LLM post-processing
5
5
  Home-page: https://petertam.pro
6
6
  Author: Piotr Tamulewicz
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "spiderforce4ai"
7
- version = "2.5.3"
7
+ version = "2.5.4"
8
8
  description = "Python wrapper for SpiderForce4AI HTML-to-Markdown conversion service with LLM post-processing"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -7,7 +7,7 @@ with open("README.md", encoding="utf-8") as f:
7
7
 
8
8
  setup(
9
9
  name="spiderforce4ai",
10
- version="2.5.3",
10
+ version="2.5.4",
11
11
  author="Piotr Tamulewicz",
12
12
  author_email="pt@petertam.pro",
13
13
  description="Python wrapper for SpiderForce4AI HTML-to-Markdown conversion service with LLM post-processing",
@@ -298,12 +298,20 @@ class PostExtractionAgent:
298
298
  try:
299
299
  # Add URL to result before transformation
300
300
  result['url'] = url
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
+
301
309
  result = self.config.custom_transform_function(result)
302
310
  logger.info(f"Applied custom transformation for {url}")
303
311
  except Exception as e:
304
- error_msg = f"Error in custom transform for {url}: {str(e)}"
305
- logger.error(error_msg)
306
- console.print(f"[red]{error_msg}[/red]")
312
+ error_msg = f"Warning: Issue in custom transform for {url}: {str(e)}"
313
+ logger.warning(error_msg)
314
+ console.print(f"[yellow]{error_msg}[/yellow]")
307
315
 
308
316
  # Save result synchronously
309
317
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: spiderforce4ai
3
- Version: 2.5.3
3
+ Version: 2.5.4
4
4
  Summary: Python wrapper for SpiderForce4AI HTML-to-Markdown conversion service with LLM post-processing
5
5
  Home-page: https://petertam.pro
6
6
  Author: Piotr Tamulewicz
File without changes
File without changes