mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-17 14:55:23 +00:00
refac
This commit is contained in:
parent
c52e16a844
commit
7955c9ba3b
1 changed files with 3 additions and 0 deletions
|
|
@ -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 a new issue