mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 13:40:55 +00:00
enh: pipeline user email support
This commit is contained in:
parent
d5b76b5ed2
commit
f9283bc311
@ -326,7 +326,7 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
|
|||||||
|
|
||||||
user = get_current_user(
|
user = get_current_user(
|
||||||
request,
|
request,
|
||||||
get_http_authorization_cred(request.headers.get("Authorization"))
|
get_http_authorization_cred(request.headers.get("Authorization")),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Remove the citations from the body
|
# Remove the citations from the body
|
||||||
@ -471,7 +471,7 @@ app.add_middleware(ChatCompletionMiddleware)
|
|||||||
|
|
||||||
|
|
||||||
def filter_pipeline(payload, user):
|
def filter_pipeline(payload, user):
|
||||||
user = {"id": user.id, "name": user.name, "role": user.role}
|
user = {"id": user.id, "email": user.email, "name": user.name, "role": user.role}
|
||||||
model_id = payload["model"]
|
model_id = payload["model"]
|
||||||
filters = [
|
filters = [
|
||||||
model
|
model
|
||||||
@ -560,7 +560,7 @@ class PipelineMiddleware(BaseHTTPMiddleware):
|
|||||||
|
|
||||||
user = get_current_user(
|
user = get_current_user(
|
||||||
request,
|
request,
|
||||||
get_http_authorization_cred(request.headers.get("Authorization"))
|
get_http_authorization_cred(request.headers.get("Authorization")),
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user