diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/testing/_providers.py | 3 | ||||
-rw-r--r-- | etc/testing/test_all.py | 14 | ||||
-rw-r--r-- | etc/testing/test_chat_completion.py | 4 | ||||
-rw-r--r-- | etc/tool/create_provider.py | 2 | ||||
-rw-r--r-- | etc/tool/improve_code.py | 4 |
5 files changed, 8 insertions, 19 deletions
diff --git a/etc/testing/_providers.py b/etc/testing/_providers.py index e2ef0cbe..0d75dd02 100644 --- a/etc/testing/_providers.py +++ b/etc/testing/_providers.py @@ -35,7 +35,6 @@ def get_providers() -> list[ProviderType]: provider for provider in __providers__ if provider.__name__ not in dir(Provider.deprecated) - and provider.__name__ not in dir(Provider.unfinished) and provider.url is not None ] @@ -59,4 +58,4 @@ def test(provider: ProviderType) -> bool: if __name__ == "__main__": main() -
\ No newline at end of file + diff --git a/etc/testing/test_all.py b/etc/testing/test_all.py index 73134e3f..6850627d 100644 --- a/etc/testing/test_all.py +++ b/etc/testing/test_all.py @@ -38,21 +38,11 @@ async def test(model: g4f.Model): async def start_test(): models_to_test = [ - # GPT-3.5 4K Context + # GPT-3.5 g4f.models.gpt_35_turbo, - g4f.models.gpt_35_turbo_0613, - # GPT-3.5 16K Context - g4f.models.gpt_35_turbo_16k, - g4f.models.gpt_35_turbo_16k_0613, - - # GPT-4 8K Context + # GPT-4 g4f.models.gpt_4, - g4f.models.gpt_4_0613, - - # GPT-4 32K Context - g4f.models.gpt_4_32k, - g4f.models.gpt_4_32k_0613, ] models_working = [] diff --git a/etc/testing/test_chat_completion.py b/etc/testing/test_chat_completion.py index 615c8be0..6b053b72 100644 --- a/etc/testing/test_chat_completion.py +++ b/etc/testing/test_chat_completion.py @@ -8,7 +8,7 @@ import g4f, asyncio print("create:", end=" ", flush=True) for response in g4f.ChatCompletion.create( model=g4f.models.default, - provider=g4f.Provider.Bing, + #provider=g4f.Provider.Bing, messages=[{"role": "user", "content": "write a poem about a tree"}], stream=True ): @@ -18,7 +18,7 @@ print() async def run_async(): response = await g4f.ChatCompletion.create_async( model=g4f.models.default, - provider=g4f.Provider.Bing, + #provider=g4f.Provider.Bing, messages=[{"role": "user", "content": "hello!"}], ) print("create_async:", response) diff --git a/etc/tool/create_provider.py b/etc/tool/create_provider.py index ff04f961..797089cd 100644 --- a/etc/tool/create_provider.py +++ b/etc/tool/create_provider.py @@ -90,7 +90,7 @@ And replace "gpt-3.5-turbo" with `model`. print("Create code...") response = [] for chunk in g4f.ChatCompletion.create( - model=g4f.models.gpt_35_long, + model=g4f.models.default, messages=[{"role": "user", "content": prompt}], timeout=300, stream=True, diff --git a/etc/tool/improve_code.py b/etc/tool/improve_code.py index b2e36f86..8578b478 100644 --- a/etc/tool/improve_code.py +++ b/etc/tool/improve_code.py @@ -30,7 +30,7 @@ Don't remove license comments. print("Create code...") response = [] for chunk in g4f.ChatCompletion.create( - model=g4f.models.gpt_35_long, + model=g4f.models.default, messages=[{"role": "user", "content": prompt}], timeout=300, stream=True @@ -42,4 +42,4 @@ response = "".join(response) if code := read_code(response): with open(path, "w") as file: - file.write(code)
\ No newline at end of file + file.write(code) |