From cad2b5a9da84ccb3cd0902909d1c43b821bbfa0b Mon Sep 17 00:00:00 2001 From: "t.me/xtekky" <98614666+xtekky@users.noreply.github.com> Date: Mon, 17 Apr 2023 00:07:26 +0100 Subject: poe.com api (gpt-4) [added license for api.py] --- poe_test.py | 13 +++++++++++++ quora/__init__.py | 2 ++ quora/cookies.txt | 1 + testing/poe_test.py | 13 ------------- 4 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 poe_test.py delete mode 100644 testing/poe_test.py diff --git a/poe_test.py b/poe_test.py new file mode 100644 index 00000000..122f19c7 --- /dev/null +++ b/poe_test.py @@ -0,0 +1,13 @@ +import quora +from time import sleep + +token = quora.Account.create(proxy = None,logging = True) +print('token', token) + +sleep(2) + +for response in quora.StreamingCompletion.create(model = 'gpt-3.5-turbo', + prompt = 'hello world', + token = token): + + print(response.completion.choices[0].text, end="", flush=True) \ No newline at end of file diff --git a/quora/__init__.py b/quora/__init__.py index 0a11bb23..c6e5fdc2 100644 --- a/quora/__init__.py +++ b/quora/__init__.py @@ -166,6 +166,8 @@ class Account: mail = Mail(client.proxies) mail_token = None _, mail_address = mail.get_mail() + if mail_address is None: + raise Exception('Error creating mail, please use proxies') if logging: print('email', mail_address) diff --git a/quora/cookies.txt b/quora/cookies.txt index 9fe0db65..8ac9aba3 100644 --- a/quora/cookies.txt +++ b/quora/cookies.txt @@ -16,3 +16,4 @@ nBvuNYRLaE4xE4HuzBPiIQ== oyae3iClomSrk6RJywZ4iw== 1Z27Ul8BTdNOhncT5H6wdg== wfUfJIlwQwUss8l-3kDt3w== +f6Jw_Nr0PietpNCtOCXJTw== diff --git a/testing/poe_test.py b/testing/poe_test.py deleted file mode 100644 index 122f19c7..00000000 --- a/testing/poe_test.py +++ /dev/null @@ -1,13 +0,0 @@ -import quora -from time import sleep - -token = quora.Account.create(proxy = None,logging = True) -print('token', token) - -sleep(2) - -for response in quora.StreamingCompletion.create(model = 'gpt-3.5-turbo', - prompt = 'hello world', - token = token): - - print(response.completion.choices[0].text, end="", flush=True) \ No newline at end of file -- cgit v1.2.3