UNPKG

@langgraph-js/pro

Version:

The Pro SDK for LangGraph - seamlessly integrate your AI agents with frontend interfaces and build complex AI workflows

11 lines (10 loc) 499 B
import { InteropZodObject } from "@langchain/core/utils/types"; import { BaseChatOpenAIFields } from "@langchain/openai"; /** * 根据 state.model_name 决定模型名称 * @example * ```typescript * const middleware = createDynamicModelMiddleware(stateSchema, "model_name"); * ``` */ export declare const createDynamicModelMiddleware: <T extends InteropZodObject>(stateSchema: T, keyInState?: string, options?: BaseChatOpenAIFields) => import("langchain").AgentMiddleware<T, undefined, any>;