spiderforce4ai 2.5.2__py3-none-any.whl → 2.5.3__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -0,0 +1,7 @@
1
+ spiderforce4ai/__init__.py,sha256=YgzX9AKw_q2Jp_jZq17UgOuoeJeBRfWz9I73TOBerSs,44100
2
+ spiderforce4ai/post_extraction_agent.py,sha256=r8xRq_uwwTxAM-1FVxYRlJMg7CIwQs710plw_10P7eg,15502
3
+ spiderforce4ai-2.5.3.dist-info/METADATA,sha256=yULQF7kxyO0Oe8JUPWiz31FPl5b2Pbri2BY_5LzeEbE,9012
4
+ spiderforce4ai-2.5.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
5
+ spiderforce4ai-2.5.3.dist-info/entry_points.txt,sha256=ibARQxOlDiL1ho12zbDZt4Uq5RKSIk_qk159ZlZ46hc,59
6
+ spiderforce4ai-2.5.3.dist-info/top_level.txt,sha256=Kth7A21Js7DCp0j5XBBi-FE45SCLouZkeNZU__Yr9Yk,15
7
+ spiderforce4ai-2.5.3.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- spiderforce4ai/__init__.py,sha256=ipAArcZXJpB-KT4MSs0NReY5mhpO2X0Zsoh-roibWWI,43401
2
- spiderforce4ai/post_extraction_agent.py,sha256=r8xRq_uwwTxAM-1FVxYRlJMg7CIwQs710plw_10P7eg,15502
3
- spiderforce4ai-2.5.2.dist-info/METADATA,sha256=vVB8EjRQ9BjfU6Rw-6KG_Ce5eIk3Tp6SHSnw6pLtN5Y,9012
4
- spiderforce4ai-2.5.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
5
- spiderforce4ai-2.5.2.dist-info/entry_points.txt,sha256=ibARQxOlDiL1ho12zbDZt4Uq5RKSIk_qk159ZlZ46hc,59
6
- spiderforce4ai-2.5.2.dist-info/top_level.txt,sha256=Kth7A21Js7DCp0j5XBBi-FE45SCLouZkeNZU__Yr9Yk,15
7
- spiderforce4ai-2.5.2.dist-info/RECORD,,