65 lines
1.9 KiB
Python
65 lines
1.9 KiB
Python
import os
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv()
|
|
|
|
APP_NAME = os.getenv("APP_NAME", "AI Patient Onboarding")
|
|
APP_ENV = os.getenv("APP_ENV", "development")
|
|
APP_VERSION = os.getenv("APP_VERSION", "1.0.0")
|
|
|
|
DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///./data/onboarding.db")
|
|
|
|
# AI Providers
|
|
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY", "")
|
|
OPENAI_MODEL = os.getenv("OPENAI_MODEL", "gpt-4o-mini")
|
|
|
|
ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY", "")
|
|
ANTHROPIC_MODEL = os.getenv("ANTHROPIC_MODEL", "claude-sonnet-4-5-20250929")
|
|
|
|
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY", "")
|
|
GEMINI_MODEL = os.getenv("GEMINI_MODEL", "gemini-3.6-flash")
|
|
|
|
SARVAM_API_KEY = os.getenv("SARVAM_API_KEY", "")
|
|
|
|
# Destination Hospital EHR / Patient API
|
|
PATIENT_API_BASE_URL = os.getenv("PATIENT_API_BASE_URL", "")
|
|
PATIENT_API_TOKEN = os.getenv("PATIENT_API_TOKEN", "")
|
|
|
|
# CORS Allowed Origins Configuration
|
|
DEFAULT_CORS_ORIGINS = [
|
|
"http://localhost:3000",
|
|
"http://localhost:5173",
|
|
"http://127.0.0.1:3000",
|
|
"http://127.0.0.1:5173",
|
|
"http://localhost:8000",
|
|
"http://127.0.0.1:8000",
|
|
"http://localhost:5500",
|
|
"http://127.0.0.1:5500",
|
|
"http://localhost:5501",
|
|
"http://127.0.0.1:5501",
|
|
"http://localhost:8080",
|
|
"http://127.0.0.1:8080",
|
|
"null",
|
|
"https://onboarding.skyheal.ai",
|
|
]
|
|
|
|
cors_raw = os.getenv("CORS_ORIGINS", "")
|
|
if cors_raw:
|
|
CORS_ORIGINS = [origin.strip() for origin in cors_raw.split(",") if origin.strip()]
|
|
else:
|
|
CORS_ORIGINS = DEFAULT_CORS_ORIGINS
|
|
|
|
|
|
class Settings:
|
|
ai_timeout_seconds: float = float(os.getenv("AI_TIMEOUT_SECONDS", "3.5"))
|
|
session_timeout_minutes: int = int(os.getenv("SESSION_TIMEOUT_MINUTES", "30"))
|
|
max_message_length: int = int(os.getenv("MAX_MESSAGE_LENGTH", "5000"))
|
|
max_response_words: int = int(os.getenv("MAX_RESPONSE_WORDS", "20"))
|
|
llm_retry_count: int = int(os.getenv("LLM_RETRY_COUNT", "2"))
|
|
supported_languages: list[str] = ["en", "ta", "hi", "te", "kn"]
|
|
|
|
|
|
settings = Settings()
|
|
|
|
|