diff options
author | t.me/xtekky <98614666+xtekky@users.noreply.github.com> | 2023-04-25 19:40:17 +0200 |
---|---|---|
committer | t.me/xtekky <98614666+xtekky@users.noreply.github.com> | 2023-04-25 19:40:17 +0200 |
commit | e341c75e5e9c34c5aa583e67b8711799d74040eb (patch) | |
tree | 9838ce842a78a0226bb9d55e83bfc0a7d7b2249d /you_test.py | |
parent | _ (diff) | |
download | gpt4free-e341c75e5e9c34c5aa583e67b8711799d74040eb.tar gpt4free-e341c75e5e9c34c5aa583e67b8711799d74040eb.tar.gz gpt4free-e341c75e5e9c34c5aa583e67b8711799d74040eb.tar.bz2 gpt4free-e341c75e5e9c34c5aa583e67b8711799d74040eb.tar.lz gpt4free-e341c75e5e9c34c5aa583e67b8711799d74040eb.tar.xz gpt4free-e341c75e5e9c34c5aa583e67b8711799d74040eb.tar.zst gpt4free-e341c75e5e9c34c5aa583e67b8711799d74040eb.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..9c69cf34 --- /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 |