feat:架构重构

This commit is contained in:
2026-10-01 23:08:06 -07:00
parent b82dc93404
commit 68588d1f92
74 changed files with 1131 additions and 3492 deletions
-5
View File
@@ -54,11 +54,6 @@ class BaseNode(ABC):
def process(self, state: T) -> T:
"""子类实现节点核心逻辑,返回状态更新"""
def fail_on_invalid_output(self, state: T, error: ValueError, reason: str) -> T:
"""模型输出未通过校验时收尾为失败结果,原因交给失败收尾由模型向用户说明"""
self.logger.warning(f"{reason}: {error}")
return {**state, "status": "failed", "failure_reason": f"{reason}:{error}"}
def log_step(self, step_name: str, message: str = ""):
"""记录步骤日志。"""
log_msg = f"[{step_name}]"