@langchain/classic 1.0.0-alpha.1 → 1.0.1
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 +13 -0
- package/LICENSE +6 -6
- package/README.md +174 -66
- 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/openai_tools/index.d.cts.map +1 -1
- package/dist/agents/openai_tools/index.d.ts.map +1 -1
- package/dist/agents/react/index.d.ts +2 -2
- package/dist/agents/react/index.d.ts.map +1 -1
- package/dist/agents/structured_chat/index.d.ts +2 -2
- package/dist/agents/structured_chat/index.d.ts.map +1 -1
- package/dist/agents/tool_calling/index.d.cts.map +1 -1
- package/dist/agents/tool_calling/index.d.ts.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts +2 -2
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.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/index.cjs +3 -0
- package/dist/chains/index.cjs.map +1 -1
- package/dist/chains/index.d.cts +2 -1
- package/dist/chains/index.d.ts +2 -1
- package/dist/chains/index.js +3 -1
- package/dist/chains/index.js.map +1 -1
- package/dist/chains/openai_moderation.cjs +107 -0
- package/dist/chains/openai_moderation.cjs.map +1 -0
- package/dist/chains/openai_moderation.d.cts +74 -0
- package/dist/chains/openai_moderation.d.cts.map +1 -0
- package/dist/chains/openai_moderation.d.ts +74 -0
- package/dist/chains/openai_moderation.d.ts.map +1 -0
- package/dist/chains/openai_moderation.js +106 -0
- package/dist/chains/openai_moderation.js.map +1 -0
- 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/chains/summarization/load.d.ts +2 -2
- package/dist/chains/summarization/load.d.ts.map +1 -1
- package/dist/embeddings/cache_backed.d.cts +1 -1
- package/dist/embeddings/cache_backed.d.ts +1 -1
- package/dist/evaluation/agents/trajectory.d.cts.map +1 -1
- package/dist/evaluation/comparison/pairwise.d.cts.map +1 -1
- package/dist/evaluation/criteria/criteria.d.cts.map +1 -1
- package/dist/experimental/autogpt/prompt.d.cts +2 -2
- package/dist/experimental/autogpt/prompt.d.cts.map +1 -1
- package/dist/hub/base.cjs +1 -1
- package/dist/hub/base.js +1 -1
- package/dist/langchain-core/dist/messages/base.d.cts +2 -0
- package/dist/langchain-core/dist/messages/base.d.cts.map +1 -1
- package/dist/langchain-core/dist/messages/format.d.cts +8 -0
- package/dist/langchain-core/dist/messages/format.d.cts.map +1 -0
- package/dist/libs/langchain-core/dist/messages/base.d.ts +2 -0
- package/dist/libs/langchain-core/dist/messages/base.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/messages/format.d.ts +8 -0
- package/dist/libs/langchain-core/dist/messages/format.d.ts.map +1 -0
- 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 +225 -225
- 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
|
@@ -13,10 +13,10 @@ const require_index = require('./utils/fast-safe-stringify/index.cjs');
|
|
|
13
13
|
const require_index$1 = require('./index.cjs');
|
|
14
14
|
const uuid = require_rolldown_runtime.__toESM(require("uuid"));
|
|
15
15
|
|
|
16
|
-
//#region ../../node_modules/.pnpm/langsmith@0.3.
|
|
17
|
-
function mergeRuntimeEnvIntoRun(run) {
|
|
16
|
+
//#region ../../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
|
|
17
|
+
function mergeRuntimeEnvIntoRun(run, cachedEnvVars) {
|
|
18
18
|
const runtimeEnv = require_env.getRuntimeEnvironment();
|
|
19
|
-
const envVars = require_env.
|
|
19
|
+
const envVars = cachedEnvVars ?? require_env.getLangSmithEnvVarsMetadata();
|
|
20
20
|
const extra = run.extra ?? {};
|
|
21
21
|
const metadata = extra.metadata;
|
|
22
22
|
run.extra = {
|
|
@@ -105,11 +105,11 @@ var AutoBatchQueue = class {
|
|
|
105
105
|
this.sizeBytes += size;
|
|
106
106
|
return itemPromise;
|
|
107
107
|
}
|
|
108
|
-
pop(upToSizeBytes) {
|
|
108
|
+
pop({ upToSizeBytes, upToSize }) {
|
|
109
109
|
if (upToSizeBytes < 1) throw new Error("Number of bytes to pop off may not be less than 1.");
|
|
110
110
|
const popped = [];
|
|
111
111
|
let poppedSizeBytes = 0;
|
|
112
|
-
while (poppedSizeBytes + (this.peek()?.size ?? 0) < upToSizeBytes && this.items.length > 0) {
|
|
112
|
+
while (poppedSizeBytes + (this.peek()?.size ?? 0) < upToSizeBytes && this.items.length > 0 && popped.length < upToSize) {
|
|
113
113
|
const item = this.items.shift();
|
|
114
114
|
if (item) {
|
|
115
115
|
popped.push(item);
|
|
@@ -134,6 +134,8 @@ var AutoBatchQueue = class {
|
|
|
134
134
|
};
|
|
135
135
|
const DEFAULT_UNCOMPRESSED_BATCH_SIZE_LIMIT_BYTES = 24 * 1024 * 1024;
|
|
136
136
|
const SERVER_INFO_REQUEST_TIMEOUT_MS = 1e4;
|
|
137
|
+
/** Maximum number of operations to batch in a single request. */
|
|
138
|
+
const DEFAULT_BATCH_SIZE_LIMIT = 100;
|
|
137
139
|
const DEFAULT_API_URL = "https://api.smith.langchain.com";
|
|
138
140
|
var Client = class Client {
|
|
139
141
|
get _fetch() {
|
|
@@ -158,6 +160,12 @@ var Client = class Client {
|
|
|
158
160
|
writable: true,
|
|
159
161
|
value: void 0
|
|
160
162
|
});
|
|
163
|
+
Object.defineProperty(this, "workspaceId", {
|
|
164
|
+
enumerable: true,
|
|
165
|
+
configurable: true,
|
|
166
|
+
writable: true,
|
|
167
|
+
value: void 0
|
|
168
|
+
});
|
|
161
169
|
Object.defineProperty(this, "caller", {
|
|
162
170
|
enumerable: true,
|
|
163
171
|
configurable: true,
|
|
@@ -236,6 +244,12 @@ var Client = class Client {
|
|
|
236
244
|
writable: true,
|
|
237
245
|
value: void 0
|
|
238
246
|
});
|
|
247
|
+
Object.defineProperty(this, "batchSizeLimit", {
|
|
248
|
+
enumerable: true,
|
|
249
|
+
configurable: true,
|
|
250
|
+
writable: true,
|
|
251
|
+
value: void 0
|
|
252
|
+
});
|
|
239
253
|
Object.defineProperty(this, "fetchOptions", {
|
|
240
254
|
enumerable: true,
|
|
241
255
|
configurable: true,
|
|
@@ -290,6 +304,12 @@ var Client = class Client {
|
|
|
290
304
|
writable: true,
|
|
291
305
|
value: void 0
|
|
292
306
|
});
|
|
307
|
+
Object.defineProperty(this, "cachedLSEnvVarsForMetadata", {
|
|
308
|
+
enumerable: true,
|
|
309
|
+
configurable: true,
|
|
310
|
+
writable: true,
|
|
311
|
+
value: void 0
|
|
312
|
+
});
|
|
293
313
|
Object.defineProperty(this, "multipartStreamingDisabled", {
|
|
294
314
|
enumerable: true,
|
|
295
315
|
configurable: true,
|
|
@@ -309,6 +329,7 @@ var Client = class Client {
|
|
|
309
329
|
this.apiKey = trimQuotes(config.apiKey ?? defaultConfig.apiKey);
|
|
310
330
|
this.webUrl = trimQuotes(config.webUrl ?? defaultConfig.webUrl);
|
|
311
331
|
if (this.webUrl?.endsWith("/")) this.webUrl = this.webUrl.slice(0, -1);
|
|
332
|
+
this.workspaceId = trimQuotes(config.workspaceId ?? require_env.getLangSmithEnvironmentVariable("WORKSPACE_ID"));
|
|
312
333
|
this.timeout_ms = config.timeout_ms ?? 9e4;
|
|
313
334
|
this.caller = new require_async_caller.AsyncCaller({
|
|
314
335
|
...config.callerOptions ?? {},
|
|
@@ -331,9 +352,11 @@ var Client = class Client {
|
|
|
331
352
|
this.autoBatchTracing = config.autoBatchTracing ?? this.autoBatchTracing;
|
|
332
353
|
this.blockOnRootRunFinalization = config.blockOnRootRunFinalization ?? this.blockOnRootRunFinalization;
|
|
333
354
|
this.batchSizeBytesLimit = config.batchSizeBytesLimit;
|
|
355
|
+
this.batchSizeLimit = config.batchSizeLimit;
|
|
334
356
|
this.fetchOptions = config.fetchOptions || {};
|
|
335
357
|
this.manualFlushMode = config.manualFlushMode ?? this.manualFlushMode;
|
|
336
358
|
if (require_env.getOtelEnabled()) this.langSmithToOTELTranslator = new require_translator.LangSmithToOTELTranslator();
|
|
359
|
+
this.cachedLSEnvVarsForMetadata = require_env.getLangSmithEnvVarsMetadata();
|
|
337
360
|
}
|
|
338
361
|
static getDefaultClientConfig() {
|
|
339
362
|
const apiKey = require_env.getLangSmithEnvironmentVariable("API_KEY");
|
|
@@ -376,6 +399,7 @@ var Client = class Client {
|
|
|
376
399
|
get headers() {
|
|
377
400
|
const headers = { "User-Agent": `langsmith-js/${require_index$1.__version__}` };
|
|
378
401
|
if (this.apiKey) headers["x-api-key"] = `${this.apiKey}`;
|
|
402
|
+
if (this.workspaceId) headers["x-tenant-id"] = this.workspaceId;
|
|
379
403
|
return headers;
|
|
380
404
|
}
|
|
381
405
|
_getPlatformEndpointPath(path) {
|
|
@@ -410,7 +434,7 @@ var Client = class Client {
|
|
|
410
434
|
signal: AbortSignal.timeout(this.timeout_ms),
|
|
411
435
|
...this.fetchOptions
|
|
412
436
|
});
|
|
413
|
-
await require_error.raiseForStatus(res, `
|
|
437
|
+
await require_error.raiseForStatus(res, `fetch ${path}`);
|
|
414
438
|
return res;
|
|
415
439
|
});
|
|
416
440
|
return response;
|
|
@@ -433,7 +457,7 @@ var Client = class Client {
|
|
|
433
457
|
signal: AbortSignal.timeout(this.timeout_ms),
|
|
434
458
|
...this.fetchOptions
|
|
435
459
|
});
|
|
436
|
-
await require_error.raiseForStatus(res, `
|
|
460
|
+
await require_error.raiseForStatus(res, `fetch ${path}`);
|
|
437
461
|
return res;
|
|
438
462
|
});
|
|
439
463
|
const items = transform ? transform(await response.json()) : await response.json();
|
|
@@ -458,7 +482,7 @@ var Client = class Client {
|
|
|
458
482
|
...this.fetchOptions,
|
|
459
483
|
body: body$1
|
|
460
484
|
});
|
|
461
|
-
await require_error.raiseForStatus(res, `
|
|
485
|
+
await require_error.raiseForStatus(res, `fetch ${path}`);
|
|
462
486
|
return res;
|
|
463
487
|
});
|
|
464
488
|
const responseBody = await response.json();
|
|
@@ -498,14 +522,24 @@ var Client = class Client {
|
|
|
498
522
|
const serverInfo = await this._ensureServerInfo();
|
|
499
523
|
return this.batchSizeBytesLimit ?? serverInfo.batch_ingest_config?.size_limit_bytes ?? DEFAULT_UNCOMPRESSED_BATCH_SIZE_LIMIT_BYTES;
|
|
500
524
|
}
|
|
525
|
+
/**
|
|
526
|
+
* Get the maximum number of operations to batch in a single request.
|
|
527
|
+
*/
|
|
528
|
+
async _getBatchSizeLimit() {
|
|
529
|
+
const serverInfo = await this._ensureServerInfo();
|
|
530
|
+
return this.batchSizeLimit ?? serverInfo.batch_ingest_config?.size_limit ?? DEFAULT_BATCH_SIZE_LIMIT;
|
|
531
|
+
}
|
|
501
532
|
async _getDatasetExamplesMultiPartSupport() {
|
|
502
533
|
const serverInfo = await this._ensureServerInfo();
|
|
503
534
|
return serverInfo.instance_flags?.dataset_examples_multipart_enabled ?? false;
|
|
504
535
|
}
|
|
505
|
-
drainAutoBatchQueue(batchSizeLimit) {
|
|
536
|
+
drainAutoBatchQueue({ batchSizeLimitBytes, batchSizeLimit }) {
|
|
506
537
|
const promises = [];
|
|
507
538
|
while (this.autoBatchQueue.items.length > 0) {
|
|
508
|
-
const [batch, done] = this.autoBatchQueue.pop(
|
|
539
|
+
const [batch, done] = this.autoBatchQueue.pop({
|
|
540
|
+
upToSizeBytes: batchSizeLimitBytes,
|
|
541
|
+
upToSize: batchSizeLimit
|
|
542
|
+
});
|
|
509
543
|
if (!batch.length) {
|
|
510
544
|
done();
|
|
511
545
|
break;
|
|
@@ -579,14 +613,21 @@ var Client = class Client {
|
|
|
579
613
|
async processRunOperation(item) {
|
|
580
614
|
clearTimeout(this.autoBatchTimeout);
|
|
581
615
|
this.autoBatchTimeout = void 0;
|
|
582
|
-
item.item = mergeRuntimeEnvIntoRun(item.item);
|
|
616
|
+
item.item = mergeRuntimeEnvIntoRun(item.item, this.cachedLSEnvVarsForMetadata);
|
|
583
617
|
const itemPromise = this.autoBatchQueue.push(item);
|
|
584
618
|
if (this.manualFlushMode) return itemPromise;
|
|
585
619
|
const sizeLimitBytes = await this._getBatchSizeLimitBytes();
|
|
586
|
-
|
|
620
|
+
const sizeLimit = await this._getBatchSizeLimit();
|
|
621
|
+
if (this.autoBatchQueue.sizeBytes > sizeLimitBytes || this.autoBatchQueue.items.length > sizeLimit) this.drainAutoBatchQueue({
|
|
622
|
+
batchSizeLimitBytes: sizeLimitBytes,
|
|
623
|
+
batchSizeLimit: sizeLimit
|
|
624
|
+
});
|
|
587
625
|
if (this.autoBatchQueue.items.length > 0) this.autoBatchTimeout = setTimeout(() => {
|
|
588
626
|
this.autoBatchTimeout = void 0;
|
|
589
|
-
this.drainAutoBatchQueue(
|
|
627
|
+
this.drainAutoBatchQueue({
|
|
628
|
+
batchSizeLimitBytes: sizeLimitBytes,
|
|
629
|
+
batchSizeLimit: sizeLimit
|
|
630
|
+
});
|
|
590
631
|
}, this.autoBatchAggregationDelayMs);
|
|
591
632
|
return itemPromise;
|
|
592
633
|
}
|
|
@@ -628,7 +669,11 @@ var Client = class Client {
|
|
|
628
669
|
*/
|
|
629
670
|
async flush() {
|
|
630
671
|
const sizeLimitBytes = await this._getBatchSizeLimitBytes();
|
|
631
|
-
await this.
|
|
672
|
+
const sizeLimit = await this._getBatchSizeLimit();
|
|
673
|
+
await this.drainAutoBatchQueue({
|
|
674
|
+
batchSizeLimitBytes: sizeLimitBytes,
|
|
675
|
+
batchSizeLimit: sizeLimit
|
|
676
|
+
});
|
|
632
677
|
}
|
|
633
678
|
_cloneCurrentOTELContext() {
|
|
634
679
|
const otel_trace = require_otel.getOTELTrace();
|
|
@@ -663,8 +708,9 @@ var Client = class Client {
|
|
|
663
708
|
}).catch(console.error);
|
|
664
709
|
return;
|
|
665
710
|
}
|
|
666
|
-
const mergedRunCreateParam = mergeRuntimeEnvIntoRun(runCreate);
|
|
711
|
+
const mergedRunCreateParam = mergeRuntimeEnvIntoRun(runCreate, this.cachedLSEnvVarsForMetadata);
|
|
667
712
|
if (options?.apiKey !== void 0) headers["x-api-key"] = options.apiKey;
|
|
713
|
+
if (options?.workspaceId !== void 0) headers["x-tenant-id"] = options.workspaceId;
|
|
668
714
|
const body = require_index.serialize(mergedRunCreateParam, `Creating run with id: ${mergedRunCreateParam.id}`);
|
|
669
715
|
await this.caller.call(async () => {
|
|
670
716
|
const res = await this._fetch(`${options?.apiUrl ?? this.apiUrl}/runs`, {
|
|
@@ -954,6 +1000,7 @@ var Client = class Client {
|
|
|
954
1000
|
"Content-Type": "application/json"
|
|
955
1001
|
};
|
|
956
1002
|
if (options?.apiKey !== void 0) headers["x-api-key"] = options.apiKey;
|
|
1003
|
+
if (options?.workspaceId !== void 0) headers["x-tenant-id"] = options.workspaceId;
|
|
957
1004
|
const body = require_index.serialize(run, `Serializing payload to update run with id: ${runId}`);
|
|
958
1005
|
await this.caller.call(async () => {
|
|
959
1006
|
const res = await this._fetch(`${options?.apiUrl ?? this.apiUrl}/runs/${runId}`, {
|
|
@@ -1152,6 +1199,7 @@ var Client = class Client {
|
|
|
1152
1199
|
is_root: isRoot,
|
|
1153
1200
|
order
|
|
1154
1201
|
};
|
|
1202
|
+
if (body.select.includes("child_run_ids")) require_warn.warnOnce("Deprecated: 'child_run_ids' in the listRuns select parameter is deprecated and will be removed in a future version.");
|
|
1155
1203
|
let runsYielded = 0;
|
|
1156
1204
|
for await (const runs of this._getCursorPaginatedList("/runs/query", body)) if (limit) {
|
|
1157
1205
|
if (runsYielded >= limit) break;
|
|
@@ -1232,7 +1280,10 @@ var Client = class Client {
|
|
|
1232
1280
|
const response = await this.caller.call(async () => {
|
|
1233
1281
|
const res = await this._fetch(`${this.apiUrl}/runs/stats`, {
|
|
1234
1282
|
method: "POST",
|
|
1235
|
-
headers:
|
|
1283
|
+
headers: {
|
|
1284
|
+
...this.headers,
|
|
1285
|
+
"Content-Type": "application/json"
|
|
1286
|
+
},
|
|
1236
1287
|
signal: AbortSignal.timeout(this.timeout_ms),
|
|
1237
1288
|
...this.fetchOptions,
|
|
1238
1289
|
body
|
|
@@ -1552,7 +1603,7 @@ var Client = class Client {
|
|
|
1552
1603
|
}
|
|
1553
1604
|
throw new Error("No projects found to resolve tenant.");
|
|
1554
1605
|
}
|
|
1555
|
-
async *listProjects({ projectIds, name, nameContains, referenceDatasetId, referenceDatasetName, referenceFree, metadata } = {}) {
|
|
1606
|
+
async *listProjects({ projectIds, name, nameContains, referenceDatasetId, referenceDatasetName, includeStats, datasetVersion, referenceFree, metadata } = {}) {
|
|
1556
1607
|
const params = new URLSearchParams();
|
|
1557
1608
|
if (projectIds !== void 0) for (const projectId of projectIds) params.append("id", projectId);
|
|
1558
1609
|
if (name !== void 0) params.append("name", name);
|
|
@@ -1562,6 +1613,8 @@ var Client = class Client {
|
|
|
1562
1613
|
const dataset = await this.readDataset({ datasetName: referenceDatasetName });
|
|
1563
1614
|
params.append("reference_dataset", dataset.id);
|
|
1564
1615
|
}
|
|
1616
|
+
if (includeStats !== void 0) params.append("include_stats", includeStats.toString());
|
|
1617
|
+
if (datasetVersion !== void 0) params.append("dataset_version", datasetVersion);
|
|
1565
1618
|
if (referenceFree !== void 0) params.append("reference_free", referenceFree.toString());
|
|
1566
1619
|
if (metadata !== void 0) params.append("metadata", JSON.stringify(metadata));
|
|
1567
1620
|
for await (const projects of this._getPaginated("/sessions", params)) yield* projects;
|
|
@@ -2243,7 +2296,10 @@ var Client = class Client {
|
|
|
2243
2296
|
}
|
|
2244
2297
|
async *listFeedback({ runIds, feedbackKeys, feedbackSourceTypes } = {}) {
|
|
2245
2298
|
const queryParams = new URLSearchParams();
|
|
2246
|
-
if (runIds)
|
|
2299
|
+
if (runIds) for (const runId of runIds) {
|
|
2300
|
+
require__uuid.assertUuid(runId);
|
|
2301
|
+
queryParams.append("run", runId);
|
|
2302
|
+
}
|
|
2247
2303
|
if (feedbackKeys) for (const key of feedbackKeys) queryParams.append("key", key);
|
|
2248
2304
|
if (feedbackSourceTypes) for (const type of feedbackSourceTypes) queryParams.append("source", type);
|
|
2249
2305
|
for await (const feedbacks of this._getPaginated("/feedback", queryParams)) yield* feedbacks;
|