File size: 709 Bytes
d0aabb7
29c313c
6063811
833527f
6063811
fc549f1
6063811
 
 
 
 
4ca8eaf
833527f
 
4ca8eaf
29c313c
 
 
 
6063811
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# src/config/settings.py
import os


class Settings:
	"""Application-wide settings."""
	# Memory settings
	MAX_TITLE_LENGTH: int = 50
	DEFAULT_TOP_K: int = 5
	SEMANTIC_CONTEXT_SIZE: int = 17
	SIMILARITY_THRESHOLD: float = 0.15
	EMBEDDING_MODEL_NAME: str = "MedEmbed-large-v0.1"
	NVIDIA_RERANKER_MODEL: str = "rerank-qa-mistral-4b"
	NVIDIA_RERANKER_ENDPOINT: str = "" # TODO

	# Safety Guard settings
	SAFETY_GUARD_ENABLED: bool = os.getenv("SAFETY_GUARD_ENABLED", "true").lower() == "true"
	SAFETY_GUARD_TIMEOUT: int = int(os.getenv("SAFETY_GUARD_TIMEOUT", "30"))
	SAFETY_GUARD_FAIL_OPEN: bool = os.getenv("SAFETY_GUARD_FAIL_OPEN", "true").lower() == "true"

# Create singleton instance
settings = Settings()