mirror of
https://github.com/open-webui/open-webui.git
synced 2026-04-30 09:18:50 -05:00
refac
This commit is contained in:
@@ -210,8 +210,12 @@ def convert_output_to_messages(output: list, raw: bool = False) -> list[dict]:
|
|||||||
content = ""
|
content = ""
|
||||||
for part in output_parts:
|
for part in output_parts:
|
||||||
if part.get("type") == "input_text":
|
if part.get("type") == "input_text":
|
||||||
text_val = part.get("text", "")
|
output_text = part.get("text", "")
|
||||||
content += str(text_val) if not isinstance(text_val, str) else text_val
|
content += (
|
||||||
|
str(output_text)
|
||||||
|
if not isinstance(output_text, str)
|
||||||
|
else output_text
|
||||||
|
)
|
||||||
|
|
||||||
messages.append(
|
messages.append(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user