feat: 新增本地 Neo4j 图数据库后端#702
Open
OneZe1023 wants to merge 5 commits into
Open
Conversation
MiniMax API does not support the response_format parameter with json_object type, causing 400 errors. Added model name detection to conditionally skip this parameter for MiniMax models. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…llback - Add multi-strategy JSON parsing in llm_client.chat_json (control char removal, nested JSON extraction, single-quote fix, markdown code block handling) - Add ValueError-specific handler in plan_outline to extract JSON from error messages before falling back
…gument Co-Authored-By: Claude <noreply@anthropic.com>
guo-bc
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
动机
原 MiroFish 使用 Zep Cloud 进行图谱记忆存储与检索,需要云服务账号并引入外部依赖。本 PR 将 Zep Cloud 替换为本地 Neo4j 后端,使项目可完全离线运行,同时保留原有多智能体模拟流程。
主要改动
新增功能:
新增本地 Neo4j 适配器,实现图谱存储、实体读取、记忆更新和搜索
新增图数据库后端工厂,支持通过配置切换 Zep Cloud / Neo4j
新增基于 Poisson 的足球比分概率确定性计算与报告注入
新增 LLM 429 限流重试逻辑(可配置退避策略)
新增本地 Neo4j Docker Compose 配置文件
报告工具改进:
修复并增强 Deep Insight、Panorama Search、Quick Search 工具输出
工具输出改为前端可直接解析的文本结构,报告时间线可展示事实、实体和关系链
其他修复:
修复 report_agent.py 中重复关键字参数 simulation_requirement 导致的 SyntaxError
提升 chat_json 和 plan_outline fallback 的 JSON 解析健壮性
测试情况
后端使用 GRAPH_BACKEND=neo4j 可正常启动
Neo4j 连接通过 Docker Compose 验证正常
报告生成与图谱检索工具端到端运行正常
足球场景下比分概率模块正确注入
注意事项
需要 Neo4j 5.x(本地或 Docker 方式运行)
兼容 OpenAI SDK 兼容的 LLM API
开源协议保持 AGPL-3.0(与上游一致)