diff options
Diffstat (limited to 'g4f/__init__.py')
-rw-r--r-- | g4f/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/__init__.py b/g4f/__init__.py index 1e8664c1..90b05c85 100644 --- a/g4f/__init__.py +++ b/g4f/__init__.py @@ -6,7 +6,6 @@ import random logging = False - class ChatCompletion: @staticmethod def create( @@ -22,8 +21,9 @@ class ChatCompletion: except KeyError: raise Exception(f'The model: {model} does not exist') + if not provider: - if isinstance(model.best_provider, list): + if isinstance(model.best_provider, tuple): provider = random.choice(model.best_provider) else: provider = model.best_provider |