mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08:00
feat: 改为在main流程中读取文件中的情景预设
This commit is contained in:
3
main.py
3
main.py
@@ -128,6 +128,9 @@ def main(first_time_init=False):
|
||||
import pkg.database.manager
|
||||
import pkg.openai.session
|
||||
import pkg.qqbot.manager
|
||||
import pkg.openai.dprompt
|
||||
|
||||
pkg.openai.dprompt.read_prompt_from_file()
|
||||
|
||||
pkg.utils.context.context['logger_handler'] = sh
|
||||
# 主启动流程
|
||||
|
||||
@@ -72,5 +72,3 @@ def get_prompt(name: str = None) -> str:
|
||||
return default_dict[key]
|
||||
|
||||
raise KeyError("未找到情景预设: " + name)
|
||||
|
||||
read_prompt_from_file()
|
||||
|
||||
Reference in New Issue
Block a user