feat: 使用模板储存默认的json格式的情景预设

This commit is contained in:
Rock Chin
2023-03-10 23:26:36 +08:00
parent 4269c7927e
commit 54cc75506f
4 changed files with 19 additions and 15 deletions

View File

@@ -88,10 +88,8 @@ def get_prompt(name: str = None) -> list:
json_content = json.load(f)
logging.debug('succeed to load json: {}'.format(json_file))
return json_content['prompt']
except FileNotFoundError:
raise KeyError("未找到Json情景预设: " + name)
raise KeyError("未找到JSON情景预设: " + name)
# 默认预设方式
elif preset_mode == 'default':