mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-01-12 20:25:49 +00:00
11 lines
409 B
TypeScript
11 lines
409 B
TypeScript
import { BadRequestException } from '@nestjs/common';
|
|
|
|
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.');
|
|
}
|
|
}
|