From 10a6c039f1c56eb4d0aaeb32dfc876e6128fff49 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 8 May 2026 08:52:29 +0200 Subject: [PATCH] set clinical prompt pool target --- src/utils/clinicalPromptPool.js | 2 +- test/clinical-assistant-prompt-pool.test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/clinicalPromptPool.js b/src/utils/clinicalPromptPool.js index 9d0c6b9..2c7ae96 100644 --- a/src/utils/clinicalPromptPool.js +++ b/src/utils/clinicalPromptPool.js @@ -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; diff --git a/test/clinical-assistant-prompt-pool.test.js b/test/clinical-assistant-prompt-pool.test.js index cb6278b..feb8503 100644 --- a/test/clinical-assistant-prompt-pool.test.js +++ b/test/clinical-assistant-prompt-pool.test.js @@ -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\(\)/); });