Spaces:
Runtime error
Runtime error
File size: 1,335 Bytes
732b14f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | """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)
|