summaryrefslogtreecommitdiffstats
path: root/testing/you_test.py
diff options
context:
space:
mode:
authorRaju Komati <komatiraju032@gmail.com>2023-04-26 20:20:18 +0200
committerRaju Komati <komatiraju032@gmail.com>2023-04-26 20:20:18 +0200
commitf43107aa764acb59dbbaad5d5ac6fb53f3990057 (patch)
tree47e4b5e94babc30430f24e3f5cbf931c3ab97ede /testing/you_test.py
parentMerge pull request #152 from 3k3n3/patch-1 (diff)
downloadgpt4free-f43107aa764acb59dbbaad5d5ac6fb53f3990057.tar
gpt4free-f43107aa764acb59dbbaad5d5ac6fb53f3990057.tar.gz
gpt4free-f43107aa764acb59dbbaad5d5ac6fb53f3990057.tar.bz2
gpt4free-f43107aa764acb59dbbaad5d5ac6fb53f3990057.tar.lz
gpt4free-f43107aa764acb59dbbaad5d5ac6fb53f3990057.tar.xz
gpt4free-f43107aa764acb59dbbaad5d5ac6fb53f3990057.tar.zst
gpt4free-f43107aa764acb59dbbaad5d5ac6fb53f3990057.zip
Diffstat (limited to '')
-rw-r--r--testing/you_test.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/testing/you_test.py b/testing/you_test.py
index 9c69cf34..6ba12f57 100644
--- a/testing/you_test.py
+++ b/testing/you_test.py
@@ -1,10 +1,7 @@
import you
# simple request with links and details
-response = you.Completion.create(
- prompt = "hello world",
- detailed = True,
- includelinks = True)
+response = you.Completion.create(prompt="hello world", detailed=True, include_links=True)
print(response)
@@ -16,17 +13,15 @@ print(response)
# }
# }
-#chatbot
+# chatbot
chat = []
while True:
prompt = input("You: ")
-
- response = you.Completion.create(
- prompt = prompt,
- chat = chat)
-
+
+ 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
+
+ chat.append({"question": prompt, "answer": response["response"]})