diff options
author | ezerinz <edwinnnzx@gmail.com> | 2023-04-30 09:05:51 +0200 |
---|---|---|
committer | ezerinz <edwinnnzx@gmail.com> | 2023-04-30 09:05:51 +0200 |
commit | 3b13c3df921379bd7ffd8f605c723e82ebf26a8f (patch) | |
tree | 9df89476526f5df0a2eecc9e347a2a13e42daa03 /unfinished/usesless/README.md | |
parent | delete module that is not accessed (diff) | |
download | gpt4free-3b13c3df921379bd7ffd8f605c723e82ebf26a8f.tar gpt4free-3b13c3df921379bd7ffd8f605c723e82ebf26a8f.tar.gz gpt4free-3b13c3df921379bd7ffd8f605c723e82ebf26a8f.tar.bz2 gpt4free-3b13c3df921379bd7ffd8f605c723e82ebf26a8f.tar.lz gpt4free-3b13c3df921379bd7ffd8f605c723e82ebf26a8f.tar.xz gpt4free-3b13c3df921379bd7ffd8f605c723e82ebf26a8f.tar.zst gpt4free-3b13c3df921379bd7ffd8f605c723e82ebf26a8f.zip |
Diffstat (limited to '')
-rw-r--r-- | unfinished/usesless/README.md | 17 |
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"] ``` |