Core modules: - Laws: CRUD, search, AI-powered QA - Analysis: legal research and case management - Contracts: lifecycle management with templates - Signatures: electronic signature workflow Infrastructure: - FastAPI + SQLite + async SQLAlchemy - Docker deployment support - 54 unit tests passing Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
48 lines
1.3 KiB
Python
48 lines
1.3 KiB
Python
"""Core application configuration."""
|
|
from typing import Optional
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Application settings."""
|
|
|
|
# Application
|
|
APP_NAME: str = "AI Legal Assistant"
|
|
APP_VERSION: str = "1.0.0"
|
|
DEBUG: bool = False
|
|
|
|
# Database
|
|
DATABASE_URL: str = "sqlite+aiosqlite:///./data/legal_assistant.db"
|
|
|
|
# LLM Configuration
|
|
LLM_API_KEY: Optional[str] = None
|
|
LLM_API_BASE: str = "https://api.openai.com/v1"
|
|
LLM_MODEL: str = "gpt-4o-mini"
|
|
|
|
# Embedding Configuration
|
|
EMBEDDING_API_KEY: Optional[str] = None
|
|
EMBEDDING_API_BASE: str = "https://api.openai.com/v1"
|
|
EMBEDDING_MODEL: str = "text-embedding-3-small"
|
|
EMBEDDING_DIMENSION: int = 1536
|
|
|
|
# JWT Configuration
|
|
JWT_SECRET_KEY: str = "your-secret-key-change-in-production"
|
|
JWT_ALGORITHM: str = "HS256"
|
|
JWT_ACCESS_TOKEN_EXPIRE_MINUTES: int = 1440 # 24 hours
|
|
JWT_REFRESH_TOKEN_EXPIRE_DAYS: int = 7
|
|
|
|
# File Storage
|
|
UPLOAD_DIR: str = "./uploads"
|
|
MAX_UPLOAD_SIZE: int = 10 * 1024 * 1024 # 10MB
|
|
|
|
# Signature
|
|
SIGNATURE_TOKEN_EXPIRE_HOURS: int = 72 # 3 days
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
env_file_encoding = "utf-8"
|
|
case_sensitive = True
|
|
|
|
|
|
settings = Settings()
|