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

XFEstudio/gpt4free

fix: ensure filename has .html extension in _playground method

8defec4e
hlohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +1 -0
Modified g4f/gui/server/website.py +1 -0
@@ -176,6 +176,7 @@ class Website:
176 176 PLAYGROUND_URL = "https://raw.githubusercontent.com/gpt4free/playground/refs/heads/main/"
177 177 if not filename or filename.endswith("/"):
178 178 filename = "index.html"
179 filename += ("" if "." in filename else ".html")
179 180 # Serve from local ./playground directory if present
180 181 local_dir = os.path.abspath("./playground")
181 182 local_path = os.path.normpath(os.path.join(local_dir, filename))