Kheem Dharmani
Initial commit: Agentic Multiwriter
32f259e
raw
history blame contribute delete
874 Bytes
from __future__ import annotations
from typing import TypedDict, List, Dict, Any
from pydantic import BaseModel, Field
class ResearchSnippet(TypedDict):
title: str
url: str
snippet: str
class AgentState(TypedDict, total=False):
topic: str
mode: str
research_snippets: List[ResearchSnippet]
outline: List[str]
draft: str
revised_draft: str
final_output: str
meta: Dict[str, Any]
class GenerateRequest(BaseModel):
topic: str = Field(..., description="Topic to research and write about.")
mode: str = Field(
"blog",
description="Output mode: 'blog', 'research_summary', or 'linkedin_post'.",
)
class GenerateResponse(BaseModel):
topic: str
mode: str
outline: List[str]
draft: str
revised_draft: str
final_output: str
meta: Dict[str, Any] = Field(default_factory=dict)