set clinical prompt pool target

This commit is contained in:
Daniel 2026-05-08 08:52:29 +02:00
parent 1621587fea
commit 10a6c039f1
2 changed files with 2 additions and 1 deletions

View file

@ -24,7 +24,7 @@ function createClinicalPromptPool(opts) {
var cacheMs = positiveInt(process.env.CLINICAL_ASSISTANT_EXAMPLE_CACHE_MS, 10 * 60 * 1000);
var refreshMs = positiveInt(process.env.CLINICAL_ASSISTANT_PROMPT_POOL_REFRESH_MS, 24 * 60 * 60 * 1000);
var ttlSeconds = Math.max(3600, Math.ceil(refreshMs / 1000) * 2);
var target = positiveInt(process.env.CLINICAL_ASSISTANT_PROMPT_POOL_TARGET, 500);
var target = positiveInt(process.env.CLINICAL_ASSISTANT_PROMPT_POOL_TARGET, 200);
var redisKey = process.env.CLINICAL_ASSISTANT_PROMPT_POOL_KEY || 'clinical-assistant:prompt-pool:v1';
var memoryCache = { expiresAt: 0, examples: [] };
var refreshPromise = null;

View file

@ -16,5 +16,6 @@ test('clinical assistant starter prompts are Redis or indexed-source backed', ()
assert.match(route, /createClinicalPromptPool\(\{[\s\S]*redisCache: redisCache/);
assert.match(pool, /opts\.redisCache\.getJson\(redisKey\)/);
assert.match(pool, /opts\.redisCache\.setJson\(redisKey, payload, ttlSeconds\)/);
assert.match(pool, /CLINICAL_ASSISTANT_PROMPT_POOL_TARGET, 200/);
assert.match(pool, /var examples = await fallbackIndexedExamples\(\)/);
});