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

XFEstudio/gpt4free

Update BingCreateImages.py

03e5f109
H Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -2
Modified g4f/Provider/BingCreateImages.py +2 -2
@@ -51,7 +51,7 @@ class BingCreateImages(AsyncGeneratorProvider, ProviderModelMixin):
51 51 Generator[str, None, None]: The final output as markdown formatted string with images.
52 52 """
53 53 cookies = self.cookies or get_cookies(".bing.com", False)
54 if "_U" not in cookies:
54 if cookies is None or "_U" not in cookies:
55 55 login_url = os.environ.get("G4F_LOGIN_URL")
56 56 if login_url:
57 57 yield f"Please login: [Bing]({login_url})\n\n"
@@ -72,7 +72,7 @@ class BingCreateImages(AsyncGeneratorProvider, ProviderModelMixin):
72 72 str: Markdown formatted string with images.
73 73 """
74 74 cookies = self.cookies or get_cookies(".bing.com", False)
75 if "_U" not in cookies:
75 if cookies is None or "_U" not in cookies:
76 76 raise MissingAuthError('Missing "_U" cookie')
77 77 proxy = self.proxy or os.environ.get("G4F_PROXY")
78 78 async with create_session(cookies, proxy) as session: