Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
93ea9bbc
authored
May 09, 2026
by
Archer
Committed by
GitHub
May 09, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: reduce base64 image payloads (#6897)
* fix: reduce base64 image payloads * doc * doc
parent
63d4b417
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
18 deletions
+15
-18
document/content/self-host/upgrading/4-15/4150.mdx
+1
-0
document/data/doc-last-modified.json
+5
-5
lint-staged.config.mjs
+7
-6
packages/service/core/ai/llm/utils.ts
+1
-6
pro
+1
-1
No files found.
document/content/self-host/upgrading/4-15/4150.mdx
View file @
93ea9bbc
...
@@ -62,6 +62,7 @@ FILE_TOKEN_KEY=
...
@@ -62,6 +62,7 @@ FILE_TOKEN_KEY=
6. codex-sandbox 加强 AST 检查,防止绕过安全检查。
6. codex-sandbox 加强 AST 检查,防止绕过安全检查。
7. 站点同步限流错误提示,重复提示。
7. 站点同步限流错误提示,重复提示。
8. 加强 IP 检测,避免伪造绕过。
8. 加强 IP 检测,避免伪造绕过。
9. 图片处理线程,支持配置是否转化成 base64 发送给模型。
## 🐛 修复
## 🐛 修复
...
...
document/data/doc-last-modified.json
View file @
93ea9bbc
...
@@ -157,8 +157,8 @@
...
@@ -157,8 +157,8 @@
"content/openapi/intro.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/openapi/intro.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/openapi/share.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/openapi/share.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/openapi/share.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/openapi/share.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/env.en.mdx"
:
"2026-05-0
6T18:25:24
+08:00"
,
"content/self-host/config/env.en.mdx"
:
"2026-05-0
8T20:36:05
+08:00"
,
"content/self-host/config/env.mdx"
:
"2026-05-0
6T18:25:24
+08:00"
,
"content/self-host/config/env.mdx"
:
"2026-05-0
8T20:36:05
+08:00"
,
"content/self-host/config/json.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/json.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/json.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/json.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/model/intro.en.mdx"
:
"2026-05-07T15:06:40+08:00"
,
"content/self-host/config/model/intro.en.mdx"
:
"2026-05-07T15:06:40+08:00"
,
...
@@ -167,8 +167,8 @@
...
@@ -167,8 +167,8 @@
"content/self-host/config/model/minimax.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/model/minimax.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/model/siliconCloud.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/model/siliconCloud.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/model/siliconCloud.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/model/siliconCloud.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/object-storage.en.mdx"
:
"2026-0
4-26T21:08:47
+08:00"
,
"content/self-host/config/object-storage.en.mdx"
:
"2026-0
5-08T20:36:05
+08:00"
,
"content/self-host/config/object-storage.mdx"
:
"2026-0
4-26T21:08:47
+08:00"
,
"content/self-host/config/object-storage.mdx"
:
"2026-0
5-08T20:36:05
+08:00"
,
"content/self-host/config/signoz.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/signoz.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/signoz.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/config/signoz.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/custom-models/bge-rerank.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/custom-models/bge-rerank.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
...
@@ -269,7 +269,7 @@
...
@@ -269,7 +269,7 @@
"content/self-host/upgrading/4-14/41481.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/upgrading/4-14/41481.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/upgrading/4-14/4149.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/upgrading/4-14/4149.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/upgrading/4-14/4149.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/upgrading/4-14/4149.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/upgrading/4-15/4150.mdx"
:
"2026-05-0
6T22:27:15
+08:00"
,
"content/self-host/upgrading/4-15/4150.mdx"
:
"2026-05-0
9T11:28:39
+08:00"
,
"content/self-host/upgrading/outdated/40.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/upgrading/outdated/40.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/upgrading/outdated/40.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/upgrading/outdated/40.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/upgrading/outdated/41.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/upgrading/outdated/41.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
...
...
lint-staged.config.mjs
View file @
93ea9bbc
...
@@ -21,12 +21,13 @@ export default {
...
@@ -21,12 +21,13 @@ export default {
files.length === 0
files.length === 0
? []
? []
: [
: [
'pnpm -C ./document run format-doc',
'pnpm -C ./document run format-doc',
'pnpm -C ./document run initDocTime',
'pnpm -C ./document run initDocTime',
'pnpm -C ./document run initDocToc',
'pnpm -C ./document run initDocToc',
'pnpm -C ./document run checkDocRefs',
'pnpm -C ./document run checkDocRefs',
'pnpm -C ./document run removeInvalidImg'
'pnpm -C ./document run removeInvalidImg',
],
'git add .'
],
'**/*.{ts,tsx}': (files) => {
'**/*.{ts,tsx}': (files) => {
const lintFiles = withoutIgnoredPaths(files);
const lintFiles = withoutIgnoredPaths(files);
if (lintFiles.length === 0) return [];
if (lintFiles.length === 0) return [];
...
...
packages/service/core/ai/llm/utils.ts
View file @
93ea9bbc
...
@@ -12,7 +12,6 @@ import { ChatCompletionRequestMessageRoleEnum } from '@fastgpt/global/core/ai/co
...
@@ -12,7 +12,6 @@ import { ChatCompletionRequestMessageRoleEnum } from '@fastgpt/global/core/ai/co
import
{
i18nT
}
from
'../../../../web/i18n/utils'
;
import
{
i18nT
}
from
'../../../../web/i18n/utils'
;
import
{
getImageBase64
}
from
'../../../common/file/image/utils'
;
import
{
getImageBase64
}
from
'../../../common/file/image/utils'
;
import
{
getS3ChatSource
}
from
'../../../common/s3/sources/chat'
;
import
{
getS3ChatSource
}
from
'../../../common/s3/sources/chat'
;
import
{
isInternalAddress
}
from
'../../../common/system/utils'
;
import
{
getErrText
}
from
'@fastgpt/global/common/error/utils'
;
import
{
getErrText
}
from
'@fastgpt/global/common/error/utils'
;
import
{
getLogger
,
LogCategories
}
from
'../../../common/logger'
;
import
{
getLogger
,
LogCategories
}
from
'../../../common/logger'
;
import
{
serviceEnv
}
from
'../../../env'
;
import
{
serviceEnv
}
from
'../../../env'
;
...
@@ -165,11 +164,7 @@ export const loadRequestMessages = async ({
...
@@ -165,11 +164,7 @@ export const loadRequestMessages = async ({
try
{
try
{
// If imgUrl is a local path, load image from local, and set url to base64
// If imgUrl is a local path, load image from local, and set url to base64
if
(
if
(
imgUrl
.
startsWith
(
'/'
)
||
serviceEnv
.
MULTIPLE_DATA_TO_BASE64
)
{
imgUrl
.
startsWith
(
'/'
)
||
serviceEnv
.
MULTIPLE_DATA_TO_BASE64
||
(
await
isInternalAddress
(
imgUrl
))
)
{
try
{
try
{
const
url
=
await
(
async
()
=>
{
const
url
=
await
(
async
()
=>
{
if
(
item
.
key
)
{
if
(
item
.
key
)
{
...
...
pro
@
958c6c7b
Subproject commit
ede09e6cbe630281918eebe2b3c696eb7bc58a65
Subproject commit
958c6c7b27f6e3b8d04213b60e41d7ac75a605c7
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment