fix(ai): 修复 OpenAI 结构化输出解析问题并重构代码结构

- 修复 OpenAI structured output 的 properties 包装层解析问题
- 重构 parseCustomSchemaResult 函数,提高代码可维护性:
  - 拆分为多个职责单一的小函数
  - 消除重复的字段提取逻辑
  - 采用清晰的策略模式处理不同解析场景
- 增强测试用例,添加具体的数值和结构验证
- 保持完全向后兼容,所有现有测试通过

Fixes: TestQueryFunctionality/ComprehensiveAnalysis 测试失败问题
This commit is contained in:
lilong.129
2025-06-11 11:15:02 +08:00
parent caf75b087b
commit 50414ec74d
3 changed files with 131 additions and 95 deletions

View File

@@ -1 +1 @@
v5.0.0-beta-2506102252
v5.0.0-beta-2506111115