-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
完善插件管理器的消息处理机制并启用多个插件 #1382
Open
chuanSir123
wants to merge
34
commits into
lss233:refactoring-v3-mvp
Choose a base branch
from
chuanSir123:refactoring-v3-mvp
base: refactoring-v3-mvp
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,488
−45
Open
完善插件管理器的消息处理机制并启用多个插件 #1382
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
a57767c
fix(ratelimit): 对齐 current_day
lss233 ea795b1
fix(dependencies): add creart
lss233 b82ead5
Update requirements.txt
lss233 e98d2a1
fix: requirements
lss233 a4dfc6e
Update requirements.txt
magisk317 546f248
Replace deprecated FreeTypeFont.getsize()
xslingcn d61e547
完善HTTP API说明
liu2-3zhi 7eb7061
修复BUG
liu2-3zhi 42c0a82
Update http_service.py
liu2-3zhi 706cc51
Update http_service.py
liu2-3zhi 3cab527
Update http_service.py
liu2-3zhi 6b1307c
暂时抑制用户发送空消息时关于未定义conversation_handler的报错(转至log报错)
TNTcraftHIM 6d55731
修改log输出至stdout
TNTcraftHIM d1f9c37
可以在preset的system字段中添加{date}变量
TNTcraftHIM 7a27f4a
在重置会话时自动加载默认预设
TNTcraftHIM 0aa5b69
允许在sdwebui配置中添加alwayson_scripts
TNTcraftHIM 3f66e7b
Merge remote-tracking branch 'upstream/refactoring-v3-mvp' into refac…
2aa7bed
主要更新:
431dd76
更新配置文件结构并新增多个默认插件(openai插件,自动工作流插件,提示词增强插件,图片生成插件,音乐插件,天气插件)
7538d29
更新自动工作流插件,加入重试机制
68b2bb5
生成图片插件漏了配置文件
3e3fc39
回滚实例注册,采用已有的实例管理
6b20fe5
自动工作流插件,改用已有的llm实例进行访问
bf7063b
新增定时器插件
0c2b80b
定时任务插件:优化一次性定时任务的load
244957b
新增图片理解插件。
7ed0cc3
去除多余的实例加载
85c494f
Merge remote-tracking branch 'refs/remotes/upstream/refactoring-v3-mv…
dfd1398
冲突
de612d4
主代码更新IMMessage
6785a45
主代码更新IMMessage
6ed61ec
定时任务根据chat_id存储
8d5dd02
增加快捷回复的触发规则
6dd7d2d
优化插件-工作流触发
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -214,8 +214,8 @@ debug = false | |||||||||||||||||
|:---|:---|:---| | ||||||||||||||||||
|result| String |SUCESS,DONE,FAILED| | ||||||||||||||||||
|message| String[] |文本返回,支持多段返回| | ||||||||||||||||||
|voice| String[] |音频返回,支持多个音频的base64编码;参考:data:audio/mpeg;base64,...| | ||||||||||||||||||
|image| String[] |图片返回,支持多个图片的base64编码;参考:data:image/png;base64,...| | ||||||||||||||||||
|voice| String[] |音频返回,支持多个音频的base64编码;参考:data:audio/mpeg;base64,,iVBORw0KGgoAAAANS...| | ||||||||||||||||||
|image| String[] |图片返回,支持多个图片的base64编码;参考:data:image/png;base64,UhEUgAAAgAAAAIACAIA...| | ||||||||||||||||||
Comment on lines
+217
to
+218
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 建议: Base64示例似乎被截断。 Base64的语音和图像示例似乎被截断。请完成这些示例或指明它们是占位符。
Suggested change
Original comment in Englishsuggestion: Base64 examples seem truncated. The base64 examples for voice and image appear truncated. Please complete these examples or indicate that they are placeholders.
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
**响应示例** | ||||||||||||||||||
```json | ||||||||||||||||||
|
@@ -245,6 +245,17 @@ debug = false | |||||||||||||||||
"message": "ping" | ||||||||||||||||||
} | ||||||||||||||||||
``` | ||||||||||||||||||
|
||||||||||||||||||
* 请注意,`session_id`请采用规范格式。其格式为`friend-`(好友)或`group-`(群组)加字符串 | ||||||||||||||||||
|
||||||||||||||||||
示例 | ||||||||||||||||||
``` | ||||||||||||||||||
friend-R6sxRvblulTZqNC | ||||||||||||||||||
group-M3jpvxv26mKVM | ||||||||||||||||||
``` | ||||||||||||||||||
|
||||||||||||||||||
如果不能正确继续是好友还是群组,将一律按照群组处理 | ||||||||||||||||||
|
||||||||||||||||||
**响应格式** | ||||||||||||||||||
字符串:request_id | ||||||||||||||||||
|
||||||||||||||||||
|
@@ -253,6 +264,12 @@ debug = false | |||||||||||||||||
1681525479905 | ||||||||||||||||||
``` | ||||||||||||||||||
|
||||||||||||||||||
* 请注意,返回的内容可能会带有引号。请去除引号。(包括 `"` 和 `'` ) | ||||||||||||||||||
|
||||||||||||||||||
``` | ||||||||||||||||||
'1681525479905' | ||||||||||||||||||
``` | ||||||||||||||||||
|
||||||||||||||||||
**GET** `/v2/chat/response` | ||||||||||||||||||
|
||||||||||||||||||
**请求参数** | ||||||||||||||||||
|
@@ -265,13 +282,28 @@ debug = false | |||||||||||||||||
``` | ||||||||||||||||||
/v2/chat/response?request_id=1681525479905 | ||||||||||||||||||
``` | ||||||||||||||||||
* 请注意,request_id不能带有引号(包括 `"` 和 `'` )。 | ||||||||||||||||||
下列为错误示范 | ||||||||||||||||||
``` | ||||||||||||||||||
/v2/chat/response?request_id='1681525479905' | ||||||||||||||||||
``` | ||||||||||||||||||
``` | ||||||||||||||||||
/v2/chat/response?request_id="1681525479905" | ||||||||||||||||||
``` | ||||||||||||||||||
``` | ||||||||||||||||||
/v2/chat/response?request_id='1681525479905" | ||||||||||||||||||
``` | ||||||||||||||||||
``` | ||||||||||||||||||
/v2/chat/response?request_id="1681525479905' | ||||||||||||||||||
``` | ||||||||||||||||||
|
||||||||||||||||||
**响应格式** | ||||||||||||||||||
|参数名|类型|说明| | ||||||||||||||||||
|:---|:---|:---| | ||||||||||||||||||
|result| String |SUCESS,DONE,FAILED| | ||||||||||||||||||
|message| String[] |文本返回,支持多段返回| | ||||||||||||||||||
|voice| String[] |音频返回,支持多个音频的base64编码;参考:data:audio/mpeg;base64,...| | ||||||||||||||||||
|image| String[] |图片返回,支持多个图片的base64编码;参考:data:image/png;base64,...| | ||||||||||||||||||
|voice| String[] |音频返回,支持多个音频的base64编码;参考:data:audio/mpeg;base64,,iVBORw0KGgoAAAANS...| | ||||||||||||||||||
|image| String[] |图片返回,支持多个图片的base64编码;参考:data:image/png;base64,UhEUgAAAgAAAAIACAIA...| | ||||||||||||||||||
|
||||||||||||||||||
* 每次请求返回增量并清空。DONE、FAILED之后没有更多返回。 | ||||||||||||||||||
|
||||||||||||||||||
|
@@ -280,10 +312,20 @@ debug = false | |||||||||||||||||
{ | ||||||||||||||||||
"result": "DONE", | ||||||||||||||||||
"message": ["pong!"], | ||||||||||||||||||
"voice": ["data:audio/mpeg;base64,..."], | ||||||||||||||||||
"image": ["data:image/png;base64,...", "data:image/png;base64,..."] | ||||||||||||||||||
"voice": ["data:audio/mpeg;base64,iVBORw0KGgoAAAANS..."], | ||||||||||||||||||
"image": ["data:image/png;base64,UhEUgAAAgAAAAIACAIA...", "data:image/png;base64,UhEUgAAAgAAAAIACAIA..."] | ||||||||||||||||||
} | ||||||||||||||||||
``` | ||||||||||||||||||
* 请注意,当返回 `SUCCESS`的时候表示等待 | ||||||||||||||||||
```json | ||||||||||||||||||
{"result": "SUCCESS", "message": [], "voice": [], "image": []} | ||||||||||||||||||
``` | ||||||||||||||||||
* 请注意,可能有多条`DONE`,请一直请求,直到出现`FAILED`。`FAILED`表示回复完毕。 | ||||||||||||||||||
```json | ||||||||||||||||||
{"result": "FAILED", "message": ["\u6ca1\u6709\u66f4\u591a\u4e86\uff01"], "voice": [], "image": []} | ||||||||||||||||||
``` | ||||||||||||||||||
* 请注意`DONE`和`FAILED`之间可能会穿插`SUCCESS`。整个回复周期可能会大于一分钟。 | ||||||||||||||||||
|
||||||||||||||||||
</details> | ||||||||||||||||||
|
||||||||||||||||||
## 🦊 加载预设 | ||||||||||||||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
ims: | ||
configs: | ||
onebot-default: | ||
access_token: '' | ||
filter_file: filter.json | ||
heartbeat_interval: '15000' | ||
host: 127.0.0.1 | ||
name: onebot | ||
port: '8567' | ||
reconnect_interval: '3000' | ||
enable: | ||
onebot: | ||
- onebot-default | ||
llms: | ||
backends: | ||
openai: | ||
adapter: openai | ||
configs: | ||
- api_base: https://wind.chuansir.top/v1 | ||
api_key: d3105c0f-f739-443d-922d-f937d2ee6ab6 | ||
model: claude-3.5-sonnet | ||
- api_base: https://api.deepseek.com | ||
api_key: sk-dc067d626bca4feaaf2bc7e4ed6c965b | ||
model: deepseek-chat | ||
enable: true | ||
models: | ||
- claude-3.5-sonnet | ||
- deepseek-chat | ||
plugins: | ||
enable: | ||
- image_generator | ||
- image_understanding | ||
- music_player | ||
- onebot_adapter | ||
- openai_adapter | ||
- prompt_generator | ||
- scheduler_plugin | ||
- weather_query | ||
- workflow_plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
问题(拼写错误): 拼写错误:SUCESS 应该是 SUCCESS。
Original comment in English
issue (typo): Typo: SUCESS should be SUCCESS.