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

XFEstudio/gpt4free

fix: check if link title is not empty string

2fc26939
GravityTwoG <crytekov@gmail.com>
提交于

代码差异

1 个文件 +1 -1
Modified g4f/providers/response.py +1 -1
@@ -64,7 +64,7 @@ def format_link(url: str, title: Optional[str] = None) -> str:
64 64 Returns:
65 65 str: The formatted markdown link
66 66 """
67 if title is None:
67 if title is None or not title.strip():
68 68 try:
69 69 title = unquote(url.split("//", maxsplit=1)[1].split("?")[0].replace("www.", ""))
70 70 except IndexError: