langchain 1.0.0-alpha.7 → 1.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/ReactAgent.cjs +2 -2
- package/dist/agents/ReactAgent.cjs.map +1 -1
- package/dist/agents/ReactAgent.js +2 -2
- package/dist/agents/ReactAgent.js.map +1 -1
- package/dist/agents/RunnableCallable.cjs +10 -0
- package/dist/agents/RunnableCallable.cjs.map +1 -1
- package/dist/agents/RunnableCallable.d.cts +5 -0
- package/dist/agents/RunnableCallable.d.cts.map +1 -1
- package/dist/agents/RunnableCallable.d.ts +5 -0
- package/dist/agents/RunnableCallable.d.ts.map +1 -1
- package/dist/agents/RunnableCallable.js +10 -0
- package/dist/agents/RunnableCallable.js.map +1 -1
- package/dist/agents/annotation.cjs +14 -0
- package/dist/agents/annotation.cjs.map +1 -1
- package/dist/agents/annotation.d.cts +12 -7
- package/dist/agents/annotation.d.cts.map +1 -1
- package/dist/agents/annotation.d.ts +11 -6
- package/dist/agents/annotation.d.ts.map +1 -1
- package/dist/agents/annotation.js +12 -1
- package/dist/agents/annotation.js.map +1 -1
- package/dist/agents/errors.d.cts +9 -2
- package/dist/agents/errors.d.cts.map +1 -1
- package/dist/agents/errors.d.ts +9 -2
- package/dist/agents/errors.d.ts.map +1 -1
- package/dist/agents/index.cjs +3 -0
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/index.d.cts +6 -5
- package/dist/agents/index.d.cts.map +1 -1
- package/dist/agents/index.d.ts +6 -5
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +4 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/interrupt.d.cts +5 -16
- package/dist/agents/interrupt.d.cts.map +1 -1
- package/dist/agents/interrupt.d.ts +3 -17
- package/dist/agents/interrupt.d.ts.map +1 -1
- package/dist/agents/interrupt.js +3 -1
- package/dist/agents/middlewareAgent/ReactAgent.cjs +145 -28
- package/dist/agents/middlewareAgent/ReactAgent.cjs.map +1 -1
- package/dist/agents/middlewareAgent/ReactAgent.d.cts +92 -12
- package/dist/agents/middlewareAgent/ReactAgent.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/ReactAgent.d.ts +92 -12
- package/dist/agents/middlewareAgent/ReactAgent.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/ReactAgent.js +145 -28
- package/dist/agents/middlewareAgent/ReactAgent.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/callLimit.cjs +128 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.d.cts +119 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.d.ts +119 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.js +127 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.cjs +278 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.d.cts +239 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.d.ts +239 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.js +276 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.cjs +1 -1
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.cts +2 -2
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.ts +2 -2
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.js +1 -1
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/hitl.cjs +38 -8
- package/dist/agents/middlewareAgent/middleware/hitl.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware/hitl.d.cts +130 -25
- package/dist/agents/middlewareAgent/middleware/hitl.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/hitl.d.ts +129 -24
- package/dist/agents/middlewareAgent/middleware/hitl.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/hitl.js +38 -8
- package/dist/agents/middlewareAgent/middleware/hitl.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/index.cjs +26 -6
- package/dist/agents/middlewareAgent/middleware/index.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware/index.d.cts +10 -3
- package/dist/agents/middlewareAgent/middleware/index.d.ts +10 -3
- package/dist/agents/middlewareAgent/middleware/index.js +17 -4
- package/dist/agents/middlewareAgent/middleware/index.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.cjs +193 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.cts +83 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.ts +83 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.js +192 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.cjs +67 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.d.cts +45 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.d.ts +45 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.js +67 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.cjs +333 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.d.cts +155 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.d.ts +155 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.js +332 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/promptCaching.cjs +50 -38
- package/dist/agents/middlewareAgent/middleware/promptCaching.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.cts +18 -18
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.ts +17 -17
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/promptCaching.js +50 -38
- package/dist/agents/middlewareAgent/middleware/promptCaching.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/summarization.cjs +3 -23
- package/dist/agents/middlewareAgent/middleware/summarization.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware/summarization.d.cts +10 -17
- package/dist/agents/middlewareAgent/middleware/summarization.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/summarization.d.ts +2 -9
- package/dist/agents/middlewareAgent/middleware/summarization.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/summarization.js +3 -22
- package/dist/agents/middlewareAgent/middleware/summarization.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.cjs +242 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.cts +158 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.ts +158 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.js +240 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/utils.cjs +26 -0
- package/dist/agents/middlewareAgent/middleware/utils.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/utils.d.cts +13 -0
- package/dist/agents/middlewareAgent/middleware/utils.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/utils.d.ts +13 -0
- package/dist/agents/middlewareAgent/middleware/utils.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/utils.js +25 -0
- package/dist/agents/middlewareAgent/middleware/utils.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware.cjs +1 -0
- package/dist/agents/middlewareAgent/middleware.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware.d.cts +14 -3
- package/dist/agents/middlewareAgent/middleware.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/middleware.d.ts +14 -3
- package/dist/agents/middlewareAgent/middleware.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/middleware.js +1 -0
- package/dist/agents/middlewareAgent/middleware.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs +2 -2
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.js +2 -2
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AgentNode.cjs +172 -78
- package/dist/agents/middlewareAgent/nodes/AgentNode.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AgentNode.js +173 -79
- package/dist/agents/middlewareAgent/nodes/AgentNode.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs +2 -2
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js +2 -2
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/middleware.cjs +11 -10
- package/dist/agents/middlewareAgent/nodes/middleware.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/middleware.js +12 -11
- package/dist/agents/middlewareAgent/nodes/middleware.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/utils.cjs +8 -30
- package/dist/agents/middlewareAgent/nodes/utils.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/utils.js +9 -30
- package/dist/agents/middlewareAgent/nodes/utils.js.map +1 -1
- package/dist/agents/middlewareAgent/types.d.cts +56 -51
- package/dist/agents/middlewareAgent/types.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/types.d.ts +56 -51
- package/dist/agents/middlewareAgent/types.d.ts.map +1 -1
- package/dist/agents/nodes/ToolNode.d.cts +1 -1
- package/dist/agents/tests/utils.cjs +77 -0
- package/dist/agents/tests/utils.cjs.map +1 -0
- package/dist/agents/tests/utils.d.cts +53 -0
- package/dist/agents/tests/utils.d.cts.map +1 -0
- package/dist/agents/tests/utils.d.ts +53 -0
- package/dist/agents/tests/utils.d.ts.map +1 -0
- package/dist/agents/tests/utils.js +76 -0
- package/dist/agents/tests/utils.js.map +1 -0
- package/dist/agents/types.cjs +7 -0
- package/dist/agents/types.cjs.map +1 -0
- package/dist/agents/types.d.cts +38 -4
- package/dist/agents/types.d.cts.map +1 -1
- package/dist/agents/types.d.ts +38 -4
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/types.js +6 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/chat_models/universal.cjs +7 -0
- package/dist/chat_models/universal.cjs.map +1 -1
- package/dist/chat_models/universal.d.cts +7 -2
- package/dist/chat_models/universal.d.cts.map +1 -1
- package/dist/chat_models/universal.d.ts +7 -2
- package/dist/chat_models/universal.d.ts.map +1 -1
- package/dist/chat_models/universal.js +7 -0
- package/dist/chat_models/universal.js.map +1 -1
- package/dist/hub/base.cjs +4 -1
- package/dist/hub/base.cjs.map +1 -1
- package/dist/hub/base.js +4 -1
- package/dist/hub/base.js.map +1 -1
- package/dist/index.cjs +64 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -9
- package/dist/index.d.ts +18 -9
- package/dist/index.js +37 -5
- package/dist/index.js.map +1 -1
- package/dist/load/import_constants.cjs +0 -19
- package/dist/load/import_constants.cjs.map +1 -1
- package/dist/load/import_constants.js +0 -19
- package/dist/load/import_constants.js.map +1 -1
- package/dist/load/import_map.cjs +2 -113
- package/dist/load/import_map.cjs.map +1 -1
- package/dist/load/import_map.js +3 -114
- package/dist/load/import_map.js.map +1 -1
- package/dist/load/serializable.d.cts +1 -10
- package/dist/load/serializable.d.ts +1 -10
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.cjs +5 -4
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.cjs.map +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.js +3 -2
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.js.map +1 -1
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.cjs +83 -0
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js +79 -0
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.cjs +16 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js +13 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.cjs +77 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.cjs.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js +74 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.cjs +115 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.cjs.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js +112 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js.map +1 -0
- package/dist/storage/encoder_backed.cjs +1 -1
- package/dist/storage/encoder_backed.d.cts +1 -1
- package/dist/storage/encoder_backed.d.ts +1 -1
- package/dist/storage/encoder_backed.js +1 -1
- package/dist/storage/file_system.cjs +1 -1
- package/dist/storage/file_system.js +1 -1
- package/package.json +36 -649
- package/dist/agents/middlewareAgent/middleware/bigTool.cjs +0 -162
- package/dist/agents/middlewareAgent/middleware/bigTool.cjs.map +0 -1
- package/dist/agents/middlewareAgent/middleware/bigTool.d.cts +0 -113
- package/dist/agents/middlewareAgent/middleware/bigTool.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/bigTool.d.ts +0 -113
- package/dist/agents/middlewareAgent/middleware/bigTool.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/bigTool.js +0 -161
- package/dist/agents/middlewareAgent/middleware/bigTool.js.map +0 -1
- package/dist/chains/analyze_documents_chain.cjs +0 -83
- package/dist/chains/analyze_documents_chain.cjs.map +0 -1
- package/dist/chains/analyze_documents_chain.d.cts +0 -58
- package/dist/chains/analyze_documents_chain.d.cts.map +0 -1
- package/dist/chains/analyze_documents_chain.d.ts +0 -58
- package/dist/chains/analyze_documents_chain.d.ts.map +0 -1
- package/dist/chains/analyze_documents_chain.js +0 -82
- package/dist/chains/analyze_documents_chain.js.map +0 -1
- package/dist/chains/api/api_chain.cjs +0 -100
- package/dist/chains/api/api_chain.cjs.map +0 -1
- package/dist/chains/api/api_chain.d.cts +0 -63
- package/dist/chains/api/api_chain.d.cts.map +0 -1
- package/dist/chains/api/api_chain.d.ts +0 -63
- package/dist/chains/api/api_chain.d.ts.map +0 -1
- package/dist/chains/api/api_chain.js +0 -100
- package/dist/chains/api/api_chain.js.map +0 -1
- package/dist/chains/api/prompts.cjs +0 -38
- package/dist/chains/api/prompts.cjs.map +0 -1
- package/dist/chains/api/prompts.js +0 -36
- package/dist/chains/api/prompts.js.map +0 -1
- package/dist/chains/base.cjs +0 -180
- package/dist/chains/base.cjs.map +0 -1
- package/dist/chains/base.d.cts +0 -88
- package/dist/chains/base.d.cts.map +0 -1
- package/dist/chains/base.d.ts +0 -88
- package/dist/chains/base.d.ts.map +0 -1
- package/dist/chains/base.js +0 -179
- package/dist/chains/base.js.map +0 -1
- package/dist/chains/chat_vector_db_chain.cjs +0 -130
- package/dist/chains/chat_vector_db_chain.cjs.map +0 -1
- package/dist/chains/chat_vector_db_chain.d.cts +0 -62
- package/dist/chains/chat_vector_db_chain.d.cts.map +0 -1
- package/dist/chains/chat_vector_db_chain.d.ts +0 -62
- package/dist/chains/chat_vector_db_chain.d.ts.map +0 -1
- package/dist/chains/chat_vector_db_chain.js +0 -129
- package/dist/chains/chat_vector_db_chain.js.map +0 -1
- package/dist/chains/combine_docs_chain.cjs +0 -275
- package/dist/chains/combine_docs_chain.cjs.map +0 -1
- package/dist/chains/combine_docs_chain.d.cts +0 -126
- package/dist/chains/combine_docs_chain.d.cts.map +0 -1
- package/dist/chains/combine_docs_chain.d.ts +0 -126
- package/dist/chains/combine_docs_chain.d.ts.map +0 -1
- package/dist/chains/combine_docs_chain.js +0 -272
- package/dist/chains/combine_docs_chain.js.map +0 -1
- package/dist/chains/combine_documents/base.cjs +0 -22
- package/dist/chains/combine_documents/base.cjs.map +0 -1
- package/dist/chains/combine_documents/base.js +0 -18
- package/dist/chains/combine_documents/base.js.map +0 -1
- package/dist/chains/combine_documents/index.cjs +0 -16
- package/dist/chains/combine_documents/index.cjs.map +0 -1
- package/dist/chains/combine_documents/index.d.cts +0 -2
- package/dist/chains/combine_documents/index.d.ts +0 -2
- package/dist/chains/combine_documents/index.js +0 -10
- package/dist/chains/combine_documents/index.js.map +0 -1
- package/dist/chains/combine_documents/reduce.cjs +0 -73
- package/dist/chains/combine_documents/reduce.cjs.map +0 -1
- package/dist/chains/combine_documents/reduce.d.cts +0 -36
- package/dist/chains/combine_documents/reduce.d.cts.map +0 -1
- package/dist/chains/combine_documents/reduce.d.ts +0 -36
- package/dist/chains/combine_documents/reduce.d.ts.map +0 -1
- package/dist/chains/combine_documents/reduce.js +0 -66
- package/dist/chains/combine_documents/reduce.js.map +0 -1
- package/dist/chains/combine_documents/stuff.cjs +0 -41
- package/dist/chains/combine_documents/stuff.cjs.map +0 -1
- package/dist/chains/combine_documents/stuff.d.cts +0 -40
- package/dist/chains/combine_documents/stuff.d.cts.map +0 -1
- package/dist/chains/combine_documents/stuff.d.ts +0 -40
- package/dist/chains/combine_documents/stuff.d.ts.map +0 -1
- package/dist/chains/combine_documents/stuff.js +0 -40
- package/dist/chains/combine_documents/stuff.js.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.cjs +0 -131
- package/dist/chains/constitutional_ai/constitutional_chain.cjs.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.cts +0 -79
- package/dist/chains/constitutional_ai/constitutional_chain.d.cts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.ts +0 -79
- package/dist/chains/constitutional_ai/constitutional_chain.d.ts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.js +0 -131
- package/dist/chains/constitutional_ai/constitutional_chain.js.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.cjs +0 -322
- package/dist/chains/constitutional_ai/constitutional_principle.cjs.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.cts +0 -50
- package/dist/chains/constitutional_ai/constitutional_principle.d.cts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.ts +0 -50
- package/dist/chains/constitutional_ai/constitutional_principle.d.ts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.js +0 -320
- package/dist/chains/constitutional_ai/constitutional_principle.js.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_prompts.cjs +0 -96
- package/dist/chains/constitutional_ai/constitutional_prompts.cjs.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_prompts.js +0 -94
- package/dist/chains/constitutional_ai/constitutional_prompts.js.map +0 -1
- package/dist/chains/conversation.cjs +0 -50
- package/dist/chains/conversation.cjs.map +0 -1
- package/dist/chains/conversation.d.cts +0 -34
- package/dist/chains/conversation.d.cts.map +0 -1
- package/dist/chains/conversation.d.ts +0 -34
- package/dist/chains/conversation.d.ts.map +0 -1
- package/dist/chains/conversation.js +0 -48
- package/dist/chains/conversation.js.map +0 -1
- package/dist/chains/conversational_retrieval_chain.cjs +0 -218
- package/dist/chains/conversational_retrieval_chain.cjs.map +0 -1
- package/dist/chains/conversational_retrieval_chain.d.cts +0 -152
- package/dist/chains/conversational_retrieval_chain.d.cts.map +0 -1
- package/dist/chains/conversational_retrieval_chain.d.ts +0 -152
- package/dist/chains/conversational_retrieval_chain.d.ts.map +0 -1
- package/dist/chains/conversational_retrieval_chain.js +0 -217
- package/dist/chains/conversational_retrieval_chain.js.map +0 -1
- package/dist/chains/graph_qa/cypher.cjs +0 -133
- package/dist/chains/graph_qa/cypher.cjs.map +0 -1
- package/dist/chains/graph_qa/cypher.d.cts +0 -76
- package/dist/chains/graph_qa/cypher.d.cts.map +0 -1
- package/dist/chains/graph_qa/cypher.d.ts +0 -76
- package/dist/chains/graph_qa/cypher.d.ts.map +0 -1
- package/dist/chains/graph_qa/cypher.js +0 -126
- package/dist/chains/graph_qa/cypher.js.map +0 -1
- package/dist/chains/graph_qa/prompts.cjs +0 -46
- package/dist/chains/graph_qa/prompts.cjs.map +0 -1
- package/dist/chains/graph_qa/prompts.js +0 -44
- package/dist/chains/graph_qa/prompts.js.map +0 -1
- package/dist/chains/history_aware_retriever.cjs +0 -55
- package/dist/chains/history_aware_retriever.cjs.map +0 -1
- package/dist/chains/history_aware_retriever.d.cts +0 -64
- package/dist/chains/history_aware_retriever.d.cts.map +0 -1
- package/dist/chains/history_aware_retriever.d.ts +0 -64
- package/dist/chains/history_aware_retriever.d.ts.map +0 -1
- package/dist/chains/history_aware_retriever.js +0 -49
- package/dist/chains/history_aware_retriever.js.map +0 -1
- package/dist/chains/index.cjs +0 -106
- package/dist/chains/index.cjs.map +0 -1
- package/dist/chains/index.d.cts +0 -25
- package/dist/chains/index.d.ts +0 -25
- package/dist/chains/index.js +0 -67
- package/dist/chains/index.js.map +0 -1
- package/dist/chains/llm_chain.cjs +0 -155
- package/dist/chains/llm_chain.cjs.map +0 -1
- package/dist/chains/llm_chain.d.cts +0 -97
- package/dist/chains/llm_chain.d.cts.map +0 -1
- package/dist/chains/llm_chain.d.ts +0 -97
- package/dist/chains/llm_chain.d.ts.map +0 -1
- package/dist/chains/llm_chain.js +0 -154
- package/dist/chains/llm_chain.js.map +0 -1
- package/dist/chains/load.cjs +0 -48
- package/dist/chains/load.cjs.map +0 -1
- package/dist/chains/load.d.cts +0 -30
- package/dist/chains/load.d.cts.map +0 -1
- package/dist/chains/load.d.ts +0 -30
- package/dist/chains/load.d.ts.map +0 -1
- package/dist/chains/load.js +0 -42
- package/dist/chains/load.js.map +0 -1
- package/dist/chains/openai_functions/base.cjs +0 -139
- package/dist/chains/openai_functions/base.cjs.map +0 -1
- package/dist/chains/openai_functions/base.d.cts +0 -172
- package/dist/chains/openai_functions/base.d.cts.map +0 -1
- package/dist/chains/openai_functions/base.d.ts +0 -172
- package/dist/chains/openai_functions/base.d.ts.map +0 -1
- package/dist/chains/openai_functions/base.js +0 -137
- package/dist/chains/openai_functions/base.js.map +0 -1
- package/dist/chains/openai_functions/extraction.cjs +0 -71
- package/dist/chains/openai_functions/extraction.cjs.map +0 -1
- package/dist/chains/openai_functions/extraction.d.cts +0 -29
- package/dist/chains/openai_functions/extraction.d.cts.map +0 -1
- package/dist/chains/openai_functions/extraction.d.ts +0 -29
- package/dist/chains/openai_functions/extraction.d.ts.map +0 -1
- package/dist/chains/openai_functions/extraction.js +0 -69
- package/dist/chains/openai_functions/extraction.js.map +0 -1
- package/dist/chains/openai_functions/index.cjs +0 -33
- package/dist/chains/openai_functions/index.cjs.map +0 -1
- package/dist/chains/openai_functions/index.d.cts +0 -5
- package/dist/chains/openai_functions/index.d.ts +0 -5
- package/dist/chains/openai_functions/index.js +0 -21
- package/dist/chains/openai_functions/index.js.map +0 -1
- package/dist/chains/openai_functions/openapi.cjs +0 -287
- package/dist/chains/openai_functions/openapi.cjs.map +0 -1
- package/dist/chains/openai_functions/openapi.d.cts +0 -61
- package/dist/chains/openai_functions/openapi.d.cts.map +0 -1
- package/dist/chains/openai_functions/openapi.d.ts +0 -61
- package/dist/chains/openai_functions/openapi.d.ts.map +0 -1
- package/dist/chains/openai_functions/openapi.js +0 -285
- package/dist/chains/openai_functions/openapi.js.map +0 -1
- package/dist/chains/openai_functions/tagging.cjs +0 -72
- package/dist/chains/openai_functions/tagging.cjs.map +0 -1
- package/dist/chains/openai_functions/tagging.d.cts +0 -47
- package/dist/chains/openai_functions/tagging.d.cts.map +0 -1
- package/dist/chains/openai_functions/tagging.d.ts +0 -47
- package/dist/chains/openai_functions/tagging.d.ts.map +0 -1
- package/dist/chains/openai_functions/tagging.js +0 -70
- package/dist/chains/openai_functions/tagging.js.map +0 -1
- package/dist/chains/query_constructor/index.cjs +0 -145
- package/dist/chains/query_constructor/index.cjs.map +0 -1
- package/dist/chains/query_constructor/index.d.cts +0 -82
- package/dist/chains/query_constructor/index.d.cts.map +0 -1
- package/dist/chains/query_constructor/index.d.ts +0 -82
- package/dist/chains/query_constructor/index.d.ts.map +0 -1
- package/dist/chains/query_constructor/index.js +0 -130
- package/dist/chains/query_constructor/index.js.map +0 -1
- package/dist/chains/query_constructor/ir.cjs +0 -22
- package/dist/chains/query_constructor/ir.cjs.map +0 -1
- package/dist/chains/query_constructor/ir.d.cts +0 -1
- package/dist/chains/query_constructor/ir.d.ts +0 -1
- package/dist/chains/query_constructor/ir.js +0 -12
- package/dist/chains/query_constructor/ir.js.map +0 -1
- package/dist/chains/query_constructor/parser.cjs +0 -80
- package/dist/chains/query_constructor/parser.cjs.map +0 -1
- package/dist/chains/query_constructor/parser.d.cts +0 -43
- package/dist/chains/query_constructor/parser.d.cts.map +0 -1
- package/dist/chains/query_constructor/parser.d.ts +0 -43
- package/dist/chains/query_constructor/parser.d.ts.map +0 -1
- package/dist/chains/query_constructor/parser.js +0 -79
- package/dist/chains/query_constructor/parser.js.map +0 -1
- package/dist/chains/query_constructor/prompt.cjs +0 -137
- package/dist/chains/query_constructor/prompt.cjs.map +0 -1
- package/dist/chains/query_constructor/prompt.d.cts +0 -22
- package/dist/chains/query_constructor/prompt.d.cts.map +0 -1
- package/dist/chains/query_constructor/prompt.d.ts +0 -22
- package/dist/chains/query_constructor/prompt.d.ts.map +0 -1
- package/dist/chains/query_constructor/prompt.js +0 -132
- package/dist/chains/query_constructor/prompt.js.map +0 -1
- package/dist/chains/question_answering/load.cjs +0 -99
- package/dist/chains/question_answering/load.cjs.map +0 -1
- package/dist/chains/question_answering/load.d.cts +0 -72
- package/dist/chains/question_answering/load.d.cts.map +0 -1
- package/dist/chains/question_answering/load.d.ts +0 -72
- package/dist/chains/question_answering/load.d.ts.map +0 -1
- package/dist/chains/question_answering/load.js +0 -96
- package/dist/chains/question_answering/load.js.map +0 -1
- package/dist/chains/question_answering/map_reduce_prompts.cjs +0 -61
- package/dist/chains/question_answering/map_reduce_prompts.cjs.map +0 -1
- package/dist/chains/question_answering/map_reduce_prompts.js +0 -59
- package/dist/chains/question_answering/map_reduce_prompts.js.map +0 -1
- package/dist/chains/question_answering/refine_prompts.cjs +0 -60
- package/dist/chains/question_answering/refine_prompts.cjs.map +0 -1
- package/dist/chains/question_answering/refine_prompts.js +0 -58
- package/dist/chains/question_answering/refine_prompts.js.map +0 -1
- package/dist/chains/question_answering/stuff_prompts.cjs +0 -20
- package/dist/chains/question_answering/stuff_prompts.cjs.map +0 -1
- package/dist/chains/question_answering/stuff_prompts.js +0 -19
- package/dist/chains/question_answering/stuff_prompts.js.map +0 -1
- package/dist/chains/retrieval.cjs +0 -55
- package/dist/chains/retrieval.cjs.map +0 -1
- package/dist/chains/retrieval.d.cts +0 -77
- package/dist/chains/retrieval.d.cts.map +0 -1
- package/dist/chains/retrieval.d.ts +0 -77
- package/dist/chains/retrieval.d.ts.map +0 -1
- package/dist/chains/retrieval.js +0 -49
- package/dist/chains/retrieval.js.map +0 -1
- package/dist/chains/retrieval_qa.cjs +0 -106
- package/dist/chains/retrieval_qa.cjs.map +0 -1
- package/dist/chains/retrieval_qa.d.cts +0 -81
- package/dist/chains/retrieval_qa.d.cts.map +0 -1
- package/dist/chains/retrieval_qa.d.ts +0 -81
- package/dist/chains/retrieval_qa.d.ts.map +0 -1
- package/dist/chains/retrieval_qa.js +0 -106
- package/dist/chains/retrieval_qa.js.map +0 -1
- package/dist/chains/router/llm_router.cjs +0 -50
- package/dist/chains/router/llm_router.cjs.map +0 -1
- package/dist/chains/router/llm_router.d.cts +0 -54
- package/dist/chains/router/llm_router.d.cts.map +0 -1
- package/dist/chains/router/llm_router.d.ts +0 -54
- package/dist/chains/router/llm_router.d.ts.map +0 -1
- package/dist/chains/router/llm_router.js +0 -50
- package/dist/chains/router/llm_router.js.map +0 -1
- package/dist/chains/router/multi_prompt.cjs +0 -116
- package/dist/chains/router/multi_prompt.cjs.map +0 -1
- package/dist/chains/router/multi_prompt.d.cts +0 -76
- package/dist/chains/router/multi_prompt.d.cts.map +0 -1
- package/dist/chains/router/multi_prompt.d.ts +0 -76
- package/dist/chains/router/multi_prompt.d.ts.map +0 -1
- package/dist/chains/router/multi_prompt.js +0 -115
- package/dist/chains/router/multi_prompt.js.map +0 -1
- package/dist/chains/router/multi_prompt_prompt.cjs +0 -22
- package/dist/chains/router/multi_prompt_prompt.cjs.map +0 -1
- package/dist/chains/router/multi_prompt_prompt.js +0 -21
- package/dist/chains/router/multi_prompt_prompt.js.map +0 -1
- package/dist/chains/router/multi_retrieval_prompt.cjs +0 -22
- package/dist/chains/router/multi_retrieval_prompt.cjs.map +0 -1
- package/dist/chains/router/multi_retrieval_prompt.js +0 -21
- package/dist/chains/router/multi_retrieval_prompt.js.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.cjs +0 -137
- package/dist/chains/router/multi_retrieval_qa.cjs.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.d.cts +0 -100
- package/dist/chains/router/multi_retrieval_qa.d.cts.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.d.ts +0 -100
- package/dist/chains/router/multi_retrieval_qa.d.ts.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.js +0 -136
- package/dist/chains/router/multi_retrieval_qa.js.map +0 -1
- package/dist/chains/router/multi_route.cjs +0 -69
- package/dist/chains/router/multi_route.cjs.map +0 -1
- package/dist/chains/router/multi_route.d.cts +0 -69
- package/dist/chains/router/multi_route.d.cts.map +0 -1
- package/dist/chains/router/multi_route.d.ts +0 -69
- package/dist/chains/router/multi_route.d.ts.map +0 -1
- package/dist/chains/router/multi_route.js +0 -68
- package/dist/chains/router/multi_route.js.map +0 -1
- package/dist/chains/router/utils.cjs +0 -18
- package/dist/chains/router/utils.cjs.map +0 -1
- package/dist/chains/router/utils.js +0 -17
- package/dist/chains/router/utils.js.map +0 -1
- package/dist/chains/sequential_chain.cjs +0 -255
- package/dist/chains/sequential_chain.cjs.map +0 -1
- package/dist/chains/sequential_chain.d.cts +0 -158
- package/dist/chains/sequential_chain.d.cts.map +0 -1
- package/dist/chains/sequential_chain.d.ts +0 -158
- package/dist/chains/sequential_chain.d.ts.map +0 -1
- package/dist/chains/sequential_chain.js +0 -254
- package/dist/chains/sequential_chain.js.map +0 -1
- package/dist/chains/serde.d.cts +0 -156
- package/dist/chains/serde.d.cts.map +0 -1
- package/dist/chains/serde.d.ts +0 -156
- package/dist/chains/serde.d.ts.map +0 -1
- package/dist/chains/sql_db/index.cjs +0 -35
- package/dist/chains/sql_db/index.cjs.map +0 -1
- package/dist/chains/sql_db/index.d.cts +0 -3
- package/dist/chains/sql_db/index.d.ts +0 -3
- package/dist/chains/sql_db/index.js +0 -21
- package/dist/chains/sql_db/index.js.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.cjs +0 -196
- package/dist/chains/sql_db/sql_db_chain.cjs.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.d.cts +0 -124
- package/dist/chains/sql_db/sql_db_chain.d.cts.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.d.ts +0 -124
- package/dist/chains/sql_db/sql_db_chain.d.ts.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.js +0 -194
- package/dist/chains/sql_db/sql_db_chain.js.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.cjs +0 -194
- package/dist/chains/sql_db/sql_db_prompt.cjs.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.d.cts +0 -44
- package/dist/chains/sql_db/sql_db_prompt.d.cts.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.d.ts +0 -44
- package/dist/chains/sql_db/sql_db_prompt.d.ts.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.js +0 -186
- package/dist/chains/sql_db/sql_db_prompt.js.map +0 -1
- package/dist/chains/summarization/load.cjs +0 -74
- package/dist/chains/summarization/load.cjs.map +0 -1
- package/dist/chains/summarization/load.d.cts +0 -33
- package/dist/chains/summarization/load.d.cts.map +0 -1
- package/dist/chains/summarization/load.d.ts +0 -33
- package/dist/chains/summarization/load.d.ts.map +0 -1
- package/dist/chains/summarization/load.js +0 -74
- package/dist/chains/summarization/load.js.map +0 -1
- package/dist/chains/summarization/refine_prompts.cjs +0 -24
- package/dist/chains/summarization/refine_prompts.cjs.map +0 -1
- package/dist/chains/summarization/refine_prompts.js +0 -23
- package/dist/chains/summarization/refine_prompts.js.map +0 -1
- package/dist/chains/summarization/stuff_prompts.cjs +0 -19
- package/dist/chains/summarization/stuff_prompts.cjs.map +0 -1
- package/dist/chains/summarization/stuff_prompts.js +0 -18
- package/dist/chains/summarization/stuff_prompts.js.map +0 -1
- package/dist/chains/transform.cjs +0 -43
- package/dist/chains/transform.cjs.map +0 -1
- package/dist/chains/transform.d.cts +0 -44
- package/dist/chains/transform.d.cts.map +0 -1
- package/dist/chains/transform.d.ts +0 -44
- package/dist/chains/transform.d.ts.map +0 -1
- package/dist/chains/transform.js +0 -43
- package/dist/chains/transform.js.map +0 -1
- package/dist/chains/vector_db_qa.cjs +0 -95
- package/dist/chains/vector_db_qa.cjs.map +0 -1
- package/dist/chains/vector_db_qa.d.cts +0 -66
- package/dist/chains/vector_db_qa.d.cts.map +0 -1
- package/dist/chains/vector_db_qa.d.ts +0 -66
- package/dist/chains/vector_db_qa.d.ts.map +0 -1
- package/dist/chains/vector_db_qa.js +0 -95
- package/dist/chains/vector_db_qa.js.map +0 -1
- package/dist/document.cjs +0 -21
- package/dist/document.cjs.map +0 -1
- package/dist/document.d.cts +0 -2
- package/dist/document.d.ts +0 -2
- package/dist/document.js +0 -10
- package/dist/document.js.map +0 -1
- package/dist/document_loaders/base.cjs +0 -22
- package/dist/document_loaders/base.cjs.map +0 -1
- package/dist/document_loaders/base.d.cts +0 -1
- package/dist/document_loaders/base.d.ts +0 -1
- package/dist/document_loaders/base.js +0 -12
- package/dist/document_loaders/base.js.map +0 -1
- package/dist/document_loaders/fs/buffer.cjs +0 -69
- package/dist/document_loaders/fs/buffer.cjs.map +0 -1
- package/dist/document_loaders/fs/buffer.d.cts +0 -46
- package/dist/document_loaders/fs/buffer.d.cts.map +0 -1
- package/dist/document_loaders/fs/buffer.d.ts +0 -46
- package/dist/document_loaders/fs/buffer.d.ts.map +0 -1
- package/dist/document_loaders/fs/buffer.js +0 -63
- package/dist/document_loaders/fs/buffer.js.map +0 -1
- package/dist/document_loaders/fs/directory.cjs +0 -116
- package/dist/document_loaders/fs/directory.cjs.map +0 -1
- package/dist/document_loaders/fs/directory.d.cts +0 -76
- package/dist/document_loaders/fs/directory.d.cts.map +0 -1
- package/dist/document_loaders/fs/directory.d.ts +0 -76
- package/dist/document_loaders/fs/directory.d.ts.map +0 -1
- package/dist/document_loaders/fs/directory.js +0 -109
- package/dist/document_loaders/fs/directory.js.map +0 -1
- package/dist/document_loaders/fs/json.cjs +0 -128
- package/dist/document_loaders/fs/json.cjs.map +0 -1
- package/dist/document_loaders/fs/json.d.cts +0 -65
- package/dist/document_loaders/fs/json.d.cts.map +0 -1
- package/dist/document_loaders/fs/json.d.ts +0 -65
- package/dist/document_loaders/fs/json.d.ts.map +0 -1
- package/dist/document_loaders/fs/json.js +0 -121
- package/dist/document_loaders/fs/json.js.map +0 -1
- package/dist/document_loaders/fs/multi_file.cjs +0 -82
- package/dist/document_loaders/fs/multi_file.cjs.map +0 -1
- package/dist/document_loaders/fs/multi_file.d.cts +0 -43
- package/dist/document_loaders/fs/multi_file.d.cts.map +0 -1
- package/dist/document_loaders/fs/multi_file.d.ts +0 -43
- package/dist/document_loaders/fs/multi_file.d.ts.map +0 -1
- package/dist/document_loaders/fs/multi_file.js +0 -76
- package/dist/document_loaders/fs/multi_file.js.map +0 -1
- package/dist/document_loaders/fs/text.cjs +0 -101
- package/dist/document_loaders/fs/text.cjs.map +0 -1
- package/dist/document_loaders/fs/text.d.cts +0 -57
- package/dist/document_loaders/fs/text.d.cts.map +0 -1
- package/dist/document_loaders/fs/text.d.ts +0 -57
- package/dist/document_loaders/fs/text.d.ts.map +0 -1
- package/dist/document_loaders/fs/text.js +0 -95
- package/dist/document_loaders/fs/text.js.map +0 -1
- package/dist/evaluation/agents/index.cjs +0 -1
- package/dist/evaluation/agents/index.js +0 -1
- package/dist/evaluation/agents/prompt.cjs +0 -132
- package/dist/evaluation/agents/prompt.cjs.map +0 -1
- package/dist/evaluation/agents/prompt.js +0 -130
- package/dist/evaluation/agents/prompt.js.map +0 -1
- package/dist/evaluation/agents/trajectory.cjs +0 -132
- package/dist/evaluation/agents/trajectory.cjs.map +0 -1
- package/dist/evaluation/agents/trajectory.d.cts +0 -61
- package/dist/evaluation/agents/trajectory.d.cts.map +0 -1
- package/dist/evaluation/agents/trajectory.d.ts +0 -61
- package/dist/evaluation/agents/trajectory.d.ts.map +0 -1
- package/dist/evaluation/agents/trajectory.js +0 -130
- package/dist/evaluation/agents/trajectory.js.map +0 -1
- package/dist/evaluation/base.cjs +0 -169
- package/dist/evaluation/base.cjs.map +0 -1
- package/dist/evaluation/base.d.cts +0 -240
- package/dist/evaluation/base.d.cts.map +0 -1
- package/dist/evaluation/base.d.ts +0 -240
- package/dist/evaluation/base.d.ts.map +0 -1
- package/dist/evaluation/base.js +0 -164
- package/dist/evaluation/base.js.map +0 -1
- package/dist/evaluation/comparison/index.cjs +0 -1
- package/dist/evaluation/comparison/index.js +0 -1
- package/dist/evaluation/comparison/pairwise.cjs +0 -178
- package/dist/evaluation/comparison/pairwise.cjs.map +0 -1
- package/dist/evaluation/comparison/pairwise.d.cts +0 -56
- package/dist/evaluation/comparison/pairwise.d.cts.map +0 -1
- package/dist/evaluation/comparison/pairwise.d.ts +0 -56
- package/dist/evaluation/comparison/pairwise.d.ts.map +0 -1
- package/dist/evaluation/comparison/pairwise.js +0 -175
- package/dist/evaluation/comparison/pairwise.js.map +0 -1
- package/dist/evaluation/comparison/prompt.cjs +0 -77
- package/dist/evaluation/comparison/prompt.cjs.map +0 -1
- package/dist/evaluation/comparison/prompt.js +0 -75
- package/dist/evaluation/comparison/prompt.js.map +0 -1
- package/dist/evaluation/criteria/criteria.cjs +0 -164
- package/dist/evaluation/criteria/criteria.cjs.map +0 -1
- package/dist/evaluation/criteria/criteria.d.cts +0 -85
- package/dist/evaluation/criteria/criteria.d.cts.map +0 -1
- package/dist/evaluation/criteria/criteria.d.ts +0 -85
- package/dist/evaluation/criteria/criteria.d.ts.map +0 -1
- package/dist/evaluation/criteria/criteria.js +0 -161
- package/dist/evaluation/criteria/criteria.js.map +0 -1
- package/dist/evaluation/criteria/index.cjs +0 -1
- package/dist/evaluation/criteria/index.js +0 -1
- package/dist/evaluation/criteria/prompt.cjs +0 -50
- package/dist/evaluation/criteria/prompt.cjs.map +0 -1
- package/dist/evaluation/criteria/prompt.js +0 -48
- package/dist/evaluation/criteria/prompt.js.map +0 -1
- package/dist/evaluation/embedding_distance/base.cjs +0 -108
- package/dist/evaluation/embedding_distance/base.cjs.map +0 -1
- package/dist/evaluation/embedding_distance/base.d.cts +0 -82
- package/dist/evaluation/embedding_distance/base.d.cts.map +0 -1
- package/dist/evaluation/embedding_distance/base.d.ts +0 -82
- package/dist/evaluation/embedding_distance/base.d.ts.map +0 -1
- package/dist/evaluation/embedding_distance/base.js +0 -105
- package/dist/evaluation/embedding_distance/base.js.map +0 -1
- package/dist/evaluation/embedding_distance/index.cjs +0 -1
- package/dist/evaluation/embedding_distance/index.js +0 -1
- package/dist/evaluation/index.cjs +0 -54
- package/dist/evaluation/index.cjs.map +0 -1
- package/dist/evaluation/index.d.cts +0 -8
- package/dist/evaluation/index.d.ts +0 -8
- package/dist/evaluation/index.js +0 -35
- package/dist/evaluation/index.js.map +0 -1
- package/dist/evaluation/loader.cjs +0 -57
- package/dist/evaluation/loader.cjs.map +0 -1
- package/dist/evaluation/loader.d.cts +0 -38
- package/dist/evaluation/loader.d.cts.map +0 -1
- package/dist/evaluation/loader.d.ts +0 -38
- package/dist/evaluation/loader.d.ts.map +0 -1
- package/dist/evaluation/loader.js +0 -56
- package/dist/evaluation/loader.js.map +0 -1
- package/dist/evaluation/qa/eval_chain.cjs +0 -41
- package/dist/evaluation/qa/eval_chain.cjs.map +0 -1
- package/dist/evaluation/qa/eval_chain.d.cts +0 -22
- package/dist/evaluation/qa/eval_chain.d.cts.map +0 -1
- package/dist/evaluation/qa/eval_chain.d.ts +0 -22
- package/dist/evaluation/qa/eval_chain.d.ts.map +0 -1
- package/dist/evaluation/qa/eval_chain.js +0 -41
- package/dist/evaluation/qa/eval_chain.js.map +0 -1
- package/dist/evaluation/qa/index.cjs +0 -1
- package/dist/evaluation/qa/index.js +0 -1
- package/dist/evaluation/qa/prompt.cjs +0 -31
- package/dist/evaluation/qa/prompt.cjs.map +0 -1
- package/dist/evaluation/qa/prompt.js +0 -30
- package/dist/evaluation/qa/prompt.js.map +0 -1
- package/dist/evaluation/types.d.cts +0 -40
- package/dist/evaluation/types.d.cts.map +0 -1
- package/dist/evaluation/types.d.ts +0 -40
- package/dist/evaluation/types.d.ts.map +0 -1
- package/dist/langchain-core/dist/load/map_keys.d.cts +0 -10
- package/dist/langchain-core/dist/load/map_keys.d.cts.map +0 -1
- package/dist/langchain-core/dist/load/serializable.d.cts +0 -82
- package/dist/langchain-core/dist/load/serializable.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/base.d.cts +0 -125
- package/dist/langchain-core/dist/messages/base.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/base.d.cts +0 -22
- package/dist/langchain-core/dist/messages/content/base.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/data.d.cts +0 -96
- package/dist/langchain-core/dist/messages/content/data.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/index.d.cts +0 -121
- package/dist/langchain-core/dist/messages/content/index.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/multimodal.d.cts +0 -110
- package/dist/langchain-core/dist/messages/content/multimodal.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/tools.d.cts +0 -214
- package/dist/langchain-core/dist/messages/content/tools.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/message.d.cts +0 -598
- package/dist/langchain-core/dist/messages/message.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/metadata.d.cts +0 -97
- package/dist/langchain-core/dist/messages/metadata.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/utils.d.cts +0 -75
- package/dist/langchain-core/dist/messages/utils.d.cts.map +0 -1
- package/dist/langchain-core/dist/prompt_values.d.cts +0 -13
- package/dist/langchain-core/dist/prompt_values.d.cts.map +0 -1
- package/dist/langchain-core/dist/utils/types/index.d.cts +0 -8
- package/dist/langchain-core/dist/utils/types/index.d.cts.map +0 -1
- package/dist/libs/langchain-core/dist/load/map_keys.d.ts +0 -10
- package/dist/libs/langchain-core/dist/load/map_keys.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/load/serializable.d.ts +0 -82
- package/dist/libs/langchain-core/dist/load/serializable.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/base.d.ts +0 -125
- package/dist/libs/langchain-core/dist/messages/base.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/base.d.ts +0 -22
- package/dist/libs/langchain-core/dist/messages/content/base.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/data.d.ts +0 -96
- package/dist/libs/langchain-core/dist/messages/content/data.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/index.d.ts +0 -121
- package/dist/libs/langchain-core/dist/messages/content/index.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/multimodal.d.ts +0 -110
- package/dist/libs/langchain-core/dist/messages/content/multimodal.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/tools.d.ts +0 -214
- package/dist/libs/langchain-core/dist/messages/content/tools.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/message.d.ts +0 -598
- package/dist/libs/langchain-core/dist/messages/message.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/metadata.d.ts +0 -97
- package/dist/libs/langchain-core/dist/messages/metadata.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/utils.d.ts +0 -75
- package/dist/libs/langchain-core/dist/messages/utils.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/prompt_values.d.ts +0 -13
- package/dist/libs/langchain-core/dist/prompt_values.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/utils/types/index.d.ts +0 -10
- package/dist/libs/langchain-core/dist/utils/types/index.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/utils/types/zod.d.ts +0 -1
- package/dist/load/map_keys.d.cts +0 -8
- package/dist/load/map_keys.d.cts.map +0 -1
- package/dist/load/map_keys.d.ts +0 -8
- package/dist/load/map_keys.d.ts.map +0 -1
- package/dist/load/serializable.d.cts.map +0 -1
- package/dist/load/serializable.d.ts.map +0 -1
- package/dist/memory/buffer_memory.cjs +0 -80
- package/dist/memory/buffer_memory.cjs.map +0 -1
- package/dist/memory/buffer_memory.d.cts +0 -67
- package/dist/memory/buffer_memory.d.cts.map +0 -1
- package/dist/memory/buffer_memory.d.ts +0 -67
- package/dist/memory/buffer_memory.d.ts.map +0 -1
- package/dist/memory/buffer_memory.js +0 -79
- package/dist/memory/buffer_memory.js.map +0 -1
- package/dist/memory/buffer_token_memory.cjs +0 -80
- package/dist/memory/buffer_token_memory.cjs.map +0 -1
- package/dist/memory/buffer_token_memory.d.cts +0 -67
- package/dist/memory/buffer_token_memory.d.cts.map +0 -1
- package/dist/memory/buffer_token_memory.d.ts +0 -67
- package/dist/memory/buffer_token_memory.d.ts.map +0 -1
- package/dist/memory/buffer_token_memory.js +0 -79
- package/dist/memory/buffer_token_memory.js.map +0 -1
- package/dist/memory/buffer_window_memory.cjs +0 -77
- package/dist/memory/buffer_window_memory.cjs.map +0 -1
- package/dist/memory/buffer_window_memory.d.cts +0 -64
- package/dist/memory/buffer_window_memory.d.cts.map +0 -1
- package/dist/memory/buffer_window_memory.d.ts +0 -64
- package/dist/memory/buffer_window_memory.d.ts.map +0 -1
- package/dist/memory/buffer_window_memory.js +0 -76
- package/dist/memory/buffer_window_memory.js.map +0 -1
- package/dist/memory/chat_memory.cjs +0 -53
- package/dist/memory/chat_memory.cjs.map +0 -1
- package/dist/memory/chat_memory.d.cts +0 -42
- package/dist/memory/chat_memory.d.cts.map +0 -1
- package/dist/memory/chat_memory.d.ts +0 -42
- package/dist/memory/chat_memory.d.ts.map +0 -1
- package/dist/memory/chat_memory.js +0 -47
- package/dist/memory/chat_memory.js.map +0 -1
- package/dist/memory/combined_memory.cjs +0 -88
- package/dist/memory/combined_memory.cjs.map +0 -1
- package/dist/memory/combined_memory.d.cts +0 -60
- package/dist/memory/combined_memory.d.cts.map +0 -1
- package/dist/memory/combined_memory.d.ts +0 -60
- package/dist/memory/combined_memory.d.ts.map +0 -1
- package/dist/memory/combined_memory.js +0 -88
- package/dist/memory/combined_memory.js.map +0 -1
- package/dist/memory/entity_memory.cjs +0 -144
- package/dist/memory/entity_memory.cjs.map +0 -1
- package/dist/memory/entity_memory.d.cts +0 -99
- package/dist/memory/entity_memory.d.cts.map +0 -1
- package/dist/memory/entity_memory.d.ts +0 -99
- package/dist/memory/entity_memory.d.ts.map +0 -1
- package/dist/memory/entity_memory.js +0 -143
- package/dist/memory/entity_memory.js.map +0 -1
- package/dist/memory/index.cjs +0 -85
- package/dist/memory/index.cjs.map +0 -1
- package/dist/memory/index.d.cts +0 -14
- package/dist/memory/index.d.ts +0 -14
- package/dist/memory/index.js +0 -39
- package/dist/memory/index.js.map +0 -1
- package/dist/memory/prompt.cjs +0 -124
- package/dist/memory/prompt.cjs.map +0 -1
- package/dist/memory/prompt.d.cts +0 -12
- package/dist/memory/prompt.d.cts.map +0 -1
- package/dist/memory/prompt.d.ts +0 -12
- package/dist/memory/prompt.d.ts.map +0 -1
- package/dist/memory/prompt.js +0 -120
- package/dist/memory/prompt.js.map +0 -1
- package/dist/memory/stores/entity/base.cjs +0 -13
- package/dist/memory/stores/entity/base.cjs.map +0 -1
- package/dist/memory/stores/entity/base.d.cts +0 -18
- package/dist/memory/stores/entity/base.d.cts.map +0 -1
- package/dist/memory/stores/entity/base.d.ts +0 -18
- package/dist/memory/stores/entity/base.d.ts.map +0 -1
- package/dist/memory/stores/entity/base.js +0 -12
- package/dist/memory/stores/entity/base.js.map +0 -1
- package/dist/memory/stores/entity/in_memory.cjs +0 -64
- package/dist/memory/stores/entity/in_memory.cjs.map +0 -1
- package/dist/memory/stores/entity/in_memory.js +0 -64
- package/dist/memory/stores/entity/in_memory.js.map +0 -1
- package/dist/memory/summary.cjs +0 -127
- package/dist/memory/summary.cjs.map +0 -1
- package/dist/memory/summary.d.cts +0 -101
- package/dist/memory/summary.d.cts.map +0 -1
- package/dist/memory/summary.d.ts +0 -101
- package/dist/memory/summary.d.ts.map +0 -1
- package/dist/memory/summary.js +0 -125
- package/dist/memory/summary.js.map +0 -1
- package/dist/memory/summary_buffer.cjs +0 -117
- package/dist/memory/summary_buffer.cjs.map +0 -1
- package/dist/memory/summary_buffer.d.cts +0 -90
- package/dist/memory/summary_buffer.d.cts.map +0 -1
- package/dist/memory/summary_buffer.d.ts +0 -90
- package/dist/memory/summary_buffer.d.ts.map +0 -1
- package/dist/memory/summary_buffer.js +0 -116
- package/dist/memory/summary_buffer.js.map +0 -1
- package/dist/memory/vector_store.cjs +0 -87
- package/dist/memory/vector_store.cjs.map +0 -1
- package/dist/memory/vector_store.d.cts +0 -81
- package/dist/memory/vector_store.d.cts.map +0 -1
- package/dist/memory/vector_store.d.ts +0 -81
- package/dist/memory/vector_store.d.ts.map +0 -1
- package/dist/memory/vector_store.js +0 -86
- package/dist/memory/vector_store.js.map +0 -1
- package/dist/output_parsers/combining.cjs +0 -61
- package/dist/output_parsers/combining.cjs.map +0 -1
- package/dist/output_parsers/combining.d.cts +0 -46
- package/dist/output_parsers/combining.d.cts.map +0 -1
- package/dist/output_parsers/combining.d.ts +0 -46
- package/dist/output_parsers/combining.d.ts.map +0 -1
- package/dist/output_parsers/combining.js +0 -60
- package/dist/output_parsers/combining.js.map +0 -1
- package/dist/output_parsers/datetime.cjs +0 -46
- package/dist/output_parsers/datetime.cjs.map +0 -1
- package/dist/output_parsers/datetime.d.cts +0 -33
- package/dist/output_parsers/datetime.d.cts.map +0 -1
- package/dist/output_parsers/datetime.d.ts +0 -33
- package/dist/output_parsers/datetime.d.ts.map +0 -1
- package/dist/output_parsers/datetime.js +0 -45
- package/dist/output_parsers/datetime.js.map +0 -1
- package/dist/output_parsers/expression.cjs +0 -86
- package/dist/output_parsers/expression.cjs.map +0 -1
- package/dist/output_parsers/expression.d.cts +0 -53
- package/dist/output_parsers/expression.d.cts.map +0 -1
- package/dist/output_parsers/expression.d.ts +0 -53
- package/dist/output_parsers/expression.d.ts.map +0 -1
- package/dist/output_parsers/expression.js +0 -79
- package/dist/output_parsers/expression.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs +0 -38
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js +0 -38
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.cjs +0 -130
- package/dist/output_parsers/expression_type_handlers/base.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.d.cts +0 -108
- package/dist/output_parsers/expression_type_handlers/base.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.d.ts +0 -108
- package/dist/output_parsers/expression_type_handlers/base.d.ts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.js +0 -129
- package/dist/output_parsers/expression_type_handlers/base.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs +0 -38
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js +0 -38
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs +0 -64
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.js +0 -64
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.cjs +0 -68
- package/dist/output_parsers/expression_type_handlers/factory.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.cts +0 -35
- package/dist/output_parsers/expression_type_handlers/factory.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.ts +0 -35
- package/dist/output_parsers/expression_type_handlers/factory.d.ts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.js +0 -68
- package/dist/output_parsers/expression_type_handlers/factory.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs +0 -299
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js +0 -298
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs +0 -40
- package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/identifier_handler.js +0 -40
- package/dist/output_parsers/expression_type_handlers/identifier_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs +0 -48
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.js +0 -48
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs +0 -36
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js +0 -36
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs +0 -40
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js +0 -40
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs +0 -45
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js +0 -45
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs +0 -37
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.js +0 -37
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/types.d.cts +0 -95
- package/dist/output_parsers/expression_type_handlers/types.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/types.d.ts +0 -95
- package/dist/output_parsers/expression_type_handlers/types.d.ts.map +0 -1
- package/dist/output_parsers/fix.cjs +0 -92
- package/dist/output_parsers/fix.cjs.map +0 -1
- package/dist/output_parsers/fix.d.cts +0 -60
- package/dist/output_parsers/fix.d.cts.map +0 -1
- package/dist/output_parsers/fix.d.ts +0 -60
- package/dist/output_parsers/fix.d.ts.map +0 -1
- package/dist/output_parsers/fix.js +0 -91
- package/dist/output_parsers/fix.js.map +0 -1
- package/dist/output_parsers/http_response.cjs +0 -53
- package/dist/output_parsers/http_response.cjs.map +0 -1
- package/dist/output_parsers/http_response.d.cts +0 -33
- package/dist/output_parsers/http_response.d.cts.map +0 -1
- package/dist/output_parsers/http_response.d.ts +0 -33
- package/dist/output_parsers/http_response.d.ts.map +0 -1
- package/dist/output_parsers/http_response.js +0 -52
- package/dist/output_parsers/http_response.js.map +0 -1
- package/dist/output_parsers/index.cjs +0 -74
- package/dist/output_parsers/index.cjs.map +0 -1
- package/dist/output_parsers/index.d.cts +0 -11
- package/dist/output_parsers/index.d.ts +0 -11
- package/dist/output_parsers/index.js +0 -37
- package/dist/output_parsers/index.js.map +0 -1
- package/dist/output_parsers/noop.cjs +0 -43
- package/dist/output_parsers/noop.cjs.map +0 -1
- package/dist/output_parsers/noop.js +0 -42
- package/dist/output_parsers/noop.js.map +0 -1
- package/dist/output_parsers/openai_functions.cjs +0 -145
- package/dist/output_parsers/openai_functions.cjs.map +0 -1
- package/dist/output_parsers/openai_functions.d.cts +0 -85
- package/dist/output_parsers/openai_functions.d.cts.map +0 -1
- package/dist/output_parsers/openai_functions.d.ts +0 -85
- package/dist/output_parsers/openai_functions.d.ts.map +0 -1
- package/dist/output_parsers/openai_functions.js +0 -142
- package/dist/output_parsers/openai_functions.js.map +0 -1
- package/dist/output_parsers/openai_tools.cjs +0 -89
- package/dist/output_parsers/openai_tools.cjs.map +0 -1
- package/dist/output_parsers/openai_tools.d.cts +0 -69
- package/dist/output_parsers/openai_tools.d.cts.map +0 -1
- package/dist/output_parsers/openai_tools.d.ts +0 -69
- package/dist/output_parsers/openai_tools.d.ts.map +0 -1
- package/dist/output_parsers/openai_tools.js +0 -87
- package/dist/output_parsers/openai_tools.js.map +0 -1
- package/dist/output_parsers/prompts.cjs +0 -25
- package/dist/output_parsers/prompts.cjs.map +0 -1
- package/dist/output_parsers/prompts.js +0 -24
- package/dist/output_parsers/prompts.js.map +0 -1
- package/dist/output_parsers/regex.cjs +0 -74
- package/dist/output_parsers/regex.cjs.map +0 -1
- package/dist/output_parsers/regex.d.cts +0 -49
- package/dist/output_parsers/regex.d.cts.map +0 -1
- package/dist/output_parsers/regex.d.ts +0 -49
- package/dist/output_parsers/regex.d.ts.map +0 -1
- package/dist/output_parsers/regex.js +0 -73
- package/dist/output_parsers/regex.js.map +0 -1
- package/dist/output_parsers/router.cjs +0 -40
- package/dist/output_parsers/router.cjs.map +0 -1
- package/dist/output_parsers/router.d.cts +0 -36
- package/dist/output_parsers/router.d.cts.map +0 -1
- package/dist/output_parsers/router.d.ts +0 -36
- package/dist/output_parsers/router.d.ts.map +0 -1
- package/dist/output_parsers/router.js +0 -39
- package/dist/output_parsers/router.js.map +0 -1
- package/dist/output_parsers/structured.cjs +0 -164
- package/dist/output_parsers/structured.cjs.map +0 -1
- package/dist/output_parsers/structured.d.cts +0 -97
- package/dist/output_parsers/structured.d.cts.map +0 -1
- package/dist/output_parsers/structured.d.ts +0 -97
- package/dist/output_parsers/structured.d.ts.map +0 -1
- package/dist/output_parsers/structured.js +0 -161
- package/dist/output_parsers/structured.js.map +0 -1
- package/dist/retrievers/contextual_compression.cjs +0 -53
- package/dist/retrievers/contextual_compression.cjs.map +0 -1
- package/dist/retrievers/contextual_compression.d.cts +0 -42
- package/dist/retrievers/contextual_compression.d.cts.map +0 -1
- package/dist/retrievers/contextual_compression.d.ts +0 -42
- package/dist/retrievers/contextual_compression.d.ts.map +0 -1
- package/dist/retrievers/contextual_compression.js +0 -47
- package/dist/retrievers/contextual_compression.js.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.cjs +0 -103
- package/dist/retrievers/document_compressors/chain_extract.cjs.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.d.cts +0 -47
- package/dist/retrievers/document_compressors/chain_extract.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.d.ts +0 -47
- package/dist/retrievers/document_compressors/chain_extract.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.js +0 -97
- package/dist/retrievers/document_compressors/chain_extract.js.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract_prompt.cjs +0 -16
- package/dist/retrievers/document_compressors/chain_extract_prompt.cjs.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract_prompt.js +0 -15
- package/dist/retrievers/document_compressors/chain_extract_prompt.js.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.cjs +0 -74
- package/dist/retrievers/document_compressors/embeddings_filter.cjs.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.cts +0 -58
- package/dist/retrievers/document_compressors/embeddings_filter.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.ts +0 -58
- package/dist/retrievers/document_compressors/embeddings_filter.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.js +0 -68
- package/dist/retrievers/document_compressors/embeddings_filter.js.map +0 -1
- package/dist/retrievers/document_compressors/index.cjs +0 -69
- package/dist/retrievers/document_compressors/index.cjs.map +0 -1
- package/dist/retrievers/document_compressors/index.d.cts +0 -61
- package/dist/retrievers/document_compressors/index.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/index.d.ts +0 -61
- package/dist/retrievers/document_compressors/index.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/index.js +0 -62
- package/dist/retrievers/document_compressors/index.js.map +0 -1
- package/dist/retrievers/ensemble.cjs +0 -76
- package/dist/retrievers/ensemble.cjs.map +0 -1
- package/dist/retrievers/ensemble.d.cts +0 -39
- package/dist/retrievers/ensemble.d.cts.map +0 -1
- package/dist/retrievers/ensemble.d.ts +0 -39
- package/dist/retrievers/ensemble.d.ts.map +0 -1
- package/dist/retrievers/ensemble.js +0 -70
- package/dist/retrievers/ensemble.js.map +0 -1
- package/dist/retrievers/hyde.cjs +0 -128
- package/dist/retrievers/hyde.cjs.map +0 -1
- package/dist/retrievers/hyde.d.cts +0 -61
- package/dist/retrievers/hyde.d.cts.map +0 -1
- package/dist/retrievers/hyde.d.ts +0 -61
- package/dist/retrievers/hyde.d.ts.map +0 -1
- package/dist/retrievers/hyde.js +0 -121
- package/dist/retrievers/hyde.js.map +0 -1
- package/dist/retrievers/matryoshka_retriever.cjs +0 -116
- package/dist/retrievers/matryoshka_retriever.cjs.map +0 -1
- package/dist/retrievers/matryoshka_retriever.d.cts +0 -99
- package/dist/retrievers/matryoshka_retriever.d.cts.map +0 -1
- package/dist/retrievers/matryoshka_retriever.d.ts +0 -99
- package/dist/retrievers/matryoshka_retriever.d.ts.map +0 -1
- package/dist/retrievers/matryoshka_retriever.js +0 -110
- package/dist/retrievers/matryoshka_retriever.js.map +0 -1
- package/dist/retrievers/multi_query.cjs +0 -150
- package/dist/retrievers/multi_query.cjs.map +0 -1
- package/dist/retrievers/multi_query.d.cts +0 -59
- package/dist/retrievers/multi_query.d.cts.map +0 -1
- package/dist/retrievers/multi_query.d.ts +0 -59
- package/dist/retrievers/multi_query.d.ts.map +0 -1
- package/dist/retrievers/multi_query.js +0 -144
- package/dist/retrievers/multi_query.js.map +0 -1
- package/dist/retrievers/multi_vector.cjs +0 -67
- package/dist/retrievers/multi_vector.cjs.map +0 -1
- package/dist/retrievers/multi_vector.d.cts +0 -51
- package/dist/retrievers/multi_vector.d.cts.map +0 -1
- package/dist/retrievers/multi_vector.d.ts +0 -51
- package/dist/retrievers/multi_vector.d.ts.map +0 -1
- package/dist/retrievers/multi_vector.js +0 -61
- package/dist/retrievers/multi_vector.js.map +0 -1
- package/dist/retrievers/parent_document.cjs +0 -137
- package/dist/retrievers/parent_document.cjs.map +0 -1
- package/dist/retrievers/parent_document.d.cts +0 -92
- package/dist/retrievers/parent_document.d.cts.map +0 -1
- package/dist/retrievers/parent_document.d.ts +0 -92
- package/dist/retrievers/parent_document.d.ts.map +0 -1
- package/dist/retrievers/parent_document.js +0 -131
- package/dist/retrievers/parent_document.js.map +0 -1
- package/dist/retrievers/score_threshold.cjs +0 -43
- package/dist/retrievers/score_threshold.cjs.map +0 -1
- package/dist/retrievers/score_threshold.d.cts +0 -20
- package/dist/retrievers/score_threshold.d.cts.map +0 -1
- package/dist/retrievers/score_threshold.d.ts +0 -20
- package/dist/retrievers/score_threshold.d.ts.map +0 -1
- package/dist/retrievers/score_threshold.js +0 -37
- package/dist/retrievers/score_threshold.js.map +0 -1
- package/dist/retrievers/self_query/functional.cjs +0 -21
- package/dist/retrievers/self_query/functional.cjs.map +0 -1
- package/dist/retrievers/self_query/functional.d.cts +0 -2
- package/dist/retrievers/self_query/functional.d.ts +0 -2
- package/dist/retrievers/self_query/functional.js +0 -10
- package/dist/retrievers/self_query/functional.js.map +0 -1
- package/dist/retrievers/self_query/index.cjs +0 -130
- package/dist/retrievers/self_query/index.cjs.map +0 -1
- package/dist/retrievers/self_query/index.d.cts +0 -79
- package/dist/retrievers/self_query/index.d.cts.map +0 -1
- package/dist/retrievers/self_query/index.d.ts +0 -79
- package/dist/retrievers/self_query/index.d.ts.map +0 -1
- package/dist/retrievers/self_query/index.js +0 -106
- package/dist/retrievers/self_query/index.js.map +0 -1
- package/dist/retrievers/time_weighted.cjs +0 -236
- package/dist/retrievers/time_weighted.cjs.map +0 -1
- package/dist/retrievers/time_weighted.d.cts +0 -142
- package/dist/retrievers/time_weighted.d.cts.map +0 -1
- package/dist/retrievers/time_weighted.d.ts +0 -142
- package/dist/retrievers/time_weighted.d.ts.map +0 -1
- package/dist/retrievers/time_weighted.js +0 -228
- package/dist/retrievers/time_weighted.js.map +0 -1
- package/dist/sql_db.cjs +0 -119
- package/dist/sql_db.cjs.map +0 -1
- package/dist/sql_db.d.cts +0 -60
- package/dist/sql_db.d.cts.map +0 -1
- package/dist/sql_db.d.ts +0 -60
- package/dist/sql_db.d.ts.map +0 -1
- package/dist/sql_db.js +0 -113
- package/dist/sql_db.js.map +0 -1
- package/dist/stores/doc/base.cjs +0 -20
- package/dist/stores/doc/base.cjs.map +0 -1
- package/dist/stores/doc/base.d.cts +0 -15
- package/dist/stores/doc/base.d.cts.map +0 -1
- package/dist/stores/doc/base.d.ts +0 -15
- package/dist/stores/doc/base.d.ts.map +0 -1
- package/dist/stores/doc/base.js +0 -14
- package/dist/stores/doc/base.js.map +0 -1
- package/dist/stores/doc/in_memory.cjs +0 -94
- package/dist/stores/doc/in_memory.cjs.map +0 -1
- package/dist/stores/doc/in_memory.d.cts +0 -53
- package/dist/stores/doc/in_memory.d.cts.map +0 -1
- package/dist/stores/doc/in_memory.d.ts +0 -53
- package/dist/stores/doc/in_memory.d.ts.map +0 -1
- package/dist/stores/doc/in_memory.js +0 -87
- package/dist/stores/doc/in_memory.js.map +0 -1
- package/dist/stores/file/base.cjs +0 -13
- package/dist/stores/file/base.cjs.map +0 -1
- package/dist/stores/file/base.d.cts +0 -15
- package/dist/stores/file/base.d.cts.map +0 -1
- package/dist/stores/file/base.d.ts +0 -15
- package/dist/stores/file/base.d.ts.map +0 -1
- package/dist/stores/file/base.js +0 -12
- package/dist/stores/file/base.js.map +0 -1
- package/dist/stores/file/in_memory.cjs +0 -53
- package/dist/stores/file/in_memory.cjs.map +0 -1
- package/dist/stores/file/in_memory.d.cts +0 -33
- package/dist/stores/file/in_memory.d.cts.map +0 -1
- package/dist/stores/file/in_memory.d.ts +0 -33
- package/dist/stores/file/in_memory.d.ts.map +0 -1
- package/dist/stores/file/in_memory.js +0 -47
- package/dist/stores/file/in_memory.js.map +0 -1
- package/dist/stores/file/node.cjs +0 -52
- package/dist/stores/file/node.cjs.map +0 -1
- package/dist/stores/file/node.d.cts +0 -29
- package/dist/stores/file/node.d.cts.map +0 -1
- package/dist/stores/file/node.d.ts +0 -29
- package/dist/stores/file/node.d.ts.map +0 -1
- package/dist/stores/file/node.js +0 -46
- package/dist/stores/file/node.js.map +0 -1
- package/dist/stores/message/in_memory.cjs +0 -21
- package/dist/stores/message/in_memory.cjs.map +0 -1
- package/dist/stores/message/in_memory.d.cts +0 -2
- package/dist/stores/message/in_memory.d.ts +0 -2
- package/dist/stores/message/in_memory.js +0 -10
- package/dist/stores/message/in_memory.js.map +0 -1
- package/dist/text_splitter.cjs +0 -22
- package/dist/text_splitter.cjs.map +0 -1
- package/dist/text_splitter.d.cts +0 -1
- package/dist/text_splitter.d.ts +0 -1
- package/dist/text_splitter.js +0 -12
- package/dist/text_splitter.js.map +0 -1
- package/dist/tools/chain.cjs +0 -36
- package/dist/tools/chain.cjs.map +0 -1
- package/dist/tools/chain.d.cts +0 -32
- package/dist/tools/chain.d.cts.map +0 -1
- package/dist/tools/chain.d.ts +0 -32
- package/dist/tools/chain.d.ts.map +0 -1
- package/dist/tools/chain.js +0 -30
- package/dist/tools/chain.js.map +0 -1
- package/dist/tools/fs.cjs +0 -56
- package/dist/tools/fs.cjs.map +0 -1
- package/dist/tools/fs.d.cts +0 -92
- package/dist/tools/fs.d.cts.map +0 -1
- package/dist/tools/fs.d.ts +0 -92
- package/dist/tools/fs.d.ts.map +0 -1
- package/dist/tools/fs.js +0 -54
- package/dist/tools/fs.js.map +0 -1
- package/dist/tools/index.cjs +0 -68
- package/dist/tools/index.cjs.map +0 -1
- package/dist/tools/index.d.cts +0 -8
- package/dist/tools/index.d.ts +0 -8
- package/dist/tools/index.js +0 -30
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/json.cjs +0 -107
- package/dist/tools/json.cjs.map +0 -1
- package/dist/tools/json.d.cts +0 -65
- package/dist/tools/json.d.cts.map +0 -1
- package/dist/tools/json.d.ts +0 -65
- package/dist/tools/json.d.ts.map +0 -1
- package/dist/tools/json.js +0 -104
- package/dist/tools/json.js.map +0 -1
- package/dist/tools/render.cjs +0 -55
- package/dist/tools/render.cjs.map +0 -1
- package/dist/tools/render.d.cts +0 -32
- package/dist/tools/render.d.cts.map +0 -1
- package/dist/tools/render.d.ts +0 -32
- package/dist/tools/render.d.ts.map +0 -1
- package/dist/tools/render.js +0 -48
- package/dist/tools/render.js.map +0 -1
- package/dist/tools/requests.cjs +0 -73
- package/dist/tools/requests.cjs.map +0 -1
- package/dist/tools/requests.d.cts +0 -56
- package/dist/tools/requests.d.cts.map +0 -1
- package/dist/tools/requests.d.ts +0 -56
- package/dist/tools/requests.d.ts.map +0 -1
- package/dist/tools/requests.js +0 -71
- package/dist/tools/requests.js.map +0 -1
- package/dist/tools/retriever.cjs +0 -30
- package/dist/tools/retriever.cjs.map +0 -1
- package/dist/tools/retriever.d.cts +0 -19
- package/dist/tools/retriever.d.cts.map +0 -1
- package/dist/tools/retriever.d.ts +0 -19
- package/dist/tools/retriever.d.ts.map +0 -1
- package/dist/tools/retriever.js +0 -24
- package/dist/tools/retriever.js.map +0 -1
- package/dist/tools/sql.cjs +0 -165
- package/dist/tools/sql.cjs.map +0 -1
- package/dist/tools/sql.d.cts +0 -86
- package/dist/tools/sql.d.cts.map +0 -1
- package/dist/tools/sql.d.ts +0 -86
- package/dist/tools/sql.d.ts.map +0 -1
- package/dist/tools/sql.js +0 -156
- package/dist/tools/sql.js.map +0 -1
- package/dist/tools/vectorstore.cjs +0 -45
- package/dist/tools/vectorstore.cjs.map +0 -1
- package/dist/tools/vectorstore.d.cts +0 -40
- package/dist/tools/vectorstore.d.cts.map +0 -1
- package/dist/tools/vectorstore.d.ts +0 -40
- package/dist/tools/vectorstore.d.ts.map +0 -1
- package/dist/tools/vectorstore.js +0 -44
- package/dist/tools/vectorstore.js.map +0 -1
- package/dist/tools/webbrowser.cjs +0 -176
- package/dist/tools/webbrowser.cjs.map +0 -1
- package/dist/tools/webbrowser.d.cts +0 -69
- package/dist/tools/webbrowser.d.cts.map +0 -1
- package/dist/tools/webbrowser.d.ts +0 -69
- package/dist/tools/webbrowser.d.ts.map +0 -1
- package/dist/tools/webbrowser.js +0 -168
- package/dist/tools/webbrowser.js.map +0 -1
- package/dist/types/expression-parser.d.cts +0 -91
- package/dist/types/expression-parser.d.cts.map +0 -1
- package/dist/types/expression-parser.d.ts +0 -91
- package/dist/types/expression-parser.d.ts.map +0 -1
- package/dist/types/type-utils.d.cts +0 -7
- package/dist/types/type-utils.d.cts.map +0 -1
- package/dist/types/type-utils.d.ts +0 -7
- package/dist/types/type-utils.d.ts.map +0 -1
- package/dist/util/document.cjs +0 -23
- package/dist/util/document.cjs.map +0 -1
- package/dist/util/document.d.cts +0 -15
- package/dist/util/document.d.cts.map +0 -1
- package/dist/util/document.d.ts +0 -15
- package/dist/util/document.d.ts.map +0 -1
- package/dist/util/document.js +0 -17
- package/dist/util/document.js.map +0 -1
- package/dist/util/entrypoint_deprecation.cjs +0 -1
- package/dist/util/entrypoint_deprecation.js +0 -1
- package/dist/util/env.cjs +0 -2
- package/dist/util/env.js +0 -1
- package/dist/util/extname.cjs +0 -7
- package/dist/util/extname.cjs.map +0 -1
- package/dist/util/extname.js +0 -6
- package/dist/util/extname.js.map +0 -1
- package/dist/util/hub.cjs +0 -39
- package/dist/util/hub.cjs.map +0 -1
- package/dist/util/hub.js +0 -38
- package/dist/util/hub.js.map +0 -1
- package/dist/util/load.cjs +0 -15
- package/dist/util/load.cjs.map +0 -1
- package/dist/util/load.d.cts +0 -6
- package/dist/util/load.d.cts.map +0 -1
- package/dist/util/load.d.ts +0 -6
- package/dist/util/load.d.ts.map +0 -1
- package/dist/util/load.js +0 -14
- package/dist/util/load.js.map +0 -1
- package/dist/util/math.cjs +0 -22
- package/dist/util/math.cjs.map +0 -1
- package/dist/util/math.d.cts +0 -1
- package/dist/util/math.d.ts +0 -1
- package/dist/util/math.js +0 -12
- package/dist/util/math.js.map +0 -1
- package/dist/util/ml-distance/distances.cjs +0 -35
- package/dist/util/ml-distance/distances.cjs.map +0 -1
- package/dist/util/ml-distance/distances.js +0 -33
- package/dist/util/ml-distance/distances.js.map +0 -1
- package/dist/util/ml-distance/similarities.cjs +0 -23
- package/dist/util/ml-distance/similarities.cjs.map +0 -1
- package/dist/util/ml-distance/similarities.d.cts +0 -11
- package/dist/util/ml-distance/similarities.d.cts.map +0 -1
- package/dist/util/ml-distance/similarities.d.ts +0 -11
- package/dist/util/ml-distance/similarities.d.ts.map +0 -1
- package/dist/util/ml-distance/similarities.js +0 -22
- package/dist/util/ml-distance/similarities.js.map +0 -1
- package/dist/util/ml-distance-euclidean/euclidean.cjs +0 -14
- package/dist/util/ml-distance-euclidean/euclidean.cjs.map +0 -1
- package/dist/util/ml-distance-euclidean/euclidean.js +0 -13
- package/dist/util/ml-distance-euclidean/euclidean.js.map +0 -1
- package/dist/util/openapi.cjs +0 -149
- package/dist/util/openapi.cjs.map +0 -1
- package/dist/util/openapi.d.cts +0 -83
- package/dist/util/openapi.d.cts.map +0 -1
- package/dist/util/openapi.d.ts +0 -83
- package/dist/util/openapi.d.ts.map +0 -1
- package/dist/util/openapi.js +0 -148
- package/dist/util/openapi.js.map +0 -1
- package/dist/util/parse.cjs +0 -22
- package/dist/util/parse.cjs.map +0 -1
- package/dist/util/parse.js +0 -21
- package/dist/util/parse.js.map +0 -1
- package/dist/util/set.cjs +0 -35
- package/dist/util/set.cjs.map +0 -1
- package/dist/util/set.js +0 -32
- package/dist/util/set.js.map +0 -1
- package/dist/util/sql_utils.cjs +0 -178
- package/dist/util/sql_utils.cjs.map +0 -1
- package/dist/util/sql_utils.d.cts +0 -31
- package/dist/util/sql_utils.d.cts.map +0 -1
- package/dist/util/sql_utils.d.ts +0 -31
- package/dist/util/sql_utils.d.ts.map +0 -1
- package/dist/util/sql_utils.js +0 -173
- package/dist/util/sql_utils.js.map +0 -1
- package/dist/util/time.cjs +0 -25
- package/dist/util/time.cjs.map +0 -1
- package/dist/util/time.d.cts +0 -10
- package/dist/util/time.d.cts.map +0 -1
- package/dist/util/time.d.ts +0 -10
- package/dist/util/time.d.ts.map +0 -1
- package/dist/util/time.js +0 -19
- package/dist/util/time.js.map +0 -1
- package/dist/vectorstores/memory.cjs +0 -265
- package/dist/vectorstores/memory.cjs.map +0 -1
- package/dist/vectorstores/memory.d.cts +0 -216
- package/dist/vectorstores/memory.d.cts.map +0 -1
- package/dist/vectorstores/memory.d.ts +0 -216
- package/dist/vectorstores/memory.d.ts.map +0 -1
- package/dist/vectorstores/memory.js +0 -259
- package/dist/vectorstores/memory.js.map +0 -1
|
@@ -12,6 +12,17 @@ const PreHookAnnotation = Annotation.Root({
|
|
|
12
12
|
default: () => []
|
|
13
13
|
})
|
|
14
14
|
});
|
|
15
|
+
const createAgentBaseAnnotation = () => Annotation.Root({ messages: Annotation({
|
|
16
|
+
reducer: messagesStateReducer,
|
|
17
|
+
default: () => []
|
|
18
|
+
}) });
|
|
19
|
+
const createAgentAnnotation = () => Annotation.Root({
|
|
20
|
+
messages: Annotation({
|
|
21
|
+
reducer: messagesStateReducer,
|
|
22
|
+
default: () => []
|
|
23
|
+
}),
|
|
24
|
+
structuredResponse: Annotation()
|
|
25
|
+
});
|
|
15
26
|
function createAgentAnnotationConditional(hasStructuredResponse = true) {
|
|
16
27
|
const baseAnnotation = { messages: Annotation({
|
|
17
28
|
reducer: messagesStateReducer,
|
|
@@ -143,5 +154,5 @@ function createAnnotationForZodType(zodType) {
|
|
|
143
154
|
}
|
|
144
155
|
|
|
145
156
|
//#endregion
|
|
146
|
-
export { createAgentAnnotationConditional, enhanceStateSchemaWithMessageReducer };
|
|
157
|
+
export { PreHookAnnotation, createAgentAnnotation, createAgentAnnotationConditional, createAgentBaseAnnotation, enhanceStateSchemaWithMessageReducer };
|
|
147
158
|
//# sourceMappingURL=annotation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotation.js","names":["PreHookAnnotation: AnnotationRoot<{\n llmInputMessages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n messages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n}>","stateSchema: AnyAnnotationRoot | InteropZodObject","annotationFields: Record<string, any>","_: unknown","update: unknown","current: unknown[]","update: unknown[]","config: (typeof ZOD_TYPE_CONFIGS)[keyof typeof ZOD_TYPE_CONFIGS]","defaultValueFn: () => unknown","zodType: any","config"],"sources":["../../src/agents/annotation.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { BaseMessage } from \"@langchain/core/messages\";\nimport {\n Annotation,\n Messages,\n AnnotationRoot,\n messagesStateReducer,\n type BinaryOperatorAggregate,\n type LastValue,\n} from \"@langchain/langgraph\";\nimport type { InteropZodToStateDefinition } from \"@langchain/langgraph/zod\";\nimport {\n isInteropZodSchema,\n getInteropZodObjectShape,\n getInteropZodDefaultGetter,\n type InteropZodObject,\n} from \"@langchain/core/utils/types\";\n\n/**\n * Special type to indicate that no response format is provided.\n * When this type is used, the structuredResponse property should not be present in the result.\n */\nexport type ResponseFormatUndefined = {\n __responseFormatUndefined: true;\n};\n\nexport const PreHookAnnotation: AnnotationRoot<{\n llmInputMessages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n messages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n}> = Annotation.Root({\n llmInputMessages: Annotation<BaseMessage[], Messages>({\n reducer: (_, update) => messagesStateReducer([], update),\n default: () => [],\n }),\n messages: Annotation<BaseMessage[], Messages>({\n reducer: messagesStateReducer,\n default: () => [],\n }),\n});\nexport type PreHookAnnotation = typeof PreHookAnnotation;\n\n// Base annotation without structuredResponse (for ResponseFormatUndefined)\nexport const createAgentBaseAnnotation = () =>\n Annotation.Root({\n messages: Annotation<BaseMessage[], Messages>({\n reducer: messagesStateReducer,\n default: () => [],\n }),\n });\n\n// Full annotation with structuredResponse (for regular cases)\nexport const createAgentAnnotation = <\n T extends Record<string, any> = Record<string, any>\n>(): AnnotationRoot<{\n structuredResponse: LastValue<T>;\n messages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n}> =>\n Annotation.Root({\n messages: Annotation<BaseMessage[], Messages>({\n reducer: messagesStateReducer,\n default: () => [],\n }),\n structuredResponse: Annotation<T>(),\n });\n\n// Create annotation conditionally - for ResponseFormatUndefined, don't include structuredResponse\nexport function createAgentAnnotationConditional<\n T extends Record<string, any> | ResponseFormatUndefined\n>(\n hasStructuredResponse = true\n): AnnotationRoot<{\n structuredResponse: LastValue<T extends ResponseFormatUndefined ? never : T>;\n messages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n}> {\n const baseAnnotation = {\n messages: Annotation<BaseMessage[], Messages>({\n reducer: messagesStateReducer,\n default: () => [],\n }),\n };\n\n if (!hasStructuredResponse) {\n return Annotation.Root(baseAnnotation) as AnnotationRoot<{\n structuredResponse: LastValue<\n T extends ResponseFormatUndefined ? never : T\n >;\n messages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n }>;\n }\n\n return Annotation.Root({\n ...baseAnnotation,\n structuredResponse:\n Annotation<T extends ResponseFormatUndefined ? never : T>(),\n });\n}\n\n// Helper type to select the right annotation based on the response format type\nexport type ReactAgentAnnotation<\n T extends Record<string, any> | ResponseFormatUndefined\n> = T extends ResponseFormatUndefined\n ? ReturnType<typeof createAgentBaseAnnotation>\n : T extends Record<string, any>\n ? ReturnType<typeof createAgentAnnotation<T>>\n : never;\n\nexport type ToAnnotationRoot<A extends AnyAnnotationRoot | InteropZodObject> =\n A extends AnyAnnotationRoot\n ? A\n : A extends InteropZodObject\n ? AnnotationRoot<InteropZodToStateDefinition<A>>\n : never;\n\nexport type AnyAnnotationRoot = AnnotationRoot<any>;\n\n/**\n * Enhances a state schema to ensure proper message handling.\n * If a Zod schema is provided, it creates an annotation that includes the messagesStateReducer\n * and infers appropriate reducers for all other fields.\n *\n * @param stateSchema - The state schema to enhance.\n * @returns The enhanced state schema.\n */\nexport function enhanceStateSchemaWithMessageReducer(\n stateSchema: AnyAnnotationRoot | InteropZodObject\n) {\n /**\n * If it's already an annotation, return as-is\n */\n if (typeof stateSchema === \"object\" && \"State\" in stateSchema) {\n return stateSchema;\n }\n\n /**\n * If it's a Zod schema, create annotations for all fields\n */\n if (isInteropZodSchema(stateSchema)) {\n const shape = getInteropZodObjectShape(stateSchema);\n const annotationFields: Record<string, any> = {};\n\n /**\n * Process each field in the Zod schema\n */\n for (const [key, zodType] of Object.entries(shape)) {\n annotationFields[key] =\n key === \"messages\"\n ? /**\n * Special handling for messages field - always use messagesStateReducer\n */\n Annotation<BaseMessage[]>({\n reducer: messagesStateReducer,\n default: () => [],\n })\n : /**\n * For other fields, create appropriate annotations based on type\n */\n createAnnotationForZodType(zodType);\n }\n\n /**\n * Ensure messages field exists even if not in the Zod schema\n */\n if (!annotationFields.messages) {\n annotationFields.messages = Annotation<BaseMessage[]>({\n reducer: messagesStateReducer,\n default: () => [],\n });\n }\n\n return Annotation.Root(annotationFields);\n }\n\n /**\n * Fallback: create a base annotation with message reducer only\n */\n return Annotation.Root({\n messages: Annotation<BaseMessage[]>({\n reducer: messagesStateReducer,\n default: () => [],\n }),\n });\n}\n\n/**\n * Type configuration for different Zod types\n */\nconst ZOD_TYPE_CONFIGS = {\n ZodString: {\n reducer: (_: unknown, update: unknown) => update,\n fallbackDefault: \"\",\n },\n ZodNumber: {\n reducer: (_: unknown, update: unknown) => update,\n fallbackDefault: 0,\n },\n ZodBoolean: {\n reducer: (_: unknown, update: unknown) => update,\n fallbackDefault: false,\n },\n ZodArray: {\n reducer: (_: unknown, update: unknown) => update,\n fallbackDefault: [] as unknown[],\n },\n ZodRecord: {\n reducer: (current: unknown[], update: unknown[]) => ({\n ...current,\n ...update,\n }),\n fallbackDefault: {} as Record<string, unknown>,\n },\n ZodObject: {\n reducer: (current: unknown[], update: unknown[]) => ({\n ...current,\n ...update,\n }),\n fallbackDefault: {} as Record<string, unknown>,\n },\n} as const;\n\n/**\n * Creates an annotation based on type configuration and default value\n */\nfunction createAnnotationFromConfig(\n config: (typeof ZOD_TYPE_CONFIGS)[keyof typeof ZOD_TYPE_CONFIGS],\n defaultValueFn: () => unknown\n) {\n return Annotation<any>({\n reducer: config.reducer,\n default: defaultValueFn,\n });\n}\n\n/**\n * Creates an appropriate annotation for a given Zod type.\n */\nfunction createAnnotationForZodType(zodType: any): any {\n const typeName = zodType._def?.typeName;\n const defaultGetter = getInteropZodDefaultGetter(zodType);\n const isOptional = typeName === \"ZodOptional\";\n\n /**\n * Handle Zod wrapper first\n */\n if (\n typeName === \"ZodDefault\" ||\n typeName === \"ZodOptional\" ||\n typeName === \"ZodNullable\"\n ) {\n const innerTypeName = zodType._def.innerType._def?.typeName;\n const config =\n ZOD_TYPE_CONFIGS[innerTypeName as keyof typeof ZOD_TYPE_CONFIGS];\n return config\n ? createAnnotationFromConfig(\n config,\n () =>\n defaultGetter?.() ||\n (isOptional ? undefined : config?.fallbackDefault)\n )\n : Annotation<unknown>({\n reducer: (_: unknown, update: unknown) => update,\n default: () => defaultGetter?.(),\n });\n }\n\n /**\n * Handle regular types\n */\n const config = ZOD_TYPE_CONFIGS[typeName as keyof typeof ZOD_TYPE_CONFIGS];\n if (config) {\n return createAnnotationFromConfig(\n config,\n () => defaultGetter?.() || config?.fallbackDefault\n );\n }\n\n /**\n * Fallback for unknown types\n */\n return Annotation<unknown>({\n reducer: (_: unknown, update: unknown) => update,\n default: () => defaultGetter?.(),\n });\n}\n"],"mappings":";;;;AA0BA,MAAaA,oBAGR,WAAW,KAAK;CACnB,kBAAkB,WAAoC;EACpD,SAAS,CAAC,GAAG,WAAW,qBAAqB,CAAE,GAAE,OAAO;EACxD,SAAS,MAAM,CAAE;CAClB,EAAC;CACF,UAAU,WAAoC;EAC5C,SAAS;EACT,SAAS,MAAM,CAAE;CAClB,EAAC;AACH,EAAC;AA4BF,SAAgB,iCAGd,wBAAwB,MAIvB;CACD,MAAM,iBAAiB,EACrB,UAAU,WAAoC;EAC5C,SAAS;EACT,SAAS,MAAM,CAAE;CAClB,EAAC,CACH;AAED,KAAI,CAAC,sBACH,QAAO,WAAW,KAAK,eAAe;AAQxC,QAAO,WAAW,KAAK;EACrB,GAAG;EACH,oBACE,YAA2D;CAC9D,EAAC;AACH;;;;;;;;;AA4BD,SAAgB,qCAC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,MAAM;CAC/B,MAAM,gBAAgB,2BAA2B,QAAQ;CACzD,MAAM,aAAa,aAAa;;;;AAKhC,KACE,aAAa,gBACb,aAAa,iBACb,aAAa,eACb;EACA,MAAM,gBAAgB,QAAQ,KAAK,UAAU,MAAM;EACnD,MAAMC,WACJ,iBAAiB;AACnB,SAAOA,WACH,2BACEA,UACA,MACE,iBAAiB,KAChB,aAAa,SAAYA,UAAQ,iBACrC,GACD,WAAoB;GAClB,SAAS,CAACP,GAAYC,WAAoB;GAC1C,SAAS,MAAM,iBAAiB;EACjC,EAAC;CACP;;;;CAKD,MAAM,SAAS,iBAAiB;AAChC,KAAI,OACF,QAAO,2BACL,QACA,MAAM,iBAAiB,IAAI,QAAQ,gBACpC;;;;AAMH,QAAO,WAAoB;EACzB,SAAS,CAACD,GAAYC,WAAoB;EAC1C,SAAS,MAAM,iBAAiB;CACjC,EAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"annotation.js","names":["PreHookAnnotation: AnnotationRoot<{\n llmInputMessages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n messages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n}>","stateSchema: AnyAnnotationRoot | InteropZodObject","annotationFields: Record<string, any>","_: unknown","update: unknown","current: unknown[]","update: unknown[]","config: (typeof ZOD_TYPE_CONFIGS)[keyof typeof ZOD_TYPE_CONFIGS]","defaultValueFn: () => unknown","zodType: any","config"],"sources":["../../src/agents/annotation.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { BaseMessage } from \"@langchain/core/messages\";\nimport {\n Annotation,\n Messages,\n AnnotationRoot,\n messagesStateReducer,\n type BinaryOperatorAggregate,\n type LastValue,\n} from \"@langchain/langgraph\";\nimport type { InteropZodToStateDefinition } from \"@langchain/langgraph/zod\";\nimport {\n isInteropZodSchema,\n getInteropZodObjectShape,\n getInteropZodDefaultGetter,\n type InteropZodObject,\n} from \"@langchain/core/utils/types\";\n\n/**\n * Special type to indicate that no response format is provided.\n * When this type is used, the structuredResponse property should not be present in the result.\n */\nexport type ResponseFormatUndefined = {\n __responseFormatUndefined: true;\n};\n\nexport const PreHookAnnotation: AnnotationRoot<{\n llmInputMessages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n messages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n}> = Annotation.Root({\n llmInputMessages: Annotation<BaseMessage[], Messages>({\n reducer: (_, update) => messagesStateReducer([], update),\n default: () => [],\n }),\n messages: Annotation<BaseMessage[], Messages>({\n reducer: messagesStateReducer,\n default: () => [],\n }),\n});\nexport type PreHookAnnotation = typeof PreHookAnnotation;\n\n// Base annotation without structuredResponse (for ResponseFormatUndefined)\nexport const createAgentBaseAnnotation = () =>\n Annotation.Root({\n messages: Annotation<BaseMessage[], Messages>({\n reducer: messagesStateReducer,\n default: () => [],\n }),\n });\n\n// Full annotation with structuredResponse (for regular cases)\nexport const createAgentAnnotation = <\n T extends Record<string, any> = Record<string, any>\n>(): AnnotationRoot<{\n structuredResponse: LastValue<T>;\n messages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n}> =>\n Annotation.Root({\n messages: Annotation<BaseMessage[], Messages>({\n reducer: messagesStateReducer,\n default: () => [],\n }),\n structuredResponse: Annotation<T>(),\n });\n\n// Create annotation conditionally - for ResponseFormatUndefined, don't include structuredResponse\nexport function createAgentAnnotationConditional<\n T extends Record<string, any> | ResponseFormatUndefined\n>(\n hasStructuredResponse = true\n): AnnotationRoot<{\n structuredResponse: LastValue<T extends ResponseFormatUndefined ? never : T>;\n messages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n}> {\n const baseAnnotation = {\n messages: Annotation<BaseMessage[], Messages>({\n reducer: messagesStateReducer,\n default: () => [],\n }),\n };\n\n if (!hasStructuredResponse) {\n return Annotation.Root(baseAnnotation) as AnnotationRoot<{\n structuredResponse: LastValue<\n T extends ResponseFormatUndefined ? never : T\n >;\n messages: BinaryOperatorAggregate<BaseMessage[], Messages>;\n }>;\n }\n\n return Annotation.Root({\n ...baseAnnotation,\n structuredResponse:\n Annotation<T extends ResponseFormatUndefined ? never : T>(),\n });\n}\n\n// Helper type to select the right annotation based on the response format type\nexport type ReactAgentAnnotation<\n T extends Record<string, any> | ResponseFormatUndefined\n> = T extends ResponseFormatUndefined\n ? ReturnType<typeof createAgentBaseAnnotation>\n : T extends Record<string, any>\n ? ReturnType<typeof createAgentAnnotation<T>>\n : never;\n\nexport type ToAnnotationRoot<A extends AnyAnnotationRoot | InteropZodObject> =\n A extends AnyAnnotationRoot\n ? A\n : A extends InteropZodObject\n ? AnnotationRoot<InteropZodToStateDefinition<A>>\n : never;\n\nexport type AnyAnnotationRoot = AnnotationRoot<any>;\n\n/**\n * Enhances a state schema to ensure proper message handling.\n * If a Zod schema is provided, it creates an annotation that includes the messagesStateReducer\n * and infers appropriate reducers for all other fields.\n *\n * @param stateSchema - The state schema to enhance.\n * @returns The enhanced state schema.\n */\nexport function enhanceStateSchemaWithMessageReducer(\n stateSchema: AnyAnnotationRoot | InteropZodObject\n) {\n /**\n * If it's already an annotation, return as-is\n */\n if (typeof stateSchema === \"object\" && \"State\" in stateSchema) {\n return stateSchema;\n }\n\n /**\n * If it's a Zod schema, create annotations for all fields\n */\n if (isInteropZodSchema(stateSchema)) {\n const shape = getInteropZodObjectShape(stateSchema);\n const annotationFields: Record<string, any> = {};\n\n /**\n * Process each field in the Zod schema\n */\n for (const [key, zodType] of Object.entries(shape)) {\n annotationFields[key] =\n key === \"messages\"\n ? /**\n * Special handling for messages field - always use messagesStateReducer\n */\n Annotation<BaseMessage[]>({\n reducer: messagesStateReducer,\n default: () => [],\n })\n : /**\n * For other fields, create appropriate annotations based on type\n */\n createAnnotationForZodType(zodType);\n }\n\n /**\n * Ensure messages field exists even if not in the Zod schema\n */\n if (!annotationFields.messages) {\n annotationFields.messages = Annotation<BaseMessage[]>({\n reducer: messagesStateReducer,\n default: () => [],\n });\n }\n\n return Annotation.Root(annotationFields);\n }\n\n /**\n * Fallback: create a base annotation with message reducer only\n */\n return Annotation.Root({\n messages: Annotation<BaseMessage[]>({\n reducer: messagesStateReducer,\n default: () => [],\n }),\n });\n}\n\n/**\n * Type configuration for different Zod types\n */\nconst ZOD_TYPE_CONFIGS = {\n ZodString: {\n reducer: (_: unknown, update: unknown) => update,\n fallbackDefault: \"\",\n },\n ZodNumber: {\n reducer: (_: unknown, update: unknown) => update,\n fallbackDefault: 0,\n },\n ZodBoolean: {\n reducer: (_: unknown, update: unknown) => update,\n fallbackDefault: false,\n },\n ZodArray: {\n reducer: (_: unknown, update: unknown) => update,\n fallbackDefault: [] as unknown[],\n },\n ZodRecord: {\n reducer: (current: unknown[], update: unknown[]) => ({\n ...current,\n ...update,\n }),\n fallbackDefault: {} as Record<string, unknown>,\n },\n ZodObject: {\n reducer: (current: unknown[], update: unknown[]) => ({\n ...current,\n ...update,\n }),\n fallbackDefault: {} as Record<string, unknown>,\n },\n} as const;\n\n/**\n * Creates an annotation based on type configuration and default value\n */\nfunction createAnnotationFromConfig(\n config: (typeof ZOD_TYPE_CONFIGS)[keyof typeof ZOD_TYPE_CONFIGS],\n defaultValueFn: () => unknown\n) {\n return Annotation<any>({\n reducer: config.reducer,\n default: defaultValueFn,\n });\n}\n\n/**\n * Creates an appropriate annotation for a given Zod type.\n */\nfunction createAnnotationForZodType(zodType: any): any {\n const typeName = zodType._def?.typeName;\n const defaultGetter = getInteropZodDefaultGetter(zodType);\n const isOptional = typeName === \"ZodOptional\";\n\n /**\n * Handle Zod wrapper first\n */\n if (\n typeName === \"ZodDefault\" ||\n typeName === \"ZodOptional\" ||\n typeName === \"ZodNullable\"\n ) {\n const innerTypeName = zodType._def.innerType._def?.typeName;\n const config =\n ZOD_TYPE_CONFIGS[innerTypeName as keyof typeof ZOD_TYPE_CONFIGS];\n return config\n ? createAnnotationFromConfig(\n config,\n () =>\n defaultGetter?.() ||\n (isOptional ? undefined : config?.fallbackDefault)\n )\n : Annotation<unknown>({\n reducer: (_: unknown, update: unknown) => update,\n default: () => defaultGetter?.(),\n });\n }\n\n /**\n * Handle regular types\n */\n const config = ZOD_TYPE_CONFIGS[typeName as keyof typeof ZOD_TYPE_CONFIGS];\n if (config) {\n return createAnnotationFromConfig(\n config,\n () => defaultGetter?.() || config?.fallbackDefault\n );\n }\n\n /**\n * Fallback for unknown types\n */\n return Annotation<unknown>({\n reducer: (_: unknown, update: unknown) => update,\n default: () => defaultGetter?.(),\n });\n}\n"],"mappings":";;;;AA0BA,MAAaA,oBAGR,WAAW,KAAK;CACnB,kBAAkB,WAAoC;EACpD,SAAS,CAAC,GAAG,WAAW,qBAAqB,CAAE,GAAE,OAAO;EACxD,SAAS,MAAM,CAAE;CAClB,EAAC;CACF,UAAU,WAAoC;EAC5C,SAAS;EACT,SAAS,MAAM,CAAE;CAClB,EAAC;AACH,EAAC;AAIF,MAAa,4BAA4B,MACvC,WAAW,KAAK,EACd,UAAU,WAAoC;CAC5C,SAAS;CACT,SAAS,MAAM,CAAE;AAClB,EAAC,CACH,EAAC;AAGJ,MAAa,wBAAwB,MAMnC,WAAW,KAAK;CACd,UAAU,WAAoC;EAC5C,SAAS;EACT,SAAS,MAAM,CAAE;CAClB,EAAC;CACF,oBAAoB,YAAe;AACpC,EAAC;AAGJ,SAAgB,iCAGd,wBAAwB,MAIvB;CACD,MAAM,iBAAiB,EACrB,UAAU,WAAoC;EAC5C,SAAS;EACT,SAAS,MAAM,CAAE;CAClB,EAAC,CACH;AAED,KAAI,CAAC,sBACH,QAAO,WAAW,KAAK,eAAe;AAQxC,QAAO,WAAW,KAAK;EACrB,GAAG;EACH,oBACE,YAA2D;CAC9D,EAAC;AACH;;;;;;;;;AA4BD,SAAgB,qCACdC,aACA;;;;AAIA,KAAI,OAAO,gBAAgB,YAAY,WAAW,YAChD,QAAO;;;;AAMT,KAAI,mBAAmB,YAAY,EAAE;EACnC,MAAM,QAAQ,yBAAyB,YAAY;EACnD,MAAMC,mBAAwC,CAAE;;;;AAKhD,OAAK,MAAM,CAAC,KAAK,QAAQ,IAAI,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H,2BACEA,UACA,MACE,iBAAiB,KAChB,aAAa,SAAYA,UAAQ,iBACrC,GACD,WAAoB;GAClB,SAAS,CAACP,GAAYC,WAAoB;GAC1C,SAAS,MAAM,iBAAiB;EACjC,EAAC;CACP;;;;CAKD,MAAM,SAAS,iBAAiB;AAChC,KAAI,OACF,QAAO,2BACL,QACA,MAAM,iBAAiB,IAAI,QAAQ,gBACpC;;;;AAMH,QAAO,WAAoB;EACzB,SAAS,CAACD,GAAYC,WAAoB;EAC1C,SAAS,MAAM,iBAAiB;CACjC,EAAC;AACH"}
|
package/dist/agents/errors.d.cts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ToolCall } from "@langchain/core/messages/tool";
|
|
2
2
|
|
|
3
3
|
//#region src/agents/errors.d.ts
|
|
4
|
-
|
|
4
|
+
declare class MultipleToolsBoundError extends Error {
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
5
7
|
/**
|
|
6
8
|
* Raised when model returns multiple structured output tool calls when only one is expected.
|
|
7
9
|
*/
|
|
@@ -20,6 +22,11 @@ declare class StructuredOutputParsingError extends Error {
|
|
|
20
22
|
/**
|
|
21
23
|
* Raised when a tool call is throwing an error.
|
|
22
24
|
*/
|
|
25
|
+
declare class ToolInvocationError extends Error {
|
|
26
|
+
readonly toolCall: ToolCall;
|
|
27
|
+
readonly toolError: Error;
|
|
28
|
+
constructor(toolError: unknown, toolCall: ToolCall);
|
|
29
|
+
}
|
|
23
30
|
//#endregion
|
|
24
|
-
export { MultipleStructuredOutputsError, StructuredOutputParsingError };
|
|
31
|
+
export { MultipleStructuredOutputsError, MultipleToolsBoundError, StructuredOutputParsingError, ToolInvocationError };
|
|
25
32
|
//# sourceMappingURL=errors.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.cts","names":["ToolCall","MultipleToolsBoundError","Error","MultipleStructuredOutputsError","StructuredOutputParsingError","ToolInvocationError"],"sources":["../../src/agents/errors.d.ts"],"sourcesContent":["/* eslint-disable no-instanceof/no-instanceof */\nimport type { ToolCall } from \"@langchain/core/messages/tool\";\nexport declare class MultipleToolsBoundError extends Error {\n constructor();\n}\n/**\n * Raised when model returns multiple structured output tool calls when only one is expected.\n */\nexport declare class MultipleStructuredOutputsError extends Error {\n readonly toolNames: string[];\n constructor(toolNames: string[]);\n}\n/**\n * Raised when structured output tool call arguments fail to parse according to the schema.\n */\nexport declare class StructuredOutputParsingError extends Error {\n readonly toolName: string;\n readonly errors: string[];\n constructor(toolName: string, errors: string[]);\n}\n/**\n * Raised when a tool call is throwing an error.\n */\nexport declare class ToolInvocationError extends Error {\n readonly toolCall: ToolCall;\n readonly toolError: Error;\n constructor(toolError: unknown, toolCall: ToolCall);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.d.cts","names":["ToolCall","MultipleToolsBoundError","Error","MultipleStructuredOutputsError","StructuredOutputParsingError","ToolInvocationError"],"sources":["../../src/agents/errors.d.ts"],"sourcesContent":["/* eslint-disable no-instanceof/no-instanceof */\nimport type { ToolCall } from \"@langchain/core/messages/tool\";\nexport declare class MultipleToolsBoundError extends Error {\n constructor();\n}\n/**\n * Raised when model returns multiple structured output tool calls when only one is expected.\n */\nexport declare class MultipleStructuredOutputsError extends Error {\n readonly toolNames: string[];\n constructor(toolNames: string[]);\n}\n/**\n * Raised when structured output tool call arguments fail to parse according to the schema.\n */\nexport declare class StructuredOutputParsingError extends Error {\n readonly toolName: string;\n readonly errors: string[];\n constructor(toolName: string, errors: string[]);\n}\n/**\n * Raised when a tool call is throwing an error.\n */\nexport declare class ToolInvocationError extends Error {\n readonly toolCall: ToolCall;\n readonly toolError: Error;\n constructor(toolError: unknown, toolCall: ToolCall);\n}\n"],"mappings":";;;cAEqBC,uBAAAA,SAAgCC,KAAK;EAArCD,WAAAA,CAAAA;AAMrB;AAOA;AAQA;;AACuBD,cAhBFG,8BAAAA,SAAuCD,KAAK,CAgB1CF;EAAQ,SACPE,SAAAA,EAAAA,MAAAA,EAAAA;EAAK,WACiBF,CAAAA,SAAAA,EAAAA,MAAAA,EAAAA;;AAHQ;;;cARjCI,4BAAAA,SAAqCF,KAAK;;;;;;;;cAQ1CG,mBAAAA,SAA4BH,KAAAA;qBAC1BF;sBACCE;4CACsBF"}
|
package/dist/agents/errors.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ToolCall } from "@langchain/core/messages/tool";
|
|
2
2
|
|
|
3
3
|
//#region src/agents/errors.d.ts
|
|
4
|
-
|
|
4
|
+
declare class MultipleToolsBoundError extends Error {
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
5
7
|
/**
|
|
6
8
|
* Raised when model returns multiple structured output tool calls when only one is expected.
|
|
7
9
|
*/
|
|
@@ -20,6 +22,11 @@ declare class StructuredOutputParsingError extends Error {
|
|
|
20
22
|
/**
|
|
21
23
|
* Raised when a tool call is throwing an error.
|
|
22
24
|
*/
|
|
25
|
+
declare class ToolInvocationError extends Error {
|
|
26
|
+
readonly toolCall: ToolCall;
|
|
27
|
+
readonly toolError: Error;
|
|
28
|
+
constructor(toolError: unknown, toolCall: ToolCall);
|
|
29
|
+
}
|
|
23
30
|
//#endregion
|
|
24
|
-
export { MultipleStructuredOutputsError, StructuredOutputParsingError };
|
|
31
|
+
export { MultipleStructuredOutputsError, MultipleToolsBoundError, StructuredOutputParsingError, ToolInvocationError };
|
|
25
32
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","names":["ToolCall","MultipleToolsBoundError","Error","MultipleStructuredOutputsError","StructuredOutputParsingError","ToolInvocationError"],"sources":["../../src/agents/errors.d.ts"],"sourcesContent":["/* eslint-disable no-instanceof/no-instanceof */\nimport type { ToolCall } from \"@langchain/core/messages/tool\";\nexport declare class MultipleToolsBoundError extends Error {\n constructor();\n}\n/**\n * Raised when model returns multiple structured output tool calls when only one is expected.\n */\nexport declare class MultipleStructuredOutputsError extends Error {\n readonly toolNames: string[];\n constructor(toolNames: string[]);\n}\n/**\n * Raised when structured output tool call arguments fail to parse according to the schema.\n */\nexport declare class StructuredOutputParsingError extends Error {\n readonly toolName: string;\n readonly errors: string[];\n constructor(toolName: string, errors: string[]);\n}\n/**\n * Raised when a tool call is throwing an error.\n */\nexport declare class ToolInvocationError extends Error {\n readonly toolCall: ToolCall;\n readonly toolError: Error;\n constructor(toolError: unknown, toolCall: ToolCall);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.d.ts","names":["ToolCall","MultipleToolsBoundError","Error","MultipleStructuredOutputsError","StructuredOutputParsingError","ToolInvocationError"],"sources":["../../src/agents/errors.d.ts"],"sourcesContent":["/* eslint-disable no-instanceof/no-instanceof */\nimport type { ToolCall } from \"@langchain/core/messages/tool\";\nexport declare class MultipleToolsBoundError extends Error {\n constructor();\n}\n/**\n * Raised when model returns multiple structured output tool calls when only one is expected.\n */\nexport declare class MultipleStructuredOutputsError extends Error {\n readonly toolNames: string[];\n constructor(toolNames: string[]);\n}\n/**\n * Raised when structured output tool call arguments fail to parse according to the schema.\n */\nexport declare class StructuredOutputParsingError extends Error {\n readonly toolName: string;\n readonly errors: string[];\n constructor(toolName: string, errors: string[]);\n}\n/**\n * Raised when a tool call is throwing an error.\n */\nexport declare class ToolInvocationError extends Error {\n readonly toolCall: ToolCall;\n readonly toolError: Error;\n constructor(toolError: unknown, toolCall: ToolCall);\n}\n"],"mappings":";;;cAEqBC,uBAAAA,SAAgCC,KAAK;EAArCD,WAAAA,CAAAA;AAMrB;AAOA;AAQA;;AACuBD,cAhBFG,8BAAAA,SAAuCD,KAAK,CAgB1CF;EAAQ,SACPE,SAAAA,EAAAA,MAAAA,EAAAA;EAAK,WACiBF,CAAAA,SAAAA,EAAAA,MAAAA,EAAAA;;AAHQ;;;cARjCI,4BAAAA,SAAqCF,KAAK;;;;;;;;cAQ1CG,mBAAAA,SAA4BH,KAAAA;qBAC1BF;sBACCE;4CACsBF"}
|
package/dist/agents/index.cjs
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_annotation = require('./annotation.cjs');
|
|
2
3
|
const require_errors = require('./errors.cjs');
|
|
3
4
|
const require_responses = require('./responses.cjs');
|
|
4
5
|
const require_ToolNode = require('./nodes/ToolNode.cjs');
|
|
5
6
|
const require_createAgent = require('./createAgent.cjs');
|
|
6
7
|
const require_middleware = require('./middlewareAgent/middleware.cjs');
|
|
7
8
|
const require_index = require('./middlewareAgent/index.cjs');
|
|
9
|
+
const require_types = require('./types.cjs');
|
|
8
10
|
require('./interrupt.cjs');
|
|
11
|
+
const require_utils = require('./tests/utils.cjs');
|
|
9
12
|
const __langchain_langgraph = require_rolldown_runtime.__toESM(require("@langchain/langgraph"));
|
|
10
13
|
|
|
11
14
|
//#region src/agents/index.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["createAgent","params: any","createAgentV2","createAgentV1"],"sources":["../../src/agents/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type {\n InteropZodObject,\n InteropZodType,\n} from \"@langchain/core/utils/types\";\nimport { MessagesAnnotation } from \"@langchain/langgraph\";\n\n// Import v1 (without middleware)\nimport { createAgent as createAgentV1 } from \"./createAgent.js\";\nimport { ReactAgent as ReactAgentV1 } from \"./ReactAgent.js\";\n\n// Import v2 (with middleware)\nimport { createAgent as createAgentV2 } from \"./middlewareAgent/index.js\";\nimport { ReactAgent as ReactAgentV2 } from \"./middlewareAgent/ReactAgent.js\";\n\nimport type {\n AnyAnnotationRoot,\n ResponseFormatUndefined,\n} from \"./annotation.js\";\nimport type { CreateAgentParams, ExtractZodArrayTypes } from \"./types.js\";\nimport type {\n CreateAgentParams as CreateAgentParamsV2,\n AgentMiddleware,\n} from \"./middlewareAgent/types.js\";\nimport type {\n ToolStrategy,\n TypedToolStrategy,\n ProviderStrategy,\n JsonSchemaFormat,\n} from \"./responses.js\";\n\n// Re-export types and utilities\nexport * from \"./types.js\";\nexport * from \"./errors.js\";\nexport * from \"./interrupt.js\";\nexport { ToolNode } from \"./nodes/ToolNode.js\";\nexport {\n toolStrategy,\n providerStrategy,\n ToolStrategy,\n ProviderStrategy,\n type ResponseFormat,\n} from \"./responses.js\";\nexport { createMiddleware } from \"./middlewareAgent/index.js\";\nexport type { AgentMiddleware } from \"./middlewareAgent/types.js\";\nexport type { ReactAgent } from \"./middlewareAgent/ReactAgent.js\";\n/**\n * Agents combine language models with tools to create systems that can reason\n * about tasks, decide which tools to use, and iteratively work towards solutions.\n * {@link createAgent} provides a production-ready ReAct (Reasoning + Acting)\n * agent implementation based on the paper {@link https://arxiv.org/abs/2210.03629|ReAct: Synergizing Reasoning and Acting in Language Models.}\n *\n * @example\n * ```ts\n * import { createAgent, tool } from \"langchain\";\n * import { z } from \"zod/v3\";\n *\n * const getWeather = tool((input) => {\n * if ([\"sf\", \"san francisco\"].includes(input.location.toLowerCase())) {\n * return \"It's 60 degrees and foggy.\";\n * } else {\n * return \"It's 90 degrees and sunny.\";\n * }\n * }, {\n * name: \"get_weather\",\n * description: \"Call to get the current weather.\",\n * schema: z.object({\n * location: z.string().describe(\"Location to get the weather for.\"),\n * })\n * })\n *\n * const agent = createAgent({\n * // use chat model from \"@langchain/openai\"\n * model: \"openai:gpt-4o-mini\",\n * tools: [getWeather]\n * });\n *\n * const inputs = {\n * messages: [{ role: \"user\", content: \"what is the weather in SF?\" }],\n * };\n *\n * const stream = await agent.stream(inputs, { streamMode: \"values\" });\n *\n * for await (const { messages } of stream) {\n * console.log(messages);\n * }\n * // Returns the messages in the state at each step of execution\n * ```\n */\n\n// ===== V1 OVERLOADS (WITHOUT MIDDLEWARE) =====\n// These overloads come first to ensure proper type inference when middleware is NOT provided\n\n// Overload 1: V1 - With responseFormat as single InteropZodType\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n T,\n ContextSchema,\n InteropZodType<T>\n > & {\n responseFormat: InteropZodType<T>;\n }\n): ReactAgentV1<StateSchema, T, ContextSchema>;\n\n// Overload 2: V1 - With responseFormat as array of InteropZodTypes\nexport function createAgent<\n T extends readonly InteropZodType<any>[],\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n ExtractZodArrayTypes<T> extends Record<string, any>\n ? ExtractZodArrayTypes<T>\n : Record<string, any>,\n ContextSchema,\n T\n > & {\n responseFormat: T;\n }\n): ReactAgentV1<\n StateSchema,\n ExtractZodArrayTypes<T> extends Record<string, any>\n ? ExtractZodArrayTypes<T>\n : Record<string, any>,\n ContextSchema\n>;\n\n// Overload 3: V1 - With responseFormat as JsonSchemaFormat\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat\n > & {\n responseFormat: JsonSchemaFormat;\n }\n): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n\n// Overload 4: V1 - With responseFormat as array of JsonSchemaFormat\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat[]\n > & {\n responseFormat: JsonSchemaFormat[];\n }\n): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n\n// Overload 5: V1 - With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[]\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat | JsonSchemaFormat[]\n > & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n }\n): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n\n// Overload 6: V1 - With responseFormat as TypedToolStrategy\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n T,\n ContextSchema,\n TypedToolStrategy<T>\n > & {\n responseFormat: TypedToolStrategy<T>;\n }\n): ReactAgentV1<StateSchema, T, ContextSchema>;\n\n// Overload 7: V1 - With responseFormat as single ToolStrategy\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<StateSchema, T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n }\n): ReactAgentV1<StateSchema, T, ContextSchema>;\n\n// Overload 8: V1 - With responseFormat as ProviderStrategy\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n T,\n ContextSchema,\n ProviderStrategy<T>\n > & {\n responseFormat: ProviderStrategy<T>;\n }\n): ReactAgentV1<StateSchema, T, ContextSchema>;\n\n// Overload 9: V1 - Without responseFormat property at all\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: Omit<\n CreateAgentParams<\n StateSchema,\n ResponseFormatUndefined,\n ContextSchema,\n never\n >,\n \"responseFormat\"\n >\n): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n\n// Overload 10: V1 - With responseFormat explicitly undefined\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: Omit<\n CreateAgentParams<\n StateSchema,\n ResponseFormatUndefined,\n ContextSchema,\n never\n >,\n \"responseFormat\"\n > & {\n responseFormat?: undefined;\n }\n): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n\n// Overload 11: V1 - For other ResponseFormat values (failsafe)\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n StructuredResponseFormat extends Record<string, any> = Record<string, any>,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n StructuredResponseFormat,\n ContextSchema,\n any\n > & {\n responseFormat: any;\n }\n): ReactAgentV1<StateSchema, StructuredResponseFormat, ContextSchema>;\n\n// ===== V2 OVERLOADS (WITH MIDDLEWARE) =====\n// These overloads explicitly require the middleware property\n\n// Overload 12: With responseFormat as single InteropZodType and middleware\nexport function createAgent<\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<T, ContextSchema, InteropZodType<T>> & {\n responseFormat: InteropZodType<T>;\n middleware: TMiddleware;\n }\n): ReactAgentV2<T, ContextSchema, TMiddleware>;\n\n// Overload 13: With responseFormat as array of InteropZodTypes and middleware\nexport function createAgent<\n T extends readonly InteropZodType<any>[],\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<\n ExtractZodArrayTypes<T> extends Record<string, any>\n ? ExtractZodArrayTypes<T>\n : Record<string, any>,\n ContextSchema,\n T\n > & {\n responseFormat: T;\n middleware: TMiddleware;\n }\n): ReactAgentV2<\n ExtractZodArrayTypes<T> extends Record<string, any>\n ? ExtractZodArrayTypes<T>\n : Record<string, any>,\n ContextSchema,\n TMiddleware\n>;\n\n// Overload 14: With responseFormat as JsonSchemaFormat and middleware\nexport function createAgent<\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat\n > & {\n responseFormat: JsonSchemaFormat;\n middleware: TMiddleware;\n }\n): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n\n// Overload 15: With responseFormat as array of JsonSchemaFormat and middleware\nexport function createAgent<\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat[]\n > & {\n responseFormat: JsonSchemaFormat[];\n middleware: TMiddleware;\n }\n): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n\n// Overload 16: With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[] and middleware\nexport function createAgent<\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat | JsonSchemaFormat[]\n > & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n middleware: TMiddleware;\n }\n): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n\n// Overload 17: With responseFormat as TypedToolStrategy and middleware\nexport function createAgent<\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<T, ContextSchema, TypedToolStrategy<T>> & {\n responseFormat: TypedToolStrategy<T>;\n middleware: TMiddleware;\n }\n): ReactAgentV2<T, ContextSchema, TMiddleware>;\n\n// Overload 18: With responseFormat as single ToolStrategy and middleware\nexport function createAgent<\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n middleware: TMiddleware;\n }\n): ReactAgentV2<T, ContextSchema, TMiddleware>;\n\n// Overload 19: With responseFormat as ProviderStrategy and middleware\nexport function createAgent<\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<T, ContextSchema, ProviderStrategy<T>> & {\n responseFormat: ProviderStrategy<T>;\n middleware: TMiddleware;\n }\n): ReactAgentV2<T, ContextSchema, TMiddleware>;\n\n// Overload 20: Without responseFormat but with middleware\nexport function createAgent<\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: Omit<\n CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>,\n \"responseFormat\"\n > & { middleware: TMiddleware }\n): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n\n// Overload 21: With responseFormat explicitly undefined and middleware\nexport function createAgent<\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: Omit<\n CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>,\n \"responseFormat\"\n > & {\n responseFormat?: undefined;\n middleware: TMiddleware;\n }\n): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n\n// Overload 22: For other ResponseFormat values with middleware (failsafe)\nexport function createAgent<\n StructuredResponseFormat extends Record<string, any> = Record<string, any>,\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<StructuredResponseFormat, ContextSchema, any> & {\n responseFormat: any;\n middleware: TMiddleware;\n }\n): ReactAgentV2<StructuredResponseFormat, ContextSchema, TMiddleware>;\n\nexport function createAgent(params: any): any {\n /**\n * Check if middleware property is present\n */\n if (\"middleware\" in params && params.middleware !== undefined) {\n /**\n * The user wants to use the middleware version of the agent.\n * Let's verify that `preModelHook` and `postModelHook` are not provided\n */\n if (\"preModelHook\" in params || \"postModelHook\" in params) {\n throw new Error(\n \"The `preModelHook` and `postModelHook` parameters are not supported in the middleware version of the agent.\"\n );\n }\n\n /**\n * Use v2 (middleware version)\n */\n return createAgentV2(params);\n } else {\n /**\n * Use v1 (original version)\n */\n return createAgentV1(params);\n }\n}\n"],"mappings":";;;;;;;;;;;AAogBA,SAAgBA,cAAYC,QAAkB;;;;AAI5C,KAAI,gBAAgB,UAAU,OAAO,eAAe,QAAW;;;;;AAK7D,MAAI,kBAAkB,UAAU,mBAAmB,OACjD,OAAM,IAAI,MACR;;;;AAOJ,SAAOC,0BAAc,OAAO;CAC7B;;;;AAIC,QAAOC,gCAAc,OAAO;AAE/B"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["createAgent","params: any","createAgentV2","createAgentV1"],"sources":["../../src/agents/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type {\n InteropZodObject,\n InteropZodType,\n} from \"@langchain/core/utils/types\";\nimport { MessagesAnnotation } from \"@langchain/langgraph\";\n\n// Import v1 (without middleware)\nimport { createAgent as createAgentV1 } from \"./createAgent.js\";\nimport { ReactAgent as ReactAgentV1 } from \"./ReactAgent.js\";\n\n// Import v2 (with middleware)\nimport { createAgent as createAgentV2 } from \"./middlewareAgent/index.js\";\nimport { ReactAgent as ReactAgentV2 } from \"./middlewareAgent/ReactAgent.js\";\n\nimport type {\n AnyAnnotationRoot,\n ResponseFormatUndefined,\n} from \"./annotation.js\";\nimport type { CreateAgentParams, ExtractZodArrayTypes } from \"./types.js\";\nimport type {\n CreateAgentParams as CreateAgentParamsV2,\n AgentMiddleware,\n} from \"./middlewareAgent/types.js\";\nimport type {\n ToolStrategy,\n TypedToolStrategy,\n ProviderStrategy,\n JsonSchemaFormat,\n} from \"./responses.js\";\n\n// Re-export types and utilities\nexport * from \"./types.js\";\nexport * from \"./errors.js\";\nexport * from \"./interrupt.js\";\nexport * from \"./annotation.js\";\nexport { ToolNode } from \"./nodes/ToolNode.js\";\nexport {\n toolStrategy,\n providerStrategy,\n ToolStrategy,\n ProviderStrategy,\n type ResponseFormat,\n} from \"./responses.js\";\nexport { createMiddleware } from \"./middlewareAgent/index.js\";\nexport { FakeToolCallingModel } from \"./tests/utils.js\";\nexport type { AgentMiddleware } from \"./middlewareAgent/types.js\";\nexport type { ReactAgent } from \"./middlewareAgent/ReactAgent.js\";\n/**\n * Agents combine language models with tools to create systems that can reason\n * about tasks, decide which tools to use, and iteratively work towards solutions.\n * {@link createAgent} provides a production-ready ReAct (Reasoning + Acting)\n * agent implementation based on the paper {@link https://arxiv.org/abs/2210.03629|ReAct: Synergizing Reasoning and Acting in Language Models.}\n *\n * @example\n * ```ts\n * import { createAgent, tool } from \"langchain\";\n * import { z } from \"zod/v3\";\n *\n * const getWeather = tool((input) => {\n * if ([\"sf\", \"san francisco\"].includes(input.location.toLowerCase())) {\n * return \"It's 60 degrees and foggy.\";\n * } else {\n * return \"It's 90 degrees and sunny.\";\n * }\n * }, {\n * name: \"get_weather\",\n * description: \"Call to get the current weather.\",\n * schema: z.object({\n * location: z.string().describe(\"Location to get the weather for.\"),\n * })\n * })\n *\n * const agent = createAgent({\n * // use chat model from \"@langchain/openai\"\n * model: \"openai:gpt-4o-mini\",\n * tools: [getWeather]\n * });\n *\n * const inputs = {\n * messages: [{ role: \"user\", content: \"what is the weather in SF?\" }],\n * };\n *\n * const stream = await agent.stream(inputs, { streamMode: \"values\" });\n *\n * for await (const { messages } of stream) {\n * console.log(messages);\n * }\n * // Returns the messages in the state at each step of execution\n * ```\n */\n\n// ===== V1 OVERLOADS (WITHOUT MIDDLEWARE) =====\n// These overloads come first to ensure proper type inference when middleware is NOT provided\n\n// Overload 1: V1 - With responseFormat as single InteropZodType\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n T,\n ContextSchema,\n InteropZodType<T>\n > & {\n responseFormat: InteropZodType<T>;\n }\n): ReactAgentV1<StateSchema, T, ContextSchema>;\n\n// Overload 2: V1 - With responseFormat as array of InteropZodTypes\nexport function createAgent<\n T extends readonly InteropZodType<any>[],\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n ExtractZodArrayTypes<T> extends Record<string, any>\n ? ExtractZodArrayTypes<T>\n : Record<string, any>,\n ContextSchema,\n T\n > & {\n responseFormat: T;\n }\n): ReactAgentV1<\n StateSchema,\n ExtractZodArrayTypes<T> extends Record<string, any>\n ? ExtractZodArrayTypes<T>\n : Record<string, any>,\n ContextSchema\n>;\n\n// Overload 3: V1 - With responseFormat as JsonSchemaFormat\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat\n > & {\n responseFormat: JsonSchemaFormat;\n }\n): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n\n// Overload 4: V1 - With responseFormat as array of JsonSchemaFormat\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat[]\n > & {\n responseFormat: JsonSchemaFormat[];\n }\n): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n\n// Overload 5: V1 - With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[]\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat | JsonSchemaFormat[]\n > & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n }\n): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n\n// Overload 6: V1 - With responseFormat as TypedToolStrategy\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n T,\n ContextSchema,\n TypedToolStrategy<T>\n > & {\n responseFormat: TypedToolStrategy<T>;\n }\n): ReactAgentV1<StateSchema, T, ContextSchema>;\n\n// Overload 7: V1 - With responseFormat as single ToolStrategy\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<StateSchema, T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n }\n): ReactAgentV1<StateSchema, T, ContextSchema>;\n\n// Overload 8: V1 - With responseFormat as ProviderStrategy\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n T,\n ContextSchema,\n ProviderStrategy<T>\n > & {\n responseFormat: ProviderStrategy<T>;\n }\n): ReactAgentV1<StateSchema, T, ContextSchema>;\n\n// Overload 9: V1 - Without responseFormat property at all\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: Omit<\n CreateAgentParams<\n StateSchema,\n ResponseFormatUndefined,\n ContextSchema,\n never\n >,\n \"responseFormat\"\n >\n): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n\n// Overload 10: V1 - With responseFormat explicitly undefined\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: Omit<\n CreateAgentParams<\n StateSchema,\n ResponseFormatUndefined,\n ContextSchema,\n never\n >,\n \"responseFormat\"\n > & {\n responseFormat?: undefined;\n }\n): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n\n// Overload 11: V1 - For other ResponseFormat values (failsafe)\nexport function createAgent<\n StateSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = typeof MessagesAnnotation,\n StructuredResponseFormat extends Record<string, any> = Record<string, any>,\n ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot\n>(\n params: CreateAgentParams<\n StateSchema,\n StructuredResponseFormat,\n ContextSchema,\n any\n > & {\n responseFormat: any;\n }\n): ReactAgentV1<StateSchema, StructuredResponseFormat, ContextSchema>;\n\n// ===== V2 OVERLOADS (WITH MIDDLEWARE) =====\n// These overloads explicitly require the middleware property\n\n// Overload 12: With responseFormat as single InteropZodType and middleware\nexport function createAgent<\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<T, ContextSchema, InteropZodType<T>> & {\n responseFormat: InteropZodType<T>;\n middleware: TMiddleware;\n }\n): ReactAgentV2<T, ContextSchema, TMiddleware>;\n\n// Overload 13: With responseFormat as array of InteropZodTypes and middleware\nexport function createAgent<\n T extends readonly InteropZodType<any>[],\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<\n ExtractZodArrayTypes<T> extends Record<string, any>\n ? ExtractZodArrayTypes<T>\n : Record<string, any>,\n ContextSchema,\n T\n > & {\n responseFormat: T;\n middleware: TMiddleware;\n }\n): ReactAgentV2<\n ExtractZodArrayTypes<T> extends Record<string, any>\n ? ExtractZodArrayTypes<T>\n : Record<string, any>,\n ContextSchema,\n TMiddleware\n>;\n\n// Overload 14: With responseFormat as JsonSchemaFormat and middleware\nexport function createAgent<\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat\n > & {\n responseFormat: JsonSchemaFormat;\n middleware: TMiddleware;\n }\n): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n\n// Overload 15: With responseFormat as array of JsonSchemaFormat and middleware\nexport function createAgent<\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat[]\n > & {\n responseFormat: JsonSchemaFormat[];\n middleware: TMiddleware;\n }\n): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n\n// Overload 16: With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[] and middleware\nexport function createAgent<\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<\n Record<string, unknown>,\n ContextSchema,\n JsonSchemaFormat | JsonSchemaFormat[]\n > & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n middleware: TMiddleware;\n }\n): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n\n// Overload 17: With responseFormat as TypedToolStrategy and middleware\nexport function createAgent<\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<T, ContextSchema, TypedToolStrategy<T>> & {\n responseFormat: TypedToolStrategy<T>;\n middleware: TMiddleware;\n }\n): ReactAgentV2<T, ContextSchema, TMiddleware>;\n\n// Overload 18: With responseFormat as single ToolStrategy and middleware\nexport function createAgent<\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n middleware: TMiddleware;\n }\n): ReactAgentV2<T, ContextSchema, TMiddleware>;\n\n// Overload 19: With responseFormat as ProviderStrategy and middleware\nexport function createAgent<\n T extends Record<string, any> = Record<string, any>,\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<T, ContextSchema, ProviderStrategy<T>> & {\n responseFormat: ProviderStrategy<T>;\n middleware: TMiddleware;\n }\n): ReactAgentV2<T, ContextSchema, TMiddleware>;\n\n// Overload 20: Without responseFormat but with middleware\nexport function createAgent<\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: Omit<\n CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>,\n \"responseFormat\"\n > & { middleware: TMiddleware }\n): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n\n// Overload 21: With responseFormat explicitly undefined and middleware\nexport function createAgent<\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: Omit<\n CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>,\n \"responseFormat\"\n > & {\n responseFormat?: undefined;\n middleware: TMiddleware;\n }\n): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n\n// Overload 22: For other ResponseFormat values with middleware (failsafe)\nexport function createAgent<\n StructuredResponseFormat extends Record<string, any> = Record<string, any>,\n ContextSchema extends\n | AnyAnnotationRoot\n | InteropZodObject = AnyAnnotationRoot,\n TMiddleware extends readonly AgentMiddleware<\n any,\n any,\n any\n >[] = readonly AgentMiddleware<any, any, any>[]\n>(\n params: CreateAgentParamsV2<StructuredResponseFormat, ContextSchema, any> & {\n responseFormat: any;\n middleware: TMiddleware;\n }\n): ReactAgentV2<StructuredResponseFormat, ContextSchema, TMiddleware>;\n\nexport function createAgent(params: any): any {\n /**\n * Check if middleware property is present\n */\n if (\"middleware\" in params && params.middleware !== undefined) {\n /**\n * The user wants to use the middleware version of the agent.\n * Let's verify that `preModelHook` and `postModelHook` are not provided\n */\n if (\"preModelHook\" in params || \"postModelHook\" in params) {\n throw new Error(\n \"The `preModelHook` and `postModelHook` parameters are not supported in the middleware version of the agent.\"\n );\n }\n\n /**\n * Use v2 (middleware version)\n */\n return createAgentV2(params);\n } else {\n /**\n * Use v1 (original version)\n */\n return createAgentV1(params);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAsgBA,SAAgBA,cAAYC,QAAkB;;;;AAI5C,KAAI,gBAAgB,UAAU,OAAO,eAAe,QAAW;;;;;AAK7D,MAAI,kBAAkB,UAAU,mBAAmB,OACjD,OAAM,IAAI,MACR;;;;AAOJ,SAAOC,0BAAc,OAAO;CAC7B;;;;AAIC,QAAOC,gCAAc,OAAO;AAE/B"}
|
package/dist/agents/index.d.cts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { AnyAnnotationRoot, ResponseFormatUndefined } from "./annotation.cjs";
|
|
2
|
-
import { MultipleStructuredOutputsError, StructuredOutputParsingError } from "./errors.cjs";
|
|
1
|
+
import { AnyAnnotationRoot, PreHookAnnotation, ReactAgentAnnotation, ResponseFormatUndefined, ToAnnotationRoot, createAgentAnnotation, createAgentAnnotationConditional, createAgentBaseAnnotation, enhanceStateSchemaWithMessageReducer } from "./annotation.cjs";
|
|
2
|
+
import { MultipleStructuredOutputsError, MultipleToolsBoundError, StructuredOutputParsingError, ToolInvocationError } from "./errors.cjs";
|
|
3
3
|
import { JsonSchemaFormat, ProviderStrategy, ResponseFormat, ToolStrategy, TypedToolStrategy, providerStrategy, toolStrategy } from "./responses.cjs";
|
|
4
|
-
import { ActionRequest, HumanInterrupt, HumanInterruptConfig, HumanResponse, Interrupt } from "./interrupt.cjs";
|
|
5
4
|
import { ToolNode } from "./nodes/ToolNode.cjs";
|
|
6
|
-
import { AgentRuntime, AgentState, ClientTool, CreateAgentParams, ExtractZodArrayTypes, N, Prompt, ServerTool } from "./types.cjs";
|
|
5
|
+
import { AgentRuntime, AgentState, ClientTool, CreateAgentParams, ExecutedToolCall, ExtractZodArrayTypes, ExtractZodType, InferResponseFormatType, InternalAgentState, META_EXTRAS_DESCRIPTION_PREFIX, N, Prompt, ReducedZodChannel, ServerTool, WithStateGraphNodes } from "./types.cjs";
|
|
7
6
|
import { AgentMiddleware, CreateAgentParams as CreateAgentParams$1 } from "./middlewareAgent/types.cjs";
|
|
7
|
+
import { createMiddleware } from "./middlewareAgent/middleware.cjs";
|
|
8
8
|
import { ReactAgent } from "./ReactAgent.cjs";
|
|
9
9
|
import { ReactAgent as ReactAgent$1 } from "./middlewareAgent/ReactAgent.cjs";
|
|
10
|
-
import {
|
|
10
|
+
import { HumanInterrupt, HumanInterruptConfig, HumanResponse, Interrupt, interrupt } from "./interrupt.cjs";
|
|
11
|
+
import { FakeToolCallingModel } from "./tests/utils.cjs";
|
|
11
12
|
import { InteropZodObject, InteropZodType } from "@langchain/core/utils/types";
|
|
12
13
|
import { MessagesAnnotation } from "@langchain/langgraph";
|
|
13
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":["InteropZodObject","InteropZodType","MessagesAnnotation","ReactAgent","ReactAgentV1","ReactAgentV2","AnyAnnotationRoot","ResponseFormatUndefined","CreateAgentParams","ExtractZodArrayTypes","CreateAgentParamsV2","AgentMiddleware","ToolStrategy","TypedToolStrategy","ProviderStrategy","JsonSchemaFormat","ToolNode","toolStrategy","providerStrategy","ResponseFormat","createMiddleware","createAgent","Record","StateSchema","T","ContextSchema","Omit","StructuredResponseFormat","TMiddleware"],"sources":["../../src/agents/index.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { InteropZodObject, InteropZodType } from \"@langchain/core/utils/types\";\nimport { MessagesAnnotation } from \"@langchain/langgraph\";\nimport { ReactAgent as ReactAgentV1 } from \"./ReactAgent.js\";\nimport { ReactAgent as ReactAgentV2 } from \"./middlewareAgent/ReactAgent.js\";\nimport type { AnyAnnotationRoot, ResponseFormatUndefined } from \"./annotation.js\";\nimport type { CreateAgentParams, ExtractZodArrayTypes } from \"./types.js\";\nimport type { CreateAgentParams as CreateAgentParamsV2, AgentMiddleware } from \"./middlewareAgent/types.js\";\nimport type { ToolStrategy, TypedToolStrategy, ProviderStrategy, JsonSchemaFormat } from \"./responses.js\";\n// Re-export types and utilities\nexport * from \"./types.js\";\nexport * from \"./errors.js\";\nexport * from \"./interrupt.js\";\nexport { ToolNode } from \"./nodes/ToolNode.js\";\nexport { toolStrategy, providerStrategy, ToolStrategy, ProviderStrategy, type ResponseFormat, } from \"./responses.js\";\nexport { createMiddleware } from \"./middlewareAgent/index.js\";\nexport type { AgentMiddleware } from \"./middlewareAgent/types.js\";\nexport type { ReactAgent } from \"./middlewareAgent/ReactAgent.js\";\n/**\n * Agents combine language models with tools to create systems that can reason\n * about tasks, decide which tools to use, and iteratively work towards solutions.\n * {@link createAgent} provides a production-ready ReAct (Reasoning + Acting)\n * agent implementation based on the paper {@link https://arxiv.org/abs/2210.03629|ReAct: Synergizing Reasoning and Acting in Language Models.}\n *\n * @example\n * ```ts\n * import { createAgent, tool } from \"langchain\";\n * import { z } from \"zod/v3\";\n *\n * const getWeather = tool((input) => {\n * if ([\"sf\", \"san francisco\"].includes(input.location.toLowerCase())) {\n * return \"It's 60 degrees and foggy.\";\n * } else {\n * return \"It's 90 degrees and sunny.\";\n * }\n * }, {\n * name: \"get_weather\",\n * description: \"Call to get the current weather.\",\n * schema: z.object({\n * location: z.string().describe(\"Location to get the weather for.\"),\n * })\n * })\n *\n * const agent = createAgent({\n * // use chat model from \"@langchain/openai\"\n * model: \"openai:gpt-4o-mini\",\n * tools: [getWeather]\n * });\n *\n * const inputs = {\n * messages: [{ role: \"user\", content: \"what is the weather in SF?\" }],\n * };\n *\n * const stream = await agent.stream(inputs, { streamMode: \"values\" });\n *\n * for await (const { messages } of stream) {\n * console.log(messages);\n * }\n * // Returns the messages in the state at each step of execution\n * ```\n */\n// ===== V1 OVERLOADS (WITHOUT MIDDLEWARE) =====\n// These overloads come first to ensure proper type inference when middleware is NOT provided\n// Overload 1: V1 - With responseFormat as single InteropZodType\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, InteropZodType<T>> & {\n responseFormat: InteropZodType<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 2: V1 - With responseFormat as array of InteropZodTypes\nexport declare function createAgent<T extends readonly InteropZodType<any>[], StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, T> & {\n responseFormat: T;\n}): ReactAgentV1<StateSchema, ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema>;\n// Overload 3: V1 - With responseFormat as JsonSchemaFormat\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat> & {\n responseFormat: JsonSchemaFormat;\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 4: V1 - With responseFormat as array of JsonSchemaFormat\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat[];\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 5: V1 - With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[]\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat | JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 6: V1 - With responseFormat as TypedToolStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, TypedToolStrategy<T>> & {\n responseFormat: TypedToolStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 7: V1 - With responseFormat as single ToolStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 8: V1 - With responseFormat as ProviderStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, ProviderStrategy<T>> & {\n responseFormat: ProviderStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 9: V1 - Without responseFormat property at all\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: Omit<CreateAgentParams<StateSchema, ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\">): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n// Overload 10: V1 - With responseFormat explicitly undefined\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: Omit<CreateAgentParams<StateSchema, ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n responseFormat?: undefined;\n}): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n// Overload 11: V1 - For other ResponseFormat values (failsafe)\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, StructuredResponseFormat extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, StructuredResponseFormat, ContextSchema, any> & {\n responseFormat: any;\n}): ReactAgentV1<StateSchema, StructuredResponseFormat, ContextSchema>;\n// ===== V2 OVERLOADS (WITH MIDDLEWARE) =====\n// These overloads explicitly require the middleware property\n// Overload 12: With responseFormat as single InteropZodType and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, InteropZodType<T>> & {\n responseFormat: InteropZodType<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 13: With responseFormat as array of InteropZodTypes and middleware\nexport declare function createAgent<T extends readonly InteropZodType<any>[], ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, T> & {\n responseFormat: T;\n middleware: TMiddleware;\n}): ReactAgentV2<ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, TMiddleware>;\n// Overload 14: With responseFormat as JsonSchemaFormat and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat> & {\n responseFormat: JsonSchemaFormat;\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 15: With responseFormat as array of JsonSchemaFormat and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat[];\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 16: With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[] and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat | JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 17: With responseFormat as TypedToolStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, TypedToolStrategy<T>> & {\n responseFormat: TypedToolStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 18: With responseFormat as single ToolStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 19: With responseFormat as ProviderStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, ProviderStrategy<T>> & {\n responseFormat: ProviderStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 20: Without responseFormat but with middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: Omit<CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n middleware: TMiddleware;\n}): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n// Overload 21: With responseFormat explicitly undefined and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: Omit<CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n responseFormat?: undefined;\n middleware: TMiddleware;\n}): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n// Overload 22: For other ResponseFormat values with middleware (failsafe)\nexport declare function createAgent<StructuredResponseFormat extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<StructuredResponseFormat, ContextSchema, any> & {\n responseFormat: any;\n middleware: TMiddleware;\n}): ReactAgentV2<StructuredResponseFormat, ContextSchema, TMiddleware>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEmIyB,iBAN3GJ,WAM2GI,CAAAA,oBAN3EnB,iBAM2EmB,GANvDzB,gBAMuDyB,GAAAA,OAN7BvB,kBAM6BuB,EAAAA,UANCH,MAMDG,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GANuBH,MAMvBG,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,EAAAA,sBANkEnB,iBAMlEmB,GANsFzB,gBAMtFyB,GANyGnB,iBAMzGmB,CAAAA,CAAAA,MAAAA,EANoIjB,iBAMpIiB,CANsJF,WAMtJE,EANmKD,CAMnKC,EANsKA,aAMtKA,EANqLxB,cAMrLwB,CANoMD,CAMpMC,CAAAA,CAAAA,GAAAA;EAAa,cAA5IrB,EALgBH,cAKhBG,CAL+BoB,CAK/BpB,CAAAA;AAAY,CAAA,CAAA,EAJZA,UAIY,CAJCmB,WAID,EAJcC,CAId,EAJiBC,aAIjB,CAAA;AAEhB;AAAmC,iBAJXJ,WAIW,CAAA,UAAA,SAJoBpB,cAIpB,CAAA,GAAA,CAAA,EAAA,EAAA,oBAJ+DK,iBAI/D,GAJmFN,gBAInF,GAAA,OAJ6GE,kBAI7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kEpHM,WAlEoHN;CAAM,CAAA,EAmEtIjB,YAnEsJiB,CAmEzIf,uBAnEyIe,EAmEhHG,aAnEgHH,EAmEjGM,WAnEiGN,CAAAA;;AAA+DtB,iBAqEjMqB,WArEiMrB,CAAAA,iCAqEpJsB,MArEoJtB,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GAqE9HsB,MArE8HtB,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,EAAAA,sBAqEnFM,iBArEmFN,GAqE/DA,gBArE+DA,GAqE5CM,iBArE4CN,EAAAA,oBAAAA,SAqEIW,eArEJX,CAAAA,GAAAA,EAAAA,GAAAA,EAAAA,GAAAA,CAAAA,EAAAA,GAAAA,SAqEgDW,eArEhDX,CAAAA,GAAAA,EAAAA,GAAAA,EAAAA,GAAAA,CAAAA,EAAAA,CAAAA,CAAAA,MAAAA,EAqE0FU,mBArE1FV,CAqE8G2B,wBArE9G3B,EAqEwIyB,aArExIzB,EAAAA,GAAAA,CAAAA,GAAAA;EAAgB,cAAGM,EAAAA,GAAAA;EAAiB,UAA4BiB,EAuEzQK,WAvEyQL;CAAW,CAAA,EAwEhSlB,YAxEkSmB,CAwErRG,wBAxEqRH,EAwE3PC,aAxE2PD,EAwE5OI,WAxE4OJ,CAAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["InteropZodObject","InteropZodType","MessagesAnnotation","ReactAgent","ReactAgentV1","ReactAgentV2","AnyAnnotationRoot","ResponseFormatUndefined","CreateAgentParams","ExtractZodArrayTypes","CreateAgentParamsV2","AgentMiddleware","ToolStrategy","TypedToolStrategy","ProviderStrategy","JsonSchemaFormat","ToolNode","toolStrategy","providerStrategy","ResponseFormat","createMiddleware","FakeToolCallingModel","createAgent","Record","StateSchema","T","ContextSchema","Omit","StructuredResponseFormat","TMiddleware"],"sources":["../../src/agents/index.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { InteropZodObject, InteropZodType } from \"@langchain/core/utils/types\";\nimport { MessagesAnnotation } from \"@langchain/langgraph\";\nimport { ReactAgent as ReactAgentV1 } from \"./ReactAgent.js\";\nimport { ReactAgent as ReactAgentV2 } from \"./middlewareAgent/ReactAgent.js\";\nimport type { AnyAnnotationRoot, ResponseFormatUndefined } from \"./annotation.js\";\nimport type { CreateAgentParams, ExtractZodArrayTypes } from \"./types.js\";\nimport type { CreateAgentParams as CreateAgentParamsV2, AgentMiddleware } from \"./middlewareAgent/types.js\";\nimport type { ToolStrategy, TypedToolStrategy, ProviderStrategy, JsonSchemaFormat } from \"./responses.js\";\n// Re-export types and utilities\nexport * from \"./types.js\";\nexport * from \"./errors.js\";\nexport * from \"./interrupt.js\";\nexport * from \"./annotation.js\";\nexport { ToolNode } from \"./nodes/ToolNode.js\";\nexport { toolStrategy, providerStrategy, ToolStrategy, ProviderStrategy, type ResponseFormat, } from \"./responses.js\";\nexport { createMiddleware } from \"./middlewareAgent/index.js\";\nexport { FakeToolCallingModel } from \"./tests/utils.js\";\nexport type { AgentMiddleware } from \"./middlewareAgent/types.js\";\nexport type { ReactAgent } from \"./middlewareAgent/ReactAgent.js\";\n/**\n * Agents combine language models with tools to create systems that can reason\n * about tasks, decide which tools to use, and iteratively work towards solutions.\n * {@link createAgent} provides a production-ready ReAct (Reasoning + Acting)\n * agent implementation based on the paper {@link https://arxiv.org/abs/2210.03629|ReAct: Synergizing Reasoning and Acting in Language Models.}\n *\n * @example\n * ```ts\n * import { createAgent, tool } from \"langchain\";\n * import { z } from \"zod/v3\";\n *\n * const getWeather = tool((input) => {\n * if ([\"sf\", \"san francisco\"].includes(input.location.toLowerCase())) {\n * return \"It's 60 degrees and foggy.\";\n * } else {\n * return \"It's 90 degrees and sunny.\";\n * }\n * }, {\n * name: \"get_weather\",\n * description: \"Call to get the current weather.\",\n * schema: z.object({\n * location: z.string().describe(\"Location to get the weather for.\"),\n * })\n * })\n *\n * const agent = createAgent({\n * // use chat model from \"@langchain/openai\"\n * model: \"openai:gpt-4o-mini\",\n * tools: [getWeather]\n * });\n *\n * const inputs = {\n * messages: [{ role: \"user\", content: \"what is the weather in SF?\" }],\n * };\n *\n * const stream = await agent.stream(inputs, { streamMode: \"values\" });\n *\n * for await (const { messages } of stream) {\n * console.log(messages);\n * }\n * // Returns the messages in the state at each step of execution\n * ```\n */\n// ===== V1 OVERLOADS (WITHOUT MIDDLEWARE) =====\n// These overloads come first to ensure proper type inference when middleware is NOT provided\n// Overload 1: V1 - With responseFormat as single InteropZodType\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, InteropZodType<T>> & {\n responseFormat: InteropZodType<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 2: V1 - With responseFormat as array of InteropZodTypes\nexport declare function createAgent<T extends readonly InteropZodType<any>[], StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, T> & {\n responseFormat: T;\n}): ReactAgentV1<StateSchema, ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema>;\n// Overload 3: V1 - With responseFormat as JsonSchemaFormat\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat> & {\n responseFormat: JsonSchemaFormat;\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 4: V1 - With responseFormat as array of JsonSchemaFormat\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat[];\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 5: V1 - With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[]\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat | JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 6: V1 - With responseFormat as TypedToolStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, TypedToolStrategy<T>> & {\n responseFormat: TypedToolStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 7: V1 - With responseFormat as single ToolStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 8: V1 - With responseFormat as ProviderStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, ProviderStrategy<T>> & {\n responseFormat: ProviderStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 9: V1 - Without responseFormat property at all\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: Omit<CreateAgentParams<StateSchema, ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\">): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n// Overload 10: V1 - With responseFormat explicitly undefined\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: Omit<CreateAgentParams<StateSchema, ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n responseFormat?: undefined;\n}): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n// Overload 11: V1 - For other ResponseFormat values (failsafe)\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, StructuredResponseFormat extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, StructuredResponseFormat, ContextSchema, any> & {\n responseFormat: any;\n}): ReactAgentV1<StateSchema, StructuredResponseFormat, ContextSchema>;\n// ===== V2 OVERLOADS (WITH MIDDLEWARE) =====\n// These overloads explicitly require the middleware property\n// Overload 12: With responseFormat as single InteropZodType and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, InteropZodType<T>> & {\n responseFormat: InteropZodType<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 13: With responseFormat as array of InteropZodTypes and middleware\nexport declare function createAgent<T extends readonly InteropZodType<any>[], ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, T> & {\n responseFormat: T;\n middleware: TMiddleware;\n}): ReactAgentV2<ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, TMiddleware>;\n// Overload 14: With responseFormat as JsonSchemaFormat and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat> & {\n responseFormat: JsonSchemaFormat;\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 15: With responseFormat as array of JsonSchemaFormat and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat[];\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 16: With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[] and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat | JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 17: With responseFormat as TypedToolStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, TypedToolStrategy<T>> & {\n responseFormat: TypedToolStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 18: With responseFormat as single ToolStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 19: With responseFormat as ProviderStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, ProviderStrategy<T>> & {\n responseFormat: ProviderStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 20: Without responseFormat but with middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: Omit<CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n middleware: TMiddleware;\n}): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n// Overload 21: With responseFormat explicitly undefined and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: Omit<CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n responseFormat?: undefined;\n middleware: TMiddleware;\n}): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n// Overload 22: For other ResponseFormat values with middleware (failsafe)\nexport declare function createAgent<StructuredResponseFormat extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<StructuredResponseFormat, ContextSchema, any> & {\n responseFormat: any;\n middleware: TMiddleware;\n}): ReactAgentV2<StructuredResponseFormat, ContextSchema, TMiddleware>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEII,iBANoBkB,WAMpBlB,CAAAA,oBANoDE,iBAMpDF,GANwEJ,gBAMxEI,GAAAA,OANkGF,kBAMlGE,EAAAA,UANgImB,MAMhInB,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GANsJmB,MAMtJnB,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,EAAAA,sBANiME,iBAMjMF,GANqNJ,gBAMrNI,GANwOE,iBAMxOF,CAAAA,CAAAA,MAAAA,EANmQI,iBAMnQJ,CANqRoB,WAMrRpB,EANkSqB,CAMlSrB,EANqSsB,aAMrStB,EANoTH,cAMpTG,CANmUqB,CAMnUrB,CAAAA,CAAAA,GAAAA;EAAY,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AAA,CAAAA,MAAAA,EAgEiIyB,IAhEjIzB,CAgEsIQ,mBAhEtIR,CAgE0JK,uBAhE1JL,EAgEmLwB,aAhEnLxB,EAAAA,KAAAA,CAAAA,EAAAA,gBAAAA,CAAAA,GAAAA;EAAkB,cAAYqB,CAAAA,EAAAA,SAAAA;EAAM,UAAgBA,EAkE1IM,WAlE0IN;CAAM,CAAA,EAmE5JlB,YAnEiMC,CAmEpLC,uBAnEoLD,EAmE3JoB,aAnE2JpB,EAmE5IuB,WAnE4IvB,CAAAA;;AAAuCA,iBAqEpNgB,WArEoNhB,CAAAA,iCAqEvKiB,MArEuKjB,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GAqEjJiB,MArEiJjB,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,EAAAA,sBAqEtGA,iBArEsGA,GAqElFN,gBArEkFM,GAqE/DA,iBArE+DA,EAAAA,oBAAAA,SAqEfK,eArEeL,CAAAA,GAAAA,EAAAA,GAAAA,EAAAA,GAAAA,CAAAA,EAAAA,GAAAA,SAqE6BK,eArE7BL,CAAAA,GAAAA,EAAAA,GAAAA,EAAAA,GAAAA,CAAAA,EAAAA,CAAAA,CAAAA,MAAAA,EAqEuEI,mBArEvEJ,CAqE2FsB,wBArE3FtB,EAqEqHoB,aArErHpB,EAAAA,GAAAA,CAAAA,GAAAA;EAAiB,cAA4BkB,EAAAA,GAAAA;EAAW,UAAEC,EAuEtRI,WAvEsRJ;CAAC,CAAA,EAwEnSpB,YAxEqSqB,CAwExRE,wBAxEwRF,EAwE9PA,aAxE8PA,EAwE/OG,WAxE+OH,CAAAA"}
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { AnyAnnotationRoot, ResponseFormatUndefined } from "./annotation.js";
|
|
2
|
-
import { MultipleStructuredOutputsError, StructuredOutputParsingError } from "./errors.js";
|
|
1
|
+
import { AnyAnnotationRoot, PreHookAnnotation, ReactAgentAnnotation, ResponseFormatUndefined, ToAnnotationRoot, createAgentAnnotation, createAgentAnnotationConditional, createAgentBaseAnnotation, enhanceStateSchemaWithMessageReducer } from "./annotation.js";
|
|
2
|
+
import { MultipleStructuredOutputsError, MultipleToolsBoundError, StructuredOutputParsingError, ToolInvocationError } from "./errors.js";
|
|
3
3
|
import { JsonSchemaFormat, ProviderStrategy, ResponseFormat, ToolStrategy, TypedToolStrategy, providerStrategy, toolStrategy } from "./responses.js";
|
|
4
|
-
import { ActionRequest, HumanInterrupt, HumanInterruptConfig, HumanResponse, Interrupt } from "./interrupt.js";
|
|
5
4
|
import { ToolNode } from "./nodes/ToolNode.js";
|
|
6
|
-
import { AgentRuntime, AgentState, ClientTool, CreateAgentParams, ExtractZodArrayTypes, N, Prompt, ServerTool } from "./types.js";
|
|
5
|
+
import { AgentRuntime, AgentState, ClientTool, CreateAgentParams, ExecutedToolCall, ExtractZodArrayTypes, ExtractZodType, InferResponseFormatType, InternalAgentState, META_EXTRAS_DESCRIPTION_PREFIX, N, Prompt, ReducedZodChannel, ServerTool, WithStateGraphNodes } from "./types.js";
|
|
7
6
|
import { AgentMiddleware, CreateAgentParams as CreateAgentParams$1 } from "./middlewareAgent/types.js";
|
|
7
|
+
import { createMiddleware } from "./middlewareAgent/middleware.js";
|
|
8
8
|
import { ReactAgent } from "./ReactAgent.js";
|
|
9
9
|
import { ReactAgent as ReactAgent$1 } from "./middlewareAgent/ReactAgent.js";
|
|
10
|
-
import {
|
|
10
|
+
import { HumanInterrupt, HumanInterruptConfig, HumanResponse, Interrupt, interrupt } from "./interrupt.js";
|
|
11
|
+
import { FakeToolCallingModel } from "./tests/utils.js";
|
|
11
12
|
import { MessagesAnnotation } from "@langchain/langgraph";
|
|
12
13
|
import { InteropZodObject, InteropZodType } from "@langchain/core/utils/types";
|
|
13
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["InteropZodObject","InteropZodType","MessagesAnnotation","ReactAgent","ReactAgentV1","ReactAgentV2","AnyAnnotationRoot","ResponseFormatUndefined","CreateAgentParams","ExtractZodArrayTypes","CreateAgentParamsV2","AgentMiddleware","ToolStrategy","TypedToolStrategy","ProviderStrategy","JsonSchemaFormat","ToolNode","toolStrategy","providerStrategy","ResponseFormat","createMiddleware","createAgent","Record","StateSchema","T","ContextSchema","Omit","StructuredResponseFormat","TMiddleware"],"sources":["../../src/agents/index.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { InteropZodObject, InteropZodType } from \"@langchain/core/utils/types\";\nimport { MessagesAnnotation } from \"@langchain/langgraph\";\nimport { ReactAgent as ReactAgentV1 } from \"./ReactAgent.js\";\nimport { ReactAgent as ReactAgentV2 } from \"./middlewareAgent/ReactAgent.js\";\nimport type { AnyAnnotationRoot, ResponseFormatUndefined } from \"./annotation.js\";\nimport type { CreateAgentParams, ExtractZodArrayTypes } from \"./types.js\";\nimport type { CreateAgentParams as CreateAgentParamsV2, AgentMiddleware } from \"./middlewareAgent/types.js\";\nimport type { ToolStrategy, TypedToolStrategy, ProviderStrategy, JsonSchemaFormat } from \"./responses.js\";\n// Re-export types and utilities\nexport * from \"./types.js\";\nexport * from \"./errors.js\";\nexport * from \"./interrupt.js\";\nexport { ToolNode } from \"./nodes/ToolNode.js\";\nexport { toolStrategy, providerStrategy, ToolStrategy, ProviderStrategy, type ResponseFormat, } from \"./responses.js\";\nexport { createMiddleware } from \"./middlewareAgent/index.js\";\nexport type { AgentMiddleware } from \"./middlewareAgent/types.js\";\nexport type { ReactAgent } from \"./middlewareAgent/ReactAgent.js\";\n/**\n * Agents combine language models with tools to create systems that can reason\n * about tasks, decide which tools to use, and iteratively work towards solutions.\n * {@link createAgent} provides a production-ready ReAct (Reasoning + Acting)\n * agent implementation based on the paper {@link https://arxiv.org/abs/2210.03629|ReAct: Synergizing Reasoning and Acting in Language Models.}\n *\n * @example\n * ```ts\n * import { createAgent, tool } from \"langchain\";\n * import { z } from \"zod/v3\";\n *\n * const getWeather = tool((input) => {\n * if ([\"sf\", \"san francisco\"].includes(input.location.toLowerCase())) {\n * return \"It's 60 degrees and foggy.\";\n * } else {\n * return \"It's 90 degrees and sunny.\";\n * }\n * }, {\n * name: \"get_weather\",\n * description: \"Call to get the current weather.\",\n * schema: z.object({\n * location: z.string().describe(\"Location to get the weather for.\"),\n * })\n * })\n *\n * const agent = createAgent({\n * // use chat model from \"@langchain/openai\"\n * model: \"openai:gpt-4o-mini\",\n * tools: [getWeather]\n * });\n *\n * const inputs = {\n * messages: [{ role: \"user\", content: \"what is the weather in SF?\" }],\n * };\n *\n * const stream = await agent.stream(inputs, { streamMode: \"values\" });\n *\n * for await (const { messages } of stream) {\n * console.log(messages);\n * }\n * // Returns the messages in the state at each step of execution\n * ```\n */\n// ===== V1 OVERLOADS (WITHOUT MIDDLEWARE) =====\n// These overloads come first to ensure proper type inference when middleware is NOT provided\n// Overload 1: V1 - With responseFormat as single InteropZodType\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, InteropZodType<T>> & {\n responseFormat: InteropZodType<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 2: V1 - With responseFormat as array of InteropZodTypes\nexport declare function createAgent<T extends readonly InteropZodType<any>[], StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, T> & {\n responseFormat: T;\n}): ReactAgentV1<StateSchema, ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema>;\n// Overload 3: V1 - With responseFormat as JsonSchemaFormat\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat> & {\n responseFormat: JsonSchemaFormat;\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 4: V1 - With responseFormat as array of JsonSchemaFormat\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat[];\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 5: V1 - With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[]\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat | JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 6: V1 - With responseFormat as TypedToolStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, TypedToolStrategy<T>> & {\n responseFormat: TypedToolStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 7: V1 - With responseFormat as single ToolStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 8: V1 - With responseFormat as ProviderStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, ProviderStrategy<T>> & {\n responseFormat: ProviderStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 9: V1 - Without responseFormat property at all\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: Omit<CreateAgentParams<StateSchema, ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\">): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n// Overload 10: V1 - With responseFormat explicitly undefined\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: Omit<CreateAgentParams<StateSchema, ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n responseFormat?: undefined;\n}): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n// Overload 11: V1 - For other ResponseFormat values (failsafe)\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, StructuredResponseFormat extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, StructuredResponseFormat, ContextSchema, any> & {\n responseFormat: any;\n}): ReactAgentV1<StateSchema, StructuredResponseFormat, ContextSchema>;\n// ===== V2 OVERLOADS (WITH MIDDLEWARE) =====\n// These overloads explicitly require the middleware property\n// Overload 12: With responseFormat as single InteropZodType and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, InteropZodType<T>> & {\n responseFormat: InteropZodType<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 13: With responseFormat as array of InteropZodTypes and middleware\nexport declare function createAgent<T extends readonly InteropZodType<any>[], ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, T> & {\n responseFormat: T;\n middleware: TMiddleware;\n}): ReactAgentV2<ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, TMiddleware>;\n// Overload 14: With responseFormat as JsonSchemaFormat and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat> & {\n responseFormat: JsonSchemaFormat;\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 15: With responseFormat as array of JsonSchemaFormat and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat[];\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 16: With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[] and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat | JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 17: With responseFormat as TypedToolStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, TypedToolStrategy<T>> & {\n responseFormat: TypedToolStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 18: With responseFormat as single ToolStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 19: With responseFormat as ProviderStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, ProviderStrategy<T>> & {\n responseFormat: ProviderStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 20: Without responseFormat but with middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: Omit<CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n middleware: TMiddleware;\n}): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n// Overload 21: With responseFormat explicitly undefined and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: Omit<CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n responseFormat?: undefined;\n middleware: TMiddleware;\n}): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n// Overload 22: For other ResponseFormat values with middleware (failsafe)\nexport declare function createAgent<StructuredResponseFormat extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<StructuredResponseFormat, ContextSchema, any> & {\n responseFormat: any;\n middleware: TMiddleware;\n}): ReactAgentV2<StructuredResponseFormat, ContextSchema, TMiddleware>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEmIyB,iBAN3GJ,WAM2GI,CAAAA,oBAN3EnB,iBAM2EmB,GANvDzB,gBAMuDyB,GAAAA,OAN7BvB,kBAM6BuB,EAAAA,UANCH,MAMDG,CAAAA,MAAAA,E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EzQK,WAvEyQL;CAAW,CAAA,EAwEhSlB,YAxEkSmB,CAwErRG,wBAxEqRH,EAwE3PC,aAxE2PD,EAwE5OI,WAxE4OJ,CAAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["InteropZodObject","InteropZodType","MessagesAnnotation","ReactAgent","ReactAgentV1","ReactAgentV2","AnyAnnotationRoot","ResponseFormatUndefined","CreateAgentParams","ExtractZodArrayTypes","CreateAgentParamsV2","AgentMiddleware","ToolStrategy","TypedToolStrategy","ProviderStrategy","JsonSchemaFormat","ToolNode","toolStrategy","providerStrategy","ResponseFormat","createMiddleware","FakeToolCallingModel","createAgent","Record","StateSchema","T","ContextSchema","Omit","StructuredResponseFormat","TMiddleware"],"sources":["../../src/agents/index.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { InteropZodObject, InteropZodType } from \"@langchain/core/utils/types\";\nimport { MessagesAnnotation } from \"@langchain/langgraph\";\nimport { ReactAgent as ReactAgentV1 } from \"./ReactAgent.js\";\nimport { ReactAgent as ReactAgentV2 } from \"./middlewareAgent/ReactAgent.js\";\nimport type { AnyAnnotationRoot, ResponseFormatUndefined } from \"./annotation.js\";\nimport type { CreateAgentParams, ExtractZodArrayTypes } from \"./types.js\";\nimport type { CreateAgentParams as CreateAgentParamsV2, AgentMiddleware } from \"./middlewareAgent/types.js\";\nimport type { ToolStrategy, TypedToolStrategy, ProviderStrategy, JsonSchemaFormat } from \"./responses.js\";\n// Re-export types and utilities\nexport * from \"./types.js\";\nexport * from \"./errors.js\";\nexport * from \"./interrupt.js\";\nexport * from \"./annotation.js\";\nexport { ToolNode } from \"./nodes/ToolNode.js\";\nexport { toolStrategy, providerStrategy, ToolStrategy, ProviderStrategy, type ResponseFormat, } from \"./responses.js\";\nexport { createMiddleware } from \"./middlewareAgent/index.js\";\nexport { FakeToolCallingModel } from \"./tests/utils.js\";\nexport type { AgentMiddleware } from \"./middlewareAgent/types.js\";\nexport type { ReactAgent } from \"./middlewareAgent/ReactAgent.js\";\n/**\n * Agents combine language models with tools to create systems that can reason\n * about tasks, decide which tools to use, and iteratively work towards solutions.\n * {@link createAgent} provides a production-ready ReAct (Reasoning + Acting)\n * agent implementation based on the paper {@link https://arxiv.org/abs/2210.03629|ReAct: Synergizing Reasoning and Acting in Language Models.}\n *\n * @example\n * ```ts\n * import { createAgent, tool } from \"langchain\";\n * import { z } from \"zod/v3\";\n *\n * const getWeather = tool((input) => {\n * if ([\"sf\", \"san francisco\"].includes(input.location.toLowerCase())) {\n * return \"It's 60 degrees and foggy.\";\n * } else {\n * return \"It's 90 degrees and sunny.\";\n * }\n * }, {\n * name: \"get_weather\",\n * description: \"Call to get the current weather.\",\n * schema: z.object({\n * location: z.string().describe(\"Location to get the weather for.\"),\n * })\n * })\n *\n * const agent = createAgent({\n * // use chat model from \"@langchain/openai\"\n * model: \"openai:gpt-4o-mini\",\n * tools: [getWeather]\n * });\n *\n * const inputs = {\n * messages: [{ role: \"user\", content: \"what is the weather in SF?\" }],\n * };\n *\n * const stream = await agent.stream(inputs, { streamMode: \"values\" });\n *\n * for await (const { messages } of stream) {\n * console.log(messages);\n * }\n * // Returns the messages in the state at each step of execution\n * ```\n */\n// ===== V1 OVERLOADS (WITHOUT MIDDLEWARE) =====\n// These overloads come first to ensure proper type inference when middleware is NOT provided\n// Overload 1: V1 - With responseFormat as single InteropZodType\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, InteropZodType<T>> & {\n responseFormat: InteropZodType<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 2: V1 - With responseFormat as array of InteropZodTypes\nexport declare function createAgent<T extends readonly InteropZodType<any>[], StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, T> & {\n responseFormat: T;\n}): ReactAgentV1<StateSchema, ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema>;\n// Overload 3: V1 - With responseFormat as JsonSchemaFormat\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat> & {\n responseFormat: JsonSchemaFormat;\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 4: V1 - With responseFormat as array of JsonSchemaFormat\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat[];\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 5: V1 - With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[]\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, Record<string, unknown>, ContextSchema, JsonSchemaFormat | JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n}): ReactAgentV1<StateSchema, Record<string, unknown>, ContextSchema>;\n// Overload 6: V1 - With responseFormat as TypedToolStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, TypedToolStrategy<T>> & {\n responseFormat: TypedToolStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 7: V1 - With responseFormat as single ToolStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 8: V1 - With responseFormat as ProviderStrategy\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, T, ContextSchema, ProviderStrategy<T>> & {\n responseFormat: ProviderStrategy<T>;\n}): ReactAgentV1<StateSchema, T, ContextSchema>;\n// Overload 9: V1 - Without responseFormat property at all\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: Omit<CreateAgentParams<StateSchema, ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\">): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n// Overload 10: V1 - With responseFormat explicitly undefined\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: Omit<CreateAgentParams<StateSchema, ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n responseFormat?: undefined;\n}): ReactAgentV1<StateSchema, ResponseFormatUndefined, ContextSchema>;\n// Overload 11: V1 - For other ResponseFormat values (failsafe)\nexport declare function createAgent<StateSchema extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, StructuredResponseFormat extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateAgentParams<StateSchema, StructuredResponseFormat, ContextSchema, any> & {\n responseFormat: any;\n}): ReactAgentV1<StateSchema, StructuredResponseFormat, ContextSchema>;\n// ===== V2 OVERLOADS (WITH MIDDLEWARE) =====\n// These overloads explicitly require the middleware property\n// Overload 12: With responseFormat as single InteropZodType and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, InteropZodType<T>> & {\n responseFormat: InteropZodType<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 13: With responseFormat as array of InteropZodTypes and middleware\nexport declare function createAgent<T extends readonly InteropZodType<any>[], ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, T> & {\n responseFormat: T;\n middleware: TMiddleware;\n}): ReactAgentV2<ExtractZodArrayTypes<T> extends Record<string, any> ? ExtractZodArrayTypes<T> : Record<string, any>, ContextSchema, TMiddleware>;\n// Overload 14: With responseFormat as JsonSchemaFormat and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat> & {\n responseFormat: JsonSchemaFormat;\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 15: With responseFormat as array of JsonSchemaFormat and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat[];\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 16: With responseFormat as union of JsonSchemaFormat | JsonSchemaFormat[] and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<Record<string, unknown>, ContextSchema, JsonSchemaFormat | JsonSchemaFormat[]> & {\n responseFormat: JsonSchemaFormat | JsonSchemaFormat[];\n middleware: TMiddleware;\n}): ReactAgentV2<Record<string, unknown>, ContextSchema, TMiddleware>;\n// Overload 17: With responseFormat as TypedToolStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, TypedToolStrategy<T>> & {\n responseFormat: TypedToolStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 18: With responseFormat as single ToolStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, ToolStrategy<T>> & {\n responseFormat: ToolStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 19: With responseFormat as ProviderStrategy and middleware\nexport declare function createAgent<T extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<T, ContextSchema, ProviderStrategy<T>> & {\n responseFormat: ProviderStrategy<T>;\n middleware: TMiddleware;\n}): ReactAgentV2<T, ContextSchema, TMiddleware>;\n// Overload 20: Without responseFormat but with middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: Omit<CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n middleware: TMiddleware;\n}): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n// Overload 21: With responseFormat explicitly undefined and middleware\nexport declare function createAgent<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: Omit<CreateAgentParamsV2<ResponseFormatUndefined, ContextSchema, never>, \"responseFormat\"> & {\n responseFormat?: undefined;\n middleware: TMiddleware;\n}): ReactAgentV2<ResponseFormatUndefined, ContextSchema, TMiddleware>;\n// Overload 22: For other ResponseFormat values with middleware (failsafe)\nexport declare function createAgent<StructuredResponseFormat extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, TMiddleware extends readonly AgentMiddleware<any, any, any>[] = readonly AgentMiddleware<any, any, any>[]>(params: CreateAgentParamsV2<StructuredResponseFormat, ContextSchema, any> & {\n responseFormat: any;\n middleware: TMiddleware;\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,GAAAA,EAAAA,GAAAA,EAAAA,GAAAA,CAAAA,EAAAA,CAAAA,CAAAA,MAAAA,EAqEuEI,mBArEvEJ,CAqE2FsB,wBArE3FtB,EAqEqHoB,aArErHpB,EAAAA,GAAAA,CAAAA,GAAAA;EAAiB,cAA4BkB,EAAAA,GAAAA;EAAW,UAAEC,EAuEtRI,WAvEsRJ;CAAC,CAAA,EAwEnSpB,YAxEqSqB,CAwExRE,wBAxEwRF,EAwE9PA,aAxE8PA,EAwE/OG,WAxE+OH,CAAAA"}
|
package/dist/agents/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { PreHookAnnotation, createAgentAnnotation, createAgentAnnotationConditional, createAgentBaseAnnotation, enhanceStateSchemaWithMessageReducer } from "./annotation.js";
|
|
1
2
|
import { MultipleStructuredOutputsError, MultipleToolsBoundError, StructuredOutputParsingError, ToolInvocationError } from "./errors.js";
|
|
2
3
|
import { ProviderStrategy, ToolStrategy, providerStrategy, toolStrategy } from "./responses.js";
|
|
3
4
|
import { ToolNode } from "./nodes/ToolNode.js";
|
|
4
5
|
import { createAgent } from "./createAgent.js";
|
|
5
6
|
import { createMiddleware } from "./middlewareAgent/middleware.js";
|
|
6
7
|
import { createAgent as createAgent$1 } from "./middlewareAgent/index.js";
|
|
7
|
-
import "./
|
|
8
|
+
import { META_EXTRAS_DESCRIPTION_PREFIX } from "./types.js";
|
|
9
|
+
import { interrupt } from "./interrupt.js";
|
|
10
|
+
import { FakeToolCallingModel } from "./tests/utils.js";
|
|
8
11
|
|
|
9
12
|
//#region src/agents/index.ts
|
|
10
13
|
function createAgent$2(params) {
|