feat: 支持使用文件存放情景预设 (#167)

This commit is contained in:
Rock Chin
2023-02-25 17:05:39 +08:00
parent 48be080fe0
commit 5ada507c2b
3 changed files with 34 additions and 2 deletions

View File

@@ -82,6 +82,12 @@ def reset_logging():
def main(first_time_init=False):
global known_exception_caught
# 检查并创建plugins、prompts目录
check_path = ["plugins", "prompts"]
for path in check_path:
if not os.path.exists(path):
os.mkdir(path)
known_exception_caught = False
try:
# 导入config.py