mirror of
https://github.com/open-webui/open-webui
synced 2025-02-23 21:53:37 +00:00
refac
This commit is contained in:
parent
51de2ffcc0
commit
aa7184ae0d
@ -1090,6 +1090,14 @@ async def process_chat_response(
|
|||||||
task_id = str(uuid4()) # Create a unique task ID.
|
task_id = str(uuid4()) # Create a unique task ID.
|
||||||
model_id = form_data.get("model", "")
|
model_id = form_data.get("model", "")
|
||||||
|
|
||||||
|
Chats.upsert_message_to_chat_by_id_and_message_id(
|
||||||
|
metadata["chat_id"],
|
||||||
|
metadata["message_id"],
|
||||||
|
{
|
||||||
|
"model": model_id,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
# Handle as a background task
|
# Handle as a background task
|
||||||
async def post_response_handler(response, events):
|
async def post_response_handler(response, events):
|
||||||
def serialize_content_blocks(content_blocks, raw=False):
|
def serialize_content_blocks(content_blocks, raw=False):
|
||||||
|
@ -1399,6 +1399,8 @@
|
|||||||
// Save chat after all messages have been created
|
// Save chat after all messages have been created
|
||||||
await saveChatHandler(_chatId);
|
await saveChatHandler(_chatId);
|
||||||
|
|
||||||
|
await tick();
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
selectedModelIds.map(async (modelId, _modelIdx) => {
|
selectedModelIds.map(async (modelId, _modelIdx) => {
|
||||||
console.log('modelId', modelId);
|
console.log('modelId', modelId);
|
||||||
|
Loading…
Reference in New Issue
Block a user