summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authort.me/xtekky <98614666+xtekky@users.noreply.github.com>2023-04-26 21:47:46 +0200
committerGitHub <noreply@github.com>2023-04-26 21:47:46 +0200
commite53697f0825c7a1e5f466b394a99ec29a6ebc177 (patch)
tree801b48de7de293945a6527a712628672166138e9 /testing
parentMerge pull request #157 from phishontop/main (diff)
parentrefactored you code added error handling and updated regex for parsing response (diff)
downloadgpt4free-e53697f0825c7a1e5f466b394a99ec29a6ebc177.tar
gpt4free-e53697f0825c7a1e5f466b394a99ec29a6ebc177.tar.gz
gpt4free-e53697f0825c7a1e5f466b394a99ec29a6ebc177.tar.bz2
gpt4free-e53697f0825c7a1e5f466b394a99ec29a6ebc177.tar.lz
gpt4free-e53697f0825c7a1e5f466b394a99ec29a6ebc177.tar.xz
gpt4free-e53697f0825c7a1e5f466b394a99ec29a6ebc177.tar.zst
gpt4free-e53697f0825c7a1e5f466b394a99ec29a6ebc177.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"]})