From 79e1fe09e407a874b092427bbe10496798257af8 Mon Sep 17 00:00:00 2001 From: nai-degen Date: Wed, 8 Nov 2023 12:02:23 -0600 Subject: [PATCH] fixes multiple enumeration on infopage --- src/info-page.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/info-page.ts b/src/info-page.ts index 4041dd5..3a18d11 100644 --- a/src/info-page.ts +++ b/src/info-page.ts @@ -258,9 +258,7 @@ function getOpenAIInfo() { const keys = keyPool.list().filter(keyIsOpenAIKey); const enabledFamilies = new Set(config.allowedModelFamilies); - const accessibleFamilies = keyPool - .list() - .filter(keyIsOpenAIKey) + const accessibleFamilies = keys .flatMap((k) => k.modelFamilies) .filter((f) => enabledFamilies.has(f)) .concat("turbo");