新增对话接口

This commit is contained in:
zcr
2026-03-12 13:13:52 +08:00
parent 7042d428fa
commit a6393df0e3
35 changed files with 843 additions and 1163 deletions

View File

@@ -1,5 +1,5 @@
import operator
from typing import Annotated, Sequence, TypedDict, Union, Optional, Dict, Any
from typing import Annotated, Sequence, TypedDict, Union, Optional
from langchain_core.messages import BaseMessage
@@ -8,8 +8,4 @@ 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