mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 03:32:33 +08:00
feat: 改为在main流程中读取文件中的情景预设
This commit is contained in:
parent
28d1f5ead9
commit
4984896c95
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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user