summaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorHeiner Lohaus <heiner.lohaus@netformic.com>2023-09-05 17:27:24 +0200
committerHeiner Lohaus <heiner.lohaus@netformic.com>2023-09-05 17:27:24 +0200
commit5ca47b44b2b42abb4f48163c17500b5ee67ab28f (patch)
treeb8fba4bde73d59c05857459eac41b25347d65c8e /tool
parent~ | Merge pull request #869 from ahobsonsayers/add-console-script (diff)
downloadgpt4free-5ca47b44b2b42abb4f48163c17500b5ee67ab28f.tar
gpt4free-5ca47b44b2b42abb4f48163c17500b5ee67ab28f.tar.gz
gpt4free-5ca47b44b2b42abb4f48163c17500b5ee67ab28f.tar.bz2
gpt4free-5ca47b44b2b42abb4f48163c17500b5ee67ab28f.tar.lz
gpt4free-5ca47b44b2b42abb4f48163c17500b5ee67ab28f.tar.xz
gpt4free-5ca47b44b2b42abb4f48163c17500b5ee67ab28f.tar.zst
gpt4free-5ca47b44b2b42abb4f48163c17500b5ee67ab28f.zip
Diffstat (limited to 'tool')
-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",