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

XFEstudio/gpt4free

Add check for running loop before retrieving user quota in GeminiCLI

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

代码差异

1 个文件 +1 -0
Modified g4f/Provider/needs_auth/GeminiCLI.py +1 -0
@@ -886,6 +886,7 @@ class GeminiCLI(AsyncGeneratorProvider, ProviderModelMixin):
886 886 if cls.auth_manager.get_access_token() is not None:
887 887 cls.live += 1
888 888 provider = GeminiCLIProvider(env=os.environ, auth_manager=cls.auth_manager)
889 get_running_loop(check_nested=True)
889 890 buckets = asyncio.run(provider.retrieve_user_quota())
890 891 cls.models = [bucket["modelId"] for bucket in buckets.get("buckets", [])]
891 892 return cls.models if cls.models else cls.fallback_models