mirror of
https://github.com/open-webui/open-webui
synced 2025-05-19 04:43:00 +00:00
fix: temp chat message continue
This commit is contained in:
parent
f72e28a56c
commit
93731e4ca9
@ -1358,7 +1358,14 @@ async def process_chat_response(
|
|||||||
)
|
)
|
||||||
|
|
||||||
tool_calls = []
|
tool_calls = []
|
||||||
content = message.get("content", "") if message else ""
|
|
||||||
|
last_assistant_message = get_last_assistant_message(form_data["messages"])
|
||||||
|
content = (
|
||||||
|
message.get("content", "")
|
||||||
|
if message
|
||||||
|
else last_assistant_message if last_assistant_message else ""
|
||||||
|
)
|
||||||
|
|
||||||
content_blocks = [
|
content_blocks = [
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
@ -1,6 +1,14 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import { chats, config, settings, user as _user, mobile, currentChatPage } from '$lib/stores';
|
import {
|
||||||
|
chats,
|
||||||
|
config,
|
||||||
|
settings,
|
||||||
|
user as _user,
|
||||||
|
mobile,
|
||||||
|
currentChatPage,
|
||||||
|
temporaryChatEnabled
|
||||||
|
} from '$lib/stores';
|
||||||
import { tick, getContext, onMount, createEventDispatcher } from 'svelte';
|
import { tick, getContext, onMount, createEventDispatcher } from 'svelte';
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
@ -85,6 +93,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateChat = async () => {
|
const updateChat = async () => {
|
||||||
|
if (!$temporaryChatEnabled) {
|
||||||
history = history;
|
history = history;
|
||||||
await tick();
|
await tick();
|
||||||
await updateChatById(localStorage.token, chatId, {
|
await updateChatById(localStorage.token, chatId, {
|
||||||
@ -94,6 +103,7 @@
|
|||||||
|
|
||||||
currentChatPage.set(1);
|
currentChatPage.set(1);
|
||||||
await chats.set(await getChatList(localStorage.token, $currentChatPage));
|
await chats.set(await getChatList(localStorage.token, $currentChatPage));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const showPreviousMessage = async (message) => {
|
const showPreviousMessage = async (message) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user