Commit Graph

230 Commits

Author SHA1 Message Date
朱潮
a277e859d1 Merge branch 'developing' into bot_manager 2026-06-23 19:32:13 +08:00
朱潮
e4af642268 add language.json 2026-06-23 18:35:23 +08:00
朱潮
6835003d15 fix: BotSettingsResponse.skills 改为 list 类型,修复 settings 接口 500
The /api/v1/general-agent/settings endpoint returned HTTP 500 because
config/general_agent.json stores skills as a list while the response
model expected Optional[str]. Add _normalize_skills_list and apply it in
both get_general_agent_settings_api and get_bot_settings so list and
legacy comma-separated string inputs both yield a list output.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-23 10:11:19 +08:00
朱潮
6f2af8ecbf feat: support per-request skills override in v3 chat API
Allow the frontend to inject extra skills (merged with the bot's default
skills) for a single request. Used by the home/chat pages to enable
ragflow-loader when the user selects a knowledge base.
2026-06-23 07:56:31 +08:00
朱潮
148ebc5904 优化agent v3接口 2026-06-22 16:39:04 +08:00
朱潮
41b2c898ec fix: 通用智能体工作目录按用户隔离
projects/robot/general-agent 所有用户共享会导致文件/会话产物互串。
get_general_agent_runtime_config 生成 project_dir_key=general-agent-{user},
v3 chat 优先用它作为 create_project_directory 的目录标识。
普通 bot 不返回 project_dir_key,行为不变。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-21 18:29:09 +08:00
朱潮
f57949520f feat: 新增配置文件驱动的通用智能体
- 新增 config/general_agent.json 与 utils/general_agent_config.py
- 登录返回的单智能体改为读取配置文件,不再复制 bot/skills
- 新增 GET /api/v1/general-agent/settings 接口
- v3 chat 在 bot_id=general-agent 时从配置文件读取运行时配置

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-21 17:01:33 +08:00
朱潮
01fb63c955 add EMBEDDING_BASE_URL 2026-06-18 14:56:27 +08:00
朱潮
13bdd9d40a feat: support multimodal image (base64) input in chat API
Normalize OpenAI-style and LangChain standard image blocks into LangChain
standard content blocks so provider block_translators auto-convert for
either OpenAI or Anthropic. Flatten multimodal content to plain text when
persisting history and computing term embeddings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 11:34:57 +08:00
朱潮
cb649d83ee Merge branch 'developing' into bot_manager
# Conflicts:
#	.features/skill/MEMORY.md
#	poetry.lock
#	requirements.txt
2026-06-08 20:07:30 +08:00
朱潮
77079539c1 refactor: remove file-parsing knowledge-base pipeline and Huey queue
The local file-parsing pipeline (upload -> Huey async parse -> generate
projects/data/.../document.txt) is no longer needed: RAG retrieval runs
against the backend vector store and does not read the local parse output,
so removing this has zero impact on existing bot Q&A.

- Delete task_queue/ (Huey queue, consumer, tasks, task status store)
- Delete parsing utils: dataset_manager, single_file_processor,
  data_merger, project_manager
- Delete db_manager.py (only managed task_status.db)
- routes/files.py: keep only POST /api/v1/upload; drop all
  parse/queue/task endpoints
- routes/projects.py: drop /tasks endpoint and task_status import
- utils/__init__.py & api_models.py: remove exports/models for deleted
  modules and queue task models
- start_unified.py & start_all_optimized.sh: no longer launch the
  queue consumer
- Drop huey dependency (keep redis)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 19:40:58 +08:00
朱潮
1fc105a732 透传接口现在支持视觉图片识别 2026-06-07 11:02:10 +08:00
朱潮
f45f55b50a add /api/v3/llm/chat/completions 2026-06-07 10:57:34 +08:00
朱潮
f18d966123 add /api/v3/llm/chat/completions 2026-06-07 10:55:25 +08:00
朱潮
96ded5e598 Merge branch 'feature/mcp-ui' into bot_manager 2026-05-26 16:13:37 +08:00
朱潮
203dcf4a4e skill category 2026-05-26 16:13:26 +08:00
朱潮
3809536746 refactor: replace mcp_resources API with direct /robots/ static file access
- Remove routes/mcp_resources.py (ui:// URI resolver endpoint)
- Frontend now directly accesses /robots/{bot_id}/skills/{server}/apps/{resource}.html
- Add Daytona fallback middleware to fetch files from sandbox on 404
- Add utils/daytona_file_fetcher.py for on-demand single file download
- Resolve merge conflict: keep voice, knowledge_base routes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-20 19:21:40 +08:00
朱潮
b4f8bb2935 refactor: replace mcp_resources API with direct /robots/ static file access
- Remove routes/mcp_resources.py (ui:// URI resolver endpoint)
- Frontend now directly accesses /robots/{bot_id}/skills/{server}/apps/{resource}.html
- Add Daytona fallback middleware to fetch files from sandbox on 404
- Add utils/daytona_file_fetcher.py for on-demand single file download

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-20 18:58:58 +08:00
朱潮
5ed28123b4 merge 2026-05-20 15:30:39 +08:00
朱潮
1a1df7f76b 优化为标准mcp app协议 2026-05-20 14:54:07 +08:00
朱潮
495b8031bb Merge branch 'feature/mcp-ui' into bot_manager 2026-05-19 19:23:57 +08:00
朱潮
c87daabd31 修改mcp协议 2026-05-19 19:19:39 +08:00
朱潮
65f3fba9ea Merge branch 'feature/mcp-ui' into bot_manager 2026-05-19 18:54:46 +08:00
朱潮
7615bd36ca 修改mcp协议 2026-05-19 18:54:37 +08:00
朱潮
ece8b5b7d2 Merge branch 'feature/mcp-ui' into bot_manager 2026-05-19 15:36:59 +08:00
朱潮
7f66279311 修改mcp-ui协议 2026-05-19 15:27:36 +08:00
朱潮
333bef1289 Merge branch 'feature/mcp-ui' into bot_manager 2026-05-18 20:19:15 +08:00
朱潮
add8a1fd18 使用 mcp_ui_server 库构建 UIResource 2026-05-18 20:19:10 +08:00
朱潮
4039bb0cb9 Merge branch 'feature/mcp-ui' into bot_manager 2026-05-18 16:24:05 +08:00
朱潮
cb4a1df0b4 update mcp-ui 2026-05-18 16:23:32 +08:00
朱潮
8482ec35d9 Merge branch 'feature/mcp-ui' into bot_manager 2026-05-18 12:43:13 +08:00
朱潮
18ad1fe156 优化ask_user 2026-05-18 12:43:06 +08:00
朱潮
50b08047d2 Merge branch 'feature/mcp-ui' into bot_manager 2026-05-18 11:37:41 +08:00
朱潮
0bf7a87a0e LLM 只需处理极短的 "Questions sent to user." 而不是完整的问题 JSON,减少了 token 消耗和延迟 2026-05-18 11:37:23 +08:00
朱潮
0bff09b61d Merge branch 'feature/mcp-ui' into bot_manager 2026-05-17 14:07:33 +08:00
朱潮
02085b789a support mcpUiUrl 2026-05-17 14:07:25 +08:00
朱潮
6d7bcd62cd Merge branch 'feature/mcp-ui' into bot_manager 2026-05-15 19:25:56 +08:00
朱潮
03a30537ab ask user question 2026-05-15 19:25:08 +08:00
朱潮
cacf31abbe Merge branch 'feature/mcp-ui' into bot_manager 2026-05-15 18:02:34 +08:00
朱潮
26582f7d39 add config.tool_response or is_ui_resource — UIResource 始终输出,其他 tool response 仍受 tool_response 参数控制 2026-05-15 18:02:26 +08:00
朱潮
81d0ebdce7 把建表语句移到迁移函数之前执行,并把 agent_user、agent_user_tokens、bot_shares 也加入基础建表列表。 2026-05-12 20:49:16 +08:00
朱潮
718ec5302e Merge branch 'developing' into bot_manager 2026-05-12 12:44:19 +08:00
csh28
e4fc0db07d chore: improve agent error logging 2026-05-11 20:29:27 +08:00
csh28
951948639e Add agent final answer first char metric 2026-05-08 15:43:48 +08:00
朱潮
f5bb23a2d1 merge 2026-05-07 19:36:27 +08:00
朱潮
425f3c5bb4 chore: replace Chinese comments and log messages with English
Convert all Chinese comments, docstrings, logger/print output,
HTTPException detail messages, and API response messages to English
across the entire codebase. Functional zh/ja localized strings
(e.g. prompt templates, timezone display names, date formats) are
preserved as-is.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 19:45:35 +08:00
朱潮
45a94942b8 异步执行 _execute_post_agent_hooks 2026-04-24 13:07:44 +08:00
朱潮
8446dab1e4 daytona support 2026-04-23 15:09:09 +08:00
朱潮
8e35d860a5 merge 2026-04-20 22:42:53 +08:00
朱潮
f13f208900 add ENABLE_SELF_KNOWLEDGE 2026-04-20 19:24:30 +08:00