diff options
author | abc <98614666+xtekky@users.noreply.github.com> | 2023-09-23 02:29:55 +0200 |
---|---|---|
committer | abc <98614666+xtekky@users.noreply.github.com> | 2023-09-23 02:29:55 +0200 |
commit | 07063b0fd83dc7bb76b095015042a97a2ccff330 (patch) | |
tree | f26ada752052dd53f34dea75a3db6e302380afe6 /tool/readme_table.py | |
parent | ~ | new providers (diff) | |
download | gpt4free-07063b0fd83dc7bb76b095015042a97a2ccff330.tar gpt4free-07063b0fd83dc7bb76b095015042a97a2ccff330.tar.gz gpt4free-07063b0fd83dc7bb76b095015042a97a2ccff330.tar.bz2 gpt4free-07063b0fd83dc7bb76b095015042a97a2ccff330.tar.lz gpt4free-07063b0fd83dc7bb76b095015042a97a2ccff330.tar.xz gpt4free-07063b0fd83dc7bb76b095015042a97a2ccff330.tar.zst gpt4free-07063b0fd83dc7bb76b095015042a97a2ccff330.zip |
Diffstat (limited to 'tool/readme_table.py')
-rw-r--r-- | tool/readme_table.py | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/tool/readme_table.py b/tool/readme_table.py index 9e43b0ae..4351c036 100644 --- a/tool/readme_table.py +++ b/tool/readme_table.py @@ -8,6 +8,7 @@ sys.path.append(str(Path(__file__).parent.parent)) import asyncio from g4f import models from g4f.Provider.base_provider import AsyncProvider, BaseProvider +from g4f.Provider.retry_provider import RetryProvider from testing.test_providers import get_providers logging = False @@ -20,6 +21,7 @@ def print_imports(): for _provider in get_providers(): if _provider.working: print(f" {_provider.__name__},") + print(")") print("# Usage:") print("response = g4f.ChatCompletion.create(..., provider=ProviderName)") @@ -72,26 +74,30 @@ def print_providers(): ] providers = get_providers() - responses = asyncio.run(test_async_list(providers)) + #responses = asyncio.run(test_async_list(providers)) for is_working in (True, False): for idx, _provider in enumerate(providers): if is_working != _provider.working: continue + if _provider == RetryProvider: + continue + netloc = urlparse(_provider.url).netloc website = f"[{netloc}]({_provider.url})" - provider_name = f"g4f.provider.{_provider.__name__}" + provider_name = f"`g4f.Provider.{_provider.__name__}`" has_gpt_35 = "✔️" if _provider.supports_gpt_35_turbo else "❌" has_gpt_4 = "✔️" if _provider.supports_gpt_4 else "❌" stream = "✔️" if _provider.supports_stream else "❌" can_async = "✔️" if issubclass(_provider, AsyncProvider) else "❌" if _provider.working: - if responses[idx]: - status = '![Active](https://img.shields.io/badge/Active-brightgreen)' - else: - status = '![Unknown](https://img.shields.io/badge/Unknown-grey)' + status = '![Active](https://img.shields.io/badge/Active-brightgreen)' + # if responses[idx]: + # status = '![Active](https://img.shields.io/badge/Active-brightgreen)' + # else: + # status = '![Unknown](https://img.shields.io/badge/Unknown-grey)' else: status = '![Inactive](https://img.shields.io/badge/Inactive-red)' auth = "✔️" if _provider.needs_auth else "❌" @@ -145,8 +151,8 @@ def get_models(): if __name__ == "__main__": - print_imports() - print_async() + # print_imports() + # print_async() print_providers() - print("\n", "-" * 50, "\n") - print_models()
\ No newline at end of file + # print("\n", "-" * 50, "\n") + # print_models()
\ No newline at end of file |