2
0
Files
bot/packages/forge/blocks/openai/helpers/isModelCompatibleWithVision.ts
2024-06-11 10:51:02 +02:00

11 lines
362 B
TypeScript

import { wildcardMatch } from '@typebot.io/lib/wildcardMatch'
import {
excludedModelsFromImageUrlSupport,
modelsWithImageUrlSupport,
} from '../constants'
export const isModelCompatibleWithVision = (model: string | undefined) =>
model && !excludedModelsFromImageUrlSupport.includes(model)
? wildcardMatch(modelsWithImageUrlSupport)(model)
: false