返回提交历史
Modified
g4f/client/stubs.py
+0
-1
Modified
g4f/providers/any_provider.py
+1
-1
XFEstudio/gpt4free
Fix unittests
33b3e1d4
代码差异
2 个文件
+1
-2
@@ -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))
@@ -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