Add red coloring to assistant response
To better distinguish between the user's messages and the ai's messages, the "assistant" label will be colored red
This commit is contained in:
parent
f49142f04c
commit
2436a59ed3
|
|
@ -193,11 +193,10 @@ def chat2(args, user_input, stream=True):
|
||||||
elif type(command_result) == str: # sometimes I want to change the user prompt with a command
|
elif type(command_result) == str: # sometimes I want to change the user prompt with a command
|
||||||
user_input = command_result
|
user_input = command_result
|
||||||
|
|
||||||
|
print('\033[91m' + 'assistant' + '\033[0m: ', end='')
|
||||||
if args.reflect:
|
if 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'
|
conversation += 'user: ' + user_input + '\n'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue