mirror of
https://github.com/open-webui/open-webui
synced 2025-04-20 14:25:55 +00:00
refac
This commit is contained in:
parent
94c6428ae2
commit
f527f31d2b
@ -1440,7 +1440,7 @@
|
|||||||
const chatEventEmitter = await getChatEventEmitter(model.id, _chatId);
|
const chatEventEmitter = await getChatEventEmitter(model.id, _chatId);
|
||||||
|
|
||||||
scrollToBottom();
|
scrollToBottom();
|
||||||
await sendPromptSocket(model, responseMessageId, _chatId);
|
await sendPromptSocket(history, model, responseMessageId, _chatId);
|
||||||
|
|
||||||
if (chatEventEmitter) clearInterval(chatEventEmitter);
|
if (chatEventEmitter) clearInterval(chatEventEmitter);
|
||||||
} else {
|
} else {
|
||||||
@ -1453,7 +1453,7 @@
|
|||||||
chats.set(await getChatList(localStorage.token, $currentChatPage));
|
chats.set(await getChatList(localStorage.token, $currentChatPage));
|
||||||
};
|
};
|
||||||
|
|
||||||
const sendPromptSocket = async (model, responseMessageId, _chatId) => {
|
const sendPromptSocket = async (history, model, responseMessageId, _chatId) => {
|
||||||
const responseMessage = history.messages[responseMessageId];
|
const responseMessage = history.messages[responseMessageId];
|
||||||
const userMessage = history.messages[responseMessage.parentId];
|
const userMessage = history.messages[responseMessage.parentId];
|
||||||
|
|
||||||
@ -1738,7 +1738,7 @@
|
|||||||
.at(0);
|
.at(0);
|
||||||
|
|
||||||
if (model) {
|
if (model) {
|
||||||
await sendPromptSocket(model, responseMessage.id, _chatId);
|
await sendPromptSocket(history, model, responseMessage.id, _chatId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user