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

XFEstudio/gpt4free

Fix unittests

33b3e1d4
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

2 个文件 +1 -2
Modified g4f/client/stubs.py +0 -1
@@ -134,7 +134,6 @@ class ChatCompletionMessage(BaseModel):
134 134 content: str
135 135 tool_calls: list[ToolCallModel] = None
136 136
137 @classmethod
138 137 @classmethod
139 138 def model_construct(cls, content: str, tool_calls: list = None):
140 139 return super().model_construct(role="assistant", content=content, **filter_none(tool_calls=tool_calls))
Modified g4f/providers/any_provider.py +1 -1
@@ -252,7 +252,7 @@ class AnyProvider(AsyncGeneratorProvider, ProviderModelMixin):
252 252 child_conversation = getattr(conversation, provider.__name__, None)
253 253 if child_conversation is not None:
254 254 kwargs["conversation"] = JsonConversation(**child_conversation)
255 debug.log(f"Using {provider.__name__} provider" + f" and model {model}" if model else "")
255 debug.log(f"Using {provider.__name__} provider" + f" and {model} model" if model else "")
256 256 yield ProviderInfo(**provider.get_dict(), model=model)
257 257 if provider in (HuggingFace, HuggingFaceMedia):
258 258 kwargs["api_key"] = api_key