feat: enhance agent orchestration, knowledge flow and UI refinements
This commit is contained in:
@@ -41,6 +41,7 @@ class AgentConfigUpdate(BaseModel):
|
||||
description: str | None = None
|
||||
system_prompt: str | None = None
|
||||
enabled: bool | None = None
|
||||
selected_skill_ids: list[str] | None = None
|
||||
|
||||
|
||||
class AgentConfigOut(BaseModel):
|
||||
@@ -51,5 +52,6 @@ class AgentConfigOut(BaseModel):
|
||||
system_prompt: str
|
||||
enabled: bool
|
||||
is_active: bool
|
||||
selected_skill_ids: list[str]
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
35
backend/app/schemas/goal.py
Normal file
35
backend/app/schemas/goal.py
Normal file
@@ -0,0 +1,35 @@
|
||||
from datetime import date, datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.models.goal import GoalStatus
|
||||
|
||||
|
||||
class GoalCreate(BaseModel):
|
||||
title: str
|
||||
goal_date: date
|
||||
note: str | None = None
|
||||
status: GoalStatus = GoalStatus.ACTIVE
|
||||
|
||||
|
||||
class GoalUpdate(BaseModel):
|
||||
title: str | None = None
|
||||
goal_date: date | None = None
|
||||
note: str | None = None
|
||||
status: GoalStatus | None = None
|
||||
|
||||
|
||||
class GoalOut(BaseModel):
|
||||
id: str
|
||||
title: str
|
||||
note: str | None
|
||||
goal_date: str
|
||||
status: GoalStatus
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class GoalListOut(BaseModel):
|
||||
items: list[GoalOut]
|
||||
40
backend/app/schemas/reminder.py
Normal file
40
backend/app/schemas/reminder.py
Normal file
@@ -0,0 +1,40 @@
|
||||
from datetime import date, datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.models.reminder import ReminderStatus
|
||||
|
||||
|
||||
class ReminderCreate(BaseModel):
|
||||
title: str
|
||||
reminder_at: datetime
|
||||
note: str | None = None
|
||||
|
||||
|
||||
class ReminderUpdate(BaseModel):
|
||||
title: str | None = None
|
||||
reminder_at: datetime | None = None
|
||||
note: str | None = None
|
||||
status: ReminderStatus | None = None
|
||||
is_dismissed: bool | None = None
|
||||
|
||||
|
||||
class ReminderOut(BaseModel):
|
||||
id: str
|
||||
title: str
|
||||
note: str | None
|
||||
reminder_at: datetime
|
||||
status: ReminderStatus
|
||||
is_dismissed: bool
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class ReminderListOut(BaseModel):
|
||||
items: list[ReminderOut]
|
||||
|
||||
|
||||
class ReminderDateQuery(BaseModel):
|
||||
date: date
|
||||
33
backend/app/schemas/schedule_center.py
Normal file
33
backend/app/schemas/schedule_center.py
Normal file
@@ -0,0 +1,33 @@
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.schemas.goal import GoalOut
|
||||
from app.schemas.reminder import ReminderOut
|
||||
from app.schemas.task import TaskOut
|
||||
from app.schemas.todo import TodoOut
|
||||
|
||||
|
||||
class ScheduleCenterDaySummary(BaseModel):
|
||||
date: str
|
||||
todo_total: int
|
||||
todo_completed: int
|
||||
task_due_total: int
|
||||
high_priority_total: int
|
||||
reminder_total: int
|
||||
goal_total: int
|
||||
|
||||
|
||||
class ScheduleCenterMonthOut(BaseModel):
|
||||
month: str
|
||||
days: list[ScheduleCenterDaySummary]
|
||||
|
||||
|
||||
class ScheduleCenterDateOut(BaseModel):
|
||||
date: str
|
||||
todos: list[TodoOut]
|
||||
tasks: list[TaskOut]
|
||||
reminders: list[ReminderOut]
|
||||
goals: list[GoalOut]
|
||||
summary: ScheduleCenterDaySummary
|
||||
generated_at: datetime
|
||||
@@ -10,7 +10,8 @@ LLMType = Literal["chat", "vlm", "embedding", "rerank"]
|
||||
# 单个模型配置
|
||||
class LLMModelConfig(BaseModel):
|
||||
name: str = "" # 模型名称/别名,用于标识
|
||||
provider: LLMProviderType = "openai"
|
||||
# provider 已废弃为必填字段:优先通过 base_url + model 推断。
|
||||
provider: Optional[LLMProviderType] = None
|
||||
model: str = ""
|
||||
base_url: str = ""
|
||||
api_key: str = ""
|
||||
@@ -52,7 +53,8 @@ class SettingsOut(BaseModel):
|
||||
# 测试 LLM 连接请求
|
||||
class LLMTestIn(BaseModel):
|
||||
type: LLMType
|
||||
provider: LLMProviderType
|
||||
# provider 已废弃为必填字段:优先通过 base_url + model 推断。
|
||||
provider: Optional[LLMProviderType] = None
|
||||
model: str
|
||||
base_url: str
|
||||
api_key: str
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from datetime import datetime
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
|
||||
@@ -6,7 +7,7 @@ class SkillCreate(BaseModel):
|
||||
name: str
|
||||
description: Optional[str] = None
|
||||
instructions: str
|
||||
agent_type: str # master/planner/executor/librarian/analyst
|
||||
agent_type: str # master/schedule_planner/executor/librarian/analyst
|
||||
tools: list[str] = []
|
||||
required_context: list[str] = []
|
||||
output_format: Optional[str] = None
|
||||
@@ -39,10 +40,11 @@ class SkillOut(BaseModel):
|
||||
required_context: list[str]
|
||||
output_format: Optional[str]
|
||||
visibility: str
|
||||
is_builtin: bool
|
||||
team_id: Optional[str]
|
||||
is_active: bool
|
||||
owner_id: str
|
||||
created_at: str
|
||||
updated_at: str
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
from datetime import date, datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
from datetime import datetime
|
||||
|
||||
from app.models.todo import TodoSource
|
||||
|
||||
|
||||
class TodoCreate(BaseModel):
|
||||
title: str
|
||||
todo_date: date | None = None
|
||||
|
||||
|
||||
class TodoUpdate(BaseModel):
|
||||
title: str | None = None
|
||||
is_completed: bool | None = None
|
||||
todo_date: date | None = None
|
||||
|
||||
|
||||
class TodoOut(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user