Update example
This commit is contained in:
parent
8a76728343
commit
3b13c3df92
1 changed files with 8 additions and 9 deletions
|
@ -10,15 +10,14 @@ to do:
|
||||||
```python
|
```python
|
||||||
import usesless
|
import usesless
|
||||||
|
|
||||||
question1 = "Who won the world series in 2020?"
|
message_id = ""
|
||||||
req = usesless.Completion.create(prompt=question1)
|
while True:
|
||||||
answer = req["text"]
|
prompt = input("Question: ")
|
||||||
message_id = req["parentMessageId"]
|
if prompt == "!stop":
|
||||||
|
break
|
||||||
|
|
||||||
question2 = "Where was it played?"
|
req = usesless.Completion.create(prompt=prompt, parentMessageId=message_id)
|
||||||
req2 = usesless.Completion.create(prompt=question2, parentMessageId=message_id)
|
|
||||||
answer2 = req2["text"]
|
|
||||||
|
|
||||||
print(answer)
|
print(f"Answer: {req['text']}")
|
||||||
print(answer2)
|
message_id = req["id"]
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue