mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 06:02:06 -05:00
[PR #2140] [MERGED] feat: configurable model name, description and vision capability #7702
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/2140
Author: @cheahjs
Created: 5/9/2024
Status: ✅ Merged
Merged: 5/23/2024
Merged by: @tjbck
Base:
dev-models← Head:feat/model-config📝 Commits (10+)
e76a444feat: allow model config via config.jsone69f312fix: remove unused API for setting model config584385efix: revert wip code for settings UI9bc628cfix: file input not working after rejecting images8effff6feat: update translation files0dbddebfeat: add API endpoint for updating configs02a4412feat: add UI support for updating model infofa6e21ffix: update models after deleting model info0f50c12fix: formatting0665703Merge branch 'dev' into feat/model-config📊 Changes
56 files changed (+1314 additions, -127 deletions)
View changed files
📝
backend/apps/litellm/main.py(+19 -2)📝
backend/apps/ollama/main.py(+11 -1)📝
backend/apps/openai/main.py(+12 -2)📝
backend/apps/web/internal/db.py(+12 -0)➕
backend/apps/web/internal/migrations/009_add_models.py(+55 -0)➕
backend/apps/web/models/models.py(+136 -0)📝
backend/main.py(+31 -2)📝
src/lib/apis/index.ts(+74 -0)📝
src/lib/apis/litellm/index.ts(+2 -1)📝
src/lib/apis/openai/index.ts(+6 -1)📝
src/lib/components/admin/Settings/Users.svelte(+1 -1)📝
src/lib/components/chat/Chat.svelte(+81 -63)📝
src/lib/components/chat/MessageInput.svelte(+92 -9)📝
src/lib/components/chat/MessageInput/Models.svelte(+5 -3)📝
src/lib/components/chat/Messages/ResponseMessage.svelte(+1 -1)📝
src/lib/components/chat/ModelSelector.svelte(+1 -1)📝
src/lib/components/chat/ModelSelector/Selector.svelte(+39 -6)📝
src/lib/components/chat/Settings/Interface.svelte(+5 -2)📝
src/lib/components/chat/Settings/Models.svelte(+251 -20)📝
src/lib/components/common/Tooltip.svelte(+2 -1)...and 36 more files
📄 Description
Pull Request Checklist
devbranch.Description
Adds the ability to set a custom display name, description, and the vision capability of a model via the web UI, which is then persisted into the database.
A new field
custom_infois injected into each model list API. An alternative implementation would be to override the model'snamefield, but would require additional mapping inside of the proxy endpoints.If a model is marked as not vision capable,
I've tested locally with Ollama and OpenAI endpoints, have not tested LiteLLM endpoints yet.
Changelog
Added
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.