mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-11 08:57:17 +00:00
fix: pass model_id at the tool-approval drain call site added upstream
This commit is contained in:
parent
913049da69
commit
667fd5cb8c
1 changed files with 2 additions and 7 deletions
|
|
@ -3262,15 +3262,10 @@ async def drain_approved_tool_calls(request, form_data, user, model, metadata) -
|
|||
if db_messages:
|
||||
assistant_message = await Chats.get_message_by_id_and_message_id(chat_id, message_id)
|
||||
if assistant_message:
|
||||
db_messages.append(
|
||||
{
|
||||
k: v
|
||||
for k, v in assistant_message.items()
|
||||
if k in ('id', 'role', 'content', 'output', 'files', 'contextSummary', 'usage')
|
||||
}
|
||||
)
|
||||
db_messages.append({k: v for k, v in assistant_message.items() if k in PERSISTED_MESSAGE_KEYS})
|
||||
form_data['messages'] = process_messages_with_output(
|
||||
db_messages,
|
||||
model_id=model['id'],
|
||||
reasoning_format=get_reasoning_format(model),
|
||||
)
|
||||
form_data['messages'] = sanitize_tool_pairs(form_data['messages'])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue