fix mismatched parameters
このコミットが含まれているのは:
コミット
172f660989
@ -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)
|
||||
|
読み込み中…
新しいイシューから参照
ユーザーをブロックする