feat: add natural elder story companion flow
This commit is contained in:
@@ -2,6 +2,7 @@ package extraction
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"data-terminal-cloud/internal/contentpolicy"
|
||||
@@ -41,3 +42,17 @@ func TestGenerateSafelyBlocksModelOutputBeforePersistence(t *testing.T) {
|
||||
t.Fatalf("result=%+v generator_calls=%d classifier_calls=%d", result, generator.calls, classifier.calls)
|
||||
}
|
||||
}
|
||||
|
||||
func TestJoinedSubjectContentCannotPromoteAgentClaims(t *testing.T) {
|
||||
content := joinedSubjectContent([]turn{
|
||||
{speaker: "agent", text: "您年轻时一定在铁路上工作过。"},
|
||||
{speaker: "subject", text: "没有,我以前在学校教书。"},
|
||||
{speaker: "agent", text: "那您一定教了四十年。"},
|
||||
})
|
||||
if strings.Contains(content, "铁路") || strings.Contains(content, "四十年") {
|
||||
t.Fatalf("agent claims entered extraction content: %q", content)
|
||||
}
|
||||
if content != "长者:没有,我以前在学校教书。" {
|
||||
t.Fatalf("subject extraction content=%q", content)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user