Section 2/4:Go 后端 — 标签解析 + 事件发射
| 文件 | 改动 | 量 |
|---|---|---|
agent.go |
改 emotionPromptSuffix → behaviorPromptSuffix |
~5 行 |
emotion.go |
EmotionParser → BehaviorParser,支持解析 action 字段 |
~40 行 |
app_chat.go |
emit chat:behavior 替代 chat:emotion |
~10 行 |
在每条回复的第一行必须输出情绪标签,格式严格为 [情绪:emotion/intensity],其中 emotion ∈ {joy, sad, surprised, angry, neutral},intensity ∈ [0.0, 1.0]
在每条回复的第一行必须输出行为标签,格式严格为 [表现:emotion/intensity] 或 [表现:emotion/intensity,动作:action],其中 emotion ∈ {joy, sad, surprised, angry, neutral},intensity ∈ [0.0, 1.0],action ∈ {wave, nod, celebrate, surprised_react, sad_pose, angry_pose} 为可选项