hunk.code_window:   typesense:
       container_name: immich_typesense
       image: typesense/typesense:0.24.1
       environment:
         - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
         - TYPESENSE_DATA_DIR=/data
       logging:
         driver: none
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:     image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
  
hunk.file_path: docker/docker-compose.dev.yml
hunk.type: replace
file: import { BadRequestException } from '@nestjs/common';
  import pkg from 'src/../../package.json';
  
  const [major, minor, patch] = pkg.version.split('.');
  
  export interface IServerVersion {
    major: number;
    minor: number;
    patch: number;
  }
  
  export const serverVersion: IServerVersion = {
    major: Number(major),
    minor: Number(minor),
    patch: Number(patch),
  };
  
  export const SERVER_VERSION = `${serverVersion.major}.${serverVersion.minor}.${serverVersion.patch}`;
  
  export const APP_MEDIA_LOCATION = process.env.IMMICH_MEDIA_LOCATION || './upload';
  
  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.');
    }
  }
  