diff options
author | Tekky <98614666+xtekky@users.noreply.github.com> | 2023-09-19 00:54:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-19 00:54:28 +0200 |
commit | a54291cb7c9dbaf3d092e62f49e0186ee1be0aee (patch) | |
tree | f901c6b0cada1b04021d1fd62f8bf45029786949 /testing | |
parent | Merge branch 'main' of https://github.com/xtekky/gpt4free (diff) | |
parent | Check supports_stream in best_providers list (diff) | |
download | gpt4free-a54291cb7c9dbaf3d092e62f49e0186ee1be0aee.tar gpt4free-a54291cb7c9dbaf3d092e62f49e0186ee1be0aee.tar.gz gpt4free-a54291cb7c9dbaf3d092e62f49e0186ee1be0aee.tar.bz2 gpt4free-a54291cb7c9dbaf3d092e62f49e0186ee1be0aee.tar.lz gpt4free-a54291cb7c9dbaf3d092e62f49e0186ee1be0aee.tar.xz gpt4free-a54291cb7c9dbaf3d092e62f49e0186ee1be0aee.tar.zst gpt4free-a54291cb7c9dbaf3d092e62f49e0186ee1be0aee.zip |
Diffstat (limited to 'testing')
-rw-r--r-- | testing/test_needs_auth.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/testing/test_needs_auth.py b/testing/test_needs_auth.py index 3cef1c61..26630e23 100644 --- a/testing/test_needs_auth.py +++ b/testing/test_needs_auth.py @@ -17,7 +17,7 @@ _providers = [ g4f.Provider.Bard ] -_instruct = "Hello, tell about you in one sentence." +_instruct = "Hello, are you GPT 4?." _example = """ OpenaiChat: Hello! How can I assist you today? 2.0 secs @@ -39,14 +39,14 @@ No Stream Total: 10.14 secs print("Bing: ", end="") for response in log_time_yield( g4f.ChatCompletion.create, - model=g4f.models.gpt_35_turbo, + model=g4f.models.default, messages=[{"role": "user", "content": _instruct}], provider=g4f.Provider.Bing, #cookies=g4f.get_cookies(".huggingface.co"), - #stream=True, + stream=True, auth=True ): - print(response, end="") + print(response, end="", flush=True) print() print() @@ -75,7 +75,7 @@ def run_stream(): model=None, messages=[{"role": "user", "content": _instruct}], ): - print(response, end="") + print(response, end="", flush=True) print() print("Stream Total:", log_time(run_stream)) print() |