Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
f9283bc3
Commit
f9283bc3
authored
Jun 19, 2024
by
Timothy J. Baek
Browse files
enh: pipeline user email support
parent
d5b76b5e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
backend/main.py
backend/main.py
+3
-3
No files found.
backend/main.py
View file @
f9283bc3
...
...
@@ -326,7 +326,7 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
user
=
get_current_user
(
request
,
get_http_authorization_cred
(
request
.
headers
.
get
(
"Authorization"
))
get_http_authorization_cred
(
request
.
headers
.
get
(
"Authorization"
))
,
)
# Remove the citations from the body
...
...
@@ -471,7 +471,7 @@ app.add_middleware(ChatCompletionMiddleware)
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"
]
filters
=
[
model
...
...
@@ -560,7 +560,7 @@ class PipelineMiddleware(BaseHTTPMiddleware):
user
=
get_current_user
(
request
,
get_http_authorization_cred
(
request
.
headers
.
get
(
"Authorization"
))
get_http_authorization_cred
(
request
.
headers
.
get
(
"Authorization"
))
,
)
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment