fix mismatched parameters

このコミットが含まれているのは:
John Doe 2023-05-13 12:55:14 -04:00
コミット 172f660989
2個のファイルの変更5行の追加4行の削除

ファイルの表示

@ -42,7 +42,8 @@ for message in response:
print(message)
# normal response
response = g4f.ChatCompletion.create(model=g4f.Models.gpt_4, prompt='hi') # alterative model setting
response = g4f.ChatCompletion.create(model=g4f.Models.gpt_4, messages=[
{"role": "user", "content": "hi"}]) # alterative model setting
print(response)
@ -78,4 +79,4 @@ def _create_completion(prompt: str, args...):
params = f'g4f.Providers.{os.path.basename(__file__)[:-3]} supports: ' + \
', '.join([f"{name}: {get_type_hints(_create_completion)[name].__name__}" for name in _create_completion.__code__.co_varnames[:_create_completion.__code__.co_argcount]])
```
```

ファイルの表示

@ -36,8 +36,8 @@ class ChatCompletion:
engine = model.best_site if not provider else provider
return (engine._create_completion(messages, **kwargs)
if stream else ''.join(engine._create_completion(messages, **kwargs)))
return (engine._create_completion(model, messages, **kwargs)
if stream else ''.join(engine._create_completion(model, messages, **kwargs)))
except TypeError as e:
print(e)