diff options
author | abc <98614666+xtekky@users.noreply.github.com> | 2023-09-17 23:24:22 +0200 |
---|---|---|
committer | abc <98614666+xtekky@users.noreply.github.com> | 2023-09-17 23:24:22 +0200 |
commit | 54f4f3904e018bb36b2d76a5a6880da69f6a324e (patch) | |
tree | c8906383c147dc9048f5db1debe46faf1e5418e4 /g4f/__init__.py | |
parent | Update __init__.py (diff) | |
parent | Merge pull request #911 from xtekky/revert-907-fix-type-hint (diff) | |
download | gpt4free-54f4f3904e018bb36b2d76a5a6880da69f6a324e.tar gpt4free-54f4f3904e018bb36b2d76a5a6880da69f6a324e.tar.gz gpt4free-54f4f3904e018bb36b2d76a5a6880da69f6a324e.tar.bz2 gpt4free-54f4f3904e018bb36b2d76a5a6880da69f6a324e.tar.lz gpt4free-54f4f3904e018bb36b2d76a5a6880da69f6a324e.tar.xz gpt4free-54f4f3904e018bb36b2d76a5a6880da69f6a324e.tar.zst gpt4free-54f4f3904e018bb36b2d76a5a6880da69f6a324e.zip |
Diffstat (limited to 'g4f/__init__.py')
-rw-r--r-- | g4f/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/g4f/__init__.py b/g4f/__init__.py index d8681297..5dead0e9 100644 --- a/g4f/__init__.py +++ b/g4f/__init__.py @@ -21,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 |