Skip to content

Commit dabcd7d

Browse files
prefix commands with /
1 parent 0347cf6 commit dabcd7d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

examples/chatbot_with_streaming.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def __init__(self, api_key, model, system_message=None):
3030

3131
def opening_instructions(self):
3232
print("""
33-
To chat: type your message and hit enter.
34-
To start a new chat: type 'new'.
35-
To exit: type 'exit', 'quit', or hit CTRL+C.
33+
To chat: type your message and hit enter
34+
To start a new chat: type /new
35+
To exit: type /exit, /quit, or hit CTRL+C
3636
""")
3737

3838
def new_chat(self):
@@ -41,11 +41,11 @@ def new_chat(self):
4141
self.messages.append(ChatMessage(role="system", content=self.system_message))
4242

4343
def check_exit(self, content):
44-
if content.lower().strip() in ["exit", "quit"]:
44+
if content.lower().strip() in ["/exit", "/quit"]:
4545
self.exit()
4646

4747
def check_new_chat(self, content):
48-
if content.lower().strip() in ["new"]:
48+
if content.lower().strip() in ["/new"]:
4949
print("")
5050
print("Starting new chat...")
5151
print("")

0 commit comments

Comments
 (0)