summaryrefslogtreecommitdiffstats
path: root/tool/readme_table.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-09-07 19:45:04 +0200
committerGitHub <noreply@github.com>2023-09-07 19:45:04 +0200
commit7ca1a59d95b52f94f674e8f981eab910b2f03518 (patch)
treeca506c3c152f3906a5b727a4cc6ebba1fd59d335 /tool/readme_table.py
parent~ | Merge pull request #869 from ahobsonsayers/add-console-script (diff)
parentFix imports in Bing (diff)
downloadgpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar
gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar.gz
gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar.bz2
gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar.lz
gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar.xz
gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar.zst
gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.zip
Diffstat (limited to '')
-rw-r--r--tool/readme_table.py27
1 files changed, 3 insertions, 24 deletions
diff --git a/tool/readme_table.py b/tool/readme_table.py
index 522c66a7..dc7c85f3 100644
--- a/tool/readme_table.py
+++ b/tool/readme_table.py
@@ -5,10 +5,9 @@ from urllib.parse import urlparse
sys.path.append(str(Path(__file__).parent.parent))
-from g4f import models, Provider
-from g4f.Provider.base_provider import BaseProvider, AsyncProvider
-from testing.test_providers import test
-
+from g4f import models
+from g4f.Provider.base_provider import AsyncProvider
+from testing.test_providers import test, get_providers
def print_imports():
print("##### Providers:")
@@ -68,26 +67,6 @@ def print_providers():
)
print("\n".join(lines))
-
-def get_provider_names() -> list[str]:
- provider_names = dir(Provider)
- ignore_names = [
- "base_provider",
- "BaseProvider",
- "AsyncProvider",
- "AsyncGeneratorProvider"
- ]
- return [
- provider_name
- for provider_name in provider_names
- if not provider_name.startswith("__") and provider_name not in ignore_names
- ]
-
-
-def get_providers() -> list[type[BaseProvider]]:
- return [getattr(Provider, provider_name) for provider_name in get_provider_names()]
-
-
def print_models():
base_provider_names = {
"cohere": "Cohere",