Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Set API Key as optional positional argument
Browse files Browse the repository at this point in the history
  • Loading branch information
ramon-victor committed Aug 2, 2023
1 parent 0eceb72 commit 54aaf40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion g4f/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class ChatCompletion:
@staticmethod
def create(api_key: str, model: Model.model or str, messages: list, provider: Provider.Provider = None, stream: bool = False, auth: str = False, **kwargs):
def create(model: Model.model or str, messages: list, api_key: str = None, provider: Provider.Provider = None, stream: bool = False, auth: str = False, **kwargs):
kwargs['auth'] = auth

if provider and provider.needs_auth and not auth:
Expand Down

0 comments on commit 54aaf40

Please sign in to comment.