mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-23 00:18:20 +01:00
Apply extensions to character greeting
This commit is contained in:
parent
c9447da898
commit
2d134031ca
@ -499,8 +499,8 @@ if args.chat or args.cai_chat:
|
|||||||
if 'example_dialogue' in data and data['example_dialogue'] != '':
|
if 'example_dialogue' in data and data['example_dialogue'] != '':
|
||||||
history['internal'] = tokenize_dialogue(data['example_dialogue'], name1, name2)
|
history['internal'] = tokenize_dialogue(data['example_dialogue'], name1, name2)
|
||||||
if 'char_greeting' in data and len(data['char_greeting'].strip()) > 0:
|
if 'char_greeting' in data and len(data['char_greeting'].strip()) > 0:
|
||||||
history['internal'] += [['<|BEGIN-VISIBLE-CHAT|>', data['char_greeting']]]
|
history['internal'] += [['<|BEGIN-VISIBLE-CHAT|>', apply_extensions(data['char_greeting'], "output")]]
|
||||||
history['visible'] += [['', data['char_greeting']]]
|
history['visible'] += [['', apply_extensions(data['char_greeting'], "output")]]
|
||||||
else:
|
else:
|
||||||
history['internal'] += [['<|BEGIN-VISIBLE-CHAT|>', "Hello there!"]]
|
history['internal'] += [['<|BEGIN-VISIBLE-CHAT|>', "Hello there!"]]
|
||||||
history['visible'] += [['', "Hello there!"]]
|
history['visible'] += [['', "Hello there!"]]
|
||||||
|
Loading…
Reference in New Issue
Block a user