summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authort.me/xtekky <98614666+xtekky@users.noreply.github.com>2023-04-10 01:03:55 +0200
committert.me/xtekky <98614666+xtekky@users.noreply.github.com>2023-04-10 01:03:55 +0200
commit633bcd81d70f4fc343204d8f562bec3d45b789b9 (patch)
treed94449e7122c0ef33de98307dea531f97844451c /testing
parentto do list (diff)
downloadgpt4free-633bcd81d70f4fc343204d8f562bec3d45b789b9.tar
gpt4free-633bcd81d70f4fc343204d8f562bec3d45b789b9.tar.gz
gpt4free-633bcd81d70f4fc343204d8f562bec3d45b789b9.tar.bz2
gpt4free-633bcd81d70f4fc343204d8f562bec3d45b789b9.tar.lz
gpt4free-633bcd81d70f4fc343204d8f562bec3d45b789b9.tar.xz
gpt4free-633bcd81d70f4fc343204d8f562bec3d45b789b9.tar.zst
gpt4free-633bcd81d70f4fc343204d8f562bec3d45b789b9.zip
Diffstat (limited to 'testing')
-rw-r--r--testing/you_test.py32
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