UNPKG

@langchain/langgraph

Version:

LangGraph

1 lines 2.6 kB
{"version":3,"file":"tool_executor.d.cts","names":["RunnableBinding","RunnableConfig","RunnableToolLike","StructuredToolInterface","ToolExecutorArgs","Array","ToolInvocationInterface","ToolExecutorInputType","ToolExecutorOutputType","ToolExecutor","Record","Promise"],"sources":["../../src/prebuilt/tool_executor.d.ts"],"sourcesContent":["import { RunnableBinding, RunnableConfig, RunnableToolLike } from \"@langchain/core/runnables\";\nimport { StructuredToolInterface } from \"@langchain/core/tools\";\n/** @deprecated Use {@link ToolNode} instead. */\nexport interface ToolExecutorArgs {\n tools: Array<StructuredToolInterface | RunnableToolLike>;\n /**\n * @default {INVALID_TOOL_MSG_TEMPLATE}\n */\n invalidToolMsgTemplate?: string;\n}\n/**\n * Interface for invoking a tool\n */\nexport interface ToolInvocationInterface {\n tool: string;\n toolInput: string;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ToolExecutorInputType = any;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ToolExecutorOutputType = any;\n/** @deprecated Use {@link ToolNode} instead. */\nexport declare class ToolExecutor extends RunnableBinding<ToolExecutorInputType, ToolExecutorOutputType> {\n lc_graph_name: string;\n tools: Array<StructuredToolInterface | RunnableToolLike>;\n toolMap: Record<string, StructuredToolInterface | RunnableToolLike>;\n invalidToolMsgTemplate: string;\n constructor(fields: ToolExecutorArgs);\n /**\n * Execute a tool invocation\n *\n * @param {ToolInvocationInterface} toolInvocation The tool to invoke and the input to pass to it.\n * @param {RunnableConfig | undefined} config Optional configuration to pass to the tool when invoked.\n * @returns Either the result of the tool invocation (`string` or `ToolMessage`, set by the `ToolOutput` generic) or a string error message.\n */\n _execute(toolInvocation: ToolInvocationInterface, config?: RunnableConfig): Promise<ToolExecutorOutputType>;\n}\nexport {};\n"],"mappings":";;;;;UAGiBI,gBAAAA;EAAAA,KAAAA,EACNC,KADMD,CACAD,uBADgB,GACUD,gBADV,CAAA;EAAA;;;wBACtBG,CAAAA,EAAAA,MAAAA;;AASX;AAGC;AAEyB;AAILI,UATJH,uBAAAA,CASgB;EAAA,IAAA,EAAA,MAAA;WAAyBC,EAAAA,MAAAA;;;KAJrDA,qBAAAA,GAMsCL,GAAAA;;KAJtCM,sBAAAA,GAKuBL,GAAAA;;AAAfO,cAHQD,YAAAA,SAAqBT,eAG7BU,CAH6CH,qBAG7CG,EAHoEF,sBAGpEE,CAAAA,CAAAA;eAEWN,EAAAA,MAAAA;OAQKE,EAXlBD,KAWkBC,CAXZH,uBAWYG,GAXcJ,gBAWdI,CAAAA;SAAkCL,EAVlDS,MAUkDT,CAAAA,MAAAA,EAVnCE,uBAUmCF,GAVTC,gBAUSD,CAAAA;wBAAyBO,EAAAA,MAAAA;aAARG,CAAAA,MAAAA,EARxDP,gBAQwDO;;;;;;;;2BAAnDL,kCAAkCL,iBAAiBU,QAAQH"}