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

XFEstudio/gpt4free

Fix cookies is None bug

dd2264b6
Heiner Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +1 -1
Modified g4f/Provider/needs_auth/OpenaiChat.py +1 -1
@@ -336,7 +336,7 @@ class OpenaiChat(AsyncGeneratorProvider, ProviderModelMixin):
336 336 if cls._args is None and cookies is None:
337 337 cookies = get_cookies("chat.openai.com", False)
338 338 api_key = kwargs["access_token"] if "access_token" in kwargs else api_key
339 if api_key is None:
339 if api_key is None and cookies is not None:
340 340 api_key = cookies["access_token"] if "access_token" in cookies else api_key
341 341 if cls._args is None:
342 342 cls._args = {