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