Add varied messaging experiments
This commit is contained in:
1 parent
43f459a024
commit
23d4c3a320
12 files changed
+217
-72
No files matched your search
@@ -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 () => {
|
||||
|
||||
Reference in new issue
Block a user