diff options
author | Heiner Lohaus <heiner@lohaus.eu> | 2023-09-23 11:42:30 +0200 |
---|---|---|
committer | Heiner Lohaus <heiner@lohaus.eu> | 2023-09-23 11:42:30 +0200 |
commit | a3ecabb00e728d2ed63ce613d6f5b5902780d45c (patch) | |
tree | dc5c440177fe9d31779bd0f53a8925eed9f6d79d /g4f/__init__.py | |
parent | ~ | update models list (diff) | |
download | gpt4free-a3ecabb00e728d2ed63ce613d6f5b5902780d45c.tar gpt4free-a3ecabb00e728d2ed63ce613d6f5b5902780d45c.tar.gz gpt4free-a3ecabb00e728d2ed63ce613d6f5b5902780d45c.tar.bz2 gpt4free-a3ecabb00e728d2ed63ce613d6f5b5902780d45c.tar.lz gpt4free-a3ecabb00e728d2ed63ce613d6f5b5902780d45c.tar.xz gpt4free-a3ecabb00e728d2ed63ce613d6f5b5902780d45c.tar.zst gpt4free-a3ecabb00e728d2ed63ce613d6f5b5902780d45c.zip |
Diffstat (limited to 'g4f/__init__.py')
-rw-r--r-- | g4f/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/g4f/__init__.py b/g4f/__init__.py index 8fdfe21f..f3a887f6 100644 --- a/g4f/__init__.py +++ b/g4f/__init__.py @@ -64,7 +64,7 @@ class ChatCompletion: model, provider = get_model_and_provider(model, provider, False) - if not issubclass(type(provider), AsyncProvider): + if not issubclass(provider, AsyncProvider) and not issubclass(type(provider), AsyncProvider): raise Exception(f"Provider: {provider.__name__} doesn't support create_async") return await provider.create_async(model.name, messages, **kwargs) |