From 9e193b16a126b8ef48a8edff969bfa19a16fae9b Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Wed, 27 Mar 2024 13:47:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3=EF=BC=8C=E4=B8=8D=E8=A6=81=E6=8C=82=E8=BD=BD=E6=8C=81?= =?UTF-8?q?=E4=B9=85=E5=8C=96=20(#1075)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: plugin update * feat: get current time plugin * fix: ts * perf: select app ux * fix: ts * perf: max w * perf: inform tip * fix: inform * remove deploy doc --- .../content/docs/development/upgrading/47.md | 36 ++----------------- packages/service/common/file/multer.ts | 6 ++-- 2 files changed, 5 insertions(+), 37 deletions(-) diff --git a/docSite/content/docs/development/upgrading/47.md b/docSite/content/docs/development/upgrading/47.md index 1a2a646f2..907781a08 100644 --- a/docSite/content/docs/development/upgrading/47.md +++ b/docSite/content/docs/development/upgrading/47.md @@ -11,39 +11,7 @@ weight: 826 增加一些 Boolean 值,用于决定不同功能块可以使用哪些模型,同时增加了模型的 logo:[点击查看最新的配置文件](/docs/development/configuration/) -## 2. Docker 部署的用户, 修改 docker-compose.yml 文件 - -在 fastgpt 容器中,挂在一个目录,用于存储临时文件(文件上传时候)。可以参考最新的 [docker-compose.yml](https://raw.githubusercontent.com/labring/FastGPT/main/files/deploy/fastgpt/docker-compose.yml) - -```yaml -...... - fastgpt: - ...... - volumes: - - ./config.json:/app/data/config.json - - ./fastgpt/tmp:/app/tmp -...... -``` - -## 2. Sealos 部署的用户,挂载存储券 - -| Step1 | Step 2 | Step3 | -| --- | --- | --- | -| ![](/imgs/47-sealos1.png) | ![](/imgs/47-sealos2.png) | ![](/imgs/47-sealos3.png) | -| Step4 | Step 5 | | -| ![](/imgs/47-sealos4.webp) | ![](/imgs/47-sealos5.png) | 完工,检查下应用状态 | - -命令如下: - -```bash -kubectl patch statefulset {{这里改成第一步的应用名}} -p '{"spec":{"template":{"spec":{"securityContext":{"fsGroup": 1001, "fsGroupChangePolicy": "Always"}}}}}' - -# 例如下面的 -# kubectl patch statefulset fastgpt-test -p '{"spec":{"template":{"spec":{"securityContext":{"fsGroup": 1001, "fsGroupChangePolicy": "Always"}}}}}' -``` - - -## 3. 初始化脚本 +## 2. 初始化脚本 升级完镜像后。从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的 `rootkey`;{{host}} 替换成自己域名 @@ -56,7 +24,7 @@ curl --location --request POST 'https://{{host}}/api/admin/initv47' \ 脚本功能: 1. 初始化插件的 parentId -## 4. 升级 ReRank 模型 +## 3. 升级 ReRank 模型 4.7对ReRank模型进行了格式变动,兼容 cohere 的格式,可以直接使用 cohere 提供的 API。如果是本地的 ReRank 模型,需要修改镜像为:`luanshaotong/reranker:v0.2` 。 diff --git a/packages/service/common/file/multer.ts b/packages/service/common/file/multer.ts index 11fb25983..80a1c1b1a 100644 --- a/packages/service/common/file/multer.ts +++ b/packages/service/common/file/multer.ts @@ -24,9 +24,9 @@ export const getUploadModel = ({ maxSize = 500 }: { maxSize?: number }) => { }, preservePath: true, storage: multer.diskStorage({ - destination: (_req, _file, cb) => { - cb(null, tmpFileDirPath); - }, + // destination: (_req, _file, cb) => { + // cb(null, tmpFileDirPath); + // }, filename: async (req, file, cb) => { const { ext } = path.parse(decodeURIComponent(file.originalname)); cb(null, `${getNanoid()}${ext}`);