From 91988d7c811f9867aac5c4b70cb4e57e7819a7a7 Mon Sep 17 00:00:00 2001 From: DG Date: Thu, 8 Dec 2022 14:47:39 -0800 Subject: [PATCH] very simple example where ChatGPT talks to itself --- multichat.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 multichat.py diff --git a/multichat.py b/multichat.py new file mode 100644 index 0000000..5074811 --- /dev/null +++ b/multichat.py @@ -0,0 +1,14 @@ +"""Get ChatGPT to talk to itself.""" + +import os +import sys +import subprocess +import requests + +metaprompt = "Now make that funnier." +chat1 = requests.get("http://localhost:5001/chat?q=%s" % "Teach me about quantum mechanics in a 140 characters or less.") +while True: + chat2 = requests.get("http://localhost:5002/chat?q=%s" % (chat1.text.replace(metaprompt, "") + " " + metaprompt)) + chat1 = requests.get("http://localhost:5001/chat?q=%s" % (chat2.text.replace(metaprompt, "") + " " + metaprompt)) + + \ No newline at end of file