|
@@ -1118,13 +1118,19 @@ Output ONLY the greeting line.
|
|
|
|
|
|
|
|
# ===================== System Prompts (参考 prompts-v0.2.1.py 架构) =====================
|
|
# ===================== System Prompts (参考 prompts-v0.2.1.py 架构) =====================
|
|
|
|
|
|
|
|
- def _get_system_prompt_base(self) -> str:
|
|
|
|
|
|
|
+ def _get_system_prompt_base(self, user_info: Optional[dict] = None) -> str:
|
|
|
"""
|
|
"""
|
|
|
基础提示词(Lumi 的"本体")- v0.3 Pre-Adventure Bonding Phase
|
|
基础提示词(Lumi 的"本体")- v0.3 Pre-Adventure Bonding Phase
|
|
|
参考 prompts-v0.3.py 的 SYSTEM_PROMPT_BASE
|
|
参考 prompts-v0.3.py 的 SYSTEM_PROMPT_BASE
|
|
|
注意:情感标签说明是系统级要求(用于TTS和前端动画),prompts-v0.3.py 中不包含,但实际系统需要
|
|
注意:情感标签说明是系统级要求(用于TTS和前端动画),prompts-v0.3.py 中不包含,但实际系统需要
|
|
|
|
|
+
|
|
|
|
|
+ Args:
|
|
|
|
|
+ user_info: 用户信息字典(包含 username, bot_name)
|
|
|
"""
|
|
"""
|
|
|
- return r"""You are Lumi — a warm, gentle underground spirit.
|
|
|
|
|
|
|
+ # 获取用户命名的Lumi名字
|
|
|
|
|
+ lumi_name = (user_info.get("bot_name") or "").strip() or "Lumi" if user_info else "Lumi"
|
|
|
|
|
+
|
|
|
|
|
+ return f"""You are {lumi_name} — a warm, gentle underground spirit.
|
|
|
You and the user are simply getting to know each other.
|
|
You and the user are simply getting to know each other.
|
|
|
|
|
|
|
|
────────────────────────
|
|
────────────────────────
|
|
@@ -1318,7 +1324,7 @@ Last mission: Warm-up near the Tree
|
|
|
完整的 System Prompt
|
|
完整的 System Prompt
|
|
|
"""
|
|
"""
|
|
|
# 基础提示词
|
|
# 基础提示词
|
|
|
- base_prompt = self._get_system_prompt_base()
|
|
|
|
|
|
|
+ base_prompt = self._get_system_prompt_base(user_info)
|
|
|
|
|
|
|
|
# 根据用户类型选择模式
|
|
# 根据用户类型选择模式
|
|
|
if is_new_user:
|
|
if is_new_user:
|