2026-03-02 17:41:04 +08:00
|
|
|
|
from typing import Any, Dict, Optional
|
|
|
|
|
|
|
|
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
2026-02-26 13:43:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AgentInput(BaseModel):
|
2026-03-02 17:41:04 +08:00
|
|
|
|
"""统一工作流输入模型(新版本 DTO)"""
|
|
|
|
|
|
|
|
|
|
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
|
|
|
|
|
|
|
|
query: str
|
|
|
|
|
|
conversation_id: Optional[str] = None
|
2026-02-26 13:43:44 +08:00
|
|
|
|
workflow_type: str = "conversation"
|
2026-03-02 17:41:04 +08:00
|
|
|
|
response_mode: str = "blocking"
|
|
|
|
|
|
user: Optional[str] = None
|
|
|
|
|
|
inputs: Dict[str, Any] = Field(default_factory=dict)
|