Add indicator in chat log for assistant responses

Now it is clear when the assistant responds in the terminal interface.
This commit is contained in:
Hayden Johnson 2024-10-01 13:00:32 -07:00
parent dc772722d6
commit 0455b12d90

View file

@ -179,10 +179,13 @@ def chat2(args, user_input, stream=True):
if parse_commands(user_input): if parse_commands(user_input):
result = '' result = ''
elif args.reflect: elif args.reflect:
print('assistant: ', end='')
result = reflection_mode(user_input, stream) result = reflection_mode(user_input, stream)
else: else:
print('assistant: ', end='')
result = chat(user_input, stream) result = chat(user_input, stream)
if result != '':
conversation += 'user: ' + user_input + '\n' conversation += 'user: ' + user_input + '\n'
conversation += 'assistant: ' + result + '\n' conversation += 'assistant: ' + result + '\n'
return result return result