summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorHeiner Lohaus <heiner@lohaus.eu>2023-09-18 07:15:43 +0200
committerHeiner Lohaus <heiner@lohaus.eu>2023-09-18 07:15:43 +0200
commit3b8dfff974618499b177c5a724638919b93b702e (patch)
treee48ce2533f3cff7b1c45a3e789f63da01e541ac7 /testing
parentAdd GptGo Provider, Fix AItianhu Provider (diff)
downloadgpt4free-3b8dfff974618499b177c5a724638919b93b702e.tar
gpt4free-3b8dfff974618499b177c5a724638919b93b702e.tar.gz
gpt4free-3b8dfff974618499b177c5a724638919b93b702e.tar.bz2
gpt4free-3b8dfff974618499b177c5a724638919b93b702e.tar.lz
gpt4free-3b8dfff974618499b177c5a724638919b93b702e.tar.xz
gpt4free-3b8dfff974618499b177c5a724638919b93b702e.tar.zst
gpt4free-3b8dfff974618499b177c5a724638919b93b702e.zip
Diffstat (limited to '')
-rw-r--r--testing/test_needs_auth.py10
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()