mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 01:30:20 +01:00
Fix prompt order in the dropdown
This commit is contained in:
parent
dfd9ba3e90
commit
32481ec4d6
@ -34,8 +34,9 @@ def get_available_presets():
|
||||
|
||||
def get_available_prompts():
|
||||
prompts = []
|
||||
prompts += sorted(set((k.stem for k in Path('prompts').glob('[0-9]*.txt'))), key=natural_keys, reverse=True)
|
||||
prompts += sorted(set((k.stem for k in Path('prompts').glob('*.txt'))), key=natural_keys)
|
||||
files = set((k.stem for k in Path('prompts').glob('*.txt')))
|
||||
prompts += sorted([k for k in files if re.match('^[0-9]', k)], key=natural_keys, reverse=True)
|
||||
prompts += sorted([k for k in files if re.match('^[^0-9]', k)], key=natural_keys)
|
||||
prompts += ['Instruct-' + k for k in get_available_instruction_templates() if k != 'None']
|
||||
prompts += ['None']
|
||||
return prompts
|
||||
|
Loading…
Reference in New Issue
Block a user