init
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user