This commit is contained in:
1 parent
93ceff7f17
commit
52d5d01337
1 file changed
+17
-2
+17
-2
@@ -1,6 +1,14 @@
|
||||
"""
|
||||
Version 0.1
|
||||
app/config.py — zentrale Konfiguration (ENV → Settings)
|
||||
|
||||
Version:
|
||||
0.2.0 (WP-04: Retriever-Gewichte & Defaults ergänzt; keine Verhaltensänderung für bestehende Nutzung)
|
||||
Stand:
|
||||
2025-10-06
|
||||
Hinweis:
|
||||
Bestehende Attribute bleiben erhalten; neue WP-04 Felder sind optional.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
import os
|
||||
from functools import lru_cache
|
||||
@@ -16,7 +24,14 @@ class Settings:
|
||||
MODEL_NAME: str = os.getenv("MINDNET_MODEL", "sentence-transformers/all-MiniLM-L6-v2")
|
||||
# API
|
||||
DEBUG: bool = os.getenv("DEBUG", "false").lower() == "true"
|
||||
# WP-04 Retriever Defaults (optional; können per ENV überschrieben werden)
|
||||
RETRIEVER_W_SEM: float = float(os.getenv("MINDNET_WP04_W_SEM", "0.70"))
|
||||
RETRIEVER_W_EDGE: float = float(os.getenv("MINDNET_WP04_W_EDGE", "0.25"))
|
||||
RETRIEVER_W_CENT: float = float(os.getenv("MINDNET_WP04_W_CENT", "0.05"))
|
||||
RETRIEVER_TOP_K: int = int(os.getenv("MINDNET_WP04_TOP_K", "10"))
|
||||
RETRIEVER_EXPAND_DEPTH: int = int(os.getenv("MINDNET_WP04_EXPAND_DEPTH", "1"))
|
||||
RETRIEVER_EDGE_TYPES: str = os.getenv("MINDNET_WP04_EDGE_TYPES", "references,belongs_to,prev,next")
|
||||
|
||||
@lru_cache
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
return Settings()
|
||||
Reference in new issue
Block a user