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
7955c9ba
Commit
7955c9ba
authored
Jun 30, 2024
by
Timothy J. Baek
Browse files
refac
parent
c52e16a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
backend/apps/webui/main.py
backend/apps/webui/main.py
+3
-0
No files found.
backend/apps/webui/main.py
View file @
7955c9ba
...
@@ -259,6 +259,9 @@ async def generate_function_chat_completion(form_data, user):
...
@@ -259,6 +259,9 @@ async def generate_function_chat_completion(form_data, user):
if
isinstance
(
line
,
BaseModel
):
if
isinstance
(
line
,
BaseModel
):
line
=
line
.
model_dump_json
()
line
=
line
.
model_dump_json
()
line
=
f
"data:
{
line
}
"
line
=
f
"data:
{
line
}
"
if
isinstance
(
line
,
dict
):
line
=
f
"data:
{
json
.
dumps
(
line
)
}
"
try
:
try
:
line
=
line
.
decode
(
"utf-8"
)
line
=
line
.
decode
(
"utf-8"
)
except
:
except
:
...
...
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