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,12 +179,15 @@ def chat2(args, user_input, stream=True):
if parse_commands(user_input):
result = ''
elif args.reflect:
print('assistant: ', end='')
result = reflection_mode(user_input, stream)
else:
print('assistant: ', end='')
result = chat(user_input, stream)
conversation += 'user: ' + user_input + '\n'
conversation += 'assistant: ' + result + '\n'
if result != '':
conversation += 'user: ' + user_input + '\n'
conversation += 'assistant: ' + result + '\n'
return result
def highlightify_text(full_text):