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

XFEstudio/gpt4free

fix(Copilot): safely access access_token using getattr to prevent AttributeError

ef7461e9
eminsk <M_N_N@tut.by>
提交于

代码差异

1 个文件 +1 -1
Modified g4f/Provider/Copilot.py +1 -1
@@ -269,7 +269,7 @@ class Copilot(AsyncAuthedProvider, ProviderModelMixin):
269 269 # debug.log(f"Copilot: User: {user}")
270 270
271 271 uploaded_attachments = []
272 if auth_result.access_token:
272 if getattr(auth_result, "access_token", None):
273 273 # Upload regular media (images)
274 274 for media, _ in merge_media(media, messages):
275 275 if not isinstance(media, str):