From 78bfbe717d7f9610da9c119ad47f4fba3738775a Mon Sep 17 00:00:00 2001 From: Tekky <98614666+xtekky@users.noreply.github.com> Date: Sun, 17 Sep 2023 22:23:54 +0100 Subject: Revert "Fix type hint" --- g4f/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g4f/__init__.py') 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 -- cgit v1.2.3