Spaces:
Runtime error

Macbath commited on
Commit
d3f2aa9
·
1 Parent(s): 650cb4f

fix: 增强JSON解析鲁棒性,修复截断/缺失逗号等问题

Browse files

- 改进_parse_json_with_fallback:json5失败时立即尝试修复截断的JSON
- 新增支持:直接解析response_text、修复缺失的逗号
- 改进_truncate_and_close_json:更健壮的截断修复逻辑
- 改进_repair_json:处理缺失逗号、未终止字符串等常见LLM输出错误
- 应用到modeling_agent.py和recommendation_agent.py

2 files changed +306 -57
Files changed (2)
agents/modeling_agent.py+106-29
agents/recommendation_agent.py+200-28