Skip to content

feat: 启用 DeepSeek 群聊共享上下文#49

Open
riesaexe wants to merge 1 commit into
MooncellWiki:mainfrom
riesaexe:feat/use-group-deepseek
Open

feat: 启用 DeepSeek 群聊共享上下文#49
riesaexe wants to merge 1 commit into
MooncellWiki:mainfrom
riesaexe:feat/use-group-deepseek

Conversation

@riesaexe

@riesaexe riesaexe commented Jun 29, 2026

Copy link
Copy Markdown

说明

本 PR 将支持群聊共享上下文的 nonebot-plugin-deepseek 直接 vendor 到 BotFooChan 的 src/plugins/nonebot_plugin_deepseek/,不再依赖外部 fork 或等待上游合并。

改动

  • 将修改后的 nonebot-plugin-deepseek 源码完整放入 src/plugins/nonebot_plugin_deepseek/
  • pyproject.toml
    • 移除原 nonebot-plugin-deepseek 的 PyPI/git 依赖。
    • 新增 vendored 插件所需的直接依赖:nonebot-plugin-localstorenonebot-plugin-waiterbeautifulsoup4
    • src/plugins/nonebot_plugin_deepseek 排除在 ruffpyright 检查之外。
  • .env
    • PLUGINS 列表中移除 nonebot_plugin_deepseek(改为由 PLUGIN_DIRS=["src/plugins"] 自动加载)。
    • 新增群聊上下文配置:
      DEEPSEEK__ENABLE_GROUP_CONTEXT=true
      DEEPSEEK__MAX_GROUP_HISTORY=20
      DEEPSEEK__TIMEOUT=600

效果

  • 同一 QQ 群内所有成员的 /ds 提问共用同一会话。
  • 不同群之间上下文隔离。
  • 历史消息超过 MAX_GROUP_HISTORY 条后自动保留最近的消息。
  • 用户可发送 /ds --reset-group-context 重置当前群会话。
  • 原有功能(余额查询、模型设置、TTS、Markdown 转图片、多轮对话 --with-context 等)保持不变。

备注

@riesaexe riesaexe closed this Jun 29, 2026
@riesaexe riesaexe reopened this Jun 29, 2026
- Inline the modified nonebot-plugin-deepseek into src/plugins/
- Add required direct dependencies: localstore, waiter, beautifulsoup4
- Remove external git dependency on riesaexe/nonebot-plugin-deepseek
- Remove nonebot_plugin_deepseek from PLUGINS list (now loaded from src/plugins)
- Enable DEEPSEEK__ENABLE_GROUP_CONTEXT and set MAX_GROUP_HISTORY=20
- Exclude vendored plugin from ruff and pyright checks
@riesaexe
riesaexe force-pushed the feat/use-group-deepseek branch from 8b15e11 to 4e8fd45 Compare June 29, 2026 08:15
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.

1 participant