added an if-statement for ending loop
@ -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"]})
```