mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-11 08:15:00 -05:00
[PR #4237] [MERGED] refactor: Simplify functions #8221
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/4237
Author: @michaelpoluektov
Created: 7/31/2024
Status: ✅ Merged
Merged: 8/1/2024
Merged by: @tjbck
Base:
dev← Head:refactor-webui-main📝 Commits (10+)
3978efdrefac: Refactor functionsdeec41dfix: function early returns22a5e19simplify main.py29a3b82refac: reuse stream_message_template006fc34fix: stream_message_templatebaf58efrefac: use add_or_update_system_message034411efix: type not manifoldae0bb8fMerge branch 'dev' of https://github.com/open-webui/open-webui into refactor-webui-mainf872671refac: rename whole_message_template, silence lsp2e0fa1crefac: rename stream_message_template📊 Changes
5 files changed (+284 additions, -392 deletions)
View changed files
📝
backend/apps/socket/main.py(+2 -4)📝
backend/apps/webui/main.py(+225 -302)📝
backend/apps/webui/models/models.py(+2 -10)📝
backend/main.py(+16 -44)📝
backend/utils/misc.py(+39 -32)📄 Description
Pull Request Checklist
Motivation: there are no docs on functions, so if people will keep using code as documentation might as well make the code more readable.
Also this makes it simpler to add more features/custom named params to functions.
Testing:
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Refactor everything around function calling.
asyncinget_event_emittergenerate_function_chat_completioninto multiple smaller functionsNo functional changes expected: everything should work exactly as before.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.