Require explicit commenter context in openers
This commit is contained in:
1 parent
f77157d303
commit
2500f0a23c
4 files changed
+18
-2
No files matched your search
@@ -8,6 +8,12 @@ describe('validateCommentTargetedOpener', () => {
|
||||
)).toEqual({ safe: true });
|
||||
});
|
||||
|
||||
it('accepts another explicit first-sentence reference to what was written', () => {
|
||||
expect(validateCommentTargetedOpener(
|
||||
'You said you would cuff her hands and bend her over your lap. That confidence caught my attention.',
|
||||
)).toEqual({ safe: true });
|
||||
});
|
||||
|
||||
it.each([
|
||||
'Your tits look incredible in that shot, I saw your comment.',
|
||||
'You look so good kneeling there, your comment caught my eye.',
|
||||
@@ -24,4 +30,10 @@ describe('validateCommentTargetedOpener', () => {
|
||||
reason: 'does not ground the opener in what the commenter expressed',
|
||||
});
|
||||
});
|
||||
|
||||
it('rejects a generic first sentence even when a later sentence mentions the comment', () => {
|
||||
expect(validateCommentTargetedOpener(
|
||||
'What draws you to that scenario? Your comment painted a vivid picture.',
|
||||
).safe).toBe(false);
|
||||
});
|
||||
});
|
||||
@@ -669,6 +669,7 @@ describe('OpenRouterClient', () => {
|
||||
const userPrompt = mockCreate.mock.calls[0][0].messages[1].content as string;
|
||||
expect(systemPrompt).toContain('The RECIPIENT is the commenter');
|
||||
expect(systemPrompt).toContain('The SOURCE POST SUBJECT is a different person');
|
||||
expect(systemPrompt).toContain('The first sentence MUST explicitly anchor to the public comment');
|
||||
expect(userPrompt).toContain('I want that too');
|
||||
expect(`${systemPrompt}\n${userPrompt}`).not.toContain('Write a message for Commenter about');
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user