-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
55 lines (43 loc) · 1.52 KB
/
Copy pathmodels.py
File metadata and controls
55 lines (43 loc) · 1.52 KB
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
55
from typing import List, Optional
from pydantic import BaseModel, Field
from datetime import datetime
class Persona(BaseModel):
"""Represents a persona that will interact on Reddit"""
username: str
info: str # Single text field with all persona information
class CompanyInfo(BaseModel):
"""Company information for content generation"""
name: str
website: str
description: str
class ContentInput(BaseModel):
"""Input for content calendar generation"""
company_info: CompanyInfo
personas: List[Persona] = Field(min_length=2)
subreddits: List[str]
chatgpt_queries: List[str]
posts_per_week: int = Field(ge=1, le=50)
start_week: Optional[int] = Field(default=0, description="Week number, 0 is current week")
class Comment(BaseModel):
"""A comment on a post"""
persona_name: str
content: str
delay_hours: float = Field(description="Hours after post creation to comment")
class Post(BaseModel):
"""A Reddit post with associated comments"""
subreddit: str
title: str
content: str
persona_name: str
target_query: str
scheduled_time: str
comments: List[Comment]
reasoning: str = Field(description="Why this post/comment combination is valuable")
keywords: List[str] = Field(default_factory=list, description="Keywords/tags for this post")
class ContentCalendar(BaseModel):
"""A week's worth of content"""
week_number: int
start_date: str
end_date: str
posts: List[Post]
metadata: dict = Field(default_factory=dict)