summaryrefslogtreecommitdiffstats
path: root/g4f/__init__.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-09-26 15:06:06 +0200
committerGitHub <noreply@github.com>2023-09-26 15:06:06 +0200
commit41af8aff6ce09be4131d50e0e24b8622628441fc (patch)
tree1519231f3513b57acf2548b77f1fc89e092fc4cb /g4f/__init__.py
parent~ (diff)
parentAdd ChatgptDuo and Aibn Provider (diff)
downloadgpt4free-41af8aff6ce09be4131d50e0e24b8622628441fc.tar
gpt4free-41af8aff6ce09be4131d50e0e24b8622628441fc.tar.gz
gpt4free-41af8aff6ce09be4131d50e0e24b8622628441fc.tar.bz2
gpt4free-41af8aff6ce09be4131d50e0e24b8622628441fc.tar.lz
gpt4free-41af8aff6ce09be4131d50e0e24b8622628441fc.tar.xz
gpt4free-41af8aff6ce09be4131d50e0e24b8622628441fc.tar.zst
gpt4free-41af8aff6ce09be4131d50e0e24b8622628441fc.zip
Diffstat (limited to 'g4f/__init__.py')
-rw-r--r--g4f/__init__.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/g4f/__init__.py b/g4f/__init__.py
index d6388fb5..b27ad820 100644
--- a/g4f/__init__.py
+++ b/g4f/__init__.py
@@ -61,13 +61,8 @@ class ChatCompletion:
provider : Union[type[BaseProvider], None] = None,
**kwargs
) -> str:
-
model, provider = get_model_and_provider(model, provider, False)
- provider_type = provider if isinstance(provider, type) else type(provider)
- if not issubclass(provider_type, AsyncProvider):
- raise Exception(f"Provider: {provider.__name__} doesn't support create_async")
-
return await provider.create_async(model.name, messages, **kwargs)
class Completion: