perf: forbid image to base64 (#3038)

* perf: forbid image to base64

* update file upload path

* feat: support promptCall use image

* fix: echarts load

* update doc
This commit is contained in:
Archer
2024-11-01 14:29:20 +08:00
committed by GitHub
parent 7ef1821557
commit 912b264a47
12 changed files with 197 additions and 58 deletions

View File

@@ -104,6 +104,9 @@ export const loadRequestMessages = async ({
}) => {
// Load image to base64
const loadImageToBase64 = async (messages: ChatCompletionContentPart[]) => {
if (process.env.MULTIPLE_DATA_TO_BASE64 === 'false') {
return messages;
}
return Promise.all(
messages.map(async (item) => {
if (item.type === 'image_url') {