fix(xingbang): workflow.run() 返回值 file 字段转字符串, 修复 JSON 序列化崩溃

五智能体流水线真实提交后返回结果序列化失败(WindowsPath 不可 JSON 序列化)。
将 file 字段转为 str, 确保 run() 返回值可被 API 序列化返回。
This commit is contained in:
NathanAlex7
2026-09-01 17:02:32 +08:00
parent c4ac5aa82e
commit 9ef970320b
+8 -2
View File
@@ -129,8 +129,14 @@ class XingbangWorkflow:
"trajectory_id": traj_id,
"customer": customer,
"reward": reward,
"results": {k: {kk: vv for kk, vv in v.items() if kk in ("output", "file", "success")}
for k, v in self._results.items()},
"results": {
k: {
kk: (str(vv) if kk == "file" and vv is not None else vv)
for kk, vv in v.items()
if kk in ("output", "file", "success")
}
for k, v in self._results.items()
},
"final_summary": summary_parts,
"evolution_insights_file": str(insights_path),
}