Skip to content

Commit

Permalink
Fix webapp build avoiding lodash omit (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
neoxelox authored Nov 13, 2024
1 parent 4a19bdf commit 4fab0d8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/core/src/services/ai/providers/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { omit } from 'lodash-es'

import { ProviderApiKey } from '../../../../schema/types'

export enum Providers {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4fab0d8

Please sign in to comment.