XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Fix thumbnail

4cb62416
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

2 个文件 +3 -3
Modified g4f.dev +1 -1
@@ -1 +1 @@
1 Subproject commit 54add9f17c866cbf672b73ef30dbab2a5feeb6e5
1 Subproject commit 6a730e28a82db77f8f5c23590e07202268051adb
Modified g4f/providers/response.py +2 -2
@@ -84,8 +84,8 @@ def format_image(image: str, alt: str, preview: Optional[str] = None) -> str:
84 84 str: The formatted markdown string.
85 85 """
86 86 preview_url = preview.replace('{image}', image) if preview else image
87 if preview_url.startswith("/media/"):
88 preview_url = "/thumbnail" + preview_url[6:]
87 # if preview_url.startswith("/media/"):
88 # preview_url = "/thumbnail" + preview_url[6:]
89 89 return f"[![{quote_title(alt)}]({quote_url(preview_url)})]({quote_url(image)})"
90 90
91 91 def format_images_markdown(images: Union[str, List[str]], alt: str,