修改引用逻辑,修改长期记忆bug
This commit is contained in:
@@ -4,12 +4,11 @@ LangGraph 状态定义模块
|
||||
"""
|
||||
|
||||
import operator
|
||||
from typing import Annotated, Any
|
||||
from typing import Annotated
|
||||
from typing_extensions import TypedDict
|
||||
from dataclasses import dataclass
|
||||
from langchain_core.messages import AnyMessage
|
||||
|
||||
|
||||
class MessagesState(TypedDict):
|
||||
"""对话状态类型定义"""
|
||||
messages: Annotated[list[AnyMessage], operator.add]
|
||||
@@ -19,7 +18,6 @@ class MessagesState(TypedDict):
|
||||
last_elapsed_time: float # 本次调用耗时(秒)
|
||||
turns_since_last_summary: int # 距离上次生成摘要的轮数
|
||||
|
||||
|
||||
@dataclass
|
||||
class GraphContext:
|
||||
"""图执行上下文"""
|
||||
|
||||
Reference in New Issue
Block a user