set clinical prompt pool target
This commit is contained in:
parent
1621587fea
commit
10a6c039f1
2 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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\(\)/);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue