prebuilt.ai_insight.modelsΒΆ

Models for General News Reporter System.

ClassesΒΆ

Article

Represents a news article.

ArticleSummary

Summary of an article.

NewsCategory

Category for organizing news.

NewsReport

Complete news report.

NewsSearchConfig

Configuration for news search.

ReportConfig

Configuration for report generation.

ReportMetadata

Metadata for the news report.

SummaryStyle

Configuration for summary generation.

Module ContentsΒΆ

class prebuilt.ai_insight.models.Article(/, **data: Any)ΒΆ

Bases: pydantic.BaseModel

Represents a news article.

author: str | None = NoneΒΆ
content: str = NoneΒΆ
property days_old: int | NoneΒΆ

Days since publication.

published_date: datetime.datetime | None = NoneΒΆ
relevance_score: float = NoneΒΆ
source: str = NoneΒΆ
title: str = NoneΒΆ
url: pydantic.HttpUrl = NoneΒΆ
class prebuilt.ai_insight.models.ArticleSummary(/, **data: Any)ΒΆ

Bases: pydantic.BaseModel

Summary of an article.

category: str | None = NoneΒΆ
implications: str | None = NoneΒΆ
key_points: List[str] = NoneΒΆ
source: str = NoneΒΆ
summary: str = NoneΒΆ
title: str = NoneΒΆ
url: pydantic.HttpUrl = NoneΒΆ
class prebuilt.ai_insight.models.NewsCategory(/, **data: Any)ΒΆ

Bases: pydantic.BaseModel

Category for organizing news.

property article_count: intΒΆ

Number of articles in category.

articles: List[ArticleSummary] = NoneΒΆ
description: str = NoneΒΆ
name: str = NoneΒΆ
class prebuilt.ai_insight.models.NewsReport(/, **data: Any)ΒΆ

Bases: pydantic.BaseModel

Complete news report.

categories: List[NewsCategory] = NoneΒΆ
conclusion: str | None = NoneΒΆ
executive_summary: str = NoneΒΆ
introduction: str = NoneΒΆ
metadata: ReportMetadata = NoneΒΆ
property report_date: strΒΆ

Formatted report date.

spotlight_article: ArticleSummary | None = NoneΒΆ
subtitle: str | None = NoneΒΆ
title: str = NoneΒΆ
property total_articles: intΒΆ

Total number of articles in report.

class prebuilt.ai_insight.models.NewsSearchConfig(/, **data: Any)ΒΆ

Bases: pydantic.BaseModel

Configuration for news search.

language: str = NoneΒΆ
max_results: int = NoneΒΆ
search_depth: Literal['basic', 'advanced'] = NoneΒΆ
search_type: Literal['news', 'general', 'academic', 'business'] = NoneΒΆ
time_period: Literal['1d', '3d', '1w', '1m', '3m'] = NoneΒΆ
topic: str = NoneΒΆ
class prebuilt.ai_insight.models.ReportConfig(/, **data: Any)ΒΆ

Bases: pydantic.BaseModel

Configuration for report generation.

articles_per_category: int = NoneΒΆ
filename_pattern: str = NoneΒΆ
include_spotlight: bool = NoneΒΆ
max_categories: int = NoneΒΆ
output_format: Literal['markdown', 'html', 'json'] = NoneΒΆ
report_style: Literal['newsletter', 'brief', 'comprehensive', 'executive'] = NoneΒΆ
save_to_file: bool = NoneΒΆ
class prebuilt.ai_insight.models.ReportMetadata(/, **data: Any)ΒΆ

Bases: pydantic.BaseModel

Metadata for the news report.

generation_time: datetime.datetime = NoneΒΆ
search_config: NewsSearchConfig = NoneΒΆ
time_period: str = NoneΒΆ
topic: str = NoneΒΆ
total_sources: int = NoneΒΆ
class prebuilt.ai_insight.models.SummaryStyle(/, **data: Any)ΒΆ

Bases: pydantic.BaseModel

Configuration for summary generation.

focus_areas: List[str] | None = NoneΒΆ
include_implications: bool = NoneΒΆ
length: Literal['brief', 'standard', 'detailed'] = NoneΒΆ
simplify_technical: bool = NoneΒΆ
target_audience: Literal['general', 'technical', 'executive', 'academic', 'youth'] = NoneΒΆ