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
995f7bc5
Commit
995f7bc5
authored
May 30, 2024
by
Timothy J. Baek
Browse files
fix: chat completed
parent
e1d65065
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
backend/main.py
backend/main.py
+10
-0
src/lib/components/chat/Chat.svelte
src/lib/components/chat/Chat.svelte
+1
-1
No files found.
backend/main.py
View file @
995f7bc5
...
...
@@ -271,6 +271,11 @@ class PipelineMiddleware(BaseHTTPMiddleware):
except
:
pass
model
=
app
.
state
.
MODELS
[
model_id
]
if
"pipeline"
in
model
:
sorted_filters
.
append
(
model
)
for
filter
in
sorted_filters
:
r
=
None
try
:
...
...
@@ -490,6 +495,11 @@ async def chat_completed(form_data: dict, user=Depends(get_verified_user)):
]
sorted_filters
=
sorted
(
filters
,
key
=
lambda
x
:
x
[
"pipeline"
][
"priority"
])
model
=
app
.
state
.
MODELS
[
model_id
]
if
"pipeline"
in
model
:
sorted_filters
=
[
model
]
+
sorted_filters
for
filter
in
sorted_filters
:
r
=
None
try
:
...
...
src/lib/components/chat/Chat.svelte
View file @
995f7bc5
...
...
@@ -899,7 +899,7 @@
const messages = createMessagesList(responseMessageId);
const res = await chatCompleted(localStorage.token, {
model: model,
model: model
.id
,
messages: messages.map((m) => ({
id: m.id,
role: m.role,
...
...
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