nonebot-plugin-dotcharacter 2.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 tghrt
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: nonebot-plugin-dotcharacter
3
+ Version: 2.0.2
4
+ Summary: NoneBot 插件:加载 dot-skill / colleague-skill 蒸馏角色,通过 QQ Bot 进行 AI 角色扮演对话
5
+ Author: tghrt
6
+ License: MIT
7
+ Keywords: nonebot,nonebot2,plugin,dot-skill,colleague-skill,roleplay,character,ai-chat
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Topic :: Communications :: Chat
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: nonebot2>=2.3.0
20
+ Requires-Dist: nonebot-adapter-onebot>=0.3.0
21
+ Requires-Dist: httpx>=0.24.0
22
+ Requires-Dist: pyyaml>=6.0
23
+ Requires-Dist: nonebot-plugin-localstore>=0.4.0
24
+ Dynamic: license-file
25
+
26
+ <div align="center">
27
+ <a href="https://v2.nonebot.dev/store"><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
28
+ <br>
29
+ <p><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
30
+ </div>
31
+
32
+ <div align="center">
33
+
34
+ # nonebot-plugin-dotcharacter
35
+
36
+ _✨ 加载 dot-skill / colleague-skill 蒸馏角色,通过 QQ Bot 进行 AI 角色扮演对话 ✨_
37
+
38
+ <a href="./LICENSE">
39
+ <img src="https://img.shields.io/github/license/TonyLiangP2010405/nonebot-plugin-dotcharacter.svg" alt="license">
40
+ </a>
41
+ <a href="https://pypi.python.org/pypi/nonebot-plugin-dotcharacter">
42
+ <img src="https://img.shields.io/pypi/v/nonebot-plugin-dotcharacter.svg" alt="pypi">
43
+ </a>
44
+ <img src="https://img.shields.io/badge/python-3.9+-blue.svg" alt="python">
45
+
46
+ </div>
47
+
48
+ ## 📖 介绍
49
+
50
+ 与 Claude Code 使用 dot-skill 角色对话完全一致:
51
+
52
+ 1. dot-skill / colleague-skill 从原材料(聊天记录、文档等)蒸馏出角色的 **SKILL.md**
53
+ 2. SKILL.md 包含 PART A(工作能力)和 PART B(人物性格)
54
+ 3. 对话时,系统提示词 = PART B 优先定态度 + PART A 供知识
55
+ 4. LLM 按照系统提示词生成符合角色风格的回复
56
+
57
+ 本插件做的事情:读取 SKILL.md → 构造系统提示词 → 管理多用户对话历史 → 调用 LLM API → 返回角色回复。
58
+
59
+ ### 特性
60
+
61
+ - 🎭 支持 celebrity / colleague / relationship 三类角色
62
+ - 🤖 支持 **9 个 LLM Provider** 预设(DeepSeek / OpenAI / Kimi / Qwen / Zhipu / SiliconFlow / Groq / Ollama / Custom)
63
+ - 📂 多目录角色扫描,支持 dot-skill 和 colleague-skill 两种格式
64
+ - 🔥 热加载角色,无需重启
65
+ - 💬 群聊 @机器人 触发对话,命令无需 @
66
+ - 👑 管理员权限控制(命令仅管理员可用)
67
+ - 🧠 多用户会话隔离
68
+
69
+ ## 💿 安装
70
+
71
+ <details open>
72
+ <summary>使用 nb-cli 安装</summary>
73
+ 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
74
+
75
+ nb plugin install nonebot-plugin-dotcharacter
76
+
77
+ </details>
78
+
79
+ <details>
80
+ <summary>使用包管理器安装</summary>
81
+ 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
82
+
83
+ <details>
84
+ <summary>pip</summary>
85
+
86
+ pip install nonebot-plugin-dotcharacter
87
+ </details>
88
+ <details>
89
+ <summary>pdm</summary>
90
+
91
+ pdm add nonebot-plugin-dotcharacter
92
+ </details>
93
+ <details>
94
+ <summary>poetry</summary>
95
+
96
+ poetry add nonebot-plugin-dotcharacter
97
+ </details>
98
+
99
+ 打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
100
+
101
+ plugins = ["nonebot_plugin_dotcharacter"]
102
+
103
+ </details>
104
+
105
+ ## ⚙️ 配置
106
+
107
+ 在 nonebot2 项目的 `.env` 文件中添加下表中的配置
108
+
109
+ | 配置项 | 必填 | 默认值 | 说明 |
110
+ |:-----:|:----:|:----:|:----:|
111
+ | DOTCHARACTER_PROVIDER | 否 | custom | LLM Provider 预设:deepseek / openai / kimi / qwen / zhipu / siliconflow / groq / ollama / custom |
112
+ | DOTCHARACTER_API_KEY | 是 | 无 | API Key |
113
+ | DOTCHARACTER_API_BASE | 否 | https://api.openai.com/v1 | API 地址(provider=custom 时有效) |
114
+ | DOTCHARACTER_MODEL | 否 | gpt-4o-mini | 模型名称 |
115
+ | DOTCHARACTER_SKILLS_PATH | 否 | 自动查找 | 角色目录路径(逗号分隔) |
116
+ | DOTCHARACTER_MAX_HISTORY | 否 | 20 | 对话历史条数 |
117
+ | DOTCHARACTER_TEMPERATURE | 否 | 0.8 | 生成温度 (0.0-2.0) |
118
+ | DOTCHARACTER_MAX_TOKENS | 否 | 1024 | 最大 Token 数 |
119
+ | DOTCHARACTER_TIMEOUT | 否 | 60 | API 超时秒数 |
120
+ | DOTCHARACTER_ADMIN_QQ | 否 | 无 | 管理员 QQ 号(逗号分隔) |
121
+ | DOTCHARACTER_ALLOWED_GROUPS | 否 | 无 | 允许的群号(逗号分隔,留空全部允许) |
122
+
123
+ ### LLM Provider 预设
124
+
125
+ | Provider | 默认模型 | Base URL |
126
+ |:--------:|:--------:|:--------:|
127
+ | deepseek | deepseek-chat | https://api.deepseek.com |
128
+ | openai | gpt-4o | https://api.openai.com/v1 |
129
+ | kimi | moonshot-v1-8k | https://api.moonshot.cn/v1 |
130
+ | qwen | qwen-plus | https://dashscope.aliyuncs.com/compatible-mode/v1 |
131
+ | zhipu | glm-4-plus | https://open.bigmodel.cn/api/paas/v4 |
132
+ | siliconflow | Qwen/Qwen2.5-72B-Instruct | https://api.siliconflow.cn/v1 |
133
+ | groq | llama-3.3-70b-versatile | https://api.groq.com/openai/v1 |
134
+ | ollama | llama3 | http://localhost:11434/v1 |
135
+ | custom | gpt-4o-mini | 自定义 |
136
+
137
+ ## 🎉 使用
138
+
139
+ ### 指令表
140
+
141
+ | 指令 | 权限 | 需要@ | 范围 | 说明 |
142
+ |:-----:|:----:|:----:|:----:|:----:|
143
+ | `!角色列表` | 管理员 | 否 | 群聊/私聊 | 列出所有可用角色 |
144
+ | `!角色切换 <名称>` | 管理员 | 否 | 群聊/私聊 | 切换到指定角色 |
145
+ | `!角色退出` | 管理员 | 否 | 群聊/私聊 | 退出当前对话 |
146
+ | `!重置对话` | 管理员 | 否 | 群聊/私聊 | 清空对话历史 |
147
+ | `!角色信息 [名称]` | 管理员 | 否 | 群聊/私聊 | 查看角色详情 |
148
+ | `!角色路径` | 管理员 | 否 | 群聊/私聊 | 查看当前扫描的目录 |
149
+ | `!角色刷新` | 管理员 | 否 | 群聊/私聊 | 重新扫描角色目录 |
150
+ | `!角色导入 add <路径>` | 管理员 | 否 | 群聊/私聊 | 添加角色目录 |
151
+ | `!模型切换` | 管理员 | 否 | 群聊/私聊 | 查看当前 LLM 配置 |
152
+ | `!模型切换 provider <名称>` | 管理员 | 否 | 群聊/私聊 | 切换 LLM Provider |
153
+ | `!模型切换 model <名称>` | 管理员 | 否 | 群聊/私聊 | 切换模型 |
154
+ | 直接对话 | 所有人 | 群聊需要 | 群聊/私聊 | 与角色对话 |
155
+
156
+ ## 🔗 相关项目
157
+
158
+ - [colleague-skill](https://github.com/titanwings/colleague-skill) — dot-skill 角色蒸馏工具,支持 celebrity / colleague / relationship 三类角色
159
+
160
+ ## 📄 许可证
161
+
162
+ MIT
@@ -0,0 +1,137 @@
1
+ <div align="center">
2
+ <a href="https://v2.nonebot.dev/store"><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
3
+ <br>
4
+ <p><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
5
+ </div>
6
+
7
+ <div align="center">
8
+
9
+ # nonebot-plugin-dotcharacter
10
+
11
+ _✨ 加载 dot-skill / colleague-skill 蒸馏角色,通过 QQ Bot 进行 AI 角色扮演对话 ✨_
12
+
13
+ <a href="./LICENSE">
14
+ <img src="https://img.shields.io/github/license/TonyLiangP2010405/nonebot-plugin-dotcharacter.svg" alt="license">
15
+ </a>
16
+ <a href="https://pypi.python.org/pypi/nonebot-plugin-dotcharacter">
17
+ <img src="https://img.shields.io/pypi/v/nonebot-plugin-dotcharacter.svg" alt="pypi">
18
+ </a>
19
+ <img src="https://img.shields.io/badge/python-3.9+-blue.svg" alt="python">
20
+
21
+ </div>
22
+
23
+ ## 📖 介绍
24
+
25
+ 与 Claude Code 使用 dot-skill 角色对话完全一致:
26
+
27
+ 1. dot-skill / colleague-skill 从原材料(聊天记录、文档等)蒸馏出角色的 **SKILL.md**
28
+ 2. SKILL.md 包含 PART A(工作能力)和 PART B(人物性格)
29
+ 3. 对话时,系统提示词 = PART B 优先定态度 + PART A 供知识
30
+ 4. LLM 按照系统提示词生成符合角色风格的回复
31
+
32
+ 本插件做的事情:读取 SKILL.md → 构造系统提示词 → 管理多用户对话历史 → 调用 LLM API → 返回角色回复。
33
+
34
+ ### 特性
35
+
36
+ - 🎭 支持 celebrity / colleague / relationship 三类角色
37
+ - 🤖 支持 **9 个 LLM Provider** 预设(DeepSeek / OpenAI / Kimi / Qwen / Zhipu / SiliconFlow / Groq / Ollama / Custom)
38
+ - 📂 多目录角色扫描,支持 dot-skill 和 colleague-skill 两种格式
39
+ - 🔥 热加载角色,无需重启
40
+ - 💬 群聊 @机器人 触发对话,命令无需 @
41
+ - 👑 管理员权限控制(命令仅管理员可用)
42
+ - 🧠 多用户会话隔离
43
+
44
+ ## 💿 安装
45
+
46
+ <details open>
47
+ <summary>使用 nb-cli 安装</summary>
48
+ 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
49
+
50
+ nb plugin install nonebot-plugin-dotcharacter
51
+
52
+ </details>
53
+
54
+ <details>
55
+ <summary>使用包管理器安装</summary>
56
+ 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
57
+
58
+ <details>
59
+ <summary>pip</summary>
60
+
61
+ pip install nonebot-plugin-dotcharacter
62
+ </details>
63
+ <details>
64
+ <summary>pdm</summary>
65
+
66
+ pdm add nonebot-plugin-dotcharacter
67
+ </details>
68
+ <details>
69
+ <summary>poetry</summary>
70
+
71
+ poetry add nonebot-plugin-dotcharacter
72
+ </details>
73
+
74
+ 打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
75
+
76
+ plugins = ["nonebot_plugin_dotcharacter"]
77
+
78
+ </details>
79
+
80
+ ## ⚙️ 配置
81
+
82
+ 在 nonebot2 项目的 `.env` 文件中添加下表中的配置
83
+
84
+ | 配置项 | 必填 | 默认值 | 说明 |
85
+ |:-----:|:----:|:----:|:----:|
86
+ | DOTCHARACTER_PROVIDER | 否 | custom | LLM Provider 预设:deepseek / openai / kimi / qwen / zhipu / siliconflow / groq / ollama / custom |
87
+ | DOTCHARACTER_API_KEY | 是 | 无 | API Key |
88
+ | DOTCHARACTER_API_BASE | 否 | https://api.openai.com/v1 | API 地址(provider=custom 时有效) |
89
+ | DOTCHARACTER_MODEL | 否 | gpt-4o-mini | 模型名称 |
90
+ | DOTCHARACTER_SKILLS_PATH | 否 | 自动查找 | 角色目录路径(逗号分隔) |
91
+ | DOTCHARACTER_MAX_HISTORY | 否 | 20 | 对话历史条数 |
92
+ | DOTCHARACTER_TEMPERATURE | 否 | 0.8 | 生成温度 (0.0-2.0) |
93
+ | DOTCHARACTER_MAX_TOKENS | 否 | 1024 | 最大 Token 数 |
94
+ | DOTCHARACTER_TIMEOUT | 否 | 60 | API 超时秒数 |
95
+ | DOTCHARACTER_ADMIN_QQ | 否 | 无 | 管理员 QQ 号(逗号分隔) |
96
+ | DOTCHARACTER_ALLOWED_GROUPS | 否 | 无 | 允许的群号(逗号分隔,留空全部允许) |
97
+
98
+ ### LLM Provider 预设
99
+
100
+ | Provider | 默认模型 | Base URL |
101
+ |:--------:|:--------:|:--------:|
102
+ | deepseek | deepseek-chat | https://api.deepseek.com |
103
+ | openai | gpt-4o | https://api.openai.com/v1 |
104
+ | kimi | moonshot-v1-8k | https://api.moonshot.cn/v1 |
105
+ | qwen | qwen-plus | https://dashscope.aliyuncs.com/compatible-mode/v1 |
106
+ | zhipu | glm-4-plus | https://open.bigmodel.cn/api/paas/v4 |
107
+ | siliconflow | Qwen/Qwen2.5-72B-Instruct | https://api.siliconflow.cn/v1 |
108
+ | groq | llama-3.3-70b-versatile | https://api.groq.com/openai/v1 |
109
+ | ollama | llama3 | http://localhost:11434/v1 |
110
+ | custom | gpt-4o-mini | 自定义 |
111
+
112
+ ## 🎉 使用
113
+
114
+ ### 指令表
115
+
116
+ | 指令 | 权限 | 需要@ | 范围 | 说明 |
117
+ |:-----:|:----:|:----:|:----:|:----:|
118
+ | `!角色列表` | 管理员 | 否 | 群聊/私聊 | 列出所有可用角色 |
119
+ | `!角色切换 <名称>` | 管理员 | 否 | 群聊/私聊 | 切换到指定角色 |
120
+ | `!角色退出` | 管理员 | 否 | 群聊/私聊 | 退出当前对话 |
121
+ | `!重置对话` | 管理员 | 否 | 群聊/私聊 | 清空对话历史 |
122
+ | `!角色信息 [名称]` | 管理员 | 否 | 群聊/私聊 | 查看角色详情 |
123
+ | `!角色路径` | 管理员 | 否 | 群聊/私聊 | 查看当前扫描的目录 |
124
+ | `!角色刷新` | 管理员 | 否 | 群聊/私聊 | 重新扫描角色目录 |
125
+ | `!角色导入 add <路径>` | 管理员 | 否 | 群聊/私聊 | 添加角色目录 |
126
+ | `!模型切换` | 管理员 | 否 | 群聊/私聊 | 查看当前 LLM 配置 |
127
+ | `!模型切换 provider <名称>` | 管理员 | 否 | 群聊/私聊 | 切换 LLM Provider |
128
+ | `!模型切换 model <名称>` | 管理员 | 否 | 群聊/私聊 | 切换模型 |
129
+ | 直接对话 | 所有人 | 群聊需要 | 群聊/私聊 | 与角色对话 |
130
+
131
+ ## 🔗 相关项目
132
+
133
+ - [colleague-skill](https://github.com/titanwings/colleague-skill) — dot-skill 角色蒸馏工具,支持 celebrity / colleague / relationship 三类角色
134
+
135
+ ## 📄 许可证
136
+
137
+ MIT