From a68ec8822a01fb606defe1f59785eb7990d0c7ce Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 23 May 2025 01:33:08 +0400 Subject: [PATCH] enh: filter md image for task generations --- backend/open_webui/utils/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index d77e4eded..a3f9b45f9 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -967,7 +967,7 @@ async def process_chat_response( if isinstance(content, str): content = re.sub( - r"]*>.*?<\/details>", + r"]*>.*?<\/details>|!\[.*?\]\(.*?\)", "", content, flags=re.S | re.I,