Security Improvements (P0.0-P0.4): - P0.0: Migrate to Gemini-only AI stack (simplified, single billing) - P0.1: Fix CORS to restrict allowed origins from env (was *) - P0.2: Remove hardcoded dev password, require env var - P0.3: Add rate limiting (slowapi) - 3-10 req/min on sensitive endpoints - P0.4: Add request size limits (100MB default via middleware) New Features: - Unified LLM service with Google Gemini priority - OXML geometry extractor for layout parsing - TSX validator for generated React components - Client ID support in presentation requests with access control - Configurable LLM/image timeouts via env vars Modern Design System (P0.9 - partial): - Enhanced CSS design tokens (primary, semantic colors, shadows) - Typography scale (h1-h4, body variants, caption) - Modern animations (fadeIn, slideIn, scaleIn) - Updated Button component with better variants and hover effects - Created unified Card and StatusBadge components - Applied design system to Dashboard and Settings pages Backend Improvements: - Master deck parser simplification - Slide-to-HTML endpoint cleanup (325 lines removed) - Better error handling in prompts endpoint Frontend Improvements: - Settings UI simplified to show only Google/Gemini - Dashboard uses CSS variables instead of hardcoded colors - Improved button transitions and hover states Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
46 lines
1.8 KiB
Python
46 lines
1.8 KiB
Python
from typing import List, Literal, Optional
|
|
import uuid
|
|
from pydantic import BaseModel, Field
|
|
|
|
from enums.tone import Tone
|
|
from enums.verbosity import Verbosity
|
|
|
|
|
|
class GeneratePresentationRequest(BaseModel):
|
|
content: str = Field(..., description="The content for generating the presentation")
|
|
slides_markdown: Optional[List[str]] = Field(
|
|
default=None, description="The markdown for the slides"
|
|
)
|
|
instructions: Optional[str] = Field(
|
|
default=None, description="The instruction for generating the presentation"
|
|
)
|
|
tone: Tone = Field(default=Tone.DEFAULT, description="The tone to use for the text")
|
|
verbosity: Verbosity = Field(
|
|
default=Verbosity.STANDARD, description="How verbose the presentation should be"
|
|
)
|
|
web_search: bool = Field(default=False, description="Whether to enable web search")
|
|
n_slides: int = Field(default=8, description="Number of slides to generate")
|
|
language: str = Field(
|
|
default="English", description="Language for the presentation"
|
|
)
|
|
template: str = Field(
|
|
default="general", description="Template to use for the presentation"
|
|
)
|
|
include_table_of_contents: bool = Field(
|
|
default=False, description="Whether to include a table of contents"
|
|
)
|
|
include_title_slide: bool = Field(
|
|
default=True, description="Whether to include a title slide"
|
|
)
|
|
files: Optional[List[str]] = Field(
|
|
default=None, description="Files to use for the presentation"
|
|
)
|
|
export_as: Literal["pptx", "pdf"] = Field(
|
|
default="pptx", description="Export format"
|
|
)
|
|
trigger_webhook: bool = Field(
|
|
default=False, description="Whether to trigger subscribed webhooks"
|
|
)
|
|
client_id: Optional[uuid.UUID] = Field(
|
|
default=None, description="Optional explicit client ID for multi-tenant mapping"
|
|
)
|