From 8ed63693e41d2b8793dc8f6ea2ae0acee6cc9852 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sat, 16 Mar 2024 20:15:53 +0100 Subject: Fix Provider not found error --- g4f/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'g4f/__init__.py') diff --git a/g4f/__init__.py b/g4f/__init__.py index dce116c4..14405e92 100644 --- a/g4f/__init__.py +++ b/g4f/__init__.py @@ -51,7 +51,7 @@ def get_model_and_provider(model : Union[Model, str], provider = IterProvider(provider_list) elif provider in ProviderUtils.convert: provider = ProviderUtils.convert[provider] - else: + elif provider: raise ProviderNotFoundError(f'Provider not found: {provider}') if isinstance(model, str): -- cgit v1.2.3