presenton/servers/fastapi/models/generate_presentation_request.py
sudipnext c7860127f2 feat: add support for optional embedded Ollama and enhance database migration handling
- Updated docker-compose.yml to allow disabling embedded Ollama via environment variable.
- Refactored Dockerfile and Dockerfile.dev for improved dependency management and installation process.
- Enhanced FastAPI migration scripts to handle orphaned Alembic revisions and added new database migration logic.
- Improved error handling in background tasks and Codex authentication endpoints.
- Added support for font file uploads with better validation and extraction of font names.
- Introduced new image search functionality with support for Pexels and Pixabay APIs.
2026-04-15 15:39:35 +05:45

46 lines
1.8 KiB
Python

from typing import List, Literal, Optional
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: Optional[int] = Field(
default=None,
description="Number of slides to generate. If omitted, model auto-detects slide count.",
)
language: Optional[str] = Field(
default=None,
description="Language for the presentation. If omitted, model auto-detects language.",
)
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"
)