mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-30 06:00:15 +01:00
Print the tokenized example dialogue in a prettier way
This commit is contained in:
parent
161cae001b
commit
2dadf42cb5
12
server.py
12
server.py
@ -519,10 +519,14 @@ if args.chat or args.cai_chat:
|
|||||||
_history.append(entry)
|
_history.append(entry)
|
||||||
entry = ['', '']
|
entry = ['', '']
|
||||||
|
|
||||||
print(f"\nDialogue tokenized to (formatted as [question, reply]):\n\n", end='')
|
print(f"\033[1;32;1m\nDialogue tokenized to:\033[0;37;0m\n", end='')
|
||||||
for i in _history:
|
for row in _history:
|
||||||
print(i)
|
for column in row:
|
||||||
print("--------------------\n", end='')
|
print("\n")
|
||||||
|
for line in column.strip().split('\n'):
|
||||||
|
print("| "+line+"\n")
|
||||||
|
print("|\n")
|
||||||
|
print("------------------------------")
|
||||||
|
|
||||||
return _history
|
return _history
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user