mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-29 10:59:32 +01:00
Fix missing example_dialogue when uploading characters
This commit is contained in:
parent
bbe4a29a25
commit
584dd33424
@ -510,9 +510,6 @@ def load_character(character, name1, name2, instruct=False):
|
|||||||
context = build_pygmalion_style_context(data)
|
context = build_pygmalion_style_context(data)
|
||||||
greeting_field = 'char_greeting'
|
greeting_field = 'char_greeting'
|
||||||
|
|
||||||
if 'example_dialogue' in data:
|
|
||||||
context += f"{data['example_dialogue'].strip()}\n"
|
|
||||||
|
|
||||||
if greeting_field in data:
|
if greeting_field in data:
|
||||||
greeting = data[greeting_field]
|
greeting = data[greeting_field]
|
||||||
|
|
||||||
@ -573,6 +570,9 @@ def build_pygmalion_style_context(data):
|
|||||||
if 'world_scenario' in data and data['world_scenario'] != '':
|
if 'world_scenario' in data and data['world_scenario'] != '':
|
||||||
context += f"Scenario: {data['world_scenario']}\n"
|
context += f"Scenario: {data['world_scenario']}\n"
|
||||||
|
|
||||||
|
if 'example_dialogue' in data and data['example_dialogue'] != '':
|
||||||
|
context += f"{data['example_dialogue'].strip()}\n"
|
||||||
|
|
||||||
context = f"{context.strip()}\n"
|
context = f"{context.strip()}\n"
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user