From 4fab0d82533757f535f0479ad8f8d550477ee8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Rodr=C3=ADguez?= Date: Wed, 13 Nov 2024 12:51:51 +0100 Subject: [PATCH] Fix webapp build avoiding lodash omit (#600) --- packages/core/src/services/ai/providers/models/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/core/src/services/ai/providers/models/index.ts b/packages/core/src/services/ai/providers/models/index.ts index b1ebc76e9..177fbb548 100644 --- a/packages/core/src/services/ai/providers/models/index.ts +++ b/packages/core/src/services/ai/providers/models/index.ts @@ -1,5 +1,3 @@ -import { omit } from 'lodash-es' - import { ProviderApiKey } from '../../../../schema/types' export enum Providers { @@ -111,7 +109,11 @@ export function listModelsForProvider({ if (!models) return {} if (name && name === latitudeProvider) { - return omit(models, DEFAULT_PROVIDER_UNSUPPORTED_MODELS) + return Object.fromEntries( + Object.entries(models).filter( + ([key]) => !DEFAULT_PROVIDER_UNSUPPORTED_MODELS.includes(key), + ), + ) } return models