#聊聊Agent开发#1. 状态(State)代表应用程序当前快照的共享数据结构可以使用 TypedDict 或 Pydantic 模型定义包含作为所有节点和边输入模式的模式(schema)通过减速器函数(reducer functions)进行更新,指定如何应用更改1. TypedDict 和 Pydantic 是什么?它们都是定义状态结构的方式:、简单说:都是用来定义你的数据结构,就像数据库的字段定义。 #pydantic方式 from pydantic import BaseModel class State(BaseModel): messages: list llm_calls: i...