diff options
author | t.me/xtekky <98614666+xtekky@users.noreply.github.com> | 2023-04-26 11:41:24 +0200 |
---|---|---|
committer | t.me/xtekky <98614666+xtekky@users.noreply.github.com> | 2023-04-26 11:41:24 +0200 |
commit | d60d6fa355d89e60100676ca08cf63a77b443da1 (patch) | |
tree | 4c9a7aa176a86c2c18728de4ed4efc6b167a2591 /testing | |
parent | Merge pull request #139 from vatva691/main (diff) | |
download | gpt4free-d60d6fa355d89e60100676ca08cf63a77b443da1.tar gpt4free-d60d6fa355d89e60100676ca08cf63a77b443da1.tar.gz gpt4free-d60d6fa355d89e60100676ca08cf63a77b443da1.tar.bz2 gpt4free-d60d6fa355d89e60100676ca08cf63a77b443da1.tar.lz gpt4free-d60d6fa355d89e60100676ca08cf63a77b443da1.tar.xz gpt4free-d60d6fa355d89e60100676ca08cf63a77b443da1.tar.zst gpt4free-d60d6fa355d89e60100676ca08cf63a77b443da1.zip |
Diffstat (limited to 'testing')
-rw-r--r-- | testing/phind_test.py | 2 | ||||
-rw-r--r-- | testing/you_test.py | 32 |
2 files changed, 33 insertions, 1 deletions
diff --git a/testing/phind_test.py b/testing/phind_test.py index d72db090..2f2560a1 100644 --- a/testing/phind_test.py +++ b/testing/phind_test.py @@ -1,7 +1,7 @@ import phind # set cf_clearance cookie ( not needed at the moment) -phind.cf_clearance = '' +phind.cf_clearance = 'MDzwnr3ZWk_ap8u.iwwMR5F3WccfOkhUy_zGNDpcF3s-1682497341-0-160' phind.user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36' prompt = 'hello world' diff --git a/testing/you_test.py b/testing/you_test.py new file mode 100644 index 00000000..9c69cf34 --- /dev/null +++ b/testing/you_test.py @@ -0,0 +1,32 @@ +import you + +# simple request with links and details +response = you.Completion.create( + prompt = "hello world", + detailed = True, + includelinks = True) + +print(response) + +# { +# "response": "...", +# "links": [...], +# "extra": {...}, +# "slots": {...} +# } +# } + +#chatbot + +chat = [] + +while True: + prompt = input("You: ") + + response = you.Completion.create( + prompt = prompt, + chat = chat) + + print("Bot:", response["response"]) + + chat.append({"question": prompt, "answer": response["response"]})
\ No newline at end of file |