mirror of
https://github.com/open-webui/open-webui
synced 2024-11-07 00:59:52 +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):
|
||||
line = line.model_dump_json()
|
||||
line = f"data: {line}"
|
||||
if isinstance(line, dict):
|
||||
line = f"data: {json.dumps(line)}"
|
||||
|
||||
try:
|
||||
line = line.decode("utf-8")
|
||||
except:
|
||||
|
Loading…
Reference in New Issue
Block a user