summaryrefslogtreecommitdiffstats
path: root/g4f/__init__.py
diff options
context:
space:
mode:
authorHeiner Lohaus <heiner@lohaus.eu>2023-09-26 10:03:37 +0200
committerHeiner Lohaus <heiner@lohaus.eu>2023-09-26 10:03:37 +0200
commit3c2755bc72efa0d8e5d8b2883443530ba67ecad4 (patch)
tree778a3c87768574ecd5f9a4927fbb58fc4137c32b /g4f/__init__.py
parentAItianhuSpace Provider with GPT 4 added (diff)
downloadgpt4free-3c2755bc72efa0d8e5d8b2883443530ba67ecad4.tar
gpt4free-3c2755bc72efa0d8e5d8b2883443530ba67ecad4.tar.gz
gpt4free-3c2755bc72efa0d8e5d8b2883443530ba67ecad4.tar.bz2
gpt4free-3c2755bc72efa0d8e5d8b2883443530ba67ecad4.tar.lz
gpt4free-3c2755bc72efa0d8e5d8b2883443530ba67ecad4.tar.xz
gpt4free-3c2755bc72efa0d8e5d8b2883443530ba67ecad4.tar.zst
gpt4free-3c2755bc72efa0d8e5d8b2883443530ba67ecad4.zip
Diffstat (limited to '')
-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: