mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08:00
Merge pull request #262 from chordfish-k/json_scenario
[Feat] 情景预设(人格)完善
This commit is contained in:
5
main.py
5
main.py
@@ -182,6 +182,7 @@ def main(first_time_init=False):
|
||||
import pkg.openai.dprompt
|
||||
|
||||
pkg.openai.dprompt.read_prompt_from_file()
|
||||
pkg.openai.dprompt.read_scenario_from_file()
|
||||
|
||||
pkg.utils.context.context['logger_handler'] = sh
|
||||
# 主启动流程
|
||||
@@ -337,6 +338,10 @@ if __name__ == '__main__':
|
||||
if not os.path.exists("sensitive.json"):
|
||||
shutil.copy("sensitive-template.json", "sensitive.json")
|
||||
|
||||
# 检查是否有scenario/default.json
|
||||
if not os.path.exists("scenario/default.json"):
|
||||
shutil.copy("scenario/default-template.json", "scenario/default.json")
|
||||
|
||||
# 检查temp目录
|
||||
if not os.path.exists("temp/"):
|
||||
os.mkdir("temp/")
|
||||
|
||||
Reference in New Issue
Block a user