spiderforce4ai 2.5.2__tar.gz → 2.5.3__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.2
3
+ Version: 2.5.3
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.2"
7
+ version = "2.5.3"
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.2",
10
+ version="2.5.3",
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",
@@ -890,6 +890,14 @@ class SpiderForce4AI:
890
890
  if config.post_agent_transformer_function:
891
891
  try:
892
892
  result.extraction_result = config.post_agent_transformer_function(llm_response)
893
+ except KeyError as e:
894
+ # Log missing field but continue with transformation
895
+ missing_field = str(e).strip("'")
896
+ logger.warning(f"Missing field '{missing_field}' in LLM response for {result.url}")
897
+ # Add missing field with empty value
898
+ llm_response[missing_field] = ""
899
+ # Retry transformation with added field
900
+ result.extraction_result = config.post_agent_transformer_function(llm_response)
893
901
  except Exception as e:
894
902
  logger.error(f"Transformer error for {result.url}: {str(e)}")
895
903
  result.extraction_result = llm_response # Use original response if transform fails
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: spiderforce4ai
3
- Version: 2.5.2
3
+ Version: 2.5.3
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