WIP-CHECKPOINT[auth-refactor]: 固化工程师崩溃前部分成果 + 同树其他未提交WIP(仅源码,不含密钥/二进制)-- 待重激活工程师续作

This commit is contained in:
Simon
2026-07-07 21:52:11 +08:00
parent 242c1967ff
commit fab75760e0
203 changed files with 21504 additions and 3345 deletions
@@ -0,0 +1,46 @@
# =============================================================================
# 企微IT智能服务台 — 会话标注 Pydantic Schema
# =============================================================================
from datetime import datetime
from typing import Optional
from pydantic import BaseModel, Field
# --------------------------------------------------------------------------
# 创建会话标注 Schema
# --------------------------------------------------------------------------
class AnnotationCreate(BaseModel):
"""创建会话标注请求 Schema。"""
conversation_id: str = Field(..., description="会话ID")
message_id: str = Field(..., description="被标注的消息ID")
feedback: str = Field(..., description="useful=有用/useless=无用")
comment: Optional[str] = Field(None, description="备注")
# --------------------------------------------------------------------------
# 会话标注响应 Schema
# --------------------------------------------------------------------------
class AnnotationResponse(BaseModel):
"""会话标注响应 Schema。"""
id: str
conversation_id: str
agent_id: str
message_id: str
feedback: str
comment: Optional[str] = None
created_at: datetime
model_config = {"from_attributes": True}
# --------------------------------------------------------------------------
# 会话标注列表响应 Schema
# --------------------------------------------------------------------------
class AnnotationListResponse(BaseModel):
"""会话标注列表响应 Schema。"""
items: list[AnnotationResponse]