返回提交历史
Modified
g4f/api/__init__.py
+6
-1
XFEstudio/gpt4free
Update __init__.py
e41bbdce
代码差异
1 个文件
+6
-1
@@ -51,6 +51,7 @@ class AppConfig():
51
51
list_ignored_providers: Optional[list[str]] = None
52
52
g4f_api_key: Optional[str] = None
53
53
ignore_cookie_files: bool = False
54
defaults: dict = {}
54
55
55
56
@classmethod
56
57
def set_config(cls, **data):
@@ -145,7 +146,11 @@ class Api:
145
146
if auth_header and auth_header != "Bearer":
146
147
config.api_key = auth_header
147
148
response = self.client.chat.completions.create(
148
**config.dict(exclude_none=True),
149
{
150
**AppConfig.defaults,
151
**config.dict(exclude_none=True),
152
},
153
149
154
ignored=AppConfig.list_ignored_providers
150
155
)
151
156
except Exception as e: