Skip to content

feat: 新增本地 Neo4j 图数据库后端#702

Open
OneZe1023 wants to merge 5 commits into
666ghj:mainfrom
OneZe1023:main
Open

feat: 新增本地 Neo4j 图数据库后端#702
OneZe1023 wants to merge 5 commits into
666ghj:mainfrom
OneZe1023:main

Conversation

@OneZe1023

Copy link
Copy Markdown

动机
原 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(与上游一致)

OneZe1023 and others added 5 commits June 16, 2026 09:02
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants