File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,16 @@ FastGPT 已有系统工具已经迁移到这个仓库,新工具也将在这个
2525## 系统工具基础设施
2626
2727- [x] 工具独立运行
28- - [ ] 热插拔
28+ - [x] 热插拔
29+ - [x] 工具版本管理
30+ - [x] SSE 流响应
2931- [ ] 更优雅的 Secret 配置
3032- [ ] 可视化调试
3133- [ ] 反向调用 FastGPT
32- - [ ] 工具版本管理
33- - [ ] SSE 流响应
3434- [ ] 更多安全策略
3535
3636## 文档
3737
38- - [ 系统工具开发指南] ( https://doc.tryfastgpt.ai /docs/introduction/guide/plugins/dev_system_tool )
39- - [ 设计文档] ( https://doc.tryfastgpt.ai /docs/introduction/development/design/design_plugin )
38+ - [ 系统工具开发指南] ( https://doc.fastgpt.io /docs/introduction/guide/plugins/dev_system_tool )
39+ - [ 设计文档] ( https://doc.fastgpt.io /docs/introduction/development/design/design_plugin )
4040- [ 开发规范] ( ./dev_zh_CN.md )
Original file line number Diff line number Diff line change 11# FastGPT-plugin 开发文档
22
3-
43## 常用命令
54
65### 安装依赖
@@ -145,4 +144,4 @@ modules/tool/type/tool.ts 下修改 `ToolTypeMap` 字段来增加类型枚举。
145144### 新增模型
146145
1471461 . modules/model/provider 找到对应模型提供商配置文件
148- 2 . 按 ConfigModelItemSchema 数据类型填写配置即可
147+ 2 . 按 ConfigModelItemSchema 数据类型填写配置即可
Original file line number Diff line number Diff line change @@ -2,13 +2,20 @@ import { s } from '@/router/init';
22import { contract } from '@/contract' ;
33import { MongoS3TTL } from '@/s3/ttl/schema' ;
44import { UploadToolsS3Path } from '@tool/constants' ;
5+ import { MongoPlugin } from '@/mongo/models/plugins' ;
56
67export default s . route ( contract . tool . upload . confirmUpload , async ( { body } ) => {
7- const { toolId } = body ;
8+ const { toolIds } = body ;
9+
10+ await MongoPlugin . create (
11+ toolIds . map ( ( toolId ) => ( {
12+ toolId
13+ } ) )
14+ ) ;
815
916 await MongoS3TTL . deleteMany ( {
1017 minioKey : {
11- $regex : new RegExp ( ` ${ UploadToolsS3Path } /${ toolId } `)
18+ $regex : toolIds . map ( ( toolId ) => `^ ${ UploadToolsS3Path } /${ toolId } `) . join ( '|' )
1219 }
1320 } ) ;
1421
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export const toolUploadContract = c.router(
4343 method : 'POST' ,
4444 description : 'Upload and install a tool plugin' ,
4545 body : z . object ( {
46- toolId : z . string ( )
46+ toolIds : z . array ( z . string ( ) )
4747 } ) ,
4848 responses : {
4949 200 : z . object ( {
You can’t perform that action at this time.
0 commit comments