diff options
author | Commenter123321 <36051603+Commenter123321@users.noreply.github.com> | 2023-10-10 15:11:17 +0200 |
---|---|---|
committer | Commenter123321 <36051603+Commenter123321@users.noreply.github.com> | 2023-10-10 15:11:17 +0200 |
commit | 9239c5720002f31b67bdd1ee805e2cd9b528d085 (patch) | |
tree | d48901a7bcce0cdac262f189b67fb5178542e4ce /g4f/gui/server/provider.py | |
parent | fix provider thing in gui (diff) | |
download | gpt4free-9239c5720002f31b67bdd1ee805e2cd9b528d085.tar gpt4free-9239c5720002f31b67bdd1ee805e2cd9b528d085.tar.gz gpt4free-9239c5720002f31b67bdd1ee805e2cd9b528d085.tar.bz2 gpt4free-9239c5720002f31b67bdd1ee805e2cd9b528d085.tar.lz gpt4free-9239c5720002f31b67bdd1ee805e2cd9b528d085.tar.xz gpt4free-9239c5720002f31b67bdd1ee805e2cd9b528d085.tar.zst gpt4free-9239c5720002f31b67bdd1ee805e2cd9b528d085.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/gui/server/provider.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/g4f/gui/server/provider.py b/g4f/gui/server/provider.py index 230b5f5f..11202d38 100644 --- a/g4f/gui/server/provider.py +++ b/g4f/gui/server/provider.py @@ -3,17 +3,12 @@ from g4f import BaseProvider def get_provider(provider: str) -> BaseProvider | None: - if isinstance(provider, str): print(provider) if provider == 'g4f.Provider.Auto': return None - if provider in g4f.Provider.ProviderUtils.convert: - return g4f.Provider.ProviderUtils.convert[provider] - - else: - return None + return g4f.Provider.ProviderUtils.convert.get(provider) else: return None |