feat(chat): 添加机器人身份信息到提示词模板

在多个提示词模板中添加机器人名称和昵称信息,让AI能够正确识别自己的身份。同时更新PromptParameters类以支持这些新参数。
This commit is contained in:
Windpicker-owo
2025-10-07 17:50:18 +08:00
parent ee51976095
commit 8142a12acb
2 changed files with 16 additions and 0 deletions

View File

@@ -35,6 +35,8 @@ class PromptParameters:
reply_to: str = ""
extra_info: str = ""
prompt_mode: Literal["s4u", "normal", "minimal"] = "s4u"
bot_name: str = ""
bot_nickname: str = ""
# 功能开关
enable_tool: bool = True
@@ -450,6 +452,8 @@ class Prompt:
"reply_target_block": self.parameters.reply_target_block,
"mood_state": self.parameters.mood_prompt,
"action_descriptions": self.parameters.action_descriptions,
"bot_name": self.parameters.bot_name,
"bot_nickname": self.parameters.bot_nickname,
}
)