jihuaqiang 3 semanas atrás
pai
commit
4b9fabe8d1
2 arquivos alterados com 4 adições e 1 exclusões
  1. 2 1
      agent.py
  2. 2 0
      tools/agent_tools.py

+ 2 - 1
agent.py

@@ -457,7 +457,8 @@ def create_langgraph_workflow():
                     )
 
                     logger.info(f"结构化结果: {structure_result}, 存储结果: {parsing_affected}")
-                    
+                    logger.info(f"调试信息: affected={affected}, content_id={content_id}, result_status={result_status}")
+                    logger.info(f"--------------------------------")
                     ok = affected is not None and affected > 0 and parsing_affected is not None and parsing_affected > 0
                     if ok:
                         success_count += 1

+ 2 - 0
tools/agent_tools.py

@@ -324,6 +324,8 @@ class UpdateDataTool:
         try:
             # 从原始数据中提取必要字段
             content_id = crawl_raw.get('content_id') or ''
+            parsing_id = crawl_raw.get('id') or ''
+            logger.info(f"store_parsing_result 调试: request_id={request_id}, content_id={content_id}, parsing_id={parsing_id}")
             
             # 只提取result字段的内容,如果不存在则使用整个对象
             structured_content = parsing_result.get('structured_content', {})