From 92bc6baa38bac3aaed3823c4a6c1d32c9fec376e Mon Sep 17 00:00:00 2001 From: frostime Date: Wed, 7 Aug 2024 12:45:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20refactor(model):=20=E6=94=B9?= =?UTF-8?q?=E5=9B=9E=E6=9D=A5=EF=BC=8C=E5=92=8C=E5=AE=98=E6=96=B9=E4=BF=9D?= =?UTF-8?q?=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/model.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/utils/model.ts b/app/utils/model.ts index 76f5211da4f..0b62b53be09 100644 --- a/app/utils/model.ts +++ b/app/utils/model.ts @@ -53,6 +53,15 @@ export function collectModelTable( } > = {}; + // default models + models.forEach((m) => { + // using @ as fullName + modelTable[`${m.name}@${m?.provider?.id}`] = { + ...m, + displayName: m.name, // 'provider' is copied over if it exists + }; + }); + // server custom models customModels .split(",") @@ -112,15 +121,6 @@ export function collectModelTable( } }); - // default models - models.forEach((m) => { - // using @ as fullName - modelTable[`${m.name}@${m?.provider?.id}`] = { - ...m, - displayName: m.name, // 'provider' is copied over if it exists - }; - }); - return modelTable; }