feat:完成微信公众号的自动化工具

This commit is contained in:
Daniel
2026-04-01 14:21:10 +08:00
commit 124a5f0192
16 changed files with 675 additions and 0 deletions

34
app/schemas.py Normal file
View File

@@ -0,0 +1,34 @@
from pydantic import BaseModel, Field
class RewriteRequest(BaseModel):
source_text: str = Field(..., min_length=20)
title_hint: str = ""
tone: str = "专业、可信、可读性强"
audience: str = "公众号读者"
keep_points: str = ""
avoid_words: str = ""
class RewriteResponse(BaseModel):
title: str
summary: str
body_markdown: str
class WechatPublishRequest(BaseModel):
title: str
summary: str = ""
body_markdown: str
author: str = ""
class IMPublishRequest(BaseModel):
title: str
body_markdown: str
class PublishResponse(BaseModel):
ok: bool
detail: str
data: dict | None = None