From a677b212d9f070d87d66b46a6c3ce2acb26a4749 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 27 Feb 2026 16:03:12 -0600 Subject: [PATCH] refac --- backend/open_webui/utils/misc.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/utils/misc.py b/backend/open_webui/utils/misc.py index d7f36937e..35e19d70c 100644 --- a/backend/open_webui/utils/misc.py +++ b/backend/open_webui/utils/misc.py @@ -210,8 +210,12 @@ def convert_output_to_messages(output: list, raw: bool = False) -> list[dict]: content = "" for part in output_parts: if part.get("type") == "input_text": - text_val = part.get("text", "") - content += str(text_val) if not isinstance(text_val, str) else text_val + output_text = part.get("text", "") + content += ( + str(output_text) + if not isinstance(output_text, str) + else output_text + ) messages.append( {