diff options
author | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2023-05-11 02:29:52 -0500 |
---|---|---|
committer | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2023-05-14 00:20:07 -0500 |
commit | 89c77af2d93c8ed3f3f452fff709d91f9228f9dc (patch) | |
tree | 5607ff26a0c735fcdb5b324931dddd397ee38d0d /src/gpt_chat_cli/cmd.py | |
parent | 280259deb57d8c18f7655e4ecd79ba137ca0a37c (diff) | |
download | gpt-chat-cli-89c77af2d93c8ed3f3f452fff709d91f9228f9dc.tar.xz gpt-chat-cli-89c77af2d93c8ed3f3f452fff709d91f9228f9dc.zip |
Fix printing when provided initial messagesv0.2.2
Diffstat (limited to 'src/gpt_chat_cli/cmd.py')
-rw-r--r-- | src/gpt_chat_cli/cmd.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpt_chat_cli/cmd.py b/src/gpt_chat_cli/cmd.py index 899c705..83cd298 100644 --- a/src/gpt_chat_cli/cmd.py +++ b/src/gpt_chat_cli/cmd.py @@ -297,10 +297,10 @@ def interactive(args : Arguments): initial_message = resolve_initial_message(args.initial_message, interactive=True) - if initial_message: - print( PROMPT, initial_message, sep='', flush=True ) - with prompter as prompt: + if initial_message: + print( prompt.prompt, initial_message, sep='', flush=True ) + while True: try: if initial_message: @@ -339,6 +339,7 @@ def interactive(args : Arguments): hist.append( ChatMessage(Role.ASSISTANT, response) ) except KeyboardInterrupt: # Skip to next prompt + print() continue except EOFError: # Exit on Control-D print() |