mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-09-12 08:29:30 -04:00
Merge pull request #231 from naa7/patch-3
added an if-statement for ending loop
This commit is contained in:
commit
d717511236
@ -25,7 +25,8 @@ chat = []
|
||||
|
||||
while True:
|
||||
prompt = input("You: ")
|
||||
|
||||
if prompt == 'q':
|
||||
break
|
||||
response = you.Completion.create(
|
||||
prompt=prompt,
|
||||
chat=chat)
|
||||
@ -33,4 +34,4 @@ while True:
|
||||
print("Bot:", response["response"])
|
||||
|
||||
chat.append({"question": prompt, "answer": response["response"]})
|
||||
```
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user