Use YAML for presets and settings

This commit is contained in:
oobabooga 2023-05-28 22:34:12 -03:00
parent 2cf711f35e
commit 00ebea0b2a
42 changed files with 155 additions and 169 deletions

View file

@ -641,7 +641,7 @@ def save_character(name, greeting, context, picture, filename, instruct=False):
data = {k: v for k, v in data.items() if v} # Strip falsy
filepath = Path(f'{folder}/{filename}.yaml')
with filepath.open('w') as f:
yaml.dump(data, f)
yaml.dump(data, f, sort_keys=False)
logger.info(f'Wrote {filepath}')
path_to_img = Path(f'{folder}/{filename}.png')