Changes in enums.py
Fixed generalisation of enums
This commit is contained in:
1 parent
01ace5b7cc
commit
ddfdd41e6a
1 file changed
+8
-6
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user