mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-14 21:35:19 +00:00
Revert "Merge clean-summary: 摘要机制安全实现(编码修复)"
This reverts commit 71cbbc8722.
This commit is contained in:
parent
71cbbc8722
commit
c26b4b0f6c
4 changed files with 3 additions and 7 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import sha256 from 'js-sha256';
|
import sha256 from 'js-sha256';
|
||||||
import { WEBUI_BASE_URL } from '$lib/constants';
|
import { WEBUI_BASE_URL } from '$lib/constants';
|
||||||
|
|
||||||
|
|
@ -213,10 +213,6 @@ export const convertMessagesToHistory = (messages) => {
|
||||||
currentId: null
|
currentId: null
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!messages || !Array.isArray(messages)) {
|
|
||||||
return history;
|
|
||||||
}
|
|
||||||
|
|
||||||
let parentMessageId = null;
|
let parentMessageId = null;
|
||||||
let messageId = null;
|
let messageId = null;
|
||||||
|
|
||||||
|
|
@ -703,7 +699,7 @@ export const getUserPosition = async (raw = false) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const convertOpenAIMessages = (convo) => {
|
const convertOpenAIMessages = (convo) => {
|
||||||
// Parse OpenAI chat messages and create chat dictionary for creating new chats
|
// Parse OpenAI chat messages and create chat dictionary for creating new chats
|
||||||
const mapping = convo['mapping'];
|
const mapping = convo['mapping'];
|
||||||
const messages = [];
|
const messages = [];
|
||||||
|
|
@ -769,7 +765,7 @@ const fragmentsToContent = (fragments: any) => {
|
||||||
.join('\n\n');
|
.join('\n\n');
|
||||||
};
|
};
|
||||||
|
|
||||||
export const convertDeepseekMessages = (convo) => {
|
const convertDeepseekMessages = (convo) => {
|
||||||
// Parse DeepSeek chat messages (mapping + fragments) into chat dictionary
|
// Parse DeepSeek chat messages (mapping + fragments) into chat dictionary
|
||||||
const mapping = convo['mapping'];
|
const mapping = convo['mapping'];
|
||||||
const messages = [];
|
const messages = [];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue