Add varied messaging experiments

This commit is contained in:
jjbrunton committed 2026-08-09 10:28:55 +01:00
1 parent 43f459a024
commit 23d4c3a320
12 files changed
+217 -72

No files matched your search

+25 -1
View File
@@ -470,7 +470,31 @@ describe('OpenRouterClient', () => {
expect(prompt).toContain('Example 1:');
expect(prompt).toContain('Example 2:');
expect(prompt).toContain('Hey you look great');
expect(prompt).toContain('positive responses');
expect(prompt).toContain('PERFORMANCE EXAMPLES');
expect(prompt).toContain('do not copy their opening words');
});
it('includes recent messages as anti-repetition context', async () => {
mockCreate.mockResolvedValueOnce({
choices: [{ message: { content: 'A different shape' } }],
});
await client.generateMessage(
'Analysis',
'Title',
'Author',
[],
undefined,
null,
null,
undefined,
['Damn, you look amazing. Got any more pics?'],
);
const prompt = mockCreate.mock.calls[0][0].messages[0].content as string;
expect(prompt).toContain('RECENT MESSAGES TO AVOID IMITATING');
expect(prompt).toContain('Damn, you look amazing');
expect(prompt).toContain('different opening words');
});
it('substitutes {rating} placeholder when score provided', async () => {