import { BadRequestException } from '@nestjs/common'; export * from './upload_location.constant'; export const MACHINE_LEARNING_URL = process.env.IMMICH_MACHINE_LEARNING_URL || 'http://immich-machine-learning:3003'; export const MACHINE_LEARNING_ENABLED = MACHINE_LEARNING_URL !== 'false'; export function assertMachineLearningEnabled() { if (!MACHINE_LEARNING_ENABLED) { throw new BadRequestException('Machine learning is not enabled.'); } }