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:
parent
dc772722d6
commit
0455b12d90
|
|
@ -179,12 +179,15 @@ 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)
|
||||||
|
|
||||||
conversation += 'user: ' + user_input + '\n'
|
if result != '':
|
||||||
conversation += 'assistant: ' + result + '\n'
|
conversation += 'user: ' + user_input + '\n'
|
||||||
|
conversation += 'assistant: ' + result + '\n'
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def highlightify_text(full_text):
|
def highlightify_text(full_text):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue