Add FastAPI backend with agent system

This commit is contained in:
2026-03-21 10:13:29 +08:00
parent ed6bab59fe
commit 6ffa07adde
82 changed files with 11138 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
from pydantic import BaseModel
class ForumPostCreate(BaseModel):
title: str
content: str
category: str | None = "discussion"
class ForumPostOut(BaseModel):
id: str
user_id: str
title: str
content: str
category: str | None
is_executed: bool
execution_result: str | None
reply_count: int
created_at: str
model_config = {"from_attributes": True}
class ForumReplyCreate(BaseModel):
content: str
class ForumReplyOut(BaseModel):
id: str
post_id: str
user_id: str | None
agent_id: str | None
content: str
is_ai_reply: bool
created_at: str
model_config = {"from_attributes": True}