Commit Graph

441 Commits

Author SHA1 Message Date
朱潮
6b2ef1137a add static-site-deploy 2026-03-07 23:54:43 +08:00
朱潮
c6641337c1 Merge branch 'master' into bot_manager 2026-03-05 15:39:59 +08:00
朱潮
49151916c6 Merge branch 'master' of https://github.com/sparticleinc/catalog-agent 2026-03-05 15:08:34 +08:00
朱潮
4c74acaf18 chat.py:730 的 v2 接口 exclude_fields 现在与 v1 接口保持一致,补上了 'model', 'model_server', 'dataset_ids', 'system_prompt', 'mcp_settings',
'robot_type', 'enable_thinking', 'skills', 'enable_memory' 这些字段。
2026-03-05 15:08:09 +08:00
autobee-sparticle
6309a53860
feat(novare): 添加人员在離判定规则,利用 last_communication_time 字段判断人员是否在 NOVARE 楼内 (#13)
EB API 始终返回人员最后已知坐标,不区分在馆/离馆。通过检查 last_communication_time
与当前时刻的差值(阈值5分钟/24小时),实现三级在離判定并提供对应的日语回答模板。

Closes sparticleinc/mygpt-frontend#1963

Co-authored-by: zhuchao <zhuchaowe@163.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:21:16 +09:00
朱潮
b6b821c9bb bug fix 2026-03-04 14:30:44 +08:00
朱潮
f7773a93e1 Merge branch 'upgrade/deepagents-0.4.4' 2026-03-04 14:08:51 +08:00
朱潮
52d8161b0e 修改确保 max_length 永远不会是 None 2026-03-04 14:08:26 +08:00
朱潮
26905ad623 新增memory管理 2026-03-04 13:43:49 +08:00
朱潮
9215f8236d 🐛 fix: 修复 Mem0 连接池耗尽和 LLM 参数透传问题
- mem0_manager: 添加 _cleanup_mem0_instance 方法,在缓存移除实例时显式释放数据库连接,避免等待 GC 导致连接池耗尽
- deep_assistant: 根据 model_provider 过滤不支持的参数,Anthropic 不支持 OpenAI 特有参数如 n、presence_penalty 等

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-04 10:11:44 +08:00
朱潮
b3b6dd85d9 排查n参数 2026-03-04 09:57:36 +08:00
autobee-sparticle
a6f071119f
Merge pull request #12 from sparticleinc/bugfix/autobee-20260302-memory-results-fix
fix(memory): handle Mem0 get_all response format with results key
2026-03-02 22:29:13 +09:00
86b38262fa fix(memory): handle Mem0 get_all response format with results key
Mem0's get_all() returns data in format {"results": [...]}, not a direct list.
Also, agent_id is at the top level of each memory, not in metadata.

Changes:
- Add _extract_memories_from_response() to handle both new and old response formats
- Add _check_agent_id_match() to check agent_id at both top-level and in metadata
- Update get_all_memories, delete_memory, delete_all_memories to use new helpers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:28:39 +00:00
autobee-sparticle
572374b297
fix(memory): handle Mem0 get_all returning string or dict items (#11)
Mem0's get_all() method may return a list containing either strings
(older version format) or dictionaries (newer version format). This
fix adds proper type checking to handle both cases gracefully.

- get_all_memories: Skip string items, only process dict items
- delete_memory: Add type checking before accessing dict methods
- delete_all_memories: Add type checking before accessing dict methods

Fixes: 'str' object has no attribute 'get' error

Co-authored-by: zhuchao <zhuchaowe@163.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:02:59 +09:00
a1f60a7024 fix: 修复 get_all_memories 调用时 config 为 None 导致的错误
问题:当调用 get_all_memories API 时,没有传递 config 参数,
导致 _create_mem0_instance 中的 config 为 None,
调用 config.get_custom_fact_extraction_prompt() 时抛出 AttributeError。

修复:添加 config 的空值检查,只在 config 存在时才添加 custom_fact_extraction_prompt。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:39:45 +00:00
朱潮
5b29e866f2 现在 v1 和 v2 接口都支持传递额外参数了 2026-03-02 20:01:43 +08:00
朱潮
f72a53462a Merge branch 'master' of https://github.com/sparticleinc/catalog-agent 2026-03-02 16:07:10 +08:00
朱潮
17f4217f29 添加了同名人员处理说明 2026-03-02 16:06:58 +08:00
朱潮
ba51bd3583 Merge branch 'upgrade/deepagents-0.4.4' into bot_manager 2026-03-02 15:27:44 +08:00
朱潮
186d2fe265 添加tmp脚本删除 2026-03-02 15:27:26 +08:00
朱潮
4ae8060eb3 Merge branch 'upgrade/deepagents-0.4.4' into bot_manager 2026-03-02 15:05:13 +08:00
朱潮
f435ab6a61 script manage prompt 2026-03-02 15:05:03 +08:00
朱潮
6a9003ba77 文件名上传修复 2026-03-02 14:29:14 +08:00
朱潮
82ffe8b623 文件名上传修复 2026-03-02 14:27:32 +08:00
朱潮
251f5966fd Merge branch 'upgrade/deepagents-0.4.4' into bot_manager 2026-03-02 13:24:11 +08:00
朱潮
fc756a1353 调整提示词 2026-03-02 13:23:58 +08:00
朱潮
81e5479094 Merge branch 'upgrade/deepagents-0.4.4' into bot_manager 2026-03-02 12:55:47 +08:00
朱潮
4a534163d5 skill.md文件长度限制解除 2026-03-02 12:55:39 +08:00
朱潮
6cb7392488 Merge branch 'upgrade/deepagents-0.4.4' into bot_manager 2026-03-02 12:17:41 +08:00
朱潮
03078a2077 移除虚拟文件夹 2026-03-02 12:17:19 +08:00
朱潮
6f665b4117 Merge branch 'master' into bot_manager 2026-03-02 10:37:49 +08:00
朱潮
55505c727a update managing-scripts 2026-03-02 10:37:32 +08:00
朱潮
965c5f99ae upgrade/deepagents-0.4.4 2026-03-02 02:30:23 +08:00
朱潮
61c8186b55 upgrade/deepagents-0.4.4 2026-03-02 02:27:42 +08:00
朱潮
0b20cc68ba docs: update plan status to completed 2026-03-02 01:38:15 +08:00
朱潮
3ce0b6a9f8 fix: update CustomSkillsMiddleware.before_agent signature
Add missing 'config' parameter to match new SkillsMiddleware API.
2026-03-02 01:37:30 +08:00
朱潮
a0b6e4cc7f feat: upgrade deepagents 0.4.3 and deepagents-cli 0.0.25
- Replace ShellMiddleware with LocalShellBackend
- Update AgentMemoryMiddleware to MemoryMiddleware with new signature
- Update CustomSkillsMiddleware to use new SkillsMiddleware signature
- Add LocalContextMiddleware for local context
- Update CompositeBackend to use routing
- Update dependencies: langgraph-checkpoint-postgres to 3.0.4

Breaking Changes:
- agent/deep_assistant.py: Major refactoring to adapt to new deepagents API
  - pyproject.toml: Version bump
    - deepagents: 0.2.8 -> 0.4.3
    - deepagents-cli: 0.0.11 -> 0.0.25
  - langgraph-checkpoint-postgres: 2.0.25 -> 3.0.4 (for compatibility with langgraph-checkpoint 3.x)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-02 01:29:58 +08:00
朱潮
9c258664f2 Merge branch 'master' into bot_manager 2026-02-28 23:28:56 +08:00
朱潮
8d29a263e1 修复 robot 目录被意外清空的问题
移除 create_robot_project 的重建逻辑,避免在发送消息时删除 dataset 文件夹内容

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 23:28:37 +08:00
朱潮
ec921e3319 更新模型选择 2026-02-28 22:39:55 +08:00
朱潮
4295860f7d 更新skill manager 2026-02-28 11:47:21 +08:00
autobee-sparticle
108c675c3d
feat(memory): add memory management API endpoints (#10)
* chore: add .worktrees/ to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(memory): add memory management API endpoints

Add new /api/v1/memory endpoints for viewing and managing user memories:
- GET /api/v1/memory - list all memories for a bot
- DELETE /api/v1/memory/{memory_id} - delete single memory
- DELETE /api/v1/memory - delete all memories for a bot

Also add delete_memory and delete_all_memories methods to Mem0Manager.

Issue: #1844

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: zhuchao <zhuchaowe@163.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 18:01:12 +09:00
朱潮
c3d2018a56 new api 2026-02-27 00:38:13 +08:00
朱潮
6365d65715 user_identifier 2026-02-27 00:21:06 +08:00
朱潮
c9c9a71452 subaccount 2026-02-26 23:56:45 +08:00
朱潮
912d5ebbed 个人中心 2026-02-26 18:11:22 +08:00
autobee-sparticle
90a2d0555f
fix(novare): 添加设备状态术语转换规则,避免系统术语泄露 (#9)
* chore: add .worktrees/ to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(novare): 添加设备状态术语转换规则,避免系统术语泄露

问题:Bot 在回答设备状态时直接使用「オフライン」等系统内部术语,
与用户认知模型不匹配,导致困惑。

解决方案:在 prompt/novare.md 的「响应规范」部分添加术语转换规则:
- 禁止在用户回复中使用系统内部术语
- 优先报告功能状态(亮度、温度等),不提及连接状态
- 提供具体的场景处理示例和正确/错误对比

closes #1853

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: zhuchao <zhuchaowe@163.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:14:29 +09:00
朱潮
c751c7997e sigle agent mode 2026-02-26 08:58:32 +08:00
朱潮
7cb2c9c5ca feat: 单智能体模式下加载用户所有知识库
- get_bot_settings 接口中,单智能体模式时加载用户的所有知识库
- 不再从 settings_json 读取 dataset_ids

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-26 08:29:10 +08:00
朱潮
1d82ca9ba8 feat: 添加启动时自动执行数据库迁移
添加 migrate_single_agent_mode 函数,在系统启动时自动添加
single_agent_bot_id 字段到 agent_user 表

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-26 08:13:36 +08:00