Initial DocsMCP stack
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# Configuration Settings
|
||||
import os
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Settings:
|
||||
"""Application settings loaded from environment variables."""
|
||||
|
||||
vector_store_host: str = os.getenv("VECTOR_STORE_HOST", "qdrant")
|
||||
vector_store_port: int = int(os.getenv("VECTOR_STORE_PORT", "6333"))
|
||||
collection_name: str = os.getenv("COLLECTION_NAME", "local_context7_docs")
|
||||
embedding_model_name: str = os.getenv("EMBEDDING_MODEL_NAME", "all-MiniLM-L6-v2")
|
||||
docs_path: str = os.getenv("DOCS_PATH", "./docs")
|
||||
db_path: str = os.getenv("DB_PATH", "./data/db.sqlite")
|
||||
log_level: str = os.getenv("LOG_LEVEL", "INFO")
|
||||
api_key_docs_api: str = os.getenv("API_KEY_DOCS_API", "")
|
||||
|
||||
@property
|
||||
def is_auth_enabled(self) -> bool:
|
||||
"""Return True if API key authentication is enabled."""
|
||||
return bool(self.api_key_docs_api)
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user