summaryrefslogtreecommitdiffstats
path: root/g4f/__init__.py
diff options
context:
space:
mode:
authorHeiner Lohaus <heiner@lohaus.eu>2023-09-23 11:42:30 +0200
committerHeiner Lohaus <heiner@lohaus.eu>2023-09-23 11:42:30 +0200
commita3ecabb00e728d2ed63ce613d6f5b5902780d45c (patch)
treedc5c440177fe9d31779bd0f53a8925eed9f6d79d /g4f/__init__.py
parent ~ | update models list (diff)
downloadgpt4free-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__.py2
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)