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

XFEstudio/gpt4free

fix: reorder parameters in YuppAPIClient and YuppModelManager constructors

2cc94047
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +3 -7
Modified g4f/Provider/yupp/models.py +3 -7
@@ -17,14 +17,10 @@ class ModelConfig:
17 17 class YuppAPIClient:
18 18 """Yupp API client for fetching model data"""
19 19
20 def __init__(self, config: ModelConfig = None, api_key: str = None, session=None):
20 def __init__(self, session, config: ModelConfig = None, api_key: str = None):
21 21 self.config = config or ModelConfig()
22 22 self.api_key = api_key
23 if session is None:
24 self.session = requests.Session()
25 self._setup_session()
26 else:
27 self.session = session
23 self.session = session
28 24 self._set_cookies()
29 25
30 26 def _setup_session(self) -> None:
@@ -229,7 +225,7 @@ class YuppModelManager:
229 225
230 226 def __init__(self, session, config: ModelConfig = None, api_key: str = None):
231 227 self.config = config or ModelConfig()
232 self.client = YuppAPIClient(config, api_key, session)
228 self.client = YuppAPIClient(session, self.config, api_key)
233 229 self.processor = ModelProcessor()
234 230 self.data_manager = DataManager()
235 231