diff options
author | abc <98614666+xtekky@users.noreply.github.com> | 2023-09-17 23:27:48 +0200 |
---|---|---|
committer | abc <98614666+xtekky@users.noreply.github.com> | 2023-09-17 23:27:48 +0200 |
commit | 8f48c41562ddef03a41bdba99ddf31bd44c10917 (patch) | |
tree | d1a4a8c4a4a5b152852679ed3b0c395e56b06348 | |
parent | Merge branch 'main' of https://github.com/xtekky/gpt4free (diff) | |
download | gpt4free-8f48c41562ddef03a41bdba99ddf31bd44c10917.tar gpt4free-8f48c41562ddef03a41bdba99ddf31bd44c10917.tar.gz gpt4free-8f48c41562ddef03a41bdba99ddf31bd44c10917.tar.bz2 gpt4free-8f48c41562ddef03a41bdba99ddf31bd44c10917.tar.lz gpt4free-8f48c41562ddef03a41bdba99ddf31bd44c10917.tar.xz gpt4free-8f48c41562ddef03a41bdba99ddf31bd44c10917.tar.zst gpt4free-8f48c41562ddef03a41bdba99ddf31bd44c10917.zip |
-rw-r--r-- | g4f/__init__.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/g4f/__init__.py b/g4f/__init__.py index 5dead0e9..d8681297 100644 --- a/g4f/__init__.py +++ b/g4f/__init__.py @@ -21,9 +21,8 @@ class ChatCompletion: except KeyError: raise Exception(f'The model: {model} does not exist') - if not provider: - if isinstance(model.best_provider, tuple): + if isinstance(model.best_provider, list): provider = random.choice(model.best_provider) else: provider = model.best_provider |