diff --git a/extensions/api/util.py b/extensions/api/util.py index 0b840155..e4f7738f 100644 --- a/extensions/api/util.py +++ b/extensions/api/util.py @@ -66,6 +66,8 @@ def build_parameters(body, chat=False): instruction_template = body.get('instruction_template', shared.settings['instruction_template']) if str(instruction_template) == "None": instruction_template = "Vicuna-v1.1" + if str(character) == "None": + character = "Assistant" name1, name2, _, greeting, context, _ = load_character_memoized(character, str(body.get('your_name', shared.settings['name1'])), '', instruct=False) name1_instruct, name2_instruct, _, _, context_instruct, turn_template = load_character_memoized(instruction_template, '', '', instruct=True)