소스 검색

历史纪录特殊处理

jihuaqiang 2 달 전
부모
커밋
4b85cfae54
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      agent.py

+ 2 - 1
agent.py

@@ -421,7 +421,8 @@ def create_langgraph_workflow():
                             identify_result
                         )
                     else:
-                        identify_result = result_indentify_data
+                        # result_indentify_data是JSON字符串,需要解析为对象
+                        identify_result = json.loads(result_indentify_data) if isinstance(result_indentify_data, str) else result_indentify_data
                         affected = result_id
                     
                     # 使用StructureTool进行内容结构化处理