From ddfdd41e6ab8b1af74e50e6f67900a932e87c4f1 Mon Sep 17 00:00:00 2001 From: Christoph Eder Date: Sat, 13 Dec 2025 19:10:25 +0100 Subject: [PATCH] Changes in enums.py Fixed generalisation of enums --- anansyTypes/enums.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/anansyTypes/enums.py b/anansyTypes/enums.py index 4e80e8f..cf6c1dd 100644 --- a/anansyTypes/enums.py +++ b/anansyTypes/enums.py @@ -1,3 +1,4 @@ +import anansyTypes from enum import Enum from typing import Union @@ -8,21 +9,22 @@ class ModelType(Enum): RESPONSE = "response" -class EmbeddingModelName(Enum): +class ModelName(Enum): + pass + + +class EmbeddingModelName(ModelName): NB_BERT = "nb_bert" -class TranscriptionModelName(Enum): +class TranscriptionModelName(ModelName): NB_WHISPER_SMALL = "nb_whisper_small" -class ResponseModelName(Enum): +class ResponseModelName(ModelName): GENERIC = "generic" -ModelName= Union[EmbeddingModelName, TranscriptionModelName, ResponseModelName] - - class PreprocessorType(Enum): NORWEGIAN = "norwegian" DEFAULT = "norwegian"