mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #6589] [MERGED] feat: Add option to forward user info as headers to OpenAI API #8709
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/6589
Author: @DucNgn
Created: 10/30/2024
Status: ✅ Merged
Merged: 11/3/2024
Merged by: @tjbck
Base:
dev← Head:dn_forward_user_info_in_headers📝 Commits (3)
3f0b3eafeat: Add option to forward user info as headers to OpenAI APIa34d202move the config to env.py06f44dcMinor comment📊 Changes
5 files changed (+45 additions, -2 deletions)
View changed files
📝
backend/open_webui/apps/audio/main.py(+7 -1)📝
backend/open_webui/apps/images/main.py(+7 -1)📝
backend/open_webui/apps/openai/main.py(+21 -0)📝
backend/open_webui/config.py(+1 -0)📝
backend/open_webui/env.py(+9 -0)📄 Description
Pull Request Checklist
This PR is following up on this discussion: https://github.com/open-webui/open-webui/discussions/6036
Docs Change: https://github.com/open-webui/docs/pull/259
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
OPENAI_FORWARD_USER_INFO_AS_HEADERS, when enabled would forward user information to OpenAI-compatible Backend with user's information: name, email, id, and role. By default, this is disabled. Users could enable it using environment variable.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.