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
9cc46629
Commit
9cc46629
authored
Jul 01, 2024
by
Timothy J. Baek
Browse files
refac
parent
a0362917
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
backend/main.py
backend/main.py
+12
-0
No files found.
backend/main.py
View file @
9cc46629
...
...
@@ -492,6 +492,12 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
"__id__"
:
filter_id
,
}
if
"__model__"
in
sig
.
parameters
:
params
=
{
**
params
,
"__model__"
:
model
,
}
if
inspect
.
iscoroutinefunction
(
inlet
):
data
=
await
inlet
(
**
params
)
else
:
...
...
@@ -1083,6 +1089,12 @@ async def chat_completed(form_data: dict, user=Depends(get_verified_user)):
"__id__"
:
filter_id
,
}
if
"__model__"
in
sig
.
parameters
:
params
=
{
**
params
,
"__model__"
:
model
,
}
if
inspect
.
iscoroutinefunction
(
outlet
):
data
=
await
outlet
(
**
params
)
else
:
...
...
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