Const
用于 Zod 状态定义的预构建模式元数据。
import { z } from "zod/v4-mini";import { MessagesZodState, StateGraph } from "@langchain/langgraph";const AgentState = z.object({ messages: z.custom<BaseMessage[]>().register(registry, MessagesZodMeta),}); Copy
import { z } from "zod/v4-mini";import { MessagesZodState, StateGraph } from "@langchain/langgraph";const AgentState = z.object({ messages: z.custom<BaseMessage[]>().register(registry, MessagesZodMeta),});
用于 Zod 状态定义的预构建模式元数据。