diff options
author | t.me/xtekky <98614666+xtekky@users.noreply.github.com> | 2023-04-12 11:48:03 +0200 |
---|---|---|
committer | t.me/xtekky <98614666+xtekky@users.noreply.github.com> | 2023-04-12 11:48:03 +0200 |
commit | cf9c1484494efefc77082cd4d31d086437678a2d (patch) | |
tree | 97bb70cfd9301e55b41b0bcbadaa72f381d55688 /testing | |
parent | _ (diff) | |
download | gpt4free-cf9c1484494efefc77082cd4d31d086437678a2d.tar gpt4free-cf9c1484494efefc77082cd4d31d086437678a2d.tar.gz gpt4free-cf9c1484494efefc77082cd4d31d086437678a2d.tar.bz2 gpt4free-cf9c1484494efefc77082cd4d31d086437678a2d.tar.lz gpt4free-cf9c1484494efefc77082cd4d31d086437678a2d.tar.xz gpt4free-cf9c1484494efefc77082cd4d31d086437678a2d.tar.zst gpt4free-cf9c1484494efefc77082cd4d31d086437678a2d.zip |
Diffstat (limited to 'testing')
-rw-r--r-- | testing/you_test.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/you_test.py b/testing/you_test.py new file mode 100644 index 00000000..62598e05 --- /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 |