Browse Source

enh: filter md image for task generations

Timothy Jaeryang Baek 1 month ago
parent
commit
a68ec8822a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      backend/open_webui/utils/middleware.py

+ 1 - 1
backend/open_webui/utils/middleware.py

@@ -967,7 +967,7 @@ async def process_chat_response(
 
                 if isinstance(content, str):
                     content = re.sub(
-                        r"<details\b[^>]*>.*?<\/details>",
+                        r"<details\b[^>]*>.*?<\/details>|!\[.*?\]\(.*?\)",
                         "",
                         content,
                         flags=re.S | re.I,