jihuaqiang 2 месяцев назад
Родитель
Сommit
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进行内容结构化处理