mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-11 09:04:17 -05:00
[PR #10373] [MERGED] feat: logit bias #38143
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/10373
Author: @dannyl1u
Created: 2/19/2025
Status: ✅ Merged
Merged: 3/1/2025
Merged by: @tjbck
Base:
dev← Head:logit_bias📝 Commits (8)
4a2a12ffeat: scaffolding for logit_bias8aa6415include logit_bias in form_data046f1fbMerge pull request #10927 from open-webui/dev95cadacMerge pull request #10933 from open-webui/dev34e3cb6logit bias: update tooltip message90aa295logit_bias: handle comma seperated valuesf4bd094Merge remote-tracking branch 'origin' into logit_biasf9292abMerge branch 'dev' into logit_bias📊 Changes
5 files changed (+66 additions, -0 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+6 -0)📝
backend/open_webui/utils/misc.py(+12 -0)📝
backend/open_webui/utils/payload.py(+1 -0)📝
src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte(+44 -0)📝
src/lib/components/chat/Settings/General.svelte(+3 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
I implemented this by accepting comma separated token:bias pairs as suggested in #9280 . This approach allows for easy copy-pasting and doesn't take up too much vertical space.
I also considered the following implementations:
Tested with OpenAI APIs.
Screenshots or Videos
Demo video (apologies for not using OLED dark theme (the best))
https://github.com/user-attachments/assets/c6876936-cf15-4112-addc-fdeeb82e41f3
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.