mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-09-12 00:29:27 -04:00
TypeError: issubclass() arg 1 must be a class
This commit is contained in:
parent
4edd7518de
commit
fd5c33efb8
@ -64,7 +64,8 @@ class ChatCompletion:
|
||||
|
||||
model, provider = get_model_and_provider(model, provider, False)
|
||||
|
||||
if not issubclass(provider, AsyncProvider) and not issubclass(type(provider), AsyncProvider):
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user