RandomZ / app /workflows /models.py
StormShadow308's picture
feat: async pipeline, job queue, generation hardening, and docs
732b14f
Raw
History Blame Contribute Delete
1.34 kB
"""Dataclasses for Temporal report generation workflows."""
from __future__ import annotations
from dataclasses import dataclass, field
@dataclass
class ReportWorkflowRequest:
"""Input to :class:`ReportGenerationWorkflow`."""
report_id: str
tenant_id: str
template_id: str
bullets: list[str]
mode: str = "generate"
ai_level: int = 3
ai_percent: int | None = None
retrieval_level: str = "paragraph"
force_regenerate: bool = False
strict_uploaded_only: bool = False
reference_document_ids: list[str] | None = None
draft_paragraph: str | None = None
interference_level: str | None = None
template_ids: list[str] | None = None
bullets_by_section: dict[str, list[str]] | None = None
parallel_sections: bool = False
@dataclass
class SectionGenerationInput:
"""Per-section activity payload."""
report_id: str
tenant_id: str
section_code: str
bullets: list[str]
mode: str
ai_level: int
ai_percent: int | None
retrieval_level: str
force_regenerate: bool
strict_uploaded_only: bool
reference_document_ids: list[str] | None
draft_paragraph: str | None
interference_level: str | None
@dataclass
class WorkflowResult:
report_id: str
status: str
failed_sections: list[str] = field(default_factory=list)