弃用langgrpah更换deepagent

This commit is contained in:
zcr
2026-03-11 21:45:46 +08:00
parent c862121b48
commit 7042d428fa
44 changed files with 2847 additions and 619 deletions

View File

@@ -1,5 +1,5 @@
import operator
from typing import Annotated, Sequence, TypedDict, Union, Optional
from typing import Annotated, Sequence, TypedDict, Union, Optional, Dict, Any
from langchain_core.messages import BaseMessage
@@ -8,4 +8,8 @@ class AgentState(TypedDict):
messages: Annotated[Sequence[BaseMessage], operator.add]
# next 存储 Supervisor 决定的下一步是谁
next: str
persona: Dict[str, Any] # 存储提取出的结构化画像,例如 {"风格偏好": "北欧", "预算": "8000-12000", ...}
persona_summary: str # 可选LLM 对当前画像的自然语言总结,便于 prompt 使用
persona_complete: bool # Supervisor 用这个判断是否能去 Researcher
require_suggestion: bool # 是否需要建议按钮
__end__: bool # 新增这个字段,默认 False