summaryrefslogtreecommitdiffstats
path: root/etc/testing/_providers.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-11-12 14:55:23 +0100
committerGitHub <noreply@github.com>2023-11-12 14:55:23 +0100
commitdf8f41645c04f21d16fa14a4f2f5196f57e76dc9 (patch)
tree6ebaed4ccdd981c9c74ac1eaec3c18084a008138 /etc/testing/_providers.py
parentMerge pull request #1239 from hlohaus/pi (diff)
parentAdd auto_continue to OpenaiChat (diff)
downloadgpt4free-df8f41645c04f21d16fa14a4f2f5196f57e76dc9.tar
gpt4free-df8f41645c04f21d16fa14a4f2f5196f57e76dc9.tar.gz
gpt4free-df8f41645c04f21d16fa14a4f2f5196f57e76dc9.tar.bz2
gpt4free-df8f41645c04f21d16fa14a4f2f5196f57e76dc9.tar.lz
gpt4free-df8f41645c04f21d16fa14a4f2f5196f57e76dc9.tar.xz
gpt4free-df8f41645c04f21d16fa14a4f2f5196f57e76dc9.tar.zst
gpt4free-df8f41645c04f21d16fa14a4f2f5196f57e76dc9.zip
Diffstat (limited to 'etc/testing/_providers.py')
-rw-r--r--etc/testing/_providers.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/testing/_providers.py b/etc/testing/_providers.py
index ec0e0271..0194318c 100644
--- a/etc/testing/_providers.py
+++ b/etc/testing/_providers.py
@@ -35,8 +35,14 @@ def main():
def get_providers() -> list[type[BaseProvider]]:
providers = dir(Provider)
providers = [getattr(Provider, provider) for provider in providers if provider != "RetryProvider"]
- providers = [provider for provider in providers if isinstance(provider, type)]
- return [provider for provider in providers if issubclass(provider, BaseProvider)]
+ providers = [provider for provider in providers if isinstance(provider, type) and hasattr(provider, "url")]
+ return [
+ provider
+ for provider in providers
+ if issubclass(provider, BaseProvider)
+ and provider.__name__ not in dir(Provider.deprecated)
+ and provider.__name__ not in dir(Provider.unfinished)
+ ]
def create_response(_provider: type[BaseProvider]) -> str: