Hamza4100's picture
Upload 20 files
a631409 verified
raw
history blame contribute delete
910 Bytes
from pydantic_settings import BaseSettings
from typing import List
import os
class Settings(BaseSettings):
# Google Gemini
GOOGLE_API_KEY: str = ""
# Pinecone
PINECONE_API_KEY: str = ""
PINECONE_INDEX_NAME: str = "health-tech-kb"
# App settings
APP_ENV: str = "development"
CORS_ORIGINS: str = "http://localhost:3000"
UPLOAD_DIR: str = "./uploads"
CHUNK_SIZE: int = 1000
CHUNK_OVERLAP: int = 200
EMBEDDING_MODEL: str = "sentence-transformers/all-MiniLM-L6-v2"
LLM_MODEL: str = "gemini-2.5-flash"
@property
def cors_origins_list(self) -> List[str]:
return [origin.strip() for origin in self.CORS_ORIGINS.split(",")]
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
settings = Settings()
# Ensure upload directory exists
os.makedirs(settings.UPLOAD_DIR, exist_ok=True)