diff options
Diffstat (limited to '')
-rw-r--r-- | g4f/gui/server/provider.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/g4f/gui/server/provider.py b/g4f/gui/server/provider.py index 8554bf4f..8c7ac755 100644 --- a/g4f/gui/server/provider.py +++ b/g4f/gui/server/provider.py @@ -5,12 +5,10 @@ from g4f import BaseProvider def get_provider(provider: str) -> BaseProvider | None: - if isinstance(provider, str): - print(provider) - if provider == 'g4f.Provider.Auto': - return None - - return g4f.Provider.ProviderUtils.convert.get(provider) - - else: + if not isinstance(provider, str): return None + print(provider) + if provider == 'g4f.Provider.Auto': + return None + + return g4f.Provider.ProviderUtils.convert.get(provider) |