@langchain/classic 1.0.0-alpha.1 → 1.0.0
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/CHANGELOG.md +5 -0
- package/LICENSE +6 -6
- package/README.md +174 -66
- package/dist/agents/chat/outputParser.d.cts +2 -2
- package/dist/agents/chat/outputParser.d.cts.map +1 -1
- package/dist/agents/initialize.d.ts +2 -2
- package/dist/agents/initialize.d.ts.map +1 -1
- package/dist/agents/mrkl/outputParser.d.cts +1 -1
- package/dist/agents/mrkl/outputParser.d.cts.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/tool.d.cts +8 -2
- package/dist/agents/toolkits/conversational_retrieval/tool.d.cts.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/tool.d.ts +8 -2
- package/dist/agents/toolkits/conversational_retrieval/tool.d.ts.map +1 -1
- package/dist/chains/question_answering/load.d.cts +2 -2
- package/dist/chains/question_answering/load.d.cts.map +1 -1
- package/dist/chains/question_answering/load.d.ts +2 -2
- package/dist/chains/question_answering/load.d.ts.map +1 -1
- package/dist/chains/summarization/load.d.cts +2 -2
- package/dist/chains/summarization/load.d.cts.map +1 -1
- package/dist/evaluation/agents/trajectory.d.cts.map +1 -1
- package/dist/evaluation/agents/trajectory.d.ts.map +1 -1
- package/dist/evaluation/comparison/pairwise.d.ts.map +1 -1
- package/dist/evaluation/criteria/criteria.d.cts.map +1 -1
- package/dist/evaluation/criteria/criteria.d.ts.map +1 -1
- package/dist/hub/base.cjs +1 -1
- package/dist/hub/base.js +1 -1
- package/dist/load/import_map.cjs +1 -1
- package/dist/load/import_map.js +1 -1
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/client.cjs +74 -18
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/client.js +75 -19
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/env.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/env.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/env.js +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/env.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/constants.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/constants.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/constants.js +1 -1
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/constants.cjs.map → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/constants.js.map} +1 -1
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/translator.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/translator.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/experimental/otel/translator.js +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/translator.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/index.cjs +2 -2
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/run_trees.cjs +7 -5
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/run_trees.js +7 -5
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/constants.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/constants.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/constants.js +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/constants.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/fetch.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/fetch.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/fetch.js +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/fetch.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/otel.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/otel.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/singletons/otel.js +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/otel.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/_uuid.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/_uuid.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/_uuid.js +1 -1
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/_uuid.cjs.map → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/_uuid.js.map} +1 -1
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_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 +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_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 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_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 +1 -1
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/async_caller.cjs.map → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_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/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/env.cjs +19 -23
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/env.js +19 -23
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/error.cjs +16 -3
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/error.js +16 -3
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/messages.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/messages.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/messages.js +1 -1
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/messages.cjs.map → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/messages.js.map} +1 -1
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/project.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/project.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/project.js +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/project.js.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/prompts.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/prompts.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/prompts.js +1 -1
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/prompts.cjs.map → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/prompts.js.map} +1 -1
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/warn.cjs +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/warn.cjs.map +1 -0
- package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/dist/utils/warn.js +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/warn.js.map +1 -0
- package/dist/output_parsers/structured.d.cts +7 -1
- package/dist/output_parsers/structured.d.cts.map +1 -1
- package/dist/output_parsers/structured.d.ts +7 -1
- package/dist/output_parsers/structured.d.ts.map +1 -1
- package/dist/smith/runner_utils.cjs +3 -3
- package/dist/smith/runner_utils.js +3 -3
- package/dist/tools/retriever.d.cts +12 -1
- package/dist/tools/retriever.d.cts.map +1 -1
- package/dist/tools/retriever.d.ts +12 -1
- package/dist/tools/retriever.d.ts.map +1 -1
- package/package.json +213 -213
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/client.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/client.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/env.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/env.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/constants.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/translator.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/translator.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/index.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/run_trees.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/run_trees.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/constants.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/constants.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/fetch.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/fetch.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/otel.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/otel.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/_uuid.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/async_caller.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/env.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/env.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/error.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/error.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/messages.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/project.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/project.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/prompts.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/warn.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/warn.js.map +0 -1
- /package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/index.cjs +0 -0
- /package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/index.js +0 -0
package/CHANGELOG.md
ADDED
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) LangChain, Inc.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
|
10
10
|
furnished to do so, subject to the following conditions:
|
|
11
11
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
14
|
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,109 +1,217 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @langchain/classic
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package contains functionality from LangChain v0.x that has been moved out of the main `langchain` package as part of the v1.0 release. It exists to provide backward compatibility for existing applications while the core `langchain` package focuses on the essential building blocks for modern agent development.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
[<img src="https://github.com/codespaces/badge.svg" title="Open in Github Codespace" width="150" height="20">](https://codespaces.new/langchain-ai/langchainjs)
|
|
5
|
+
## When to use this package
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
Use `@langchain/classic` if you:
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
- Have existing code that uses legacy chains (e.g., `LLMChain`, `ConversationalRetrievalQAChain`, `RetrievalQAChain`)
|
|
10
|
+
- Use the indexing API
|
|
11
|
+
- Depend on functionality from `@langchain/community` that was previously re-exported from `langchain`
|
|
12
|
+
- Are maintaining an existing application and not yet ready to migrate to the new `createAgent` API
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## When NOT to use this package
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
**For new projects, use `langchain` v1.0 instead.** The new APIs provide:
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
- **`createAgent`**: A cleaner, more powerful way to build agents with middleware support
|
|
19
|
+
- **Better performance**: Optimized for modern agent workflows
|
|
20
|
+
- **Focused API surface**: Less complexity, easier to learn
|
|
21
|
+
- **Active development**: New features and improvements will focus on v1.0 APIs
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
See the [LangChain v1.0 release notes](https://docs.langchain.com/oss/javascript/releases/langchain-v1) for more information.
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
## Installation
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- Supabase Edge Functions
|
|
27
|
-
- Browser
|
|
28
|
-
- Deno
|
|
27
|
+
```bash npm2yarn
|
|
28
|
+
npm install @langchain/classic
|
|
29
|
+
```
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
This package requires `@langchain/core` as a peer dependency:
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
```bash npm2yarn
|
|
34
|
+
npm install @langchain/core
|
|
35
|
+
```
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
- **Reason**: rely on a language model to reason (about how to answer based on provided context, what actions to take, etc.)
|
|
37
|
+
## What's included
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
### Legacy Chains
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
Use [LangGraph.js](https://js.langchain.com/docs/concepts/#langgraphjs) to build stateful agents with first-class streaming and human-in-the-loop support.
|
|
41
|
-
- **Productionization**: Use [LangSmith](https://docs.smith.langchain.com/) to inspect, monitor and evaluate your chains, so that you can continuously optimize and deploy with confidence.
|
|
42
|
-
- **Deployment**: Turn your LangGraph applications into production-ready APIs and Assistants with [LangGraph Cloud](https://langchain-ai.github.io/langgraph/cloud/).
|
|
41
|
+
All chain implementations from v0.x, including:
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
- `LLMChain` - Basic chain for calling an LLM with a prompt template
|
|
44
|
+
- `ConversationalRetrievalQAChain` - Chain for conversational question-answering over documents
|
|
45
|
+
- `RetrievalQAChain` - Chain for question-answering over documents without conversation memory
|
|
46
|
+
- `StuffDocumentsChain` - Chain for stuffing documents into a prompt
|
|
47
|
+
- `MapReduceDocumentsChain` - Chain for map-reduce operations over documents
|
|
48
|
+
- `RefineDocumentsChain` - Chain for iterative refinement over documents
|
|
49
|
+
- And many more...
|
|
45
50
|
|
|
46
|
-
|
|
47
|
-
- **[`@langchain/community`](https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain-community)**: Third party integrations.
|
|
48
|
-
- **[`langchain`](https://github.com/langchain-ai/langchainjs/blob/main/langchain)**: Chains, agents, and retrieval strategies that make up an application's cognitive architecture.
|
|
49
|
-
- **[LangGraph.js](https://langchain-ai.github.io/langgraphjs/)**: LangGraph powers production-grade agents, trusted by Linkedin, Uber, Klarna, GitLab, and many more. Build robust and stateful multi-actor applications with LLMs by modeling steps as edges and nodes in a graph. Integrates smoothly with LangChain, but can be used without it.
|
|
51
|
+
### Indexing API
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
The `RecordManager` and related indexing functionality for managing document updates in vector stores.
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
### Community Integrations
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
Re-exports from `@langchain/community` that were previously available in the main `langchain` package.
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
### Other Deprecated Functionality
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
- End-to-end Example: [Doc-Chatbot](https://github.com/dissorial/doc-chatbot)
|
|
61
|
+
Various utilities and abstractions that have been replaced by better alternatives in v1.0.
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
## Migration
|
|
63
64
|
|
|
64
|
-
|
|
65
|
-
- End-to-end Example: [Chat-LangChain](https://github.com/langchain-ai/chat-langchain)
|
|
65
|
+
### From `langchain` v0.x to `@langchain/classic`
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
If you're upgrading to `langchain` v1.0 but want to keep using legacy functionality:
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
1. Install `@langchain/classic`:
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
```bash npm2yarn
|
|
72
|
+
npm install @langchain/classic
|
|
73
|
+
```
|
|
73
74
|
|
|
74
|
-
|
|
75
|
+
2. Update your imports:
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
```typescript
|
|
78
|
+
// Before (v0.x)
|
|
79
|
+
import { LLMChain } from "langchain/chains";
|
|
80
|
+
import { ConversationalRetrievalQAChain } from "langchain/chains";
|
|
77
81
|
|
|
78
|
-
|
|
82
|
+
// After (v1.0)
|
|
83
|
+
import { LLMChain } from "@langchain/classic/chains";
|
|
84
|
+
import { ConversationalRetrievalQAChain } from "@langchain/classic/chains";
|
|
85
|
+
```
|
|
79
86
|
|
|
80
|
-
|
|
87
|
+
Or if you imported from the root:
|
|
81
88
|
|
|
82
|
-
|
|
89
|
+
```typescript
|
|
90
|
+
// Before (v0.x)
|
|
91
|
+
import { LLMChain } from "langchain";
|
|
83
92
|
|
|
84
|
-
|
|
93
|
+
// After (v1.0)
|
|
94
|
+
import { LLMChain } from "@langchain/classic";
|
|
95
|
+
```
|
|
85
96
|
|
|
86
|
-
|
|
97
|
+
### From `@langchain/classic` to `langchain` v1.0
|
|
87
98
|
|
|
88
|
-
|
|
99
|
+
**For new development, we recommend using `createAgent` instead of legacy chains.**
|
|
89
100
|
|
|
90
|
-
|
|
101
|
+
Example migration from `LLMChain`:
|
|
91
102
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- [API Reference](https://api.js.langchain.com)
|
|
103
|
+
```typescript
|
|
104
|
+
// Before (using LLMChain)
|
|
105
|
+
import { LLMChain } from "@langchain/classic/chains";
|
|
106
|
+
import { ChatOpenAI } from "@langchain/openai";
|
|
107
|
+
import { PromptTemplate } from "@langchain/core/prompts";
|
|
98
108
|
|
|
99
|
-
|
|
109
|
+
const model = new ChatOpenAI({ model: "gpt-4" });
|
|
110
|
+
const prompt = PromptTemplate.fromTemplate(
|
|
111
|
+
"What is a good name for a company that makes {product}?"
|
|
112
|
+
);
|
|
113
|
+
const chain = new LLMChain({ llm: model, prompt });
|
|
114
|
+
const result = await chain.call({ product: "colorful socks" });
|
|
100
115
|
|
|
101
|
-
|
|
116
|
+
// After (using createAgent)
|
|
117
|
+
import { createAgent } from "langchain";
|
|
102
118
|
|
|
103
|
-
|
|
119
|
+
const agent = createAgent({
|
|
120
|
+
model: "openai:gpt-4",
|
|
121
|
+
systemPrompt: "You are a creative assistant that helps name companies.",
|
|
122
|
+
});
|
|
104
123
|
|
|
105
|
-
|
|
124
|
+
const result = await agent.invoke({
|
|
125
|
+
messages: [
|
|
126
|
+
{
|
|
127
|
+
role: "user",
|
|
128
|
+
content: "What is a good name for a company that makes colorful socks?",
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
});
|
|
132
|
+
```
|
|
106
133
|
|
|
107
|
-
|
|
134
|
+
For more complex migrations, see the [migration guide](https://docs.langchain.com/oss/javascript/migrate/langchain-v1).
|
|
108
135
|
|
|
109
|
-
|
|
136
|
+
## Support and Maintenance
|
|
137
|
+
|
|
138
|
+
`@langchain/classic` will receive:
|
|
139
|
+
|
|
140
|
+
- **Bug fixes**: Critical bugs will be fixed
|
|
141
|
+
- **Security updates**: Security vulnerabilities will be patched
|
|
142
|
+
- **No new features**: New functionality will focus on `langchain` v1.0 APIs
|
|
143
|
+
|
|
144
|
+
This package is in **maintenance mode**. For new features and active development, use `langchain` v1.0.
|
|
145
|
+
|
|
146
|
+
## Examples
|
|
147
|
+
|
|
148
|
+
### Using a legacy chain
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
import { LLMChain } from "@langchain/classic/chains";
|
|
152
|
+
import { ChatOpenAI } from "@langchain/openai";
|
|
153
|
+
import { PromptTemplate } from "@langchain/core/prompts";
|
|
154
|
+
|
|
155
|
+
const model = new ChatOpenAI({ model: "gpt-4" });
|
|
156
|
+
|
|
157
|
+
const prompt = PromptTemplate.fromTemplate(
|
|
158
|
+
"Tell me a {adjective} joke about {content}."
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
const chain = new LLMChain({ llm: model, prompt });
|
|
162
|
+
|
|
163
|
+
const result = await chain.call({
|
|
164
|
+
adjective: "funny",
|
|
165
|
+
content: "chickens",
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
console.log(result.text);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Using ConversationalRetrievalQAChain
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
import { ConversationalRetrievalQAChain } from "@langchain/classic/chains";
|
|
175
|
+
import { ChatOpenAI } from "@langchain/openai";
|
|
176
|
+
import { OpenAIEmbeddings } from "@langchain/openai";
|
|
177
|
+
import { MemoryVectorStore } from "langchain/vectorstores/memory";
|
|
178
|
+
|
|
179
|
+
// Create vector store with documents
|
|
180
|
+
const vectorStore = await MemoryVectorStore.fromTexts(
|
|
181
|
+
["Document 1 text...", "Document 2 text..."],
|
|
182
|
+
[{ id: 1 }, { id: 2 }],
|
|
183
|
+
new OpenAIEmbeddings()
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
// Create chain
|
|
187
|
+
const model = new ChatOpenAI({ model: "gpt-4" });
|
|
188
|
+
const chain = ConversationalRetrievalQAChain.fromLLM(
|
|
189
|
+
model,
|
|
190
|
+
vectorStore.asRetriever()
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
// Use chain
|
|
194
|
+
const result = await chain.call({
|
|
195
|
+
question: "What is in the documents?",
|
|
196
|
+
chat_history: [],
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
console.log(result.text);
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Resources
|
|
203
|
+
|
|
204
|
+
- [LangChain v1.0 Release Notes](https://docs.langchain.com/oss/javascript/releases/langchain-v1)
|
|
205
|
+
- [Migration Guide](https://docs.langchain.com/oss/javascript/migrate/langchain-v1)
|
|
206
|
+
- [LangChain v1.0 Documentation](https://docs.langchain.com/oss/javascript/langchain/agents)
|
|
207
|
+
- [GitHub Repository](https://github.com/langchain-ai/langchainjs)
|
|
208
|
+
|
|
209
|
+
## Support
|
|
210
|
+
|
|
211
|
+
For bug reports and issues, please open an issue on [GitHub](https://github.com/langchain-ai/langchainjs/issues).
|
|
212
|
+
|
|
213
|
+
For questions and discussions, join our [Discord community](https://discord.gg/langchain).
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
This package is licensed under the MIT License. See the [LICENSE](../../LICENSE) file for details.
|
|
@@ -51,12 +51,12 @@ declare class ChatAgentOutputParser extends AgentActionOutputParser {
|
|
|
51
51
|
* @returns An object that satisfies the AgentFinish interface or an object with the tool, toolInput, and log.
|
|
52
52
|
*/
|
|
53
53
|
parse(text: string): Promise<{
|
|
54
|
+
tool?: undefined;
|
|
55
|
+
toolInput?: undefined;
|
|
54
56
|
returnValues: {
|
|
55
57
|
output: string;
|
|
56
58
|
};
|
|
57
59
|
log: string;
|
|
58
|
-
tool?: undefined;
|
|
59
|
-
toolInput?: undefined;
|
|
60
60
|
} | {
|
|
61
61
|
returnValues?: undefined;
|
|
62
62
|
tool: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputParser.d.cts","names":["AgentActionOutputParser","FINAL_ANSWER_ACTION","ChatAgentOutputParser","Promise"],"sources":["../../../src/agents/chat/outputParser.d.ts"],"sourcesContent":["import { AgentActionOutputParser } from \"../types.js\";\nexport declare const FINAL_ANSWER_ACTION = \"Final Answer:\";\n/**\n * A class that extends the AgentActionOutputParser to parse the output of\n * the ChatAgent in LangChain. It checks if the output text contains the\n * final answer action or a JSON response, and parses it accordingly.\n * @example\n * ```typescript\n * const prompt = ChatPromptTemplate.fromMessages([\n * [\n * \"ai\",\n * `{PREFIX}\n * {FORMAT_INSTRUCTIONS}\n * {SUFFIX}`,\n * ],\n * [\"human\", \"Question: {input}\"],\n * ]);\n * const runnableAgent = RunnableSequence.from([\n * {\n * input: (i: { input: string; steps: AgentStep[] }) => i.input,\n * agent_scratchpad: (i: { input: string; steps: AgentStep[] }) =>\n * formatLogToString(i.steps),\n * },\n * prompt,\n * new OpenAI({ temperature: 0 }),\n * new ChatAgentOutputParser(),\n * ]);\n *\n * const executor = AgentExecutor.fromAgentAndTools({\n * agent: runnableAgent,\n * tools: [new SerpAPI(), new Calculator()],\n * });\n *\n * const result = await executor.invoke({\n * input:\n * \"Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?\",\n * });\n * ```\n */\nexport declare class ChatAgentOutputParser extends AgentActionOutputParser {\n lc_namespace: string[];\n /**\n * Parses the output text from the MRKL chain into an agent action or\n * agent finish. If the text contains the final answer action or does not\n * contain an action, it returns an AgentFinish with the output and log.\n * If the text contains a JSON response, it returns the tool, toolInput,\n * and log.\n * @param text The output text from the MRKL chain.\n * @returns An object that satisfies the AgentFinish interface or an object with the tool, toolInput, and log.\n */\n parse(text: string): Promise<{\n returnValues: {\n output: string;\n };\n log: string;\n
|
|
1
|
+
{"version":3,"file":"outputParser.d.cts","names":["AgentActionOutputParser","FINAL_ANSWER_ACTION","ChatAgentOutputParser","Promise"],"sources":["../../../src/agents/chat/outputParser.d.ts"],"sourcesContent":["import { AgentActionOutputParser } from \"../types.js\";\nexport declare const FINAL_ANSWER_ACTION = \"Final Answer:\";\n/**\n * A class that extends the AgentActionOutputParser to parse the output of\n * the ChatAgent in LangChain. It checks if the output text contains the\n * final answer action or a JSON response, and parses it accordingly.\n * @example\n * ```typescript\n * const prompt = ChatPromptTemplate.fromMessages([\n * [\n * \"ai\",\n * `{PREFIX}\n * {FORMAT_INSTRUCTIONS}\n * {SUFFIX}`,\n * ],\n * [\"human\", \"Question: {input}\"],\n * ]);\n * const runnableAgent = RunnableSequence.from([\n * {\n * input: (i: { input: string; steps: AgentStep[] }) => i.input,\n * agent_scratchpad: (i: { input: string; steps: AgentStep[] }) =>\n * formatLogToString(i.steps),\n * },\n * prompt,\n * new OpenAI({ temperature: 0 }),\n * new ChatAgentOutputParser(),\n * ]);\n *\n * const executor = AgentExecutor.fromAgentAndTools({\n * agent: runnableAgent,\n * tools: [new SerpAPI(), new Calculator()],\n * });\n *\n * const result = await executor.invoke({\n * input:\n * \"Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?\",\n * });\n * ```\n */\nexport declare class ChatAgentOutputParser extends AgentActionOutputParser {\n lc_namespace: string[];\n /**\n * Parses the output text from the MRKL chain into an agent action or\n * agent finish. If the text contains the final answer action or does not\n * contain an action, it returns an AgentFinish with the output and log.\n * If the text contains a JSON response, it returns the tool, toolInput,\n * and log.\n * @param text The output text from the MRKL chain.\n * @returns An object that satisfies the AgentFinish interface or an object with the tool, toolInput, and log.\n */\n parse(text: string): Promise<{\n tool?: undefined;\n toolInput?: undefined;\n returnValues: {\n output: string;\n };\n log: string;\n } | {\n returnValues?: undefined;\n tool: any;\n toolInput: any;\n log: string;\n }>;\n /**\n * Returns the format instructions used in the output parser for the\n * ChatAgent class.\n * @returns The format instructions as a string.\n */\n getFormatInstructions(): string;\n}\n"],"mappings":";;;;;AAuCA;;;;AAA0E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAArDE,qBAAAA,SAA8BF,uBAAAA;;;;;;;;;;;uBAW1BG"}
|
|
@@ -7,7 +7,7 @@ import { StructuredChatAgent } from "./structured_chat/index.js";
|
|
|
7
7
|
import { OpenAIAgent } from "./openai_functions/index.js";
|
|
8
8
|
import { XMLAgent } from "./xml/index.js";
|
|
9
9
|
import { StructuredToolInterface, ToolInterface } from "@langchain/core/tools";
|
|
10
|
-
import * as
|
|
10
|
+
import * as _langchain_core_language_models_base0 from "@langchain/core/language_models/base";
|
|
11
11
|
import { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
|
|
12
12
|
import { CallbackManager } from "@langchain/core/callbacks/manager";
|
|
13
13
|
|
|
@@ -19,7 +19,7 @@ import { CallbackManager } from "@langchain/core/callbacks/manager";
|
|
|
19
19
|
* "chat-conversational-react-description".
|
|
20
20
|
*/
|
|
21
21
|
type AgentType = "zero-shot-react-description" | "chat-zero-shot-react-description" | "chat-conversational-react-description";
|
|
22
|
-
declare const initializeAgentExecutor: (tools: ToolInterface<StringInputToolSchema, any, any>[], llm: BaseLanguageModelInterface<any,
|
|
22
|
+
declare const initializeAgentExecutor: (tools: ToolInterface<StringInputToolSchema, any, any>[], llm: BaseLanguageModelInterface<any, _langchain_core_language_models_base0.BaseLanguageModelCallOptions>, _agentType?: AgentType | undefined, _verbose?: boolean | undefined, _callbackManager?: CallbackManager | undefined) => Promise<AgentExecutor>;
|
|
23
23
|
/**
|
|
24
24
|
* @interface
|
|
25
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialize.d.ts","names":["
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","names":["_langchain_core_language_models_base0","BaseLanguageModelInterface","StructuredToolInterface","ToolInterface","CallbackManager","ChatAgent","ChatConversationalAgent","StructuredChatAgent","AgentExecutor","AgentExecutorInput","ZeroShotAgent","OpenAIAgent","XMLAgent","AgentType","initializeAgentExecutor","_________langchain_core_dist_tools_types_js0","StringInputToolSchema","BaseLanguageModelCallOptions","Promise","InitializeAgentExecutorOptions","fromLLMAndTools","Parameters","Omit","InitializeAgentExecutorOptionsStructured","initializeAgentExecutorWithOptions"],"sources":["../../src/agents/initialize.d.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport type { StructuredToolInterface, ToolInterface } from \"@langchain/core/tools\";\nimport { CallbackManager } from \"@langchain/core/callbacks/manager\";\nimport { ChatAgent } from \"./chat/index.js\";\nimport { ChatConversationalAgent } from \"./chat_convo/index.js\";\nimport { StructuredChatAgent } from \"./structured_chat/index.js\";\nimport { AgentExecutor, AgentExecutorInput } from \"./executor.js\";\nimport { ZeroShotAgent } from \"./mrkl/index.js\";\nimport { OpenAIAgent } from \"./openai_functions/index.js\";\nimport { XMLAgent } from \"./xml/index.js\";\n/**\n * Represents the type of an agent in LangChain. It can be\n * \"zero-shot-react-description\", \"chat-zero-shot-react-description\", or\n * \"chat-conversational-react-description\".\n */\ntype AgentType = \"zero-shot-react-description\" | \"chat-zero-shot-react-description\" | \"chat-conversational-react-description\";\nexport declare const initializeAgentExecutor: (tools: ToolInterface<import(\"../../../langchain-core/dist/tools/types.js\").StringInputToolSchema, any, any>[], llm: BaseLanguageModelInterface<any, import(\"@langchain/core/language_models/base\").BaseLanguageModelCallOptions>, _agentType?: AgentType | undefined, _verbose?: boolean | undefined, _callbackManager?: CallbackManager | undefined) => Promise<AgentExecutor>;\n/**\n * @interface\n */\nexport type InitializeAgentExecutorOptions = ({\n agentType: \"zero-shot-react-description\";\n agentArgs?: Parameters<typeof ZeroShotAgent.fromLLMAndTools>[2];\n memory?: never;\n} & Omit<AgentExecutorInput, \"agent\" | \"tools\">) | ({\n agentType: \"chat-zero-shot-react-description\";\n agentArgs?: Parameters<typeof ChatAgent.fromLLMAndTools>[2];\n memory?: never;\n} & Omit<AgentExecutorInput, \"agent\" | \"tools\">) | ({\n agentType: \"chat-conversational-react-description\";\n agentArgs?: Parameters<typeof ChatConversationalAgent.fromLLMAndTools>[2];\n} & Omit<AgentExecutorInput, \"agent\" | \"tools\">) | ({\n agentType: \"xml\";\n agentArgs?: Parameters<typeof XMLAgent.fromLLMAndTools>[2];\n} & Omit<AgentExecutorInput, \"agent\" | \"tools\">);\n/**\n * @interface\n */\nexport type InitializeAgentExecutorOptionsStructured = ({\n agentType: \"structured-chat-zero-shot-react-description\";\n agentArgs?: Parameters<typeof StructuredChatAgent.fromLLMAndTools>[2];\n} & Omit<AgentExecutorInput, \"agent\" | \"tools\">) | ({\n agentType: \"openai-functions\";\n agentArgs?: Parameters<typeof OpenAIAgent.fromLLMAndTools>[2];\n} & Omit<AgentExecutorInput, \"agent\" | \"tools\">);\n/**\n * Initialize an agent executor with options.\n * @param tools Array of tools to use in the agent\n * @param llm LLM or ChatModel to use in the agent\n * @param options Options for the agent, including agentType, agentArgs, and other options for AgentExecutor.fromAgentAndTools\n * @returns AgentExecutor\n */\nexport declare function initializeAgentExecutorWithOptions(tools: StructuredToolInterface[], llm: BaseLanguageModelInterface, options: InitializeAgentExecutorOptionsStructured): Promise<AgentExecutor>;\nexport declare function initializeAgentExecutorWithOptions(tools: ToolInterface[], llm: BaseLanguageModelInterface, options?: InitializeAgentExecutorOptions): Promise<AgentExecutor>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAS0C;AAO1C,KADKa,SAAAA,GACgBC,6BAAyY,GAAA,kCAAA,GAAA,uCAAA;AAAA,cAAzYA,uBAAyY,EAAA,CAAA,KAAA,EAAxWX,aAAwW,CAAA,qBAAA,EAAA,GAAA,EAAA,GAAA,CAAA,EAAA,EAAA,GAAA,EAA3PF,0BAA2P,CAAA,GAAA,EAA3VD,qCAAAA,CAA+KiB,4BAAAA,CAA4K,EAAA,UAAA,CAAA,EAAhIJ,SAAgI,GAAA,SAAA,EAAA,QAAA,CAAA,EAAA,OAAA,GAAA,SAAA,EAAA,gBAAA,CAAA,EAAtDT,eAAsD,GAAA,SAAA,EAAA,GAAtBc,OAAsB,CAAdV,aAAc,CAAA;;;;AAA3PP,KAIvJkB,8BAAAA,GAJuJlB,CAAAA;EAA0B,SAAiGY,EAAAA,6BAAAA;EAAS,SAAiET,CAAAA,EAMxViB,UANwVjB,CAAAA,OAMtUM,aAAAA,CAAcU,eANwThB,CAAAA,CAAAA,CAAAA,CAAAA;EAAe,MAAyBI,CAAAA,EAAAA,KAAAA;CAAa,GAQzZc,IARoYJ,CAQ/XT,kBAR+XS,EAAAA,OAAAA,GAAAA,OAAAA,CAAAA,CAAAA,GAAAA,CAAAA;EAAO,SAAA,EAAA,kCAAA;EAInYC,SAAAA,CAAAA,EAMIE,UANJF,CAAAA,OAMsBd,SAAAA,CAAUe,eANF,CAAA,CAAA,CAAA,CAAA;EAAA,MAAA,CAAA,EAAA,KAAA;CAAA,GAQtCE,IAN8BZ,CAMzBD,kBANuCW,EAAAA,OAAAA,GAAAA,OAAAA,CAAAA,CAAAA,GAAAA,CAAAA;EAAe,SAA/CC,EAAAA,uCAAAA;EAAU,SAEjBZ,CAAAA,EAMOY,UANPZ,CAAAA,OAMyBH,uBAAAA,CAAwBc,eANjDX,CAAAA,CAAAA,CAAAA,CAAAA;CAAkB,GAOvBa,IAPAA,CAOKb,kBAPLa,EAAAA,OAAAA,GAAAA,OAAAA,CAAAA,CAAAA,GAAAA,CAAAA;EAAI,SAE0BjB,EAAAA,KAAUe;EAAe,SAA3CC,CAAAA,EAOAA,UAPAA,CAAAA,OAOkBT,QAAAA,CAASQ,eAP3BC,CAAAA,CAAAA,CAAAA,CAAAA;CAAU,GAQtBC,IANKb,CAMAA,kBANAA,EAAAA,OAAAA,GAAAA,OAAAA,CAAAA,CAAAA;;;;AAGAA,KAOGc,wCAAAA,GAPHd,CAAAA;EAAkB,SAAvBa,EAAAA,6CAAAA;EAAI,SAE0BV,CAAAA,EAOlBS,UAP2BD,CAAAA,OAOTb,mBAAAA,CAAoBa,eAPXA,CAAAA,CAAAA,CAAAA,CAAAA;CAAe,GAQtDE,IARYD,CAQPZ,kBAROY,EAAAA,OAAAA,GAAAA,OAAAA,CAAAA,CAAAA,GAAAA,CAAAA;EAAU,SACjBZ,EAAAA,kBAAAA;EAAkB,SAAvBa,CAAAA,EASYD,UATZC,CAAAA,OAS8BX,WAAAA,CAAYS,eAT1CE,CAAAA,CAAAA,CAAAA,CAAAA;AAAI,CAAA,GAUJA,IAVI,CAUCb,kBAVD,EAAA,OAAA,GAAA,OAAA,CAAA,CAAA;AAIR;;;;;;;AAKgBY,iBASQG,kCAAAA,CATRH,KAAAA,EASkDnB,uBATlDmB,EAAAA,EAAAA,GAAAA,EASkFpB,0BATlFoB,EAAAA,OAAAA,EASuHE,wCATvHF,CAAAA,EASkKH,OATlKG,CAS0Kb,aAT1Ka,CAAAA;AACPZ,iBASee,kCAAAA,CATff,KAAAA,EASyDN,aATzDM,EAAAA,EAAAA,GAAAA,EAS+ER,0BAT/EQ,EAAAA,OAAAA,CAAAA,EASqHU,8BATrHV,CAAAA,EASsJS,OATtJT,CAS8JD,aAT9JC,CAAAA"}
|
|
@@ -25,10 +25,10 @@ declare class ZeroShotAgentOutputParser extends AgentActionOutputParser {
|
|
|
25
25
|
tool?: undefined;
|
|
26
26
|
toolInput?: undefined;
|
|
27
27
|
} | {
|
|
28
|
+
returnValues?: undefined;
|
|
28
29
|
tool: string;
|
|
29
30
|
toolInput: string;
|
|
30
31
|
log: string;
|
|
31
|
-
returnValues?: undefined;
|
|
32
32
|
}>;
|
|
33
33
|
/**
|
|
34
34
|
* Returns the format instructions for parsing the output of an agent
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputParser.d.cts","names":["OutputParserArgs","AgentActionOutputParser","FINAL_ANSWER_ACTION","ZeroShotAgentOutputParser","Promise"],"sources":["../../../src/agents/mrkl/outputParser.d.ts"],"sourcesContent":["import { OutputParserArgs } from \"../agent.js\";\nimport { AgentActionOutputParser } from \"../types.js\";\nexport declare const FINAL_ANSWER_ACTION = \"Final Answer:\";\n/**\n * A class that extends `AgentActionOutputParser` to provide a custom\n * implementation for parsing the output of a ZeroShotAgent action.\n */\nexport declare class ZeroShotAgentOutputParser extends AgentActionOutputParser {\n lc_namespace: string[];\n finishToolName: string;\n constructor(fields?: OutputParserArgs);\n /**\n * Parses the text output of an agent action, extracting the tool, tool\n * input, and output.\n * @param text The text output of an agent action.\n * @returns An object containing the tool, tool input, and output extracted from the text, along with the original text as a log.\n */\n parse(text: string): Promise<{\n returnValues: {\n output: string;\n };\n log: string;\n tool?: undefined;\n toolInput?: undefined;\n } | {\n tool: string;\n toolInput: string;\n log: string;\n
|
|
1
|
+
{"version":3,"file":"outputParser.d.cts","names":["OutputParserArgs","AgentActionOutputParser","FINAL_ANSWER_ACTION","ZeroShotAgentOutputParser","Promise"],"sources":["../../../src/agents/mrkl/outputParser.d.ts"],"sourcesContent":["import { OutputParserArgs } from \"../agent.js\";\nimport { AgentActionOutputParser } from \"../types.js\";\nexport declare const FINAL_ANSWER_ACTION = \"Final Answer:\";\n/**\n * A class that extends `AgentActionOutputParser` to provide a custom\n * implementation for parsing the output of a ZeroShotAgent action.\n */\nexport declare class ZeroShotAgentOutputParser extends AgentActionOutputParser {\n lc_namespace: string[];\n finishToolName: string;\n constructor(fields?: OutputParserArgs);\n /**\n * Parses the text output of an agent action, extracting the tool, tool\n * input, and output.\n * @param text The text output of an agent action.\n * @returns An object containing the tool, tool input, and output extracted from the text, along with the original text as a log.\n */\n parse(text: string): Promise<{\n returnValues: {\n output: string;\n };\n log: string;\n tool?: undefined;\n toolInput?: undefined;\n } | {\n returnValues?: undefined;\n tool: string;\n toolInput: string;\n log: string;\n }>;\n /**\n * Returns the format instructions for parsing the output of an agent\n * action in the style of the ZeroShotAgent.\n * @returns The format instructions for parsing the output.\n */\n getFormatInstructions(): string;\n}\n"],"mappings":";;;;;;AAOA;;;AAUyBI,cAVJD,yBAAAA,SAAkCF,uBAAAA,CAU9BG;EAAO,YAVuBH,EAAAA,MAAAA,EAAAA;EAAuB,cAAA,EAAA,MAAA;uBAGrDD;;;;;;;uBAOAI"}
|
|
@@ -5,9 +5,15 @@ import { z } from "zod";
|
|
|
5
5
|
//#region src/agents/toolkits/conversational_retrieval/tool.d.ts
|
|
6
6
|
declare function createRetrieverTool(retriever: BaseRetrieverInterface, input: Omit<DynamicStructuredToolInput, "func" | "schema">): DynamicStructuredTool<z.ZodObject<{
|
|
7
7
|
input: z.ZodString;
|
|
8
|
-
}, z.
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
9
|
input: string;
|
|
10
|
-
},
|
|
10
|
+
}, {
|
|
11
|
+
input: string;
|
|
12
|
+
}>, {
|
|
13
|
+
input: string;
|
|
14
|
+
}, {
|
|
15
|
+
input: string;
|
|
16
|
+
}, string>;
|
|
11
17
|
//#endregion
|
|
12
18
|
export { createRetrieverTool };
|
|
13
19
|
//# sourceMappingURL=tool.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.cts","names":["BaseRetrieverInterface","z","DynamicStructuredTool","DynamicStructuredToolInput","createRetrieverTool","Omit","ZodString","
|
|
1
|
+
{"version":3,"file":"tool.d.cts","names":["BaseRetrieverInterface","z","DynamicStructuredTool","DynamicStructuredToolInput","createRetrieverTool","Omit","ZodString","ZodTypeAny","ZodObject"],"sources":["../../../../src/agents/toolkits/conversational_retrieval/tool.d.ts"],"sourcesContent":["import type { BaseRetrieverInterface } from \"@langchain/core/retrievers\";\nimport { z } from \"zod\";\nimport { DynamicStructuredTool, DynamicStructuredToolInput } from \"@langchain/core/tools\";\nexport declare function createRetrieverTool(retriever: BaseRetrieverInterface, input: Omit<DynamicStructuredToolInput, \"func\" | \"schema\">): DynamicStructuredTool<z.ZodObject<{\n input: z.ZodString;\n}, \"strip\", z.ZodTypeAny, {\n input: string;\n}, {\n input: string;\n}>, {\n input: string;\n}, {\n input: string;\n}, string>;\n"],"mappings":";;;;;iBAGwBI,mBAAAA,YAA+BJ,+BAA+BK,KAAKF,iDAAiDD,sBAAsBD,CAAAA,CAAEO;SACzJP,CAAAA,CAAEK;AADb,CAAA,EAAA,OAAwBF,EAEZH,CAAAA,CAAEM,UAFUH,EAAmB;EAAA,KAAA,EAAA,MAAA;CAAA,EAAA;EAAkC,KAAcD,EAAAA,MAAAA;CAA0B,CAAA,EAAA;EAA3B,KAC7EG,EAAAA,MAAAA;CAAS,EAAA;EACE,KAF4IE,EAAAA,MAAAA;CAAS,EAAA,MAAjCN,CAAAA"}
|
|
@@ -5,9 +5,15 @@ import { BaseRetrieverInterface } from "@langchain/core/retrievers";
|
|
|
5
5
|
//#region src/agents/toolkits/conversational_retrieval/tool.d.ts
|
|
6
6
|
declare function createRetrieverTool(retriever: BaseRetrieverInterface, input: Omit<DynamicStructuredToolInput, "func" | "schema">): DynamicStructuredTool<z.ZodObject<{
|
|
7
7
|
input: z.ZodString;
|
|
8
|
-
}, z.
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
9
|
input: string;
|
|
10
|
-
},
|
|
10
|
+
}, {
|
|
11
|
+
input: string;
|
|
12
|
+
}>, {
|
|
13
|
+
input: string;
|
|
14
|
+
}, {
|
|
15
|
+
input: string;
|
|
16
|
+
}, string>;
|
|
11
17
|
//#endregion
|
|
12
18
|
export { createRetrieverTool };
|
|
13
19
|
//# sourceMappingURL=tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","names":["BaseRetrieverInterface","z","DynamicStructuredTool","DynamicStructuredToolInput","createRetrieverTool","Omit","ZodString","
|
|
1
|
+
{"version":3,"file":"tool.d.ts","names":["BaseRetrieverInterface","z","DynamicStructuredTool","DynamicStructuredToolInput","createRetrieverTool","Omit","ZodString","ZodTypeAny","ZodObject"],"sources":["../../../../src/agents/toolkits/conversational_retrieval/tool.d.ts"],"sourcesContent":["import type { BaseRetrieverInterface } from \"@langchain/core/retrievers\";\nimport { z } from \"zod\";\nimport { DynamicStructuredTool, DynamicStructuredToolInput } from \"@langchain/core/tools\";\nexport declare function createRetrieverTool(retriever: BaseRetrieverInterface, input: Omit<DynamicStructuredToolInput, \"func\" | \"schema\">): DynamicStructuredTool<z.ZodObject<{\n input: z.ZodString;\n}, \"strip\", z.ZodTypeAny, {\n input: string;\n}, {\n input: string;\n}>, {\n input: string;\n}, {\n input: string;\n}, string>;\n"],"mappings":";;;;;iBAGwBI,mBAAAA,YAA+BJ,+BAA+BK,KAAKF,iDAAiDD,sBAAsBD,CAAAA,CAAEO;SACzJP,CAAAA,CAAEK;AADb,CAAA,EAAA,OAAwBF,EAEZH,CAAAA,CAAEM,UAFUH,EAAmB;EAAA,KAAA,EAAA,MAAA;CAAA,EAAA;EAAkC,KAAcD,EAAAA,MAAAA;CAA0B,CAAA,EAAA;EAA3B,KAC7EG,EAAAA,MAAAA;CAAS,EAAA;EACE,KAF4IE,EAAAA,MAAAA;CAAS,EAAA,MAAjCN,CAAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MapReduceDocumentsChain, MapReduceDocumentsChainInput, RefineDocumentsChain, StuffDocumentsChain } from "../combine_docs_chain.cjs";
|
|
2
2
|
import { BasePromptTemplate } from "@langchain/core/prompts";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _langchain_core_language_models_base2 from "@langchain/core/language_models/base";
|
|
4
4
|
import { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
|
|
5
5
|
|
|
6
6
|
//#region src/chains/question_answering/load.d.ts
|
|
@@ -16,7 +16,7 @@ type QAChainParams = ({
|
|
|
16
16
|
} & MapReduceQAChainParams) | ({
|
|
17
17
|
type?: "refine";
|
|
18
18
|
} & RefineQAChainParams);
|
|
19
|
-
declare const loadQAChain: (llm: BaseLanguageModelInterface<any,
|
|
19
|
+
declare const loadQAChain: (llm: BaseLanguageModelInterface<any, _langchain_core_language_models_base2.BaseLanguageModelCallOptions>, params?: QAChainParams) => MapReduceDocumentsChain | RefineDocumentsChain | StuffDocumentsChain;
|
|
20
20
|
/**
|
|
21
21
|
* Represents the parameters for creating a StuffQAChain.
|
|
22
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.cts","names":["BaseLanguageModelInterface","BasePromptTemplate","StuffDocumentsChain","MapReduceDocumentsChain","RefineDocumentsChain","MapReduceDocumentsChainInput","QAChainParams","StuffQAChainParams","MapReduceQAChainParams","RefineQAChainParams","loadQAChain","
|
|
1
|
+
{"version":3,"file":"load.d.cts","names":["BaseLanguageModelInterface","BasePromptTemplate","StuffDocumentsChain","MapReduceDocumentsChain","RefineDocumentsChain","MapReduceDocumentsChainInput","QAChainParams","StuffQAChainParams","MapReduceQAChainParams","RefineQAChainParams","loadQAChain","_langchain_core_language_models_base2","BaseLanguageModelCallOptions","loadQAStuffChain","loadQAMapReduceChain","loadQARefineChain"],"sources":["../../../src/chains/question_answering/load.d.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { BasePromptTemplate } from \"@langchain/core/prompts\";\nimport { StuffDocumentsChain, MapReduceDocumentsChain, RefineDocumentsChain, MapReduceDocumentsChainInput } from \"../combine_docs_chain.js\";\n/**\n * Represents the parameters for creating a QAChain. It can be of three\n * types: \"stuff\", \"map_reduce\", or \"refine\".\n */\nexport type QAChainParams = ({\n type?: \"stuff\";\n} & StuffQAChainParams) | ({\n type?: \"map_reduce\";\n} & MapReduceQAChainParams) | ({\n type?: \"refine\";\n} & RefineQAChainParams);\nexport declare const loadQAChain: (llm: BaseLanguageModelInterface<any, import(\"@langchain/core/language_models/base\").BaseLanguageModelCallOptions>, params?: QAChainParams) => MapReduceDocumentsChain | RefineDocumentsChain | StuffDocumentsChain;\n/**\n * Represents the parameters for creating a StuffQAChain.\n */\nexport interface StuffQAChainParams {\n prompt?: BasePromptTemplate;\n verbose?: boolean;\n}\n/**\n * Loads a StuffQAChain based on the provided parameters. It takes an LLM\n * instance and StuffQAChainParams as parameters.\n * @param llm An instance of BaseLanguageModel.\n * @param params Parameters for creating a StuffQAChain.\n * @returns A StuffQAChain instance.\n */\nexport declare function loadQAStuffChain(llm: BaseLanguageModelInterface, params?: StuffQAChainParams): StuffDocumentsChain;\n/**\n * Represents the parameters for creating a MapReduceQAChain.\n */\nexport interface MapReduceQAChainParams {\n returnIntermediateSteps?: MapReduceDocumentsChainInput[\"returnIntermediateSteps\"];\n combineMapPrompt?: BasePromptTemplate;\n combinePrompt?: BasePromptTemplate;\n combineLLM?: BaseLanguageModelInterface;\n verbose?: boolean;\n}\n/**\n * Loads a MapReduceQAChain based on the provided parameters. It takes an\n * LLM instance and MapReduceQAChainParams as parameters.\n * @param llm An instance of BaseLanguageModel.\n * @param params Parameters for creating a MapReduceQAChain.\n * @returns A MapReduceQAChain instance.\n */\nexport declare function loadQAMapReduceChain(llm: BaseLanguageModelInterface, params?: MapReduceQAChainParams): MapReduceDocumentsChain;\n/**\n * Represents the parameters for creating a RefineQAChain.\n */\nexport interface RefineQAChainParams {\n questionPrompt?: BasePromptTemplate;\n refinePrompt?: BasePromptTemplate;\n refineLLM?: BaseLanguageModelInterface;\n verbose?: boolean;\n}\n/**\n * Loads a RefineQAChain based on the provided parameters. It takes an LLM\n * instance and RefineQAChainParams as parameters.\n * @param llm An instance of BaseLanguageModel.\n * @param params Parameters for creating a RefineQAChain.\n * @returns A RefineQAChain instance.\n */\nexport declare function loadQARefineChain(llm: BaseLanguageModelInterface, params?: RefineQAChainParams): RefineDocumentsChain;\n"],"mappings":";;;;;;;;;;AAOA;AAAyB,KAAbM,aAAAA,GAAa,CAAA;EAAA,IAErBC,CAAAA,EAAAA,OAAAA;CAAkB,GAAlBA,kBAEAC,CAAAA,GAAAA,CAAAA;EAAsB,IAEtBC,CAAAA,EAAAA,YAAAA;AAAmB,CAAA,GAFnBD,sBAEmB,CAAA,GAAA,CAAA;EACFE,IAAAA,CAAAA,EAAAA,QAAgO;CAAA,GADjPD,mBACiP,CAAA;AAAAE,cAAhOD,WAAgOC,EAAAA,CAAAA,GAAAA,EAA7MX,0BAA+EY,CAAAA,GAAAA,EAA8HD,qCAAAA,CAA9HC,4BAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EAAwCN,aAAxCM,EAAAA,GAA0DT,uBAA1DS,GAAoFR,oBAApFQ,GAA2GV,mBAA3GU;;;;AAAoFR,UAI1LG,kBAAAA,CAJ0LH;EAAoB,MAAGF,CAAAA,EAKrND,kBALqNC;EAAmB,OAAA,CAAA,EAAA,OAAA;AAIrP;AAWA;;;;;AAA2H;AAI3H;AAAuC,iBAJfW,gBAAAA,CAIe,GAAA,EAJOb,0BAIP,EAAA,MAAA,CAAA,EAJ4CO,kBAI5C,CAAA,EAJiEL,mBAIjE;;;;AAItBF,UAJAQ,sBAAAA,CAIAR;EAA0B,uBAAA,CAAA,EAHbK,4BAGa,CAAA,yBAAA,CAAA;EAUnBS,gBAAAA,CAAAA,EAZDb,kBAYqB;EAAA,aAAA,CAAA,EAXxBA,kBAWwB;EAAA,UAAMD,CAAAA,EAVjCA,0BAUiCA;EAA0B,OAAWQ,CAAAA,EAAAA,OAAAA;;AAAgD;AAIvI;;;;;AAG0C;AAUlBO,iBAjBAD,oBAAAA,CAiBiB,GAAA,EAjBSd,0BAiBT,EAAA,MAAA,CAAA,EAjB8CQ,sBAiB9C,CAAA,EAjBuEL,uBAiBvE;;;;AAAiEC,UAbzFK,mBAAAA,CAayFL;EAAoB,cAAA,CAAA,EAZzGH,kBAYyG;iBAX3GA;cACHD;;;;;;;;;;iBAUQe,iBAAAA,MAAuBf,qCAAqCS,sBAAsBL"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MapReduceDocumentsChain, MapReduceDocumentsChainInput, RefineDocumentsChain, StuffDocumentsChain } from "../combine_docs_chain.js";
|
|
2
2
|
import { BasePromptTemplate } from "@langchain/core/prompts";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _langchain_core_language_models_base2 from "@langchain/core/language_models/base";
|
|
4
4
|
import { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
|
|
5
5
|
|
|
6
6
|
//#region src/chains/question_answering/load.d.ts
|
|
@@ -16,7 +16,7 @@ type QAChainParams = ({
|
|
|
16
16
|
} & MapReduceQAChainParams) | ({
|
|
17
17
|
type?: "refine";
|
|
18
18
|
} & RefineQAChainParams);
|
|
19
|
-
declare const loadQAChain: (llm: BaseLanguageModelInterface<any,
|
|
19
|
+
declare const loadQAChain: (llm: BaseLanguageModelInterface<any, _langchain_core_language_models_base2.BaseLanguageModelCallOptions>, params?: QAChainParams) => MapReduceDocumentsChain | RefineDocumentsChain | StuffDocumentsChain;
|
|
20
20
|
/**
|
|
21
21
|
* Represents the parameters for creating a StuffQAChain.
|
|
22
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","names":["BaseLanguageModelInterface","BasePromptTemplate","StuffDocumentsChain","MapReduceDocumentsChain","RefineDocumentsChain","MapReduceDocumentsChainInput","QAChainParams","StuffQAChainParams","MapReduceQAChainParams","RefineQAChainParams","loadQAChain","
|
|
1
|
+
{"version":3,"file":"load.d.ts","names":["BaseLanguageModelInterface","BasePromptTemplate","StuffDocumentsChain","MapReduceDocumentsChain","RefineDocumentsChain","MapReduceDocumentsChainInput","QAChainParams","StuffQAChainParams","MapReduceQAChainParams","RefineQAChainParams","loadQAChain","_langchain_core_language_models_base2","BaseLanguageModelCallOptions","loadQAStuffChain","loadQAMapReduceChain","loadQARefineChain"],"sources":["../../../src/chains/question_answering/load.d.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { BasePromptTemplate } from \"@langchain/core/prompts\";\nimport { StuffDocumentsChain, MapReduceDocumentsChain, RefineDocumentsChain, MapReduceDocumentsChainInput } from \"../combine_docs_chain.js\";\n/**\n * Represents the parameters for creating a QAChain. It can be of three\n * types: \"stuff\", \"map_reduce\", or \"refine\".\n */\nexport type QAChainParams = ({\n type?: \"stuff\";\n} & StuffQAChainParams) | ({\n type?: \"map_reduce\";\n} & MapReduceQAChainParams) | ({\n type?: \"refine\";\n} & RefineQAChainParams);\nexport declare const loadQAChain: (llm: BaseLanguageModelInterface<any, import(\"@langchain/core/language_models/base\").BaseLanguageModelCallOptions>, params?: QAChainParams) => MapReduceDocumentsChain | RefineDocumentsChain | StuffDocumentsChain;\n/**\n * Represents the parameters for creating a StuffQAChain.\n */\nexport interface StuffQAChainParams {\n prompt?: BasePromptTemplate;\n verbose?: boolean;\n}\n/**\n * Loads a StuffQAChain based on the provided parameters. It takes an LLM\n * instance and StuffQAChainParams as parameters.\n * @param llm An instance of BaseLanguageModel.\n * @param params Parameters for creating a StuffQAChain.\n * @returns A StuffQAChain instance.\n */\nexport declare function loadQAStuffChain(llm: BaseLanguageModelInterface, params?: StuffQAChainParams): StuffDocumentsChain;\n/**\n * Represents the parameters for creating a MapReduceQAChain.\n */\nexport interface MapReduceQAChainParams {\n returnIntermediateSteps?: MapReduceDocumentsChainInput[\"returnIntermediateSteps\"];\n combineMapPrompt?: BasePromptTemplate;\n combinePrompt?: BasePromptTemplate;\n combineLLM?: BaseLanguageModelInterface;\n verbose?: boolean;\n}\n/**\n * Loads a MapReduceQAChain based on the provided parameters. It takes an\n * LLM instance and MapReduceQAChainParams as parameters.\n * @param llm An instance of BaseLanguageModel.\n * @param params Parameters for creating a MapReduceQAChain.\n * @returns A MapReduceQAChain instance.\n */\nexport declare function loadQAMapReduceChain(llm: BaseLanguageModelInterface, params?: MapReduceQAChainParams): MapReduceDocumentsChain;\n/**\n * Represents the parameters for creating a RefineQAChain.\n */\nexport interface RefineQAChainParams {\n questionPrompt?: BasePromptTemplate;\n refinePrompt?: BasePromptTemplate;\n refineLLM?: BaseLanguageModelInterface;\n verbose?: boolean;\n}\n/**\n * Loads a RefineQAChain based on the provided parameters. It takes an LLM\n * instance and RefineQAChainParams as parameters.\n * @param llm An instance of BaseLanguageModel.\n * @param params Parameters for creating a RefineQAChain.\n * @returns A RefineQAChain instance.\n */\nexport declare function loadQARefineChain(llm: BaseLanguageModelInterface, params?: RefineQAChainParams): RefineDocumentsChain;\n"],"mappings":";;;;;;;;;;AAOA;AAAyB,KAAbM,aAAAA,GAAa,CAAA;EAAA,IAErBC,CAAAA,EAAAA,OAAAA;CAAkB,GAAlBA,kBAEAC,CAAAA,GAAAA,CAAAA;EAAsB,IAEtBC,CAAAA,EAAAA,YAAAA;AAAmB,CAAA,GAFnBD,sBAEmB,CAAA,GAAA,CAAA;EACFE,IAAAA,CAAAA,EAAAA,QAAgO;CAAA,GADjPD,mBACiP,CAAA;AAAAE,cAAhOD,WAAgOC,EAAAA,CAAAA,GAAAA,EAA7MX,0BAA+EY,CAAAA,GAAAA,EAA8HD,qCAAAA,CAA9HC,4BAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EAAwCN,aAAxCM,EAAAA,GAA0DT,uBAA1DS,GAAoFR,oBAApFQ,GAA2GV,mBAA3GU;;;;AAAoFR,UAI1LG,kBAAAA,CAJ0LH;EAAoB,MAAGF,CAAAA,EAKrND,kBALqNC;EAAmB,OAAA,CAAA,EAAA,OAAA;AAIrP;AAWA;;;;;AAA2H;AAI3H;AAAuC,iBAJfW,gBAAAA,CAIe,GAAA,EAJOb,0BAIP,EAAA,MAAA,CAAA,EAJ4CO,kBAI5C,CAAA,EAJiEL,mBAIjE;;;;AAItBF,UAJAQ,sBAAAA,CAIAR;EAA0B,uBAAA,CAAA,EAHbK,4BAGa,CAAA,yBAAA,CAAA;EAUnBS,gBAAAA,CAAAA,EAZDb,kBAYqB;EAAA,aAAA,CAAA,EAXxBA,kBAWwB;EAAA,UAAMD,CAAAA,EAVjCA,0BAUiCA;EAA0B,OAAWQ,CAAAA,EAAAA,OAAAA;;AAAgD;AAIvI;;;;;AAG0C;AAUlBO,iBAjBAD,oBAAAA,CAiBiB,GAAA,EAjBSd,0BAiBT,EAAA,MAAA,CAAA,EAjB8CQ,sBAiB9C,CAAA,EAjBuEL,uBAiBvE;;;;AAAiEC,UAbzFK,mBAAAA,CAayFL;EAAoB,cAAA,CAAA,EAZzGH,kBAYyG;iBAX3GA;cACHD;;;;;;;;;;iBAUQe,iBAAAA,MAAuBf,qCAAqCS,sBAAsBL"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MapReduceDocumentsChain, MapReduceDocumentsChainInput, RefineDocumentsChain, StuffDocumentsChain } from "../combine_docs_chain.cjs";
|
|
2
2
|
import { BasePromptTemplate } from "@langchain/core/prompts";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _langchain_core_language_models_base1 from "@langchain/core/language_models/base";
|
|
4
4
|
import { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
|
|
5
5
|
|
|
6
6
|
//#region src/chains/summarization/load.d.ts
|
|
@@ -27,7 +27,7 @@ type SummarizationChainParams = BaseParams & ({
|
|
|
27
27
|
refineLLM?: BaseLanguageModelInterface;
|
|
28
28
|
questionPrompt?: BasePromptTemplate;
|
|
29
29
|
});
|
|
30
|
-
declare const loadSummarizationChain: (llm: BaseLanguageModelInterface<any,
|
|
30
|
+
declare const loadSummarizationChain: (llm: BaseLanguageModelInterface<any, _langchain_core_language_models_base1.BaseLanguageModelCallOptions>, params?: SummarizationChainParams) => MapReduceDocumentsChain | RefineDocumentsChain | StuffDocumentsChain;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { SummarizationChainParams, loadSummarizationChain };
|
|
33
33
|
//# sourceMappingURL=load.d.cts.map
|