Multi-Rag / src /Blog /models /Task_models.py
VashuTheGreat's picture
Clean commit without images
1f725d8
from pydantic import BaseModel,Field
from typing import List,Literal
class Task(BaseModel):
id: int
title: str
goal: str = Field(
...,
description="One sentence describing what the reader should be able to do/understand after this section.",
)
bullets: List[str] = Field(
...,
min_length=2,
max_length=5,
description="3–5 concrete, non-overlapping subpoints to cover in this section.",
)
target_words: int = Field(
...,
description="Target word count for this section (120–450).",
)
section_type: Literal[
"intro", "core", "examples", "checklist", "common_mistakes", "conclusion"
] = Field(
...,
description="Use 'common_mistakes' exactly once in the plan.",
)
tags: List[str] = Field(default_factory=list)
requires_research: bool = False
requires_citations: bool = False
requires_code: bool = False