Jinja templates for Instruct and Chat (#4874)
This commit is contained in:
parent
aab0dd962d
commit
39d2fe1ed9
71 changed files with 1774 additions and 518 deletions
|
@ -154,13 +154,9 @@ def list_interface_input_elements():
|
|||
'greeting',
|
||||
'context',
|
||||
'mode',
|
||||
'instruction_template',
|
||||
'name1_instruct',
|
||||
'name2_instruct',
|
||||
'context_instruct',
|
||||
'system_message',
|
||||
'custom_system_message',
|
||||
'turn_template',
|
||||
'instruction_template_str',
|
||||
'chat_template_str',
|
||||
'chat_style',
|
||||
'chat-instruct_command',
|
||||
]
|
||||
|
@ -202,7 +198,7 @@ def apply_interface_values(state, use_persistent=False):
|
|||
return [state[k] if k in state else gr.update() for k in elements]
|
||||
|
||||
|
||||
def save_settings(state, preset, instruction_template, extensions, show_controls):
|
||||
def save_settings(state, preset, extensions, show_controls):
|
||||
output = copy.deepcopy(shared.settings)
|
||||
exclude = ['name2', 'greeting', 'context', 'turn_template']
|
||||
for k in state:
|
||||
|
@ -213,7 +209,6 @@ def save_settings(state, preset, instruction_template, extensions, show_controls
|
|||
output['prompt-default'] = state['prompt_menu-default']
|
||||
output['prompt-notebook'] = state['prompt_menu-notebook']
|
||||
output['character'] = state['character_menu']
|
||||
output['instruction_template'] = instruction_template
|
||||
output['default_extensions'] = extensions
|
||||
output['seed'] = int(output['seed'])
|
||||
output['show_controls'] = show_controls
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue