summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unfinished/usesless/README.md17
1 files changed, 8 insertions, 9 deletions
diff --git a/unfinished/usesless/README.md b/unfinished/usesless/README.md
index 4ff6d94b..13e9df8c 100644
--- a/unfinished/usesless/README.md
+++ b/unfinished/usesless/README.md
@@ -10,15 +10,14 @@ to do:
```python
import usesless
-question1 = "Who won the world series in 2020?"
-req = usesless.Completion.create(prompt=question1)
-answer = req["text"]
-message_id = req["parentMessageId"]
+message_id = ""
+while True:
+ prompt = input("Question: ")
+ if prompt == "!stop":
+ break
-question2 = "Where was it played?"
-req2 = usesless.Completion.create(prompt=question2, parentMessageId=message_id)
-answer2 = req2["text"]
+ req = usesless.Completion.create(prompt=prompt, parentMessageId=message_id)
-print(answer)
-print(answer2)
+ print(f"Answer: {req['text']}")
+ message_id = req["id"]
```