feat: improve elder companion conversations

This commit is contained in:
Codex Local
2026-08-29 22:06:30 +08:00
parent e652516147
commit f0849119f7
11 changed files with 176 additions and 22 deletions
@@ -160,7 +160,7 @@ func TestServiceIdempotentlyCreatesConversationWithoutPersistingToken(t *testing
created_by,submitted_by,submitted_at,approved_by,approved_at,published_by,published_at
) VALUES (
$1::uuid,$2::uuid,'10000000-0000-0000-0000-000000000001','orchestration-test-persona','编排测试人设','PERSONA',1,'PUBLISHED',
'{"system_prompt":"你是已审核发布的陪伴助手。","tone":"warm"}'::jsonb,'编排集成测试',
'{"system_prompt":"你是已审核发布的陪伴助手;一次只问一个问题;不要编造长者事实。","tone":"warm"}'::jsonb,'编排集成测试',
'10000000-0000-0000-0000-000000000102','10000000-0000-0000-0000-000000000102','2026-08-23T11:00:00Z',
'10000000-0000-0000-0000-000000000102','2026-08-23T11:01:00Z','10000000-0000-0000-0000-000000000102','2026-08-23T11:02:00Z'
)`, []any{testPersonaConfigID, testPersonaConfigPublicID}},
@@ -359,7 +359,7 @@ func TestServiceIdempotentlyCreatesConversationWithoutPersistingToken(t *testing
providerClient.startRequest.VoiceVersion != testVoiceConfigPublicID ||
providerClient.startRequest.ModelVersion != testModelConfigPublicID ||
providerClient.startRequest.RoutingVersion != testRoutingConfigPublicID ||
providerClient.startRequest.SystemPrompt != "你是已审核发布的陪伴助手。" ||
providerClient.startRequest.SystemPrompt != "你是已审核发布的陪伴助手;一次只问一个问题;不要编造长者事实。" ||
providerClient.startRequest.PersonaTone != "warm" ||
providerClient.startRequest.VoiceResourceRef != "voice://orchestration/approved" ||
providerClient.startRequest.ModelResourceRef != "model://orchestration/approved" {
+1 -1
View File
@@ -81,7 +81,7 @@ func TestBuildContextSummaryIncludesContinuityAndBoundariesWithinSnapshotLimit(t
result := buildContextSummary("王阿姨", profile,
[]string{"上次聊到刚刚注册了个体工商户,准备开始新的工作。"},
[]string{"喜欢在周末听越剧。"})
for _, expected := range []string{"交流边界", "收入", "王阿姨", "最近第1次通话摘要", "注册了个体工商户", "已人工确认的长期记忆", "越剧"} {
for _, expected := range []string{"交流边界", "收入", "王阿姨", "本次交流目标:自然陪伴", "交流节奏:放慢语速", "优先话题:家乡", "背景资料:退休教师", "兴趣:戏曲", "最近第1次通话摘要", "注册了个体工商户", "已人工确认的长期记忆", "越剧"} {
if !strings.Contains(result, expected) {
t.Fatalf("context %q does not contain %q", result, expected)
}