This commit is contained in:
2026-03-02 17:41:04 +08:00
parent 460c2e87b8
commit c9bebe5615
7 changed files with 322 additions and 86 deletions
+22
View File
@@ -0,0 +1,22 @@
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, ConfigDict, Field
class ChatMessageFileDTO(BaseModel):
"""文件输入模型(预留)"""
model_config = ConfigDict(extra="allow")
class ChatMessageRequestDTO(BaseModel):
"""/api/workflows/stream 请求模型(对齐标准 chat message 请求)"""
model_config = ConfigDict(extra="forbid")
query: str
inputs: Dict[str, Any] = Field(default_factory=dict)
response_mode: str = "streaming"
user: Optional[str] = None
conversation_id: Optional[str] = None
files: List[ChatMessageFileDTO] = Field(default_factory=list)