Shorten strategy response window to 12 hours
This commit is contained in:
1 parent
e7c29f91f2
commit
9e1b1aeefe
3 files changed
+8
-5
No files matched your search
@@ -181,6 +181,7 @@ openrouter:
|
|||||||
strategies:
|
strategies:
|
||||||
explorationRate: 0.2 # 20% of the time try a random strategy instead of the best
|
explorationRate: 0.2 # 20% of the time try a random strategy instead of the best
|
||||||
minSamples: 5 # Min messages sent before trusting a strategy's response rate
|
minSamples: 5 # Min messages sent before trusting a strategy's response rate
|
||||||
|
responseWindowHours: 12 # Age unanswered sends before including them in strategy performance
|
||||||
variants:
|
variants:
|
||||||
- id: compliment_direct
|
- id: compliment_direct
|
||||||
weight: 1
|
weight: 1
|
||||||
@@ -201,6 +202,7 @@ strategies:
|
|||||||
chatStrategies:
|
chatStrategies:
|
||||||
explorationRate: 0.2
|
explorationRate: 0.2
|
||||||
minSamples: 5
|
minSamples: 5
|
||||||
|
responseWindowHours: 12
|
||||||
variants:
|
variants:
|
||||||
- id: chat_direct
|
- id: chat_direct
|
||||||
weight: 1
|
weight: 1
|
||||||
|
|||||||
+4
-4
@@ -131,23 +131,23 @@ export const ConfigSchema = z.object({
|
|||||||
strategies: z.object({
|
strategies: z.object({
|
||||||
explorationRate: z.number().min(0).max(1).default(0.2),
|
explorationRate: z.number().min(0).max(1).default(0.2),
|
||||||
minSamples: z.number().int().positive().transform((value) => Math.max(30, value)).default(30),
|
minSamples: z.number().int().positive().transform((value) => Math.max(30, value)).default(30),
|
||||||
responseWindowHours: z.number().positive().default(48),
|
responseWindowHours: z.number().positive().default(12),
|
||||||
variants: z.array(z.object({
|
variants: z.array(z.object({
|
||||||
id: z.string(),
|
id: z.string(),
|
||||||
weight: z.number().default(1),
|
weight: z.number().default(1),
|
||||||
promptOverride: z.string(),
|
promptOverride: z.string(),
|
||||||
})).default([]),
|
})).default([]),
|
||||||
}).default({ explorationRate: 0.2, minSamples: 30, responseWindowHours: 48, variants: [] }),
|
}).default({ explorationRate: 0.2, minSamples: 30, responseWindowHours: 12, variants: [] }),
|
||||||
chatStrategies: z.object({
|
chatStrategies: z.object({
|
||||||
explorationRate: z.number().min(0).max(1).default(0.2),
|
explorationRate: z.number().min(0).max(1).default(0.2),
|
||||||
minSamples: z.number().int().positive().transform((value) => Math.max(30, value)).default(30),
|
minSamples: z.number().int().positive().transform((value) => Math.max(30, value)).default(30),
|
||||||
responseWindowHours: z.number().positive().default(48),
|
responseWindowHours: z.number().positive().default(12),
|
||||||
variants: z.array(z.object({
|
variants: z.array(z.object({
|
||||||
id: z.string(),
|
id: z.string(),
|
||||||
weight: z.number().default(1),
|
weight: z.number().default(1),
|
||||||
promptOverride: z.string(),
|
promptOverride: z.string(),
|
||||||
})).default([]),
|
})).default([]),
|
||||||
}).default({ explorationRate: 0.2, minSamples: 30, responseWindowHours: 48, variants: [] }),
|
}).default({ explorationRate: 0.2, minSamples: 30, responseWindowHours: 12, variants: [] }),
|
||||||
web: z.object({
|
web: z.object({
|
||||||
enabled: z.boolean().default(true),
|
enabled: z.boolean().default(true),
|
||||||
port: z.number().default(3000),
|
port: z.number().default(3000),
|
||||||
|
|||||||
@@ -228,8 +228,9 @@ describe('ConfigSchema', () => {
|
|||||||
if (result.success) {
|
if (result.success) {
|
||||||
expect(result.data.strategies.explorationRate).toBe(0.2);
|
expect(result.data.strategies.explorationRate).toBe(0.2);
|
||||||
expect(result.data.strategies.minSamples).toBe(30);
|
expect(result.data.strategies.minSamples).toBe(30);
|
||||||
expect(result.data.strategies.responseWindowHours).toBe(48);
|
expect(result.data.strategies.responseWindowHours).toBe(12);
|
||||||
expect(result.data.strategies.variants).toEqual([]);
|
expect(result.data.strategies.variants).toEqual([]);
|
||||||
|
expect(result.data.chatStrategies.responseWindowHours).toBe(12);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user