返回提交历史
Modified
g4f/client.py
+1
-4
XFEstudio/gpt4free
Fix isssue with stop in client
58071796
代码差异
1 个文件
+1
-4
@@ -127,10 +127,6 @@ class Completions():
127
127
api_key: str = None,
128
128
**kwargs
129
129
) -> Union[ChatCompletion, Generator[ChatCompletionChunk]]:
130
if max_tokens is not None:
131
kwargs["max_tokens"] = max_tokens
132
if stop:
133
kwargs["stop"] = stop
134
130
model, provider = get_model_and_provider(
135
131
model,
136
132
self.provider if provider is None else provider,
@@ -141,6 +137,7 @@ class Completions():
141
137
response = provider.create_completion(
142
138
model, messages, stream,
143
139
proxy=self.client.get_proxy(),
140
max_tokens=max_tokens,
144
141
stop=stop,
145
142
api_key=self.client.api_key if api_key is None else api_key,
146
143
**kwargs