From 5ca47b44b2b42abb4f48163c17500b5ee67ab28f Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Tue, 5 Sep 2023 17:27:24 +0200 Subject: Add to many provider async and stream support, Fix Ails, AItianhu, ChatgptAi, ChatgptLogin Provider, Add fallback cookies to Bing, Improve OpenaiChat Provider --- tool/readme_table.py | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'tool') 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", -- cgit v1.2.3