summaryrefslogtreecommitdiffstats
path: root/you_test.py
diff options
context:
space:
mode:
authort.me/xtekky <98614666+xtekky@users.noreply.github.com>2023-04-12 11:47:40 +0200
committert.me/xtekky <98614666+xtekky@users.noreply.github.com>2023-04-12 11:47:40 +0200
commitfdbe98f673aa6727697d274ddbcc0e5cc1bc6c60 (patch)
tree438b30f7805a95e421f46e08795ad14ff8790a1e /you_test.py
parentt3nsor api working again (diff)
downloadgpt4free-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.py32
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