Explorar o código

enh: filter md image for task generations

Timothy Jaeryang Baek hai 4 meses
pai
achega
a68ec8822a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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,