summaryrefslogtreecommitdiffstats
path: root/g4f/__init__.py
diff options
context:
space:
mode:
authorabc <98614666+xtekky@users.noreply.github.com>2023-09-23 11:56:05 +0200
committerabc <98614666+xtekky@users.noreply.github.com>2023-09-23 11:56:05 +0200
commitf21bac74b8c40d7ec077b3cd34e63ba967d4dd12 (patch)
treec93319de3a5e3b678a00842545ded5ab1b423dd4 /g4f/__init__.py
parent~ (diff)
parent~ | Merge pull request #933 from hlohaus/night (diff)
downloadgpt4free-f21bac74b8c40d7ec077b3cd34e63ba967d4dd12.tar
gpt4free-f21bac74b8c40d7ec077b3cd34e63ba967d4dd12.tar.gz
gpt4free-f21bac74b8c40d7ec077b3cd34e63ba967d4dd12.tar.bz2
gpt4free-f21bac74b8c40d7ec077b3cd34e63ba967d4dd12.tar.lz
gpt4free-f21bac74b8c40d7ec077b3cd34e63ba967d4dd12.tar.xz
gpt4free-f21bac74b8c40d7ec077b3cd34e63ba967d4dd12.tar.zst
gpt4free-f21bac74b8c40d7ec077b3cd34e63ba967d4dd12.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)