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,