소스 검색

enh: filter md image for task generations

Timothy Jaeryang Baek 4 달 전
부모
커밋
a68ec8822a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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,