-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
40 lines (28 loc) · 1.21 KB
/
Copy pathmodels.py
File metadata and controls
40 lines (28 loc) · 1.21 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
from pydantic import AliasChoices, BaseModel, Field, RootModel
class HealthRes(BaseModel):
status: str = Field(description="服务健康检查状态。")
class AgentReq(BaseModel):
contents: str = Field(
validation_alias=AliasChoices("contents", "req"),
description="用户提供的目标或任务内容。",
)
class SuggestRes(RootModel[list[str]]):
root: list[str] = Field(
min_length=3,
max_length=5,
description="按优先级排列的本周目标,来自用户提供的本月目标与前几周目标。",
)
class WeekPlanRes(RootModel[list[str]]):
root: list[str] = Field(
min_length=7,
max_length=7,
description="从周一到周日排列的每日核心任务,仅包含具体任务内容。",
)
class TodoStage(BaseModel):
name: str = Field(description="任务阶段名称。")
value: float = Field(description="预计完成小时数,允许小数。")
todos: list[str] = Field(description="该阶段下高度可执行的待办事项内容。")
class TodoRes(RootModel[list[TodoStage]]):
root: list[TodoStage] = Field(
description="按执行顺序排列的任务阶段及其待办事项。",
)