from typing import List from pydantic import BaseModel, Field class NewsItem(BaseModel): title: str = Field(description="Title of the AI news article") url: str = Field(description="URL of the news article") source: str = Field(description="Source website of the news") description: str = Field(description="Brief description of the news article") class NewsResults(BaseModel): news_items: List[NewsItem] = Field(description="List of AI news articles found") class Subsection(BaseModel): title: str = Field(description="Title of the subsection (based on news item title)") source: str = Field(description="Source of the news item") url: str = Field(description="URL of the news item") content: str = Field(description="Content for this subsection") class Section(BaseModel): name: str = Field(description="Name for this section of the blog") description: str = Field(description="Description for this section of the blog") information: str = Field(description="Information which should be included in this section of the blog") subsections: List[Subsection] = Field(description="Subsections for each news item in this category", default=[]) class Sections(BaseModel): sections: List[Section] = Field(description="List of sections for this blog")