From 1eefa094e3cb4a7cde74ece82a5f8215150ef7c4 Mon Sep 17 00:00:00 2001 From: Raju Komati Date: Mon, 1 May 2023 20:02:44 +0530 Subject: updated quora readme --- testing/poe_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'testing') diff --git a/testing/poe_test.py b/testing/poe_test.py index 22d95f5f..6edc030c 100644 --- a/testing/poe_test.py +++ b/testing/poe_test.py @@ -1,6 +1,6 @@ from time import sleep -from gpt4free import quora +from gpt4free import quora token = quora.Account.create(proxy=None, logging=True) print('token', token) @@ -9,3 +9,5 @@ sleep(2) for response in quora.StreamingCompletion.create(model='ChatGPT', prompt='hello world', token=token): print(response.text, flush=True) + +quora.Account.delete(token) -- cgit v1.2.3 From 05494ebbb1436db8028d1e6e8189c550dc9ddf03 Mon Sep 17 00:00:00 2001 From: Raju Komati Date: Mon, 1 May 2023 20:04:45 +0530 Subject: refactored code --- testing/theb_test.py | 2 +- testing/useless_test.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'testing') diff --git a/testing/theb_test.py b/testing/theb_test.py index 0fd2ec8b..5fa80908 100644 --- a/testing/theb_test.py +++ b/testing/theb_test.py @@ -2,4 +2,4 @@ from gpt4free import theb for token in theb.Completion.create('hello world'): print(token, end='', flush=True) - print('asdsos') \ No newline at end of file + print('asdsos') diff --git a/testing/useless_test.py b/testing/useless_test.py index 9b613aac..47c92386 100644 --- a/testing/useless_test.py +++ b/testing/useless_test.py @@ -11,7 +11,6 @@ while True: print(f"Answer: {req['text']}") message_id = req["id"] - import gpt4free message_id = "" @@ -20,8 +19,7 @@ while True: if prompt == "!stop": break - req = gpt4free.Completion.create(provider = gpt4free.Provider.UseLess, - prompt=prompt, parentMessageId=message_id) + req = gpt4free.Completion.create(provider=gpt4free.Provider.UseLess, prompt=prompt, parentMessageId=message_id) print(f"Answer: {req['text']}") - message_id = req["id"] \ No newline at end of file + message_id = req["id"] -- cgit v1.2.3