Spaces:
Runtime error
Runtime error
File size: 777 Bytes
5a67683 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
from enum import Enum, auto, unique
from pathlib import Path
PROJECT_ROOT_PATH: Path = Path(__file__).parents[1]
@unique
class BaseEnum(str, Enum):
@staticmethod
def _generate_next_value_(name: str, *_):
"""
Automatically generate values for enum.
Enum values are lower-cased enum member names.
"""
return name.lower()
@classmethod
def get_values(cls) -> list[str]:
# noinspection PyUnresolvedReferences
return [m.value for m in cls]
class LLMMode(BaseEnum):
MOCK = auto()
OPENAI = auto()
LOCAL = auto()
class EmbeddingMode(BaseEnum):
MOCK = auto()
OPENAI = auto()
LOCAL = auto()
class VectorDatabase(BaseEnum):
WEAVIATE = auto()
WEAVIATE_INDEX_NAME = "LlamaIndex"
|