Skip to content

Commit

Permalink
4.8.14 test (#3160)
Browse files Browse the repository at this point in the history
* perf: remove base64 check

* perf: update doc
  • Loading branch information
c121914yu authored Nov 14, 2024
1 parent b6d650a commit e882498
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
6 changes: 5 additions & 1 deletion docSite/content/zh-cn/docs/development/upgrading/4813.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ weight: 811
- 更新 FastGPT 商业版镜像 tag: v4.8.13-fix (fastgpt-pro镜像)
- Sandbox 镜像,可以不更新

### 3. 调整文件上传编排
### 3. 添加环境变量

- 给 fastgpt 和 fastgpt-pro 镜像添加环境变量:`FE_DOMAIN=http://xx.com`,值为 fastgpt 前端访问地址,注意后面不要加`/`。如果没加到话,图片识别可能会有问题。

### 4. 调整文件上传编排

虽然依然兼容旧版的文件上传编排,但是未来两个版本内将会去除兼容代码,请尽快调整编排,以适应最新的文件上传逻辑。尤其是嵌套应用的文件传递,未来将不会自动传递,必须手动指定传递的文件。

Expand Down
2 changes: 0 additions & 2 deletions files/docker/docker-compose-milvus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ services:
- OPENAI_BASE_URL=http://oneapi:3000/v1
# AI模型的API Key。(这里默认填写了OneAPI的快速默认key,测试通后,务必及时修改)
- CHAT_API_KEY=sk-fastgpt
# 是否将图片转成 base64 传递给模型,本地开发和内网环境使用共有模型时候需要设置为 true
- MULTIPLE_DATA_TO_BASE64=false
# 数据库最大连接数
- DB_MAX_LINK=30
# 登录凭证密钥
Expand Down
2 changes: 0 additions & 2 deletions files/docker/docker-compose-pgvector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ services:
- OPENAI_BASE_URL=http://oneapi:3000/v1
# AI模型的API Key。(这里默认填写了OneAPI的快速默认key,测试通后,务必及时修改)
- CHAT_API_KEY=sk-fastgpt
# 是否将图片转成 base64 传递给模型,本地开发和内网环境使用共有模型时候需要设置为 true
- MULTIPLE_DATA_TO_BASE64=false
# 数据库最大连接数
- DB_MAX_LINK=30
# 登录凭证密钥
Expand Down
2 changes: 0 additions & 2 deletions files/docker/docker-compose-zilliz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ services:
- OPENAI_BASE_URL=http://oneapi:3000/v1
# AI模型的API Key。(这里默认填写了OneAPI的快速默认key,测试通后,务必及时修改)
- CHAT_API_KEY=sk-fastgpt
# 是否将图片转成 base64 传递给模型,本地开发和内网环境使用共有模型时候需要设置为 true
- MULTIPLE_DATA_TO_BASE64=false
# 数据库最大连接数
- DB_MAX_LINK=30
# 登录凭证密钥
Expand Down
2 changes: 1 addition & 1 deletion packages/service/core/chat/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const loadRequestMessages = async ({
}
return Promise.all(
messages.map(async (item) => {
if (item.type === 'image_url' && process.env.MULTIPLE_DATA_TO_BASE64 === 'true') {
if (item.type === 'image_url') {
// Remove url origin
const imgUrl = (() => {
if (origin && item.image_url.url.startsWith(origin)) {
Expand Down

0 comments on commit e882498

Please sign in to comment.