feat(fase2): add Flow schemas and Flow Engine core

API Gateway:
- Add Pydantic schemas for Flow API (create, update, response, nodes, edges)

Flow Engine:
- Add FlowContext for variable management and interpolation
- Add FlowEngine for executing chatbot flows
- Support node types: trigger, message, buttons, wait_input, condition, set_variable

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude AI
2026-01-29 10:19:11 +00:00
parent 257baaaf19
commit 8824f65a62
4 changed files with 377 additions and 0 deletions

View File

@@ -6,6 +6,15 @@ from app.schemas.auth import (
UserResponse,
CreateUserRequest,
)
from app.schemas.flow import (
NodeData,
FlowNode,
FlowEdge,
FlowCreate,
FlowUpdate,
FlowResponse,
FlowListResponse,
)
__all__ = [
"LoginRequest",
@@ -14,4 +23,11 @@ __all__ = [
"RefreshRequest",
"UserResponse",
"CreateUserRequest",
"NodeData",
"FlowNode",
"FlowEdge",
"FlowCreate",
"FlowUpdate",
"FlowResponse",
"FlowListResponse",
]