mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-21 09:47:13 +00:00
refactor: 配置文件均改为json
This commit is contained in:
@@ -14,8 +14,8 @@ class ScenarioPromptLoader(loader.PromptLoader):
|
||||
async def load(self):
|
||||
"""加载Prompt
|
||||
"""
|
||||
for file in os.listdir("scenarios"):
|
||||
with open("scenarios/{}".format(file), "r", encoding="utf-8") as f:
|
||||
for file in os.listdir("data/scenarios"):
|
||||
with open("data/scenarios/{}".format(file), "r", encoding="utf-8") as f:
|
||||
file_str = f.read()
|
||||
file_name = file.split(".")[0]
|
||||
file_json = json.loads(file_str)
|
||||
|
||||
Reference in New Issue
Block a user