mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #4295] [MERGED] refactor: Refactor OpenAI API to use helper functions, silence LSP/linter warnings #37072
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/4295
Author: @michaelpoluektov
Created: 8/2/2024
Status: ✅ Merged
Merged: 8/4/2024
Merged by: @tjbck
Base:
dev← Head:refactor-tools📝 Commits (2)
12c21farefac: apps/openai/main.py and utils3653126refac: undo raw split, remove gpt-4-vision-preview📊 Changes
8 files changed (+160 additions, -240 deletions)
View changed files
📝
backend/apps/openai/main.py(+72 -143)📝
backend/apps/socket/main.py(+15 -12)📝
backend/apps/webui/main.py(+2 -43)📝
backend/apps/webui/routers/tools.py(+13 -18)📝
backend/main.py(+11 -16)📝
backend/utils/misc.py(+43 -0)📝
backend/utils/task.py(+1 -2)📝
backend/utils/utils.py(+3 -6)📄 Description
Pull Request Checklist
Sorry for the large amount of refactor PR's. I understand it's a pain to review but it's a lot easier to work on a project when you can rely on your LSP to hint at possible errors and not get inundated with warnings and whatnot.
This addresses a few things:
get_all_models)except:, unused imports,== Noneinstead ofis None, unused variables, function re-definition with the same name)Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.