mirror of
https://github.com/open-webui/open-webui
synced 2024-11-24 21:13:59 +00:00
refac
This commit is contained in:
parent
c52e16a844
commit
7955c9ba3b
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user