mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-15 09:31:21 +00:00
chore: bump
This commit is contained in:
parent
49ca2d7915
commit
858c1e9665
6 changed files with 20 additions and 11 deletions
|
|
@ -1698,7 +1698,9 @@ async def chat_completion(
|
|||
|
||||
async def emit_cancel_event():
|
||||
if is_saved_chat_id(metadata.get('chat_id')) and metadata.get('message_id'):
|
||||
async with Chats.edit_message_output(metadata['chat_id'], metadata['message_id']) as message:
|
||||
async with Chats.edit_message_output(
|
||||
metadata['chat_id'], metadata['message_id']
|
||||
) as message:
|
||||
if message is not None:
|
||||
response_meta = dict(message.get('meta') or {})
|
||||
response_meta.setdefault('response_ended_at', time.time())
|
||||
|
|
|
|||
|
|
@ -552,9 +552,8 @@ async def update_note_by_id(
|
|||
):
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.DEFAULT())
|
||||
|
||||
if (
|
||||
form_data.data
|
||||
and not await has_access_to_note_files(note, get_content_files(form_data.data.get('content')), user, db=db)
|
||||
if form_data.data and not await has_access_to_note_files(
|
||||
note, get_content_files(form_data.data.get('content')), user, db=db
|
||||
):
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.DEFAULT())
|
||||
|
||||
|
|
|
|||
|
|
@ -1601,7 +1601,9 @@ async def replace_note_content(
|
|||
update_data['title'] = title
|
||||
|
||||
editor = await Users.get_user_by_id(__user__['id'])
|
||||
if not editor or not await has_access_to_note_files(note, get_content_files(update_data['data']['content']), editor):
|
||||
if not editor or not await has_access_to_note_files(
|
||||
note, get_content_files(update_data['data']['content']), editor
|
||||
):
|
||||
return JSONCodec.dumps({'error': 'Cannot attach files you cannot access'})
|
||||
form = NoteUpdateForm(**update_data)
|
||||
updated_note = await Notes.update_note_by_id(note_id, form)
|
||||
|
|
|
|||
|
|
@ -4092,7 +4092,9 @@ async def non_streaming_chat_response_handler(response, ctx):
|
|||
# Save message in the database
|
||||
usage = normalize_usage(response_data.get('usage', {}) or {})
|
||||
if continuing:
|
||||
usage = merge_usage((ctx.get('assistant_message') or {}).get('usage'), usage or {'incomplete': True})
|
||||
usage = merge_usage(
|
||||
(ctx.get('assistant_message') or {}).get('usage'), usage or {'incomplete': True}
|
||||
)
|
||||
finish_reason = choices[0].get('finish_reason') if choices else None
|
||||
|
||||
if save_to_chat:
|
||||
|
|
@ -4909,7 +4911,9 @@ async def streaming_chat_response_handler(response, ctx):
|
|||
|
||||
# Normalize and capture usage for DB persistence
|
||||
if response_metadata.get('usage'):
|
||||
current_usage = update_usage_snapshot(current_usage, response_metadata['usage'])
|
||||
current_usage = update_usage_snapshot(
|
||||
current_usage, response_metadata['usage']
|
||||
)
|
||||
usage = merge_usage(prior_usage, current_usage)
|
||||
response_metadata['usage'] = usage
|
||||
|
||||
|
|
@ -5782,7 +5786,9 @@ async def streaming_chat_response_handler(response, ctx):
|
|||
for tool_call in response_tool_calls:
|
||||
tool_call_id = tool_call['call_id']
|
||||
tool_function_name = tool_call.get('name', '')
|
||||
tool_function_params, tool_result, tool, tool_type, direct_tool = tool_results[tool_call['call_id']]
|
||||
tool_function_params, tool_result, tool, tool_type, direct_tool = tool_results[
|
||||
tool_call['call_id']
|
||||
]
|
||||
if tool_result is None:
|
||||
results.append(
|
||||
{
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "open-webui",
|
||||
"version": "0.12.4",
|
||||
"version": "0.12.5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "open-webui",
|
||||
"version": "0.12.4",
|
||||
"version": "0.12.5",
|
||||
"dependencies": {
|
||||
"@azure/msal-browser": "^4.5.0",
|
||||
"@codemirror/lang-javascript": "^6.2.2",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "open-webui",
|
||||
"version": "0.12.4",
|
||||
"version": "0.12.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"crypto:verify": "node scripts/encryption/artifact.mjs",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue