@langchain/core 1.1.24 → 1.1.25
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 +21 -0
- package/dist/_virtual/_rolldown/runtime.cjs +43 -0
- package/dist/_virtual/_rolldown/runtime.js +18 -0
- package/dist/agents.cjs +3 -1
- package/dist/agents.d.cts.map +1 -1
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +3 -1
- package/dist/caches/index.cjs +4 -4
- package/dist/caches/index.cjs.map +1 -1
- package/dist/caches/index.d.cts.map +1 -1
- package/dist/caches/index.d.ts.map +1 -1
- package/dist/caches/index.js +3 -4
- package/dist/caches/index.js.map +1 -1
- package/dist/callbacks/base.cjs +9 -16
- package/dist/callbacks/base.cjs.map +1 -1
- package/dist/callbacks/base.d.cts +1 -0
- package/dist/callbacks/base.d.cts.map +1 -1
- package/dist/callbacks/base.d.ts +1 -0
- package/dist/callbacks/base.d.ts.map +1 -1
- package/dist/callbacks/base.js +6 -15
- package/dist/callbacks/base.js.map +1 -1
- package/dist/callbacks/dispatch/index.cjs +6 -6
- package/dist/callbacks/dispatch/index.cjs.map +1 -1
- package/dist/callbacks/dispatch/index.d.cts +0 -1
- package/dist/callbacks/dispatch/index.d.cts.map +1 -1
- package/dist/callbacks/dispatch/index.d.ts +0 -1
- package/dist/callbacks/dispatch/index.d.ts.map +1 -1
- package/dist/callbacks/dispatch/index.js +4 -5
- package/dist/callbacks/dispatch/index.js.map +1 -1
- package/dist/callbacks/dispatch/web.cjs +1 -0
- package/dist/callbacks/dispatch/web.cjs.map +1 -1
- package/dist/callbacks/dispatch/web.d.cts +0 -1
- package/dist/callbacks/dispatch/web.d.cts.map +1 -1
- package/dist/callbacks/dispatch/web.d.ts +0 -1
- package/dist/callbacks/dispatch/web.d.ts.map +1 -1
- package/dist/callbacks/dispatch/web.js.map +1 -1
- package/dist/callbacks/manager.cjs +30 -50
- package/dist/callbacks/manager.cjs.map +1 -1
- package/dist/callbacks/manager.d.cts.map +1 -1
- package/dist/callbacks/manager.d.ts.map +1 -1
- package/dist/callbacks/manager.js +28 -49
- package/dist/callbacks/manager.js.map +1 -1
- package/dist/callbacks/promises.cjs +3 -3
- package/dist/callbacks/promises.js +2 -3
- package/dist/chat_history.cjs +4 -4
- package/dist/chat_history.cjs.map +1 -1
- package/dist/chat_history.d.cts +0 -1
- package/dist/chat_history.d.cts.map +1 -1
- package/dist/chat_history.d.ts +0 -1
- package/dist/chat_history.d.ts.map +1 -1
- package/dist/chat_history.js +3 -4
- package/dist/chat_history.js.map +1 -1
- package/dist/context.cjs +10 -2
- package/dist/context.cjs.map +1 -1
- package/dist/context.d.cts.map +1 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +7 -0
- package/dist/context.js.map +1 -1
- package/dist/document_loaders/base.cjs +3 -3
- package/dist/document_loaders/base.cjs.map +1 -1
- package/dist/document_loaders/base.d.cts +0 -1
- package/dist/document_loaders/base.d.cts.map +1 -1
- package/dist/document_loaders/base.d.ts +0 -1
- package/dist/document_loaders/base.d.ts.map +1 -1
- package/dist/document_loaders/base.js +2 -3
- package/dist/document_loaders/base.js.map +1 -1
- package/dist/document_loaders/langsmith.cjs +4 -4
- package/dist/document_loaders/langsmith.cjs.map +1 -1
- package/dist/document_loaders/langsmith.d.cts.map +1 -1
- package/dist/document_loaders/langsmith.d.ts.map +1 -1
- package/dist/document_loaders/langsmith.js +2 -3
- package/dist/document_loaders/langsmith.js.map +1 -1
- package/dist/documents/document.cjs.map +1 -1
- package/dist/documents/document.d.cts.map +1 -1
- package/dist/documents/document.d.ts.map +1 -1
- package/dist/documents/document.js.map +1 -1
- package/dist/documents/index.cjs +3 -3
- package/dist/documents/index.js +2 -3
- package/dist/documents/transformers.cjs.map +1 -1
- package/dist/documents/transformers.d.cts +0 -1
- package/dist/documents/transformers.d.cts.map +1 -1
- package/dist/documents/transformers.d.ts +0 -1
- package/dist/documents/transformers.d.ts.map +1 -1
- package/dist/documents/transformers.js.map +1 -1
- package/dist/embeddings.cjs +3 -3
- package/dist/embeddings.cjs.map +1 -1
- package/dist/embeddings.d.cts +0 -1
- package/dist/embeddings.d.cts.map +1 -1
- package/dist/embeddings.d.ts +0 -1
- package/dist/embeddings.d.ts.map +1 -1
- package/dist/embeddings.js +2 -3
- package/dist/embeddings.js.map +1 -1
- package/dist/errors/index.cjs +141 -15
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.d.cts +134 -11
- package/dist/errors/index.d.cts.map +1 -1
- package/dist/errors/index.d.ts +134 -11
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +138 -16
- package/dist/errors/index.js.map +1 -1
- package/dist/example_selectors/base.cjs.map +1 -1
- package/dist/example_selectors/base.d.cts +0 -1
- package/dist/example_selectors/base.d.cts.map +1 -1
- package/dist/example_selectors/base.d.ts +0 -1
- package/dist/example_selectors/base.d.ts.map +1 -1
- package/dist/example_selectors/base.js.map +1 -1
- package/dist/example_selectors/conditional.cjs +1 -2
- package/dist/example_selectors/conditional.cjs.map +1 -1
- package/dist/example_selectors/conditional.d.cts.map +1 -1
- package/dist/example_selectors/conditional.d.ts.map +1 -1
- package/dist/example_selectors/conditional.js +1 -2
- package/dist/example_selectors/conditional.js.map +1 -1
- package/dist/example_selectors/index.cjs +3 -3
- package/dist/example_selectors/index.js +2 -3
- package/dist/example_selectors/length_based.cjs +1 -2
- package/dist/example_selectors/length_based.cjs.map +1 -1
- package/dist/example_selectors/length_based.d.cts +0 -1
- package/dist/example_selectors/length_based.d.cts.map +1 -1
- package/dist/example_selectors/length_based.d.ts +0 -1
- package/dist/example_selectors/length_based.d.ts.map +1 -1
- package/dist/example_selectors/length_based.js +1 -2
- package/dist/example_selectors/length_based.js.map +1 -1
- package/dist/example_selectors/semantic_similarity.cjs +4 -8
- package/dist/example_selectors/semantic_similarity.cjs.map +1 -1
- package/dist/example_selectors/semantic_similarity.d.cts +0 -1
- package/dist/example_selectors/semantic_similarity.d.cts.map +1 -1
- package/dist/example_selectors/semantic_similarity.d.ts +0 -1
- package/dist/example_selectors/semantic_similarity.d.ts.map +1 -1
- package/dist/example_selectors/semantic_similarity.js +4 -8
- package/dist/example_selectors/semantic_similarity.js.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/dist/indexing/base.cjs +7 -11
- package/dist/indexing/base.cjs.map +1 -1
- package/dist/indexing/base.d.cts.map +1 -1
- package/dist/indexing/base.d.ts.map +1 -1
- package/dist/indexing/base.js +5 -9
- package/dist/indexing/base.js.map +1 -1
- package/dist/indexing/index.cjs +3 -3
- package/dist/indexing/index.js +2 -3
- package/dist/indexing/record_manager.cjs.map +1 -1
- package/dist/indexing/record_manager.d.cts.map +1 -1
- package/dist/indexing/record_manager.d.ts.map +1 -1
- package/dist/indexing/record_manager.js.map +1 -1
- package/dist/language_models/base.cjs +10 -14
- package/dist/language_models/base.cjs.map +1 -1
- package/dist/language_models/base.d.cts +2 -4
- package/dist/language_models/base.d.cts.map +1 -1
- package/dist/language_models/base.d.ts +2 -4
- package/dist/language_models/base.d.ts.map +1 -1
- package/dist/language_models/base.js +9 -14
- package/dist/language_models/base.js.map +1 -1
- package/dist/language_models/chat_models.cjs +19 -25
- package/dist/language_models/chat_models.cjs.map +1 -1
- package/dist/language_models/chat_models.d.cts.map +1 -1
- package/dist/language_models/chat_models.d.ts.map +1 -1
- package/dist/language_models/chat_models.js +18 -25
- package/dist/language_models/chat_models.js.map +1 -1
- package/dist/language_models/llms.cjs +12 -15
- package/dist/language_models/llms.cjs.map +1 -1
- package/dist/language_models/llms.d.cts.map +1 -1
- package/dist/language_models/llms.d.ts.map +1 -1
- package/dist/language_models/llms.js +11 -15
- package/dist/language_models/llms.js.map +1 -1
- package/dist/language_models/profile.cjs +3 -1
- package/dist/language_models/profile.d.cts.map +1 -1
- package/dist/language_models/profile.d.ts.map +1 -1
- package/dist/language_models/profile.js +3 -1
- package/dist/language_models/utils.cjs.map +1 -1
- package/dist/language_models/utils.js.map +1 -1
- package/dist/load/import_constants.cjs.map +1 -1
- package/dist/load/import_constants.js.map +1 -1
- package/dist/load/import_map.cjs +13 -14
- package/dist/load/import_map.js +13 -14
- package/dist/load/import_type.d.cts.map +1 -1
- package/dist/load/import_type.d.ts.map +1 -1
- package/dist/load/index.cjs +74 -13
- package/dist/load/index.cjs.map +1 -1
- package/dist/load/index.d.cts +13 -4
- package/dist/load/index.d.cts.map +1 -1
- package/dist/load/index.d.ts +13 -4
- package/dist/load/index.d.ts.map +1 -1
- package/dist/load/index.js +68 -8
- package/dist/load/index.js.map +1 -1
- package/dist/load/map_keys.cjs +5 -3
- package/dist/load/map_keys.cjs.map +1 -1
- package/dist/load/map_keys.d.cts.map +1 -1
- package/dist/load/map_keys.d.ts.map +1 -1
- package/dist/load/map_keys.js.map +1 -1
- package/dist/load/serializable.cjs +9 -19
- package/dist/load/serializable.cjs.map +1 -1
- package/dist/load/serializable.d.cts.map +1 -1
- package/dist/load/serializable.d.ts.map +1 -1
- package/dist/load/serializable.js +8 -19
- package/dist/load/serializable.js.map +1 -1
- package/dist/load/validation.cjs.map +1 -1
- package/dist/load/validation.js.map +1 -1
- package/dist/memory.cjs +3 -3
- package/dist/memory.cjs.map +1 -1
- package/dist/memory.d.cts.map +1 -1
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +2 -3
- package/dist/memory.js.map +1 -1
- package/dist/messages/ai.cjs.map +1 -1
- package/dist/messages/ai.d.cts.map +1 -1
- package/dist/messages/ai.d.ts.map +1 -1
- package/dist/messages/ai.js.map +1 -1
- package/dist/messages/base.cjs +10 -12
- package/dist/messages/base.cjs.map +1 -1
- package/dist/messages/base.d.cts +6 -3
- package/dist/messages/base.d.cts.map +1 -1
- package/dist/messages/base.d.ts +6 -3
- package/dist/messages/base.d.ts.map +1 -1
- package/dist/messages/base.js +10 -12
- package/dist/messages/base.js.map +1 -1
- package/dist/messages/block_translators/anthropic.cjs +30 -35
- package/dist/messages/block_translators/anthropic.cjs.map +1 -1
- package/dist/messages/block_translators/anthropic.js +30 -35
- package/dist/messages/block_translators/anthropic.js.map +1 -1
- package/dist/messages/block_translators/bedrock_converse.cjs +38 -46
- package/dist/messages/block_translators/bedrock_converse.cjs.map +1 -1
- package/dist/messages/block_translators/bedrock_converse.js +38 -46
- package/dist/messages/block_translators/bedrock_converse.js.map +1 -1
- package/dist/messages/block_translators/data.cjs.map +1 -1
- package/dist/messages/block_translators/data.js.map +1 -1
- package/dist/messages/block_translators/deepseek.cjs.map +1 -1
- package/dist/messages/block_translators/deepseek.js.map +1 -1
- package/dist/messages/block_translators/google.cjs +6 -9
- package/dist/messages/block_translators/google.cjs.map +1 -1
- package/dist/messages/block_translators/google.js +6 -9
- package/dist/messages/block_translators/google.js.map +1 -1
- package/dist/messages/block_translators/google_genai.cjs.map +1 -1
- package/dist/messages/block_translators/google_genai.js.map +1 -1
- package/dist/messages/block_translators/google_vertexai.cjs +1 -3
- package/dist/messages/block_translators/google_vertexai.cjs.map +1 -1
- package/dist/messages/block_translators/google_vertexai.js +1 -3
- package/dist/messages/block_translators/google_vertexai.js.map +1 -1
- package/dist/messages/block_translators/groq.cjs.map +1 -1
- package/dist/messages/block_translators/groq.js.map +1 -1
- package/dist/messages/block_translators/index.cjs.map +1 -1
- package/dist/messages/block_translators/index.js.map +1 -1
- package/dist/messages/block_translators/ollama.cjs.map +1 -1
- package/dist/messages/block_translators/ollama.js.map +1 -1
- package/dist/messages/block_translators/openai.cjs +6 -10
- package/dist/messages/block_translators/openai.cjs.map +1 -1
- package/dist/messages/block_translators/openai.js +6 -10
- package/dist/messages/block_translators/openai.js.map +1 -1
- package/dist/messages/block_translators/utils.cjs +1 -1
- package/dist/messages/block_translators/utils.cjs.map +1 -1
- package/dist/messages/block_translators/utils.js +1 -1
- package/dist/messages/block_translators/utils.js.map +1 -1
- package/dist/messages/block_translators/xai.cjs.map +1 -1
- package/dist/messages/block_translators/xai.js.map +1 -1
- package/dist/messages/chat.cjs.map +1 -1
- package/dist/messages/chat.d.cts.map +1 -1
- package/dist/messages/chat.d.ts.map +1 -1
- package/dist/messages/chat.js.map +1 -1
- package/dist/messages/content/base.d.cts.map +1 -1
- package/dist/messages/content/base.d.ts.map +1 -1
- package/dist/messages/content/data.cjs +1 -3
- package/dist/messages/content/data.cjs.map +1 -1
- package/dist/messages/content/data.d.cts +0 -1
- package/dist/messages/content/data.d.cts.map +1 -1
- package/dist/messages/content/data.d.ts +0 -1
- package/dist/messages/content/data.d.ts.map +1 -1
- package/dist/messages/content/data.js +1 -3
- package/dist/messages/content/data.js.map +1 -1
- package/dist/messages/content/index.cjs +2 -2
- package/dist/messages/content/index.cjs.map +1 -1
- package/dist/messages/content/index.d.cts.map +1 -1
- package/dist/messages/content/index.d.ts.map +1 -1
- package/dist/messages/content/index.js +6 -6
- package/dist/messages/content/index.js.map +1 -1
- package/dist/messages/content/multimodal.cjs.map +1 -1
- package/dist/messages/content/multimodal.d.cts +4 -8
- package/dist/messages/content/multimodal.d.cts.map +1 -1
- package/dist/messages/content/multimodal.d.ts +4 -8
- package/dist/messages/content/multimodal.d.ts.map +1 -1
- package/dist/messages/content/multimodal.js.map +1 -1
- package/dist/messages/content/tools.cjs.map +1 -1
- package/dist/messages/content/tools.d.cts.map +1 -1
- package/dist/messages/content/tools.d.ts.map +1 -1
- package/dist/messages/content/tools.js.map +1 -1
- package/dist/messages/format.cjs.map +1 -1
- package/dist/messages/format.d.cts.map +1 -1
- package/dist/messages/format.d.ts.map +1 -1
- package/dist/messages/format.js.map +1 -1
- package/dist/messages/function.cjs.map +1 -1
- package/dist/messages/function.d.cts.map +1 -1
- package/dist/messages/function.d.ts.map +1 -1
- package/dist/messages/function.js.map +1 -1
- package/dist/messages/human.cjs.map +1 -1
- package/dist/messages/human.d.cts.map +1 -1
- package/dist/messages/human.d.ts.map +1 -1
- package/dist/messages/human.js.map +1 -1
- package/dist/messages/index.cjs +4 -4
- package/dist/messages/index.js +3 -4
- package/dist/messages/message.cjs.map +1 -1
- package/dist/messages/message.d.cts +13 -24
- package/dist/messages/message.d.cts.map +1 -1
- package/dist/messages/message.d.ts +13 -24
- package/dist/messages/message.d.ts.map +1 -1
- package/dist/messages/message.js.map +1 -1
- package/dist/messages/metadata.cjs +1 -2
- package/dist/messages/metadata.cjs.map +1 -1
- package/dist/messages/metadata.d.cts.map +1 -1
- package/dist/messages/metadata.d.ts.map +1 -1
- package/dist/messages/metadata.js +1 -2
- package/dist/messages/metadata.js.map +1 -1
- package/dist/messages/modifier.cjs.map +1 -1
- package/dist/messages/modifier.d.cts.map +1 -1
- package/dist/messages/modifier.d.ts.map +1 -1
- package/dist/messages/modifier.js.map +1 -1
- package/dist/messages/system.cjs.map +1 -1
- package/dist/messages/system.d.cts.map +1 -1
- package/dist/messages/system.d.ts.map +1 -1
- package/dist/messages/system.js.map +1 -1
- package/dist/messages/tool.cjs +3 -3
- package/dist/messages/tool.cjs.map +1 -1
- package/dist/messages/tool.d.cts.map +1 -1
- package/dist/messages/tool.d.ts.map +1 -1
- package/dist/messages/tool.js +2 -3
- package/dist/messages/tool.js.map +1 -1
- package/dist/messages/transformers.cjs +8 -14
- package/dist/messages/transformers.cjs.map +1 -1
- package/dist/messages/transformers.d.cts.map +1 -1
- package/dist/messages/transformers.d.ts.map +1 -1
- package/dist/messages/transformers.js +8 -14
- package/dist/messages/transformers.js.map +1 -1
- package/dist/messages/utils.cjs +11 -14
- package/dist/messages/utils.cjs.map +1 -1
- package/dist/messages/utils.d.cts +7 -7
- package/dist/messages/utils.d.cts.map +1 -1
- package/dist/messages/utils.d.ts +7 -7
- package/dist/messages/utils.d.ts.map +1 -1
- package/dist/messages/utils.js +11 -14
- package/dist/messages/utils.js.map +1 -1
- package/dist/output_parsers/base.cjs +5 -5
- package/dist/output_parsers/base.cjs.map +1 -1
- package/dist/output_parsers/base.d.cts.map +1 -1
- package/dist/output_parsers/base.d.ts.map +1 -1
- package/dist/output_parsers/base.js +5 -5
- package/dist/output_parsers/base.js.map +1 -1
- package/dist/output_parsers/bytes.cjs.map +1 -1
- package/dist/output_parsers/bytes.d.cts +0 -1
- package/dist/output_parsers/bytes.d.cts.map +1 -1
- package/dist/output_parsers/bytes.d.ts +0 -1
- package/dist/output_parsers/bytes.d.ts.map +1 -1
- package/dist/output_parsers/bytes.js.map +1 -1
- package/dist/output_parsers/index.cjs +3 -3
- package/dist/output_parsers/index.js +2 -3
- package/dist/output_parsers/json.cjs +1 -1
- package/dist/output_parsers/json.cjs.map +1 -1
- package/dist/output_parsers/json.d.cts +0 -1
- package/dist/output_parsers/json.d.cts.map +1 -1
- package/dist/output_parsers/json.d.ts.map +1 -1
- package/dist/output_parsers/json.js +1 -1
- package/dist/output_parsers/json.js.map +1 -1
- package/dist/output_parsers/list.cjs.map +1 -1
- package/dist/output_parsers/list.d.cts +0 -1
- package/dist/output_parsers/list.d.cts.map +1 -1
- package/dist/output_parsers/list.d.ts +0 -1
- package/dist/output_parsers/list.d.ts.map +1 -1
- package/dist/output_parsers/list.js.map +1 -1
- package/dist/output_parsers/openai_functions/index.cjs +3 -3
- package/dist/output_parsers/openai_functions/index.js +2 -3
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.cjs +6 -9
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.cjs.map +1 -1
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts +0 -1
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts.map +1 -1
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts.map +1 -1
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.js +6 -9
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.js.map +1 -1
- package/dist/output_parsers/openai_tools/index.cjs +3 -3
- package/dist/output_parsers/openai_tools/index.js +2 -3
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.cjs +14 -21
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.cjs.map +1 -1
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts +1 -2
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts.map +1 -1
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts +1 -2
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts.map +1 -1
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.js +14 -21
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.js.map +1 -1
- package/dist/output_parsers/string.cjs +3 -0
- package/dist/output_parsers/string.cjs.map +1 -1
- package/dist/output_parsers/string.d.cts +0 -1
- package/dist/output_parsers/string.d.cts.map +1 -1
- package/dist/output_parsers/string.d.ts +0 -1
- package/dist/output_parsers/string.d.ts.map +1 -1
- package/dist/output_parsers/string.js +3 -0
- package/dist/output_parsers/string.js.map +1 -1
- package/dist/output_parsers/structured.cjs +10 -13
- package/dist/output_parsers/structured.cjs.map +1 -1
- package/dist/output_parsers/structured.d.cts.map +1 -1
- package/dist/output_parsers/structured.d.ts.map +1 -1
- package/dist/output_parsers/structured.js +8 -11
- package/dist/output_parsers/structured.js.map +1 -1
- package/dist/output_parsers/transform.cjs +3 -3
- package/dist/output_parsers/transform.cjs.map +1 -1
- package/dist/output_parsers/transform.d.cts +0 -1
- package/dist/output_parsers/transform.d.cts.map +1 -1
- package/dist/output_parsers/transform.d.ts +0 -1
- package/dist/output_parsers/transform.d.ts.map +1 -1
- package/dist/output_parsers/transform.js.map +1 -1
- package/dist/output_parsers/xml.cjs +4 -7
- package/dist/output_parsers/xml.cjs.map +1 -1
- package/dist/output_parsers/xml.d.cts.map +1 -1
- package/dist/output_parsers/xml.d.ts.map +1 -1
- package/dist/output_parsers/xml.js +4 -7
- package/dist/output_parsers/xml.js.map +1 -1
- package/dist/outputs.cjs +3 -3
- package/dist/outputs.cjs.map +1 -1
- package/dist/outputs.d.cts.map +1 -1
- package/dist/outputs.d.ts.map +1 -1
- package/dist/outputs.js +2 -3
- package/dist/outputs.js.map +1 -1
- package/dist/prompt_values.cjs +3 -3
- package/dist/prompt_values.cjs.map +1 -1
- package/dist/prompt_values.d.cts +1 -3
- package/dist/prompt_values.d.cts.map +1 -1
- package/dist/prompt_values.d.ts +1 -3
- package/dist/prompt_values.d.ts.map +1 -1
- package/dist/prompt_values.js +2 -3
- package/dist/prompt_values.js.map +1 -1
- package/dist/prompts/base.cjs +2 -3
- package/dist/prompts/base.cjs.map +1 -1
- package/dist/prompts/base.d.cts.map +1 -1
- package/dist/prompts/base.d.ts.map +1 -1
- package/dist/prompts/base.js +2 -3
- package/dist/prompts/base.js.map +1 -1
- package/dist/prompts/chat.cjs +22 -37
- package/dist/prompts/chat.cjs.map +1 -1
- package/dist/prompts/chat.d.cts +1 -0
- package/dist/prompts/chat.d.cts.map +1 -1
- package/dist/prompts/chat.d.ts +1 -0
- package/dist/prompts/chat.d.ts.map +1 -1
- package/dist/prompts/chat.js +22 -37
- package/dist/prompts/chat.js.map +1 -1
- package/dist/prompts/dict.cjs.map +1 -1
- package/dist/prompts/dict.d.cts.map +1 -1
- package/dist/prompts/dict.d.ts.map +1 -1
- package/dist/prompts/dict.js.map +1 -1
- package/dist/prompts/few_shot.cjs +9 -14
- package/dist/prompts/few_shot.cjs.map +1 -1
- package/dist/prompts/few_shot.d.cts.map +1 -1
- package/dist/prompts/few_shot.d.ts.map +1 -1
- package/dist/prompts/few_shot.js +9 -14
- package/dist/prompts/few_shot.js.map +1 -1
- package/dist/prompts/image.cjs +3 -5
- package/dist/prompts/image.cjs.map +1 -1
- package/dist/prompts/image.d.cts +0 -1
- package/dist/prompts/image.d.cts.map +1 -1
- package/dist/prompts/image.d.ts +0 -1
- package/dist/prompts/image.d.ts.map +1 -1
- package/dist/prompts/image.js +3 -5
- package/dist/prompts/image.js.map +1 -1
- package/dist/prompts/index.cjs +3 -3
- package/dist/prompts/index.js +2 -3
- package/dist/prompts/pipeline.cjs.map +1 -1
- package/dist/prompts/pipeline.d.cts +0 -1
- package/dist/prompts/pipeline.d.cts.map +1 -1
- package/dist/prompts/pipeline.d.ts +0 -1
- package/dist/prompts/pipeline.d.ts.map +1 -1
- package/dist/prompts/pipeline.js.map +1 -1
- package/dist/prompts/prompt.cjs +9 -12
- package/dist/prompts/prompt.cjs.map +1 -1
- package/dist/prompts/prompt.d.cts +0 -1
- package/dist/prompts/prompt.d.cts.map +1 -1
- package/dist/prompts/prompt.d.ts.map +1 -1
- package/dist/prompts/prompt.js +9 -12
- package/dist/prompts/prompt.js.map +1 -1
- package/dist/prompts/serde.d.cts +0 -1
- package/dist/prompts/serde.d.cts.map +1 -1
- package/dist/prompts/serde.d.ts +0 -1
- package/dist/prompts/serde.d.ts.map +1 -1
- package/dist/prompts/string.cjs +1 -2
- package/dist/prompts/string.cjs.map +1 -1
- package/dist/prompts/string.d.cts +0 -1
- package/dist/prompts/string.d.cts.map +1 -1
- package/dist/prompts/string.d.ts +0 -1
- package/dist/prompts/string.d.ts.map +1 -1
- package/dist/prompts/string.js +1 -2
- package/dist/prompts/string.js.map +1 -1
- package/dist/prompts/structured.cjs.map +1 -1
- package/dist/prompts/structured.d.cts +0 -1
- package/dist/prompts/structured.d.cts.map +1 -1
- package/dist/prompts/structured.d.ts.map +1 -1
- package/dist/prompts/structured.js.map +1 -1
- package/dist/prompts/template.cjs +7 -11
- package/dist/prompts/template.cjs.map +1 -1
- package/dist/prompts/template.d.cts +0 -1
- package/dist/prompts/template.d.cts.map +1 -1
- package/dist/prompts/template.d.ts.map +1 -1
- package/dist/prompts/template.js +4 -9
- package/dist/prompts/template.js.map +1 -1
- package/dist/retrievers/document_compressors/index.cjs +3 -3
- package/dist/retrievers/document_compressors/index.cjs.map +1 -1
- package/dist/retrievers/document_compressors/index.d.cts +0 -1
- package/dist/retrievers/document_compressors/index.d.cts.map +1 -1
- package/dist/retrievers/document_compressors/index.d.ts +0 -1
- package/dist/retrievers/document_compressors/index.d.ts.map +1 -1
- package/dist/retrievers/document_compressors/index.js +2 -3
- package/dist/retrievers/document_compressors/index.js.map +1 -1
- package/dist/retrievers/index.cjs +4 -5
- package/dist/retrievers/index.cjs.map +1 -1
- package/dist/retrievers/index.d.cts +0 -1
- package/dist/retrievers/index.d.cts.map +1 -1
- package/dist/retrievers/index.d.ts +0 -1
- package/dist/retrievers/index.d.ts.map +1 -1
- package/dist/retrievers/index.js +3 -5
- package/dist/retrievers/index.js.map +1 -1
- package/dist/runnables/base.cjs +44 -67
- package/dist/runnables/base.cjs.map +1 -1
- package/dist/runnables/base.d.cts +1 -2
- package/dist/runnables/base.d.cts.map +1 -1
- package/dist/runnables/base.d.ts +1 -2
- package/dist/runnables/base.d.ts.map +1 -1
- package/dist/runnables/base.js +40 -63
- package/dist/runnables/base.js.map +1 -1
- package/dist/runnables/branch.cjs +4 -8
- package/dist/runnables/branch.cjs.map +1 -1
- package/dist/runnables/branch.d.cts +0 -1
- package/dist/runnables/branch.d.cts.map +1 -1
- package/dist/runnables/branch.d.ts +0 -1
- package/dist/runnables/branch.d.ts.map +1 -1
- package/dist/runnables/branch.js +4 -8
- package/dist/runnables/branch.js.map +1 -1
- package/dist/runnables/config.cjs +1 -1
- package/dist/runnables/config.cjs.map +1 -1
- package/dist/runnables/config.d.cts.map +1 -1
- package/dist/runnables/config.d.ts.map +1 -1
- package/dist/runnables/config.js +1 -1
- package/dist/runnables/config.js.map +1 -1
- package/dist/runnables/graph.cjs +6 -8
- package/dist/runnables/graph.cjs.map +1 -1
- package/dist/runnables/graph.d.cts.map +1 -1
- package/dist/runnables/graph.d.ts.map +1 -1
- package/dist/runnables/graph.js +4 -7
- package/dist/runnables/graph.js.map +1 -1
- package/dist/runnables/graph_mermaid.cjs +6 -9
- package/dist/runnables/graph_mermaid.cjs.map +1 -1
- package/dist/runnables/graph_mermaid.js +6 -9
- package/dist/runnables/graph_mermaid.js.map +1 -1
- package/dist/runnables/history.cjs +4 -6
- package/dist/runnables/history.cjs.map +1 -1
- package/dist/runnables/history.d.cts.map +1 -1
- package/dist/runnables/history.d.ts.map +1 -1
- package/dist/runnables/history.js +4 -6
- package/dist/runnables/history.js.map +1 -1
- package/dist/runnables/index.cjs +3 -3
- package/dist/runnables/index.js +2 -3
- package/dist/runnables/iter.cjs.map +1 -1
- package/dist/runnables/iter.js.map +1 -1
- package/dist/runnables/passthrough.cjs +1 -1
- package/dist/runnables/passthrough.cjs.map +1 -1
- package/dist/runnables/passthrough.d.cts.map +1 -1
- package/dist/runnables/passthrough.d.ts.map +1 -1
- package/dist/runnables/passthrough.js +1 -1
- package/dist/runnables/passthrough.js.map +1 -1
- package/dist/runnables/router.cjs +2 -3
- package/dist/runnables/router.cjs.map +1 -1
- package/dist/runnables/router.d.cts.map +1 -1
- package/dist/runnables/router.d.ts.map +1 -1
- package/dist/runnables/router.js +2 -3
- package/dist/runnables/router.js.map +1 -1
- package/dist/runnables/types.d.cts +1 -2
- package/dist/runnables/types.d.cts.map +1 -1
- package/dist/runnables/types.d.ts +1 -2
- package/dist/runnables/types.d.ts.map +1 -1
- package/dist/runnables/utils.cjs +1 -2
- package/dist/runnables/utils.cjs.map +1 -1
- package/dist/runnables/utils.js +1 -2
- package/dist/runnables/utils.js.map +1 -1
- package/dist/runnables/wrappers.cjs.map +1 -1
- package/dist/runnables/wrappers.js.map +1 -1
- package/dist/singletons/async_local_storage/context.cjs +4 -5
- package/dist/singletons/async_local_storage/context.cjs.map +1 -1
- package/dist/singletons/async_local_storage/context.d.cts +0 -1
- package/dist/singletons/async_local_storage/context.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/context.d.ts +0 -1
- package/dist/singletons/async_local_storage/context.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/context.js +2 -3
- package/dist/singletons/async_local_storage/context.js.map +1 -1
- package/dist/singletons/async_local_storage/globals.cjs.map +1 -1
- package/dist/singletons/async_local_storage/globals.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/globals.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/globals.js.map +1 -1
- package/dist/singletons/async_local_storage/index.cjs +5 -10
- package/dist/singletons/async_local_storage/index.cjs.map +1 -1
- package/dist/singletons/async_local_storage/index.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/index.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/index.js +3 -8
- package/dist/singletons/async_local_storage/index.js.map +1 -1
- package/dist/singletons/callbacks.cjs +4 -4
- package/dist/singletons/callbacks.cjs.map +1 -1
- package/dist/singletons/callbacks.d.cts +0 -1
- package/dist/singletons/callbacks.d.cts.map +1 -1
- package/dist/singletons/callbacks.d.ts +0 -1
- package/dist/singletons/callbacks.d.ts.map +1 -1
- package/dist/singletons/callbacks.js +1 -2
- package/dist/singletons/callbacks.js.map +1 -1
- package/dist/singletons/index.cjs +3 -3
- package/dist/singletons/index.js +2 -3
- package/dist/singletons/tracer.cjs +3 -6
- package/dist/singletons/tracer.cjs.map +1 -1
- package/dist/singletons/tracer.js +1 -4
- package/dist/singletons/tracer.js.map +1 -1
- package/dist/stores.cjs +3 -3
- package/dist/stores.cjs.map +1 -1
- package/dist/stores.d.cts +0 -1
- package/dist/stores.d.cts.map +1 -1
- package/dist/stores.d.ts +0 -1
- package/dist/stores.d.ts.map +1 -1
- package/dist/stores.js +2 -3
- package/dist/stores.js.map +1 -1
- package/dist/structured_query/base.cjs +3 -3
- package/dist/structured_query/base.cjs.map +1 -1
- package/dist/structured_query/base.d.cts +0 -1
- package/dist/structured_query/base.d.cts.map +1 -1
- package/dist/structured_query/base.d.ts +0 -1
- package/dist/structured_query/base.d.ts.map +1 -1
- package/dist/structured_query/base.js +3 -3
- package/dist/structured_query/base.js.map +1 -1
- package/dist/structured_query/functional.cjs +3 -3
- package/dist/structured_query/functional.cjs.map +1 -1
- package/dist/structured_query/functional.d.cts +0 -1
- package/dist/structured_query/functional.d.cts.map +1 -1
- package/dist/structured_query/functional.d.ts +0 -1
- package/dist/structured_query/functional.d.ts.map +1 -1
- package/dist/structured_query/functional.js +3 -3
- package/dist/structured_query/functional.js.map +1 -1
- package/dist/structured_query/index.cjs +3 -3
- package/dist/structured_query/index.js +2 -3
- package/dist/structured_query/ir.cjs.map +1 -1
- package/dist/structured_query/ir.d.cts +0 -1
- package/dist/structured_query/ir.d.cts.map +1 -1
- package/dist/structured_query/ir.d.ts +0 -1
- package/dist/structured_query/ir.d.ts.map +1 -1
- package/dist/structured_query/ir.js.map +1 -1
- package/dist/structured_query/utils.cjs.map +1 -1
- package/dist/structured_query/utils.d.cts.map +1 -1
- package/dist/structured_query/utils.d.ts.map +1 -1
- package/dist/structured_query/utils.js.map +1 -1
- package/dist/tools/index.cjs +11 -12
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.d.cts +2 -1
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +7 -9
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/types.cjs.map +1 -1
- package/dist/tools/types.d.cts +1 -0
- package/dist/tools/types.d.cts.map +1 -1
- package/dist/tools/types.d.ts +1 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js.map +1 -1
- package/dist/tools/utils.cjs.map +1 -1
- package/dist/tools/utils.d.cts +0 -1
- package/dist/tools/utils.d.cts.map +1 -1
- package/dist/tools/utils.d.ts +0 -1
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tools/utils.js.map +1 -1
- package/dist/tracers/base.cjs +7 -7
- package/dist/tracers/base.cjs.map +1 -1
- package/dist/tracers/base.d.cts +6 -12
- package/dist/tracers/base.d.cts.map +1 -1
- package/dist/tracers/base.d.ts +6 -12
- package/dist/tracers/base.d.ts.map +1 -1
- package/dist/tracers/base.js +5 -6
- package/dist/tracers/base.js.map +1 -1
- package/dist/tracers/console.cjs +9 -9
- package/dist/tracers/console.cjs.map +1 -1
- package/dist/tracers/console.d.cts +0 -1
- package/dist/tracers/console.d.cts.map +1 -1
- package/dist/tracers/console.d.ts +0 -1
- package/dist/tracers/console.d.ts.map +1 -1
- package/dist/tracers/console.js +6 -8
- package/dist/tracers/console.js.map +1 -1
- package/dist/tracers/event_stream.cjs +2 -4
- package/dist/tracers/event_stream.cjs.map +1 -1
- package/dist/tracers/event_stream.d.cts +2 -5
- package/dist/tracers/event_stream.d.cts.map +1 -1
- package/dist/tracers/event_stream.d.ts +2 -5
- package/dist/tracers/event_stream.d.ts.map +1 -1
- package/dist/tracers/event_stream.js +2 -4
- package/dist/tracers/event_stream.js.map +1 -1
- package/dist/tracers/log_stream.cjs +5 -5
- package/dist/tracers/log_stream.cjs.map +1 -1
- package/dist/tracers/log_stream.d.cts +14 -31
- package/dist/tracers/log_stream.d.cts.map +1 -1
- package/dist/tracers/log_stream.d.ts +14 -31
- package/dist/tracers/log_stream.d.ts.map +1 -1
- package/dist/tracers/log_stream.js +4 -5
- package/dist/tracers/log_stream.js.map +1 -1
- package/dist/tracers/root_listener.cjs.map +1 -1
- package/dist/tracers/root_listener.js.map +1 -1
- package/dist/tracers/run_collector.cjs +3 -3
- package/dist/tracers/run_collector.cjs.map +1 -1
- package/dist/tracers/run_collector.d.cts +0 -1
- package/dist/tracers/run_collector.d.cts.map +1 -1
- package/dist/tracers/run_collector.d.ts +0 -1
- package/dist/tracers/run_collector.d.ts.map +1 -1
- package/dist/tracers/run_collector.js +2 -3
- package/dist/tracers/run_collector.js.map +1 -1
- package/dist/tracers/tracer_langchain.cjs +8 -11
- package/dist/tracers/tracer_langchain.cjs.map +1 -1
- package/dist/tracers/tracer_langchain.d.cts +8 -8
- package/dist/tracers/tracer_langchain.d.cts.map +1 -1
- package/dist/tracers/tracer_langchain.d.ts +8 -8
- package/dist/tracers/tracer_langchain.d.ts.map +1 -1
- package/dist/tracers/tracer_langchain.js +5 -9
- package/dist/tracers/tracer_langchain.js.map +1 -1
- package/dist/types/_internal.d.cts.map +1 -1
- package/dist/types/_internal.d.ts.map +1 -1
- package/dist/types/stream.cjs +3 -1
- package/dist/types/stream.js +3 -1
- package/dist/types/type-utils.d.cts.map +1 -1
- package/dist/types/type-utils.d.ts.map +1 -1
- package/dist/utils/async_caller.cjs +8 -9
- package/dist/utils/async_caller.cjs.map +1 -1
- package/dist/utils/async_caller.d.cts.map +1 -1
- package/dist/utils/async_caller.d.ts.map +1 -1
- package/dist/utils/async_caller.js +5 -8
- package/dist/utils/async_caller.js.map +1 -1
- package/dist/utils/callbacks.cjs +2 -3
- package/dist/utils/callbacks.cjs.map +1 -1
- package/dist/utils/callbacks.js +2 -3
- package/dist/utils/callbacks.js.map +1 -1
- package/dist/utils/chunk_array.cjs +4 -5
- package/dist/utils/chunk_array.cjs.map +1 -1
- package/dist/utils/chunk_array.d.cts.map +1 -1
- package/dist/utils/chunk_array.d.ts.map +1 -1
- package/dist/utils/chunk_array.js +3 -5
- package/dist/utils/chunk_array.js.map +1 -1
- package/dist/utils/context.cjs +4 -5
- package/dist/utils/context.cjs.map +1 -1
- package/dist/utils/context.d.cts.map +1 -1
- package/dist/utils/context.d.ts.map +1 -1
- package/dist/utils/context.js +3 -5
- package/dist/utils/context.js.map +1 -1
- package/dist/utils/env.cjs +9 -12
- package/dist/utils/env.cjs.map +1 -1
- package/dist/utils/env.d.cts.map +1 -1
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +8 -12
- package/dist/utils/env.js.map +1 -1
- package/dist/utils/event_source_parse.cjs +9 -9
- package/dist/utils/event_source_parse.cjs.map +1 -1
- package/dist/utils/event_source_parse.d.cts.map +1 -1
- package/dist/utils/event_source_parse.d.ts.map +1 -1
- package/dist/utils/event_source_parse.js +8 -9
- package/dist/utils/event_source_parse.js.map +1 -1
- package/dist/utils/fast-json-patch/index.cjs +3 -0
- package/dist/utils/fast-json-patch/index.cjs.map +1 -1
- package/dist/utils/fast-json-patch/index.js +4 -0
- package/dist/utils/fast-json-patch/index.js.map +1 -1
- package/dist/utils/fast-json-patch/src/core.cjs +6 -10
- package/dist/utils/fast-json-patch/src/core.cjs.map +1 -1
- package/dist/utils/fast-json-patch/src/core.d.cts +0 -1
- package/dist/utils/fast-json-patch/src/core.d.cts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.d.ts +0 -1
- package/dist/utils/fast-json-patch/src/core.d.ts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.js +6 -10
- package/dist/utils/fast-json-patch/src/core.js.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.cjs +5 -3
- package/dist/utils/fast-json-patch/src/duplex.cjs.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.d.cts +0 -1
- package/dist/utils/fast-json-patch/src/duplex.d.cts.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.d.ts +0 -1
- package/dist/utils/fast-json-patch/src/duplex.d.ts.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.js +5 -3
- package/dist/utils/fast-json-patch/src/duplex.js.map +1 -1
- package/dist/utils/fast-json-patch/src/helpers.cjs +4 -4
- package/dist/utils/fast-json-patch/src/helpers.cjs.map +1 -1
- package/dist/utils/fast-json-patch/src/helpers.js +4 -4
- package/dist/utils/fast-json-patch/src/helpers.js.map +1 -1
- package/dist/utils/format.cjs +3 -1
- package/dist/utils/format.d.cts.map +1 -1
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +3 -1
- package/dist/utils/function_calling.cjs +3 -3
- package/dist/utils/function_calling.cjs.map +1 -1
- package/dist/utils/function_calling.d.cts +0 -1
- package/dist/utils/function_calling.d.cts.map +1 -1
- package/dist/utils/function_calling.d.ts +0 -1
- package/dist/utils/function_calling.d.ts.map +1 -1
- package/dist/utils/function_calling.js +2 -3
- package/dist/utils/function_calling.js.map +1 -1
- package/dist/utils/hash.cjs +3 -3
- package/dist/utils/hash.d.cts +0 -1
- package/dist/utils/hash.d.cts.map +1 -1
- package/dist/utils/hash.d.ts +0 -1
- package/dist/utils/hash.d.ts.map +1 -1
- package/dist/utils/hash.js +2 -3
- package/dist/utils/is-network-error/index.cjs +2 -3
- package/dist/utils/is-network-error/index.cjs.map +1 -1
- package/dist/utils/is-network-error/index.js +2 -3
- package/dist/utils/is-network-error/index.js.map +1 -1
- package/dist/utils/js-sha256/hash.cjs +41 -34
- package/dist/utils/js-sha256/hash.cjs.map +1 -1
- package/dist/utils/js-sha256/hash.d.cts.map +1 -1
- package/dist/utils/js-sha256/hash.d.ts.map +1 -1
- package/dist/utils/js-sha256/hash.js +41 -35
- package/dist/utils/js-sha256/hash.js.map +1 -1
- package/dist/utils/json.cjs.map +1 -1
- package/dist/utils/json.d.cts.map +1 -1
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/json_patch.cjs +3 -3
- package/dist/utils/json_patch.js +2 -3
- package/dist/utils/json_schema.cjs +12 -14
- package/dist/utils/json_schema.cjs.map +1 -1
- package/dist/utils/json_schema.d.cts.map +1 -1
- package/dist/utils/json_schema.d.ts.map +1 -1
- package/dist/utils/json_schema.js +4 -7
- package/dist/utils/json_schema.js.map +1 -1
- package/dist/utils/math.cjs +7 -8
- package/dist/utils/math.cjs.map +1 -1
- package/dist/utils/math.d.cts.map +1 -1
- package/dist/utils/math.d.ts.map +1 -1
- package/dist/utils/math.js +8 -10
- package/dist/utils/math.js.map +1 -1
- package/dist/utils/ml-distance/distances.cjs.map +1 -1
- package/dist/utils/ml-distance/distances.js.map +1 -1
- package/dist/utils/ml-distance/similarities.cjs.map +1 -1
- package/dist/utils/ml-distance/similarities.d.cts.map +1 -1
- package/dist/utils/ml-distance/similarities.d.ts.map +1 -1
- package/dist/utils/ml-distance/similarities.js.map +1 -1
- package/dist/utils/ml-distance-euclidean/euclidean.cjs.map +1 -1
- package/dist/utils/ml-distance-euclidean/euclidean.js.map +1 -1
- package/dist/utils/namespace.cjs +63 -0
- package/dist/utils/namespace.cjs.map +1 -0
- package/dist/utils/namespace.d.cts +73 -0
- package/dist/utils/namespace.d.cts.map +1 -0
- package/dist/utils/namespace.d.ts +73 -0
- package/dist/utils/namespace.d.ts.map +1 -0
- package/dist/utils/namespace.js +62 -0
- package/dist/utils/namespace.js.map +1 -0
- package/dist/utils/p-retry/index.cjs +2 -2
- package/dist/utils/p-retry/index.cjs.map +1 -1
- package/dist/utils/p-retry/index.js +2 -2
- package/dist/utils/p-retry/index.js.map +1 -1
- package/dist/utils/sax-js/sax.cjs +28 -34
- package/dist/utils/sax-js/sax.cjs.map +1 -1
- package/dist/utils/sax-js/sax.js +28 -34
- package/dist/utils/sax-js/sax.js.map +1 -1
- package/dist/utils/signal.cjs +1 -1
- package/dist/utils/signal.cjs.map +1 -1
- package/dist/utils/signal.d.cts.map +1 -1
- package/dist/utils/signal.d.ts.map +1 -1
- package/dist/utils/signal.js +1 -1
- package/dist/utils/signal.js.map +1 -1
- package/dist/utils/ssrf.cjs +8 -10
- package/dist/utils/ssrf.cjs.map +1 -1
- package/dist/utils/ssrf.d.cts.map +1 -1
- package/dist/utils/ssrf.d.ts.map +1 -1
- package/dist/utils/ssrf.js +7 -10
- package/dist/utils/ssrf.js.map +1 -1
- package/dist/utils/stream.cjs +4 -4
- package/dist/utils/stream.cjs.map +1 -1
- package/dist/utils/stream.d.cts.map +1 -1
- package/dist/utils/stream.d.ts.map +1 -1
- package/dist/utils/stream.js +3 -4
- package/dist/utils/stream.js.map +1 -1
- package/dist/utils/testing/chat_models.cjs +3 -5
- package/dist/utils/testing/chat_models.cjs.map +1 -1
- package/dist/utils/testing/chat_models.d.cts.map +1 -1
- package/dist/utils/testing/chat_models.d.ts.map +1 -1
- package/dist/utils/testing/chat_models.js +3 -5
- package/dist/utils/testing/chat_models.js.map +1 -1
- package/dist/utils/testing/embeddings.cjs +2 -4
- package/dist/utils/testing/embeddings.cjs.map +1 -1
- package/dist/utils/testing/embeddings.d.cts +0 -1
- package/dist/utils/testing/embeddings.d.cts.map +1 -1
- package/dist/utils/testing/embeddings.d.ts +0 -1
- package/dist/utils/testing/embeddings.d.ts.map +1 -1
- package/dist/utils/testing/embeddings.js +2 -4
- package/dist/utils/testing/embeddings.js.map +1 -1
- package/dist/utils/testing/index.cjs +3 -3
- package/dist/utils/testing/index.js +2 -3
- package/dist/utils/testing/llms.cjs.map +1 -1
- package/dist/utils/testing/llms.d.cts.map +1 -1
- package/dist/utils/testing/llms.d.ts.map +1 -1
- package/dist/utils/testing/llms.js.map +1 -1
- package/dist/utils/testing/message_history.cjs +1 -1
- package/dist/utils/testing/message_history.cjs.map +1 -1
- package/dist/utils/testing/message_history.d.cts.map +1 -1
- package/dist/utils/testing/message_history.d.ts.map +1 -1
- package/dist/utils/testing/message_history.js +1 -1
- package/dist/utils/testing/message_history.js.map +1 -1
- package/dist/utils/testing/output_parsers.cjs.map +1 -1
- package/dist/utils/testing/output_parsers.d.cts +0 -1
- package/dist/utils/testing/output_parsers.d.cts.map +1 -1
- package/dist/utils/testing/output_parsers.d.ts +0 -1
- package/dist/utils/testing/output_parsers.d.ts.map +1 -1
- package/dist/utils/testing/output_parsers.js.map +1 -1
- package/dist/utils/testing/retrievers.cjs +1 -1
- package/dist/utils/testing/retrievers.cjs.map +1 -1
- package/dist/utils/testing/retrievers.d.cts.map +1 -1
- package/dist/utils/testing/retrievers.d.ts.map +1 -1
- package/dist/utils/testing/retrievers.js +1 -1
- package/dist/utils/testing/retrievers.js.map +1 -1
- package/dist/utils/testing/runnables.cjs.map +1 -1
- package/dist/utils/testing/runnables.d.cts.map +1 -1
- package/dist/utils/testing/runnables.d.ts.map +1 -1
- package/dist/utils/testing/runnables.js.map +1 -1
- package/dist/utils/testing/tools.cjs.map +1 -1
- package/dist/utils/testing/tools.d.cts.map +1 -1
- package/dist/utils/testing/tools.d.ts.map +1 -1
- package/dist/utils/testing/tools.js.map +1 -1
- package/dist/utils/testing/tracers.cjs.map +1 -1
- package/dist/utils/testing/tracers.d.cts.map +1 -1
- package/dist/utils/testing/tracers.d.ts.map +1 -1
- package/dist/utils/testing/tracers.js.map +1 -1
- package/dist/utils/testing/vectorstores.cjs +7 -11
- package/dist/utils/testing/vectorstores.cjs.map +1 -1
- package/dist/utils/testing/vectorstores.d.cts +0 -1
- package/dist/utils/testing/vectorstores.d.cts.map +1 -1
- package/dist/utils/testing/vectorstores.d.ts +0 -1
- package/dist/utils/testing/vectorstores.d.ts.map +1 -1
- package/dist/utils/testing/vectorstores.js +7 -11
- package/dist/utils/testing/vectorstores.js.map +1 -1
- package/dist/utils/tiktoken.cjs +4 -4
- package/dist/utils/tiktoken.cjs.map +1 -1
- package/dist/utils/tiktoken.d.cts.map +1 -1
- package/dist/utils/tiktoken.d.ts.map +1 -1
- package/dist/utils/tiktoken.js +2 -3
- package/dist/utils/tiktoken.js.map +1 -1
- package/dist/utils/types/index.cjs +3 -3
- package/dist/utils/types/index.d.cts +0 -1
- package/dist/utils/types/index.d.cts.map +1 -1
- package/dist/utils/types/index.d.ts +0 -1
- package/dist/utils/types/index.d.ts.map +1 -1
- package/dist/utils/types/index.js +2 -3
- package/dist/utils/types/zod.cjs +17 -32
- package/dist/utils/types/zod.cjs.map +1 -1
- package/dist/utils/types/zod.d.cts +1 -1
- package/dist/utils/types/zod.d.cts.map +1 -1
- package/dist/utils/types/zod.d.ts +1 -1
- package/dist/utils/types/zod.d.ts.map +1 -1
- package/dist/utils/types/zod.js +15 -30
- package/dist/utils/types/zod.js.map +1 -1
- package/dist/utils/zod-to-json-schema/Options.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/Options.js.map +1 -1
- package/dist/utils/zod-to-json-schema/Refs.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/Refs.js.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.js.map +1 -1
- package/dist/utils/zod-to-json-schema/getRelativePath.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/getRelativePath.js.map +1 -1
- package/dist/utils/zod-to-json-schema/index.js +2 -0
- package/dist/utils/zod-to-json-schema/parseDef.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parseDef.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/any.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/any.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/any.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/any.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/array.cjs +2 -2
- package/dist/utils/zod-to-json-schema/parsers/array.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/array.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/array.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/array.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/bigint.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/bigint.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/boolean.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/boolean.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/branded.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/branded.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/catch.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/catch.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/date.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/date.d.cts +0 -1
- package/dist/utils/zod-to-json-schema/parsers/date.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/date.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/date.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/default.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/default.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/effects.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/effects.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/enum.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/enum.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/enum.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/enum.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.cjs +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.js +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/literal.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/literal.d.cts +0 -1
- package/dist/utils/zod-to-json-schema/parsers/literal.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/literal.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/literal.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.cjs +17 -19
- package/dist/utils/zod-to-json-schema/parsers/map.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.d.cts +0 -1
- package/dist/utils/zod-to-json-schema/parsers/map.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.js +17 -19
- package/dist/utils/zod-to-json-schema/parsers/map.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.cjs +2 -3
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.js +2 -3
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/never.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/never.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/never.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/never.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/null.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/null.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/null.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/null.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nullable.cjs +5 -5
- package/dist/utils/zod-to-json-schema/parsers/nullable.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nullable.js +5 -5
- package/dist/utils/zod-to-json-schema/parsers/nullable.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/number.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/number.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/number.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/number.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/object.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/object.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/object.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/object.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/optional.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/optional.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/pipeline.cjs +2 -3
- package/dist/utils/zod-to-json-schema/parsers/pipeline.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/pipeline.js +2 -3
- package/dist/utils/zod-to-json-schema/parsers/pipeline.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/promise.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/promise.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/readonly.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/readonly.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.cjs +4 -4
- package/dist/utils/zod-to-json-schema/parsers/record.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.js +2 -2
- package/dist/utils/zod-to-json-schema/parsers/record.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.cjs +4 -5
- package/dist/utils/zod-to-json-schema/parsers/set.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.js +4 -5
- package/dist/utils/zod-to-json-schema/parsers/set.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.d.cts +0 -1
- package/dist/utils/zod-to-json-schema/parsers/string.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.d.ts +0 -1
- package/dist/utils/zod-to-json-schema/parsers/string.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/tuple.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/tuple.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/undefined.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/undefined.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/union.cjs +3 -6
- package/dist/utils/zod-to-json-schema/parsers/union.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/union.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/union.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/union.js +3 -6
- package/dist/utils/zod-to-json-schema/parsers/union.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/unknown.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/unknown.js.map +1 -1
- package/dist/utils/zod-to-json-schema/selectParser.cjs +3 -3
- package/dist/utils/zod-to-json-schema/selectParser.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/selectParser.js +1 -1
- package/dist/utils/zod-to-json-schema/selectParser.js.map +1 -1
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.cjs +3 -3
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.js +3 -3
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.js.map +1 -1
- package/dist/vectorstores.cjs +4 -5
- package/dist/vectorstores.cjs.map +1 -1
- package/dist/vectorstores.d.cts +0 -1
- package/dist/vectorstores.d.cts.map +1 -1
- package/dist/vectorstores.d.ts +0 -1
- package/dist/vectorstores.d.ts.map +1 -1
- package/dist/vectorstores.js +3 -5
- package/dist/vectorstores.js.map +1 -1
- package/package.json +2 -2
- package/dist/_virtual/rolldown_runtime.cjs +0 -32
- package/dist/_virtual/rolldown_runtime.js +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @langchain/core
|
|
2
2
|
|
|
3
|
+
## 1.1.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#10002](https://github.com/langchain-ai/langchainjs/pull/10002) [`27186c5`](https://github.com/langchain-ai/langchainjs/commit/27186c54884cfe7c2522fa50b42c3ca0ccaefdba) Thanks [@aditya-gg04](https://github.com/aditya-gg04)! - fix(core): support reasoning/thinking blocks in StringOutputParser
|
|
8
|
+
|
|
9
|
+
- [#10077](https://github.com/langchain-ai/langchainjs/pull/10077) [`05396f7`](https://github.com/langchain-ai/langchainjs/commit/05396f7ce0a91c49a3bae4bbcd3dbdd6cbd18089) Thanks [@christian-bromann](https://github.com/christian-bromann)! - feat(core): add ContextOverflowError, raise in anthropic and openai
|
|
10
|
+
|
|
11
|
+
- [#10081](https://github.com/langchain-ai/langchainjs/pull/10081) [`5a6f26b`](https://github.com/langchain-ai/langchainjs/commit/5a6f26bbaed80195dc538c538b96219a8b03f38f) Thanks [@hntrl](https://github.com/hntrl)! - feat(core): add namespace-based symbol branding for error class hierarchies
|
|
12
|
+
|
|
13
|
+
Introduces `createNamespace` utility for hierarchical symbol-based branding of class hierarchies.
|
|
14
|
+
All LangChain error classes now use this pattern, replacing hand-rolled duck-type `isInstance` checks
|
|
15
|
+
with reliable cross-realm `Symbol.for`-based identity.
|
|
16
|
+
- New `LangChainError` base class that all LangChain errors extend
|
|
17
|
+
- New `createNamespace` / `Namespace` API in `@langchain/core/utils/namespace`
|
|
18
|
+
- Refactored `ModelAbortError`, `ContextOverflowError` to use namespace branding
|
|
19
|
+
- Added `ContextOverflowError.fromError()` static factory method
|
|
20
|
+
- Deprecated `addLangChainErrorFields` in favor of `LangChainError` subclasses
|
|
21
|
+
- Migrated Google provider errors (`GoogleError`, `ConfigurationError`, etc.) to namespace branding
|
|
22
|
+
- Updated Anthropic and OpenAI providers to use `ContextOverflowError.fromError()`
|
|
23
|
+
|
|
3
24
|
## 1.1.24
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __exportAll = (all, no_symbols) => {
|
|
9
|
+
let target = {};
|
|
10
|
+
for (var name in all) {
|
|
11
|
+
__defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
if (!no_symbols) {
|
|
17
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
+
}
|
|
19
|
+
return target;
|
|
20
|
+
};
|
|
21
|
+
var __copyProps = (to, from, except, desc) => {
|
|
22
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
24
|
+
key = keys[i];
|
|
25
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
26
|
+
__defProp(to, key, {
|
|
27
|
+
get: ((k) => from[k]).bind(null, key),
|
|
28
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
36
|
+
value: mod,
|
|
37
|
+
enumerable: true
|
|
38
|
+
}) : target, mod));
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
|
|
42
|
+
exports.__exportAll = __exportAll;
|
|
43
|
+
exports.__toESM = __toESM;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) {
|
|
6
|
+
__defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (!no_symbols) {
|
|
12
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { __exportAll };
|
package/dist/agents.cjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
1
3
|
|
|
2
4
|
//#region src/agents.ts
|
|
3
|
-
var agents_exports = {};
|
|
5
|
+
var agents_exports = /* @__PURE__ */ require_runtime.__exportAll({});
|
|
4
6
|
|
|
5
7
|
//#endregion
|
|
6
8
|
Object.defineProperty(exports, 'agents_exports', {
|
package/dist/agents.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.cts","names":[
|
|
1
|
+
{"version":3,"file":"agents.d.cts","names":[],"sources":["../src/agents.ts"],"mappings":";KAAY,WAAA;EACV,IAAA;EAEA,SAAA,WAAoB,MAAA;EACpB,GAAA;AAAA;AAAA,KAGU,WAAA;EAEV,YAAA,EAAc,MAAA;EACd,GAAA;AAAA;AAAA,KAGU,SAAA;EACV,MAAA,EAAQ,WAAA;EACR,WAAA;AAAA"}
|
package/dist/agents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","names":[
|
|
1
|
+
{"version":3,"file":"agents.d.ts","names":[],"sources":["../src/agents.ts"],"mappings":";KAAY,WAAA;EACV,IAAA;EAEA,SAAA,WAAoB,MAAA;EACpB,GAAA;AAAA;AAAA,KAGU,WAAA;EAEV,YAAA,EAAc,MAAA;EACd,GAAA;AAAA;AAAA,KAGU,SAAA;EACV,MAAA,EAAQ,WAAA;EACR,WAAA;AAAA"}
|
package/dist/agents.js
CHANGED
package/dist/caches/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_hash = require('../utils/js-sha256/hash.cjs');
|
|
4
4
|
require('../utils/hash.cjs');
|
|
5
|
+
const require_utils = require('../messages/utils.cjs');
|
|
5
6
|
|
|
6
7
|
//#region src/caches/index.ts
|
|
7
|
-
var caches_exports = {
|
|
8
|
-
require_rolldown_runtime.__export(caches_exports, {
|
|
8
|
+
var caches_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
9
9
|
BaseCache: () => BaseCache,
|
|
10
10
|
InMemoryCache: () => InMemoryCache,
|
|
11
11
|
defaultHashKeyEncoder: () => defaultHashKeyEncoder,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["sha256","mapStoredMessageToChatMessage"],"sources":["../../src/caches/index.ts"],"sourcesContent":["import { sha256, type HashKeyEncoder } from \"../utils/hash.js\";\nimport type { Generation, ChatGeneration } from \"../outputs.js\";\nimport { mapStoredMessageToChatMessage } from \"../messages/utils.js\";\nimport { type StoredGeneration } from \"../messages/base.js\";\n\nexport const defaultHashKeyEncoder: HashKeyEncoder = (...strings) =>\n sha256(strings.join(\"_\"));\n\nexport function deserializeStoredGeneration(\n storedGeneration: StoredGeneration\n) {\n if (storedGeneration.message !== undefined) {\n return {\n text: storedGeneration.text,\n message: mapStoredMessageToChatMessage(storedGeneration.message),\n };\n } else {\n return { text: storedGeneration.text };\n }\n}\n\nexport function serializeGeneration(generation: Generation) {\n const serializedValue: StoredGeneration = {\n text: generation.text,\n };\n if ((generation as ChatGeneration).message !== undefined) {\n serializedValue.message = (generation as ChatGeneration).message.toDict();\n }\n return serializedValue;\n}\n\n/**\n * Base class for all caches. All caches should extend this class.\n */\nexport abstract class BaseCache<T = Generation[]> {\n protected keyEncoder: HashKeyEncoder = defaultHashKeyEncoder;\n\n /**\n * Sets a custom key encoder function for the cache.\n * This function should take a prompt and an LLM key and return a string\n * that will be used as the cache key.\n * @param keyEncoderFn The custom key encoder function.\n */\n makeDefaultKeyEncoder(keyEncoderFn: HashKeyEncoder): void {\n this.keyEncoder = keyEncoderFn;\n }\n\n abstract lookup(prompt: string, llmKey: string): Promise<T | null>;\n\n abstract update(prompt: string, llmKey: string, value: T): Promise<void>;\n}\n\nconst GLOBAL_MAP = new Map();\n\n/**\n * A cache for storing LLM generations that stores data in memory.\n */\nexport class InMemoryCache<T = Generation[]> extends BaseCache<T> {\n private cache: Map<string, T>;\n\n constructor(map?: Map<string, T>) {\n super();\n this.cache = map ?? new Map();\n }\n\n /**\n * Retrieves data from the cache using a prompt and an LLM key. If the\n * data is not found, it returns null.\n * @param prompt The prompt used to find the data.\n * @param llmKey The LLM key used to find the data.\n * @returns The data corresponding to the prompt and LLM key, or null if not found.\n */\n lookup(prompt: string, llmKey: string): Promise<T | null> {\n return Promise.resolve(\n this.cache.get(this.keyEncoder(prompt, llmKey)) ?? null\n );\n }\n\n /**\n * Updates the cache with new data using a prompt and an LLM key.\n * @param prompt The prompt used to store the data.\n * @param llmKey The LLM key used to store the data.\n * @param value The data to be stored.\n */\n async update(prompt: string, llmKey: string, value: T): Promise<void> {\n this.cache.set(this.keyEncoder(prompt, llmKey), value);\n }\n\n /**\n * Returns a global instance of InMemoryCache using a predefined global\n * map as the initial cache.\n * @returns A global instance of InMemoryCache.\n */\n static global(): InMemoryCache {\n return new InMemoryCache(GLOBAL_MAP);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAKA,MAAa,yBAAyC,GAAG,YACvDA,oBAAO,QAAQ,KAAK,IAAI,CAAC;AAE3B,SAAgB,4BACd,kBACA;AACA,KAAI,iBAAiB,YAAY,OAC/B,QAAO;EACL,MAAM,iBAAiB;EACvB,SAASC,4CAA8B,iBAAiB,QAAQ;EACjE;KAED,QAAO,EAAE,MAAM,iBAAiB,MAAM;;AAI1C,SAAgB,oBAAoB,YAAwB;CAC1D,MAAM,kBAAoC,EACxC,MAAM,WAAW,MAClB;AACD,KAAK,WAA8B,YAAY,OAC7C,iBAAgB,UAAW,WAA8B,QAAQ,QAAQ;AAE3E,QAAO;;;;;AAMT,IAAsB,YAAtB,MAAkD;CAChD,AAAU,aAA6B;;;;;;;CAQvC,sBAAsB,cAAoC;AACxD,OAAK,aAAa;;;AAQtB,MAAM,6BAAa,IAAI,KAAK;;;;AAK5B,IAAa,gBAAb,MAAa,sBAAwC,UAAa;CAChE,AAAQ;CAER,YAAY,KAAsB;AAChC,SAAO;AACP,OAAK,QAAQ,uBAAO,IAAI,KAAK;;;;;;;;;CAU/B,OAAO,QAAgB,QAAmC;AACxD,SAAO,QAAQ,QACb,KAAK,MAAM,IAAI,KAAK,WAAW,QAAQ,OAAO,CAAC,IAAI,KACpD;;;;;;;;CASH,MAAM,OAAO,QAAgB,QAAgB,OAAyB;AACpE,OAAK,MAAM,IAAI,KAAK,WAAW,QAAQ,OAAO,EAAE,MAAM;;;;;;;CAQxD,OAAO,SAAwB;AAC7B,SAAO,IAAI,cAAc,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/caches/index.ts"],"mappings":";;;;;;;;;;;;cAKa,qBAAA,EAAuB,cAAA;AAAA,iBAGpB,2BAAA,CACd,gBAAA,EAAkB,gBAAA;;sCAAgB,cAAA;;;;;iBAYpB,mBAAA,CAAoB,UAAA,EAAY,UAAA,GAAU,gBAAA;AAhB1D;;;AAAA,uBA6BsB,SAAA,KAAc,UAAA;EAAA,UACxB,UAAA,EAAY,cAAA;EA3BR;;;;;;EAmCd,qBAAA,CAAsB,YAAA,EAAc,cAAA;EAAA,SAI3B,MAAA,CAAO,MAAA,UAAgB,MAAA,WAAiB,OAAA,CAAQ,CAAA;EAAA,SAEhD,MAAA,CAAO,MAAA,UAAgB,MAAA,UAAgB,KAAA,EAAO,CAAA,GAAI,OAAA;AAAA;;;;cAQhD,aAAA,KAAkB,UAAA,YAAsB,SAAA,CAAU,CAAA;EAAA,QACrD,KAAA;EAER,WAAA,CAAY,GAAA,GAAM,GAAA,SAAY,CAAA;;;;;;;;EAY9B,MAAA,CAAO,MAAA,UAAgB,MAAA,WAAiB,OAAA,CAAQ,CAAA;EA/D9B;;;;;;EA2EZ,MAAA,CAAO,MAAA,UAAgB,MAAA,UAAgB,KAAA,EAAO,CAAA,GAAI,OAAA;;;;;;SASjD,MAAA,CAAA,GAAU,aAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/caches/index.ts"],"mappings":";;;;;;;;;;;;cAKa,qBAAA,EAAuB,cAAA;AAAA,iBAGpB,2BAAA,CACd,gBAAA,EAAkB,gBAAA;;sCAAgB,cAAA;;;;;iBAYpB,mBAAA,CAAoB,UAAA,EAAY,UAAA,GAAU,gBAAA;AAhB1D;;;AAAA,uBA6BsB,SAAA,KAAc,UAAA;EAAA,UACxB,UAAA,EAAY,cAAA;EA3BR;;;;;;EAmCd,qBAAA,CAAsB,YAAA,EAAc,cAAA;EAAA,SAI3B,MAAA,CAAO,MAAA,UAAgB,MAAA,WAAiB,OAAA,CAAQ,CAAA;EAAA,SAEhD,MAAA,CAAO,MAAA,UAAgB,MAAA,UAAgB,KAAA,EAAO,CAAA,GAAI,OAAA;AAAA;;;;cAQhD,aAAA,KAAkB,UAAA,YAAsB,SAAA,CAAU,CAAA;EAAA,QACrD,KAAA;EAER,WAAA,CAAY,GAAA,GAAM,GAAA,SAAY,CAAA;;;;;;;;EAY9B,MAAA,CAAO,MAAA,UAAgB,MAAA,WAAiB,OAAA,CAAQ,CAAA;EA/D9B;;;;;;EA2EZ,MAAA,CAAO,MAAA,UAAgB,MAAA,UAAgB,KAAA,EAAO,CAAA,GAAI,OAAA;;;;;;SASjD,MAAA,CAAA,GAAU,aAAA;AAAA"}
|
package/dist/caches/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mapStoredMessageToChatMessage } from "../messages/utils.js";
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
3
2
|
import { sha256 } from "../utils/js-sha256/hash.js";
|
|
4
3
|
import "../utils/hash.js";
|
|
4
|
+
import { mapStoredMessageToChatMessage } from "../messages/utils.js";
|
|
5
5
|
|
|
6
6
|
//#region src/caches/index.ts
|
|
7
|
-
var caches_exports = {
|
|
8
|
-
__export(caches_exports, {
|
|
7
|
+
var caches_exports = /* @__PURE__ */ __exportAll({
|
|
9
8
|
BaseCache: () => BaseCache,
|
|
10
9
|
InMemoryCache: () => InMemoryCache,
|
|
11
10
|
defaultHashKeyEncoder: () => defaultHashKeyEncoder,
|
package/dist/caches/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/caches/index.ts"],"sourcesContent":["import { sha256, type HashKeyEncoder } from \"../utils/hash.js\";\nimport type { Generation, ChatGeneration } from \"../outputs.js\";\nimport { mapStoredMessageToChatMessage } from \"../messages/utils.js\";\nimport { type StoredGeneration } from \"../messages/base.js\";\n\nexport const defaultHashKeyEncoder: HashKeyEncoder = (...strings) =>\n sha256(strings.join(\"_\"));\n\nexport function deserializeStoredGeneration(\n storedGeneration: StoredGeneration\n) {\n if (storedGeneration.message !== undefined) {\n return {\n text: storedGeneration.text,\n message: mapStoredMessageToChatMessage(storedGeneration.message),\n };\n } else {\n return { text: storedGeneration.text };\n }\n}\n\nexport function serializeGeneration(generation: Generation) {\n const serializedValue: StoredGeneration = {\n text: generation.text,\n };\n if ((generation as ChatGeneration).message !== undefined) {\n serializedValue.message = (generation as ChatGeneration).message.toDict();\n }\n return serializedValue;\n}\n\n/**\n * Base class for all caches. All caches should extend this class.\n */\nexport abstract class BaseCache<T = Generation[]> {\n protected keyEncoder: HashKeyEncoder = defaultHashKeyEncoder;\n\n /**\n * Sets a custom key encoder function for the cache.\n * This function should take a prompt and an LLM key and return a string\n * that will be used as the cache key.\n * @param keyEncoderFn The custom key encoder function.\n */\n makeDefaultKeyEncoder(keyEncoderFn: HashKeyEncoder): void {\n this.keyEncoder = keyEncoderFn;\n }\n\n abstract lookup(prompt: string, llmKey: string): Promise<T | null>;\n\n abstract update(prompt: string, llmKey: string, value: T): Promise<void>;\n}\n\nconst GLOBAL_MAP = new Map();\n\n/**\n * A cache for storing LLM generations that stores data in memory.\n */\nexport class InMemoryCache<T = Generation[]> extends BaseCache<T> {\n private cache: Map<string, T>;\n\n constructor(map?: Map<string, T>) {\n super();\n this.cache = map ?? new Map();\n }\n\n /**\n * Retrieves data from the cache using a prompt and an LLM key. If the\n * data is not found, it returns null.\n * @param prompt The prompt used to find the data.\n * @param llmKey The LLM key used to find the data.\n * @returns The data corresponding to the prompt and LLM key, or null if not found.\n */\n lookup(prompt: string, llmKey: string): Promise<T | null> {\n return Promise.resolve(\n this.cache.get(this.keyEncoder(prompt, llmKey)) ?? null\n );\n }\n\n /**\n * Updates the cache with new data using a prompt and an LLM key.\n * @param prompt The prompt used to store the data.\n * @param llmKey The LLM key used to store the data.\n * @param value The data to be stored.\n */\n async update(prompt: string, llmKey: string, value: T): Promise<void> {\n this.cache.set(this.keyEncoder(prompt, llmKey), value);\n }\n\n /**\n * Returns a global instance of InMemoryCache using a predefined global\n * map as the initial cache.\n * @returns A global instance of InMemoryCache.\n */\n static global(): InMemoryCache {\n return new InMemoryCache(GLOBAL_MAP);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAKA,MAAa,yBAAyC,GAAG,YACvD,OAAO,QAAQ,KAAK,IAAI,CAAC;AAE3B,SAAgB,4BACd,kBACA;AACA,KAAI,iBAAiB,YAAY,OAC/B,QAAO;EACL,MAAM,iBAAiB;EACvB,SAAS,8BAA8B,iBAAiB,QAAQ;EACjE;KAED,QAAO,EAAE,MAAM,iBAAiB,MAAM;;AAI1C,SAAgB,oBAAoB,YAAwB;CAC1D,MAAM,kBAAoC,EACxC,MAAM,WAAW,MAClB;AACD,KAAK,WAA8B,YAAY,OAC7C,iBAAgB,UAAW,WAA8B,QAAQ,QAAQ;AAE3E,QAAO;;;;;AAMT,IAAsB,YAAtB,MAAkD;CAChD,AAAU,aAA6B;;;;;;;CAQvC,sBAAsB,cAAoC;AACxD,OAAK,aAAa;;;AAQtB,MAAM,6BAAa,IAAI,KAAK;;;;AAK5B,IAAa,gBAAb,MAAa,sBAAwC,UAAa;CAChE,AAAQ;CAER,YAAY,KAAsB;AAChC,SAAO;AACP,OAAK,QAAQ,uBAAO,IAAI,KAAK;;;;;;;;;CAU/B,OAAO,QAAgB,QAAmC;AACxD,SAAO,QAAQ,QACb,KAAK,MAAM,IAAI,KAAK,WAAW,QAAQ,OAAO,CAAC,IAAI,KACpD;;;;;;;;CASH,MAAM,OAAO,QAAgB,QAAgB,OAAyB;AACpE,OAAK,MAAM,IAAI,KAAK,WAAW,QAAQ,OAAO,EAAE,MAAM;;;;;;;CAQxD,OAAO,SAAwB;AAC7B,SAAO,IAAI,cAAc,WAAW"}
|
package/dist/callbacks/base.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
const require_load_serializable = require('../load/serializable.cjs');
|
|
3
4
|
const require_utils_env = require('../utils/env.cjs');
|
|
4
|
-
|
|
5
|
+
let uuid = require("uuid");
|
|
6
|
+
uuid = require_runtime.__toESM(uuid);
|
|
5
7
|
|
|
6
8
|
//#region src/callbacks/base.ts
|
|
7
|
-
var base_exports = {
|
|
8
|
-
require_rolldown_runtime.__export(base_exports, {
|
|
9
|
+
var base_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
9
10
|
BaseCallbackHandler: () => BaseCallbackHandler,
|
|
10
11
|
callbackHandlerPrefersStreaming: () => callbackHandlerPrefersStreaming,
|
|
11
12
|
isBaseCallbackHandler: () => isBaseCallbackHandler
|
|
@@ -34,18 +35,10 @@ var BaseCallbackHandler = class extends BaseCallbackHandlerMethodsClass {
|
|
|
34
35
|
this.name
|
|
35
36
|
];
|
|
36
37
|
}
|
|
37
|
-
get lc_secrets() {
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
get
|
|
41
|
-
return void 0;
|
|
42
|
-
}
|
|
43
|
-
get lc_aliases() {
|
|
44
|
-
return void 0;
|
|
45
|
-
}
|
|
46
|
-
get lc_serializable_keys() {
|
|
47
|
-
return void 0;
|
|
48
|
-
}
|
|
38
|
+
get lc_secrets() {}
|
|
39
|
+
get lc_attributes() {}
|
|
40
|
+
get lc_aliases() {}
|
|
41
|
+
get lc_serializable_keys() {}
|
|
49
42
|
/**
|
|
50
43
|
* The name of the serializable. Override to provide an alias or
|
|
51
44
|
* to preserve the serialized module name in minified environments.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.cjs","names":["x: BaseCallbackHandler","get_lc_unique_name","getEnvironmentVariable","input?: BaseCallbackHandlerInput","Serializable","methods: CallbackHandlerMethods","x: unknown"],"sources":["../../src/callbacks/base.ts"],"sourcesContent":["import * as uuid from \"uuid\";\nimport type { ChainValues } from \"../utils/types/index.js\";\nimport type { BaseMessage } from \"../messages/base.js\";\nimport type { AgentAction, AgentFinish } from \"../agents.js\";\nimport type {\n ChatGenerationChunk,\n GenerationChunk,\n LLMResult,\n} from \"../outputs.js\";\nimport {\n Serializable,\n Serialized,\n SerializedNotImplemented,\n get_lc_unique_name,\n} from \"../load/serializable.js\";\nimport type { SerializedFields } from \"../load/map_keys.js\";\nimport type { DocumentInterface } from \"../documents/document.js\";\nimport { getEnvironmentVariable } from \"../utils/env.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Error = any;\n\n/**\n * Interface for the input parameters of the BaseCallbackHandler class. It\n * allows to specify which types of events should be ignored by the\n * callback handler.\n */\nexport interface BaseCallbackHandlerInput {\n ignoreLLM?: boolean;\n ignoreChain?: boolean;\n ignoreAgent?: boolean;\n ignoreRetriever?: boolean;\n ignoreCustomEvent?: boolean;\n _awaitHandler?: boolean;\n raiseError?: boolean;\n}\n\n/**\n * Interface for the indices of a new token produced by an LLM or Chat\n * Model in streaming mode.\n */\nexport interface NewTokenIndices {\n prompt: number;\n completion: number;\n}\n\n// TODO: Add all additional callback fields here\nexport type HandleLLMNewTokenCallbackFields = {\n chunk?: GenerationChunk | ChatGenerationChunk;\n};\n\n/**\n * Abstract class that provides a set of optional methods that can be\n * overridden in derived classes to handle various events during the\n * execution of a LangChain application.\n */\nabstract class BaseCallbackHandlerMethodsClass {\n /**\n * Called at the start of an LLM or Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleLLMStart?(\n llm: Serialized,\n prompts: string[],\n runId: string,\n parentRunId?: string,\n extraParams?: Record<string, unknown>,\n tags?: string[],\n metadata?: Record<string, unknown>,\n runName?: string\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called when an LLM/ChatModel in `streaming` mode produces a new token\n */\n handleLLMNewToken?(\n token: string,\n /**\n * idx.prompt is the index of the prompt that produced the token\n * (if there are multiple prompts)\n * idx.completion is the index of the completion that produced the token\n * (if multiple completions per prompt are requested)\n */\n idx: NewTokenIndices,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n fields?: HandleLLMNewTokenCallbackFields\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called if an LLM/ChatModel run encounters an error\n */\n handleLLMError?(\n err: Error,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n extraParams?: Record<string, unknown>\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the end of an LLM/ChatModel run, with the output and the run ID.\n */\n handleLLMEnd?(\n output: LLMResult,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n extraParams?: Record<string, unknown>\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the start of a Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleChatModelStart?(\n llm: Serialized,\n messages: BaseMessage[][],\n runId: string,\n parentRunId?: string,\n extraParams?: Record<string, unknown>,\n tags?: string[],\n metadata?: Record<string, unknown>,\n runName?: string\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the start of a Chain run, with the chain name and inputs\n * and the run ID.\n */\n handleChainStart?(\n chain: Serialized,\n inputs: ChainValues,\n runId: string,\n runType?: string,\n tags?: string[],\n metadata?: Record<string, unknown>,\n runName?: string,\n parentRunId?: string,\n extra?: Record<string, unknown>\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called if a Chain run encounters an error\n */\n handleChainError?(\n err: Error,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n kwargs?: { inputs?: Record<string, unknown> }\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the end of a Chain run, with the outputs and the run ID.\n */\n handleChainEnd?(\n outputs: ChainValues,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n kwargs?: { inputs?: Record<string, unknown> }\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the start of a Tool run, with the tool name and input\n * and the run ID.\n */\n handleToolStart?(\n tool: Serialized,\n input: string,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n metadata?: Record<string, unknown>,\n runName?: string\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called if a Tool run encounters an error\n */\n handleToolError?(\n err: Error,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the end of a Tool run, with the tool output and the run ID.\n */\n handleToolEnd?(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n output: any,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n handleText?(\n text: string,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): Promise<void> | void;\n\n /**\n * Called when an agent is about to execute an action,\n * with the action and the run ID.\n */\n handleAgentAction?(\n action: AgentAction,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): Promise<void> | void;\n\n /**\n * Called when an agent finishes execution, before it exits.\n * with the final output and the run ID.\n */\n handleAgentEnd?(\n action: AgentFinish,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): Promise<void> | void;\n\n handleRetrieverStart?(\n retriever: Serialized,\n query: string,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n metadata?: Record<string, unknown>,\n name?: string\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n handleRetrieverEnd?(\n documents: DocumentInterface[],\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n handleRetrieverError?(\n err: Error,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n handleCustomEvent?(\n eventName: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data: any,\n runId: string,\n tags?: string[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metadata?: Record<string, any>\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n}\n\n/**\n * Base interface for callbacks. All methods are optional. If a method is not\n * implemented, it will be ignored. If a method is implemented, it will be\n * called at the appropriate time. All methods are called with the run ID of\n * the LLM/ChatModel/Chain that is running, which is generated by the\n * CallbackManager.\n *\n * @interface\n */\nexport type CallbackHandlerMethods = BaseCallbackHandlerMethodsClass;\n\n/**\n * Interface for handlers that can indicate a preference for streaming responses.\n * When implemented, this allows the handler to signal whether it prefers to receive\n * streaming responses from language models rather than complete responses.\n */\nexport interface CallbackHandlerPrefersStreaming {\n readonly lc_prefer_streaming: boolean;\n}\n\nexport function callbackHandlerPrefersStreaming(x: BaseCallbackHandler) {\n return \"lc_prefer_streaming\" in x && x.lc_prefer_streaming;\n}\n\n/**\n * Abstract base class for creating callback handlers in the LangChain\n * framework. It provides a set of optional methods that can be overridden\n * in derived classes to handle various events during the execution of a\n * LangChain application.\n */\nexport abstract class BaseCallbackHandler\n extends BaseCallbackHandlerMethodsClass\n implements BaseCallbackHandlerInput, Serializable\n{\n lc_serializable = false;\n\n get lc_namespace(): [\"langchain_core\", \"callbacks\", string] {\n return [\"langchain_core\", \"callbacks\", this.name];\n }\n\n get lc_secrets(): { [key: string]: string } | undefined {\n return undefined;\n }\n\n get lc_attributes(): { [key: string]: string } | undefined {\n return undefined;\n }\n\n get lc_aliases(): { [key: string]: string } | undefined {\n return undefined;\n }\n\n get lc_serializable_keys(): string[] | undefined {\n return undefined;\n }\n\n /**\n * The name of the serializable. Override to provide an alias or\n * to preserve the serialized module name in minified environments.\n *\n * Implemented as a static method to support loading logic.\n */\n static lc_name(): string {\n return this.name;\n }\n\n /**\n * The final serialized identifier for the module.\n */\n get lc_id(): string[] {\n return [\n ...this.lc_namespace,\n get_lc_unique_name(this.constructor as typeof BaseCallbackHandler),\n ];\n }\n\n lc_kwargs: SerializedFields;\n\n abstract name: string;\n\n ignoreLLM = false;\n\n ignoreChain = false;\n\n ignoreAgent = false;\n\n ignoreRetriever = false;\n\n ignoreCustomEvent = false;\n\n raiseError = false;\n\n awaitHandlers =\n getEnvironmentVariable(\"LANGCHAIN_CALLBACKS_BACKGROUND\") === \"false\";\n\n constructor(input?: BaseCallbackHandlerInput) {\n super();\n this.lc_kwargs = input || {};\n if (input) {\n this.ignoreLLM = input.ignoreLLM ?? this.ignoreLLM;\n this.ignoreChain = input.ignoreChain ?? this.ignoreChain;\n this.ignoreAgent = input.ignoreAgent ?? this.ignoreAgent;\n this.ignoreRetriever = input.ignoreRetriever ?? this.ignoreRetriever;\n this.ignoreCustomEvent =\n input.ignoreCustomEvent ?? this.ignoreCustomEvent;\n this.raiseError = input.raiseError ?? this.raiseError;\n this.awaitHandlers =\n this.raiseError || (input._awaitHandler ?? this.awaitHandlers);\n }\n }\n\n copy(): BaseCallbackHandler {\n return new (this.constructor as new (\n input?: BaseCallbackHandlerInput\n ) => BaseCallbackHandler)(this);\n }\n\n toJSON(): Serialized {\n return Serializable.prototype.toJSON.call(this);\n }\n\n toJSONNotImplemented(): SerializedNotImplemented {\n return Serializable.prototype.toJSONNotImplemented.call(this);\n }\n\n static fromMethods(methods: CallbackHandlerMethods) {\n class Handler extends BaseCallbackHandler {\n name = uuid.v7();\n\n constructor() {\n super();\n Object.assign(this, methods);\n }\n }\n return new Handler();\n }\n}\n\nexport const isBaseCallbackHandler = (x: unknown) => {\n const callbackHandler = x as BaseCallbackHandler;\n return (\n callbackHandler !== undefined &&\n typeof callbackHandler.copy === \"function\" &&\n typeof callbackHandler.name === \"string\" &&\n type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AAK,KAAK;CAC9D;CAED,OAAO,YAAYC,SAAiC;EAClD,MAAM,gBAAgB,oBAAoB;GACxC,OAAO,KAAK,IAAI;GAEhB,cAAc;IACZ,OAAO;IACP,OAAO,OAAO,MAAM,QAAQ;GAC7B;EACF;AACD,SAAO,IAAI;CACZ;AACF;AAED,MAAa,wBAAwB,CAACC,MAAe;CACnD,MAAM,kBAAkB;AACxB,QACE,oBAAoB,UACpB,OAAO,gBAAgB,SAAS,cAChC,OAAO,gBAAgB,SAAS,YAChC,OAAO,gBAAgB,kBAAkB;AAE5C"}
|
|
1
|
+
{"version":3,"file":"base.cjs","names":["get_lc_unique_name","getEnvironmentVariable","Serializable"],"sources":["../../src/callbacks/base.ts"],"sourcesContent":["import * as uuid from \"uuid\";\nimport type { ChainValues } from \"../utils/types/index.js\";\nimport type { BaseMessage } from \"../messages/base.js\";\nimport type { AgentAction, AgentFinish } from \"../agents.js\";\nimport type {\n ChatGenerationChunk,\n GenerationChunk,\n LLMResult,\n} from \"../outputs.js\";\nimport {\n Serializable,\n Serialized,\n SerializedNotImplemented,\n get_lc_unique_name,\n} from \"../load/serializable.js\";\nimport type { SerializedFields } from \"../load/map_keys.js\";\nimport type { DocumentInterface } from \"../documents/document.js\";\nimport { getEnvironmentVariable } from \"../utils/env.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Error = any;\n\n/**\n * Interface for the input parameters of the BaseCallbackHandler class. It\n * allows to specify which types of events should be ignored by the\n * callback handler.\n */\nexport interface BaseCallbackHandlerInput {\n ignoreLLM?: boolean;\n ignoreChain?: boolean;\n ignoreAgent?: boolean;\n ignoreRetriever?: boolean;\n ignoreCustomEvent?: boolean;\n _awaitHandler?: boolean;\n raiseError?: boolean;\n}\n\n/**\n * Interface for the indices of a new token produced by an LLM or Chat\n * Model in streaming mode.\n */\nexport interface NewTokenIndices {\n prompt: number;\n completion: number;\n}\n\n// TODO: Add all additional callback fields here\nexport type HandleLLMNewTokenCallbackFields = {\n chunk?: GenerationChunk | ChatGenerationChunk;\n};\n\n/**\n * Abstract class that provides a set of optional methods that can be\n * overridden in derived classes to handle various events during the\n * execution of a LangChain application.\n */\nabstract class BaseCallbackHandlerMethodsClass {\n /**\n * Called at the start of an LLM or Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleLLMStart?(\n llm: Serialized,\n prompts: string[],\n runId: string,\n parentRunId?: string,\n extraParams?: Record<string, unknown>,\n tags?: string[],\n metadata?: Record<string, unknown>,\n runName?: string\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called when an LLM/ChatModel in `streaming` mode produces a new token\n */\n handleLLMNewToken?(\n token: string,\n /**\n * idx.prompt is the index of the prompt that produced the token\n * (if there are multiple prompts)\n * idx.completion is the index of the completion that produced the token\n * (if multiple completions per prompt are requested)\n */\n idx: NewTokenIndices,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n fields?: HandleLLMNewTokenCallbackFields\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called if an LLM/ChatModel run encounters an error\n */\n handleLLMError?(\n err: Error,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n extraParams?: Record<string, unknown>\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the end of an LLM/ChatModel run, with the output and the run ID.\n */\n handleLLMEnd?(\n output: LLMResult,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n extraParams?: Record<string, unknown>\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the start of a Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleChatModelStart?(\n llm: Serialized,\n messages: BaseMessage[][],\n runId: string,\n parentRunId?: string,\n extraParams?: Record<string, unknown>,\n tags?: string[],\n metadata?: Record<string, unknown>,\n runName?: string\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the start of a Chain run, with the chain name and inputs\n * and the run ID.\n */\n handleChainStart?(\n chain: Serialized,\n inputs: ChainValues,\n runId: string,\n runType?: string,\n tags?: string[],\n metadata?: Record<string, unknown>,\n runName?: string,\n parentRunId?: string,\n extra?: Record<string, unknown>\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called if a Chain run encounters an error\n */\n handleChainError?(\n err: Error,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n kwargs?: { inputs?: Record<string, unknown> }\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the end of a Chain run, with the outputs and the run ID.\n */\n handleChainEnd?(\n outputs: ChainValues,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n kwargs?: { inputs?: Record<string, unknown> }\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the start of a Tool run, with the tool name and input\n * and the run ID.\n */\n handleToolStart?(\n tool: Serialized,\n input: string,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n metadata?: Record<string, unknown>,\n runName?: string\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called if a Tool run encounters an error\n */\n handleToolError?(\n err: Error,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called at the end of a Tool run, with the tool output and the run ID.\n */\n handleToolEnd?(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n output: any,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n handleText?(\n text: string,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): Promise<void> | void;\n\n /**\n * Called when an agent is about to execute an action,\n * with the action and the run ID.\n */\n handleAgentAction?(\n action: AgentAction,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): Promise<void> | void;\n\n /**\n * Called when an agent finishes execution, before it exits.\n * with the final output and the run ID.\n */\n handleAgentEnd?(\n action: AgentFinish,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): Promise<void> | void;\n\n handleRetrieverStart?(\n retriever: Serialized,\n query: string,\n runId: string,\n parentRunId?: string,\n tags?: string[],\n metadata?: Record<string, unknown>,\n name?: string\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n handleRetrieverEnd?(\n documents: DocumentInterface[],\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n handleRetrieverError?(\n err: Error,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n handleCustomEvent?(\n eventName: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data: any,\n runId: string,\n tags?: string[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metadata?: Record<string, any>\n ): // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n}\n\n/**\n * Base interface for callbacks. All methods are optional. If a method is not\n * implemented, it will be ignored. If a method is implemented, it will be\n * called at the appropriate time. All methods are called with the run ID of\n * the LLM/ChatModel/Chain that is running, which is generated by the\n * CallbackManager.\n *\n * @interface\n */\nexport type CallbackHandlerMethods = BaseCallbackHandlerMethodsClass;\n\n/**\n * Interface for handlers that can indicate a preference for streaming responses.\n * When implemented, this allows the handler to signal whether it prefers to receive\n * streaming responses from language models rather than complete responses.\n */\nexport interface CallbackHandlerPrefersStreaming {\n readonly lc_prefer_streaming: boolean;\n}\n\nexport function callbackHandlerPrefersStreaming(x: BaseCallbackHandler) {\n return \"lc_prefer_streaming\" in x && x.lc_prefer_streaming;\n}\n\n/**\n * Abstract base class for creating callback handlers in the LangChain\n * framework. It provides a set of optional methods that can be overridden\n * in derived classes to handle various events during the execution of a\n * LangChain application.\n */\nexport abstract class BaseCallbackHandler\n extends BaseCallbackHandlerMethodsClass\n implements BaseCallbackHandlerInput, Serializable\n{\n lc_serializable = false;\n\n get lc_namespace(): [\"langchain_core\", \"callbacks\", string] {\n return [\"langchain_core\", \"callbacks\", this.name];\n }\n\n get lc_secrets(): { [key: string]: string } | undefined {\n return undefined;\n }\n\n get lc_attributes(): { [key: string]: string } | undefined {\n return undefined;\n }\n\n get lc_aliases(): { [key: string]: string } | undefined {\n return undefined;\n }\n\n get lc_serializable_keys(): string[] | undefined {\n return undefined;\n }\n\n /**\n * The name of the serializable. Override to provide an alias or\n * to preserve the serialized module name in minified environments.\n *\n * Implemented as a static method to support loading logic.\n */\n static lc_name(): string {\n return this.name;\n }\n\n /**\n * The final serialized identifier for the module.\n */\n get lc_id(): string[] {\n return [\n ...this.lc_namespace,\n get_lc_unique_name(this.constructor as typeof BaseCallbackHandler),\n ];\n }\n\n lc_kwargs: SerializedFields;\n\n abstract name: string;\n\n ignoreLLM = false;\n\n ignoreChain = false;\n\n ignoreAgent = false;\n\n ignoreRetriever = false;\n\n ignoreCustomEvent = false;\n\n raiseError = false;\n\n awaitHandlers =\n getEnvironmentVariable(\"LANGCHAIN_CALLBACKS_BACKGROUND\") === \"false\";\n\n constructor(input?: BaseCallbackHandlerInput) {\n super();\n this.lc_kwargs = input || {};\n if (input) {\n this.ignoreLLM = input.ignoreLLM ?? this.ignoreLLM;\n this.ignoreChain = input.ignoreChain ?? this.ignoreChain;\n this.ignoreAgent = input.ignoreAgent ?? this.ignoreAgent;\n this.ignoreRetriever = input.ignoreRetriever ?? this.ignoreRetriever;\n this.ignoreCustomEvent =\n input.ignoreCustomEvent ?? this.ignoreCustomEvent;\n this.raiseError = input.raiseError ?? this.raiseError;\n this.awaitHandlers =\n this.raiseError || (input._awaitHandler ?? this.awaitHandlers);\n }\n }\n\n copy(): BaseCallbackHandler {\n return new (this.constructor as new (\n input?: BaseCallbackHandlerInput\n ) => BaseCallbackHandler)(this);\n }\n\n toJSON(): Serialized {\n return Serializable.prototype.toJSON.call(this);\n }\n\n toJSONNotImplemented(): SerializedNotImplemented {\n return Serializable.prototype.toJSONNotImplemented.call(this);\n }\n\n static fromMethods(methods: CallbackHandlerMethods) {\n class Handler extends BaseCallbackHandler {\n name = uuid.v7();\n\n constructor() {\n super();\n Object.assign(this, methods);\n }\n }\n return new Handler();\n }\n}\n\nexport const isBaseCallbackHandler = (x: unknown) => {\n const callbackHandler = x as BaseCallbackHandler;\n return (\n callbackHandler !== undefined &&\n typeof callbackHandler.copy === \"function\" &&\n typeof callbackHandler.name === \"string\" &&\n typeof callbackHandler.awaitHandlers === \"boolean\"\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwDA,IAAe,kCAAf,MAA+C;AAmP/C,SAAgB,gCAAgC,GAAwB;AACtE,QAAO,yBAAyB,KAAK,EAAE;;;;;;;;AASzC,IAAsB,sBAAtB,cACU,gCAEV;CACE,kBAAkB;CAElB,IAAI,eAAwD;AAC1D,SAAO;GAAC;GAAkB;GAAa,KAAK;GAAK;;CAGnD,IAAI,aAAoD;CAIxD,IAAI,gBAAuD;CAI3D,IAAI,aAAoD;CAIxD,IAAI,uBAA6C;;;;;;;CAUjD,OAAO,UAAkB;AACvB,SAAO,KAAK;;;;;CAMd,IAAI,QAAkB;AACpB,SAAO,CACL,GAAG,KAAK,cACRA,6CAAmB,KAAK,YAA0C,CACnE;;CAGH;CAIA,YAAY;CAEZ,cAAc;CAEd,cAAc;CAEd,kBAAkB;CAElB,oBAAoB;CAEpB,aAAa;CAEb,gBACEC,yCAAuB,iCAAiC,KAAK;CAE/D,YAAY,OAAkC;AAC5C,SAAO;AACP,OAAK,YAAY,SAAS,EAAE;AAC5B,MAAI,OAAO;AACT,QAAK,YAAY,MAAM,aAAa,KAAK;AACzC,QAAK,cAAc,MAAM,eAAe,KAAK;AAC7C,QAAK,cAAc,MAAM,eAAe,KAAK;AAC7C,QAAK,kBAAkB,MAAM,mBAAmB,KAAK;AACrD,QAAK,oBACH,MAAM,qBAAqB,KAAK;AAClC,QAAK,aAAa,MAAM,cAAc,KAAK;AAC3C,QAAK,gBACH,KAAK,eAAe,MAAM,iBAAiB,KAAK;;;CAItD,OAA4B;AAC1B,SAAO,IAAK,KAAK,YAES,KAAK;;CAGjC,SAAqB;AACnB,SAAOC,uCAAa,UAAU,OAAO,KAAK,KAAK;;CAGjD,uBAAiD;AAC/C,SAAOA,uCAAa,UAAU,qBAAqB,KAAK,KAAK;;CAG/D,OAAO,YAAY,SAAiC;EAClD,MAAM,gBAAgB,oBAAoB;GACxC,OAAO,KAAK,IAAI;GAEhB,cAAc;AACZ,WAAO;AACP,WAAO,OAAO,MAAM,QAAQ;;;AAGhC,SAAO,IAAI,SAAS;;;AAIxB,MAAa,yBAAyB,MAAe;CACnD,MAAM,kBAAkB;AACxB,QACE,oBAAoB,UACpB,OAAO,gBAAgB,SAAS,cAChC,OAAO,gBAAgB,SAAS,YAChC,OAAO,gBAAgB,kBAAkB"}
|
|
@@ -55,6 +55,7 @@ declare abstract class BaseCallbackHandlerMethodsClass {
|
|
|
55
55
|
* idx.completion is the index of the completion that produced the token
|
|
56
56
|
* (if multiple completions per prompt are requested)
|
|
57
57
|
*/
|
|
58
|
+
|
|
58
59
|
idx: NewTokenIndices, runId: string, parentRunId?: string, tags?: string[], fields?: HandleLLMNewTokenCallbackFields): Promise<any> | any;
|
|
59
60
|
/**
|
|
60
61
|
* Called if an LLM/ChatModel run encounters an error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.cts","names":["ChainValues","BaseMessage","AgentAction","AgentFinish","ChatGenerationChunk","GenerationChunk","LLMResult","Serializable","Serialized","SerializedNotImplemented","SerializedFields","DocumentInterface","Error","BaseCallbackHandlerInput","NewTokenIndices","HandleLLMNewTokenCallbackFields","BaseCallbackHandlerMethodsClass","Record","Promise","CallbackHandlerMethods","CallbackHandlerPrefersStreaming","callbackHandlerPrefersStreaming","BaseCallbackHandler","___messages_message_js11","MessageToolSet","MessageStructure","MessageType","isBaseCallbackHandler"],"sources":["../../src/callbacks/base.d.ts"],"sourcesContent":["import type { ChainValues } from \"../utils/types/index.js\";\nimport type { BaseMessage } from \"../messages/base.js\";\nimport type { AgentAction, AgentFinish } from \"../agents.js\";\nimport type { ChatGenerationChunk, GenerationChunk, LLMResult } from \"../outputs.js\";\nimport { Serializable, Serialized, SerializedNotImplemented } from \"../load/serializable.js\";\nimport type { SerializedFields } from \"../load/map_keys.js\";\nimport type { DocumentInterface } from \"../documents/document.js\";\ntype Error = any;\n/**\n * Interface for the input parameters of the BaseCallbackHandler class. It\n * allows to specify which types of events should be ignored by the\n * callback handler.\n */\nexport interface BaseCallbackHandlerInput {\n ignoreLLM?: boolean;\n ignoreChain?: boolean;\n ignoreAgent?: boolean;\n ignoreRetriever?: boolean;\n ignoreCustomEvent?: boolean;\n _awaitHandler?: boolean;\n raiseError?: boolean;\n}\n/**\n * Interface for the indices of a new token produced by an LLM or Chat\n * Model in streaming mode.\n */\nexport interface NewTokenIndices {\n prompt: number;\n completion: number;\n}\nexport type HandleLLMNewTokenCallbackFields = {\n chunk?: GenerationChunk | ChatGenerationChunk;\n};\n/**\n * Abstract class that provides a set of optional methods that can be\n * overridden in derived classes to handle various events during the\n * execution of a LangChain application.\n */\ndeclare abstract class BaseCallbackHandlerMethodsClass {\n /**\n * Called at the start of an LLM or Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleLLMStart?(llm: Serialized, prompts: string[], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string): Promise<any> | any;\n /**\n * Called when an LLM/ChatModel in `streaming` mode produces a new token\n */\n handleLLMNewToken?(token: string, \n /**\n * idx.prompt is the index of the prompt that produced the token\n * (if there are multiple prompts)\n * idx.completion is the index of the completion that produced the token\n * (if multiple completions per prompt are requested)\n */\n idx: NewTokenIndices, runId: string, parentRunId?: string, tags?: string[], fields?: HandleLLMNewTokenCallbackFields): Promise<any> | any;\n /**\n * Called if an LLM/ChatModel run encounters an error\n */\n handleLLMError?(err: Error, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>): Promise<any> | any;\n /**\n * Called at the end of an LLM/ChatModel run, with the output and the run ID.\n */\n handleLLMEnd?(output: LLMResult, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>): Promise<any> | any;\n /**\n * Called at the start of a Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleChatModelStart?(llm: Serialized, messages: BaseMessage[][], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string): Promise<any> | any;\n /**\n * Called at the start of a Chain run, with the chain name and inputs\n * and the run ID.\n */\n handleChainStart?(chain: Serialized, inputs: ChainValues, runId: string, runType?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string, parentRunId?: string, extra?: Record<string, unknown>): Promise<any> | any;\n /**\n * Called if a Chain run encounters an error\n */\n handleChainError?(err: Error, runId: string, parentRunId?: string, tags?: string[], kwargs?: {\n inputs?: Record<string, unknown>;\n }): Promise<any> | any;\n /**\n * Called at the end of a Chain run, with the outputs and the run ID.\n */\n handleChainEnd?(outputs: ChainValues, runId: string, parentRunId?: string, tags?: string[], kwargs?: {\n inputs?: Record<string, unknown>;\n }): Promise<any> | any;\n /**\n * Called at the start of a Tool run, with the tool name and input\n * and the run ID.\n */\n handleToolStart?(tool: Serialized, input: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string): Promise<any> | any;\n /**\n * Called if a Tool run encounters an error\n */\n handleToolError?(err: Error, runId: string, parentRunId?: string, tags?: string[]): Promise<any> | any;\n /**\n * Called at the end of a Tool run, with the tool output and the run ID.\n */\n handleToolEnd?(output: any, runId: string, parentRunId?: string, tags?: string[]): Promise<any> | any;\n handleText?(text: string, runId: string, parentRunId?: string, tags?: string[]): Promise<void> | void;\n /**\n * Called when an agent is about to execute an action,\n * with the action and the run ID.\n */\n handleAgentAction?(action: AgentAction, runId: string, parentRunId?: string, tags?: string[]): Promise<void> | void;\n /**\n * Called when an agent finishes execution, before it exits.\n * with the final output and the run ID.\n */\n handleAgentEnd?(action: AgentFinish, runId: string, parentRunId?: string, tags?: string[]): Promise<void> | void;\n handleRetrieverStart?(retriever: Serialized, query: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, name?: string): Promise<any> | any;\n handleRetrieverEnd?(documents: DocumentInterface[], runId: string, parentRunId?: string, tags?: string[]): Promise<any> | any;\n handleRetrieverError?(err: Error, runId: string, parentRunId?: string, tags?: string[]): Promise<any> | any;\n handleCustomEvent?(eventName: string, data: any, runId: string, tags?: string[], metadata?: Record<string, any>): Promise<any> | any;\n}\n/**\n * Base interface for callbacks. All methods are optional. If a method is not\n * implemented, it will be ignored. If a method is implemented, it will be\n * called at the appropriate time. All methods are called with the run ID of\n * the LLM/ChatModel/Chain that is running, which is generated by the\n * CallbackManager.\n *\n * @interface\n */\nexport type CallbackHandlerMethods = BaseCallbackHandlerMethodsClass;\n/**\n * Interface for handlers that can indicate a preference for streaming responses.\n * When implemented, this allows the handler to signal whether it prefers to receive\n * streaming responses from language models rather than complete responses.\n */\nexport interface CallbackHandlerPrefersStreaming {\n readonly lc_prefer_streaming: boolean;\n}\nexport declare function callbackHandlerPrefersStreaming(x: BaseCallbackHandler): unknown;\n/**\n * Abstract base class for creating callback handlers in the LangChain\n * framework. It provides a set of optional methods that can be overridden\n * in derived classes to handle various events during the execution of a\n * LangChain application.\n */\nexport declare abstract class BaseCallbackHandler extends BaseCallbackHandlerMethodsClass implements BaseCallbackHandlerInput, Serializable {\n lc_serializable: boolean;\n get lc_namespace(): [\"langchain_core\", \"callbacks\", string];\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n get lc_attributes(): {\n [key: string]: string;\n } | undefined;\n get lc_aliases(): {\n [key: string]: string;\n } | undefined;\n get lc_serializable_keys(): string[] | undefined;\n /**\n * The name of the serializable. Override to provide an alias or\n * to preserve the serialized module name in minified environments.\n *\n * Implemented as a static method to support loading logic.\n */\n static lc_name(): string;\n /**\n * The final serialized identifier for the module.\n */\n get lc_id(): string[];\n lc_kwargs: SerializedFields;\n abstract name: string;\n ignoreLLM: boolean;\n ignoreChain: boolean;\n ignoreAgent: boolean;\n ignoreRetriever: boolean;\n ignoreCustomEvent: boolean;\n raiseError: boolean;\n awaitHandlers: boolean;\n constructor(input?: BaseCallbackHandlerInput);\n copy(): BaseCallbackHandler;\n toJSON(): Serialized;\n toJSONNotImplemented(): SerializedNotImplemented;\n static fromMethods(methods: CallbackHandlerMethods): {\n name: string;\n /**\n * Called at the start of an LLM or Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleLLMStart?(llm: Serialized, prompts: string[], runId: string, parentRunId?: string | undefined, extraParams?: Record<string, unknown> | undefined, tags?: string[] | undefined, metadata?: Record<string, unknown> | undefined, runName?: string | undefined): any;\n /**\n * Called when an LLM/ChatModel in `streaming` mode produces a new token\n */\n handleLLMNewToken?(token: string, idx: NewTokenIndices, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, fields?: HandleLLMNewTokenCallbackFields | undefined): any;\n /**\n * Called if an LLM/ChatModel run encounters an error\n */\n handleLLMError?(err: any, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, extraParams?: Record<string, unknown> | undefined): any;\n /**\n * Called at the end of an LLM/ChatModel run, with the output and the run ID.\n */\n handleLLMEnd?(output: LLMResult, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, extraParams?: Record<string, unknown> | undefined): any;\n /**\n * Called at the start of a Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleChatModelStart?(llm: Serialized, messages: BaseMessage<import(\"../messages/message.js\").MessageStructure<import(\"../messages/message.js\").MessageToolSet>, import(\"../messages/message.js\").MessageType>[][], runId: string, parentRunId?: string | undefined, extraParams?: Record<string, unknown> | undefined, tags?: string[] | undefined, metadata?: Record<string, unknown> | undefined, runName?: string | undefined): any;\n /**\n * Called at the start of a Chain run, with the chain name and inputs\n * and the run ID.\n */\n handleChainStart?(chain: Serialized, inputs: ChainValues, runId: string, runType?: string | undefined, tags?: string[] | undefined, metadata?: Record<string, unknown> | undefined, runName?: string | undefined, parentRunId?: string | undefined, extra?: Record<string, unknown> | undefined): any;\n /**\n * Called if a Chain run encounters an error\n */\n handleChainError?(err: any, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, kwargs?: {\n inputs?: Record<string, unknown> | undefined;\n } | undefined): any;\n /**\n * Called at the end of a Chain run, with the outputs and the run ID.\n */\n handleChainEnd?(outputs: ChainValues, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, kwargs?: {\n inputs?: Record<string, unknown> | undefined;\n } | undefined): any;\n /**\n * Called at the start of a Tool run, with the tool name and input\n * and the run ID.\n */\n handleToolStart?(tool: Serialized, input: string, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, metadata?: Record<string, unknown> | undefined, runName?: string | undefined): any;\n /**\n * Called if a Tool run encounters an error\n */\n handleToolError?(err: any, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): any;\n /**\n * Called at the end of a Tool run, with the tool output and the run ID.\n */\n handleToolEnd?(output: any, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): any;\n handleText?(text: string, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): void | Promise<void>;\n /**\n * Called when an agent is about to execute an action,\n * with the action and the run ID.\n */\n handleAgentAction?(action: AgentAction, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): void | Promise<void>;\n /**\n * Called when an agent finishes execution, before it exits.\n * with the final output and the run ID.\n */\n handleAgentEnd?(action: AgentFinish, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): void | Promise<void>;\n handleRetrieverStart?(retriever: Serialized, query: string, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, metadata?: Record<string, unknown> | undefined, name?: string | undefined): any;\n handleRetrieverEnd?(documents: DocumentInterface<Record<string, any>>[], runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): any;\n handleRetrieverError?(err: any, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): any;\n handleCustomEvent?(eventName: string, data: any, runId: string, tags?: string[] | undefined, metadata?: Record<string, any> | undefined): any;\n lc_serializable: boolean;\n get lc_namespace(): [\"langchain_core\", \"callbacks\", string];\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n get lc_attributes(): {\n [key: string]: string;\n } | undefined;\n get lc_aliases(): {\n [key: string]: string;\n } | undefined;\n get lc_serializable_keys(): string[] | undefined;\n /**\n * The final serialized identifier for the module.\n */\n get lc_id(): string[];\n lc_kwargs: SerializedFields;\n ignoreLLM: boolean;\n ignoreChain: boolean;\n ignoreAgent: boolean;\n ignoreRetriever: boolean;\n ignoreCustomEvent: boolean;\n raiseError: boolean;\n awaitHandlers: boolean;\n copy(): BaseCallbackHandler;\n toJSON(): Serialized;\n toJSONNotImplemented(): SerializedNotImplemented;\n };\n}\nexport declare const isBaseCallbackHandler: (x: unknown) => boolean;\nexport {};\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;;;;;KAOKY,KAAAA;;;AAD6D;AAOlE;AAaA;AAIYG,UAjBKF,wBAAAA,CAiB0B;EAQpBG,SAAAA,CAAAA,EAAAA,OAAAA;EAKER,WAAAA,CAAAA,EAAAA,OAAAA;EAAkFS,WAAAA,CAAAA,EAAAA,OAAAA;EAAqDA,eAAAA,CAAAA,EAAAA,OAAAA;EAA4CC,iBAAAA,CAAAA,EAAAA,OAAAA;EAWnMJ,aAAAA,CAAAA,EAAAA,OAAAA;EAAgFC,UAAAA,CAAAA,EAAAA,OAAAA;;;;;;AAQgBE,UApCxFH,eAAAA,CAoCwFG;EAA0BC,MAAAA,EAAAA,MAAAA;EAKpGV,UAAAA,EAAAA,MAAAA;;AAA0FS,KArC7GF,+BAAAA,GAqC6GE;EAAqDA,KAAAA,CAAAA,EApClKZ,eAoCkKY,GApChJb,mBAoCgJa;CAA4CC;;;;;;uBA7BnMF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IAyBA;;;IAAA;;;;;;;;;;;;;;cAmJS,qBAAA,GAAqB,CAAA"}
|
package/dist/callbacks/base.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ declare abstract class BaseCallbackHandlerMethodsClass {
|
|
|
55
55
|
* idx.completion is the index of the completion that produced the token
|
|
56
56
|
* (if multiple completions per prompt are requested)
|
|
57
57
|
*/
|
|
58
|
+
|
|
58
59
|
idx: NewTokenIndices, runId: string, parentRunId?: string, tags?: string[], fields?: HandleLLMNewTokenCallbackFields): Promise<any> | any;
|
|
59
60
|
/**
|
|
60
61
|
* Called if an LLM/ChatModel run encounters an error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","names":["ChainValues","BaseMessage","AgentAction","AgentFinish","ChatGenerationChunk","GenerationChunk","LLMResult","Serializable","Serialized","SerializedNotImplemented","SerializedFields","DocumentInterface","Error","BaseCallbackHandlerInput","NewTokenIndices","HandleLLMNewTokenCallbackFields","BaseCallbackHandlerMethodsClass","Record","Promise","CallbackHandlerMethods","CallbackHandlerPrefersStreaming","callbackHandlerPrefersStreaming","BaseCallbackHandler","___messages_message_js11","MessageToolSet","MessageStructure","MessageType","isBaseCallbackHandler"],"sources":["../../src/callbacks/base.d.ts"],"sourcesContent":["import type { ChainValues } from \"../utils/types/index.js\";\nimport type { BaseMessage } from \"../messages/base.js\";\nimport type { AgentAction, AgentFinish } from \"../agents.js\";\nimport type { ChatGenerationChunk, GenerationChunk, LLMResult } from \"../outputs.js\";\nimport { Serializable, Serialized, SerializedNotImplemented } from \"../load/serializable.js\";\nimport type { SerializedFields } from \"../load/map_keys.js\";\nimport type { DocumentInterface } from \"../documents/document.js\";\ntype Error = any;\n/**\n * Interface for the input parameters of the BaseCallbackHandler class. It\n * allows to specify which types of events should be ignored by the\n * callback handler.\n */\nexport interface BaseCallbackHandlerInput {\n ignoreLLM?: boolean;\n ignoreChain?: boolean;\n ignoreAgent?: boolean;\n ignoreRetriever?: boolean;\n ignoreCustomEvent?: boolean;\n _awaitHandler?: boolean;\n raiseError?: boolean;\n}\n/**\n * Interface for the indices of a new token produced by an LLM or Chat\n * Model in streaming mode.\n */\nexport interface NewTokenIndices {\n prompt: number;\n completion: number;\n}\nexport type HandleLLMNewTokenCallbackFields = {\n chunk?: GenerationChunk | ChatGenerationChunk;\n};\n/**\n * Abstract class that provides a set of optional methods that can be\n * overridden in derived classes to handle various events during the\n * execution of a LangChain application.\n */\ndeclare abstract class BaseCallbackHandlerMethodsClass {\n /**\n * Called at the start of an LLM or Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleLLMStart?(llm: Serialized, prompts: string[], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string): Promise<any> | any;\n /**\n * Called when an LLM/ChatModel in `streaming` mode produces a new token\n */\n handleLLMNewToken?(token: string, \n /**\n * idx.prompt is the index of the prompt that produced the token\n * (if there are multiple prompts)\n * idx.completion is the index of the completion that produced the token\n * (if multiple completions per prompt are requested)\n */\n idx: NewTokenIndices, runId: string, parentRunId?: string, tags?: string[], fields?: HandleLLMNewTokenCallbackFields): Promise<any> | any;\n /**\n * Called if an LLM/ChatModel run encounters an error\n */\n handleLLMError?(err: Error, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>): Promise<any> | any;\n /**\n * Called at the end of an LLM/ChatModel run, with the output and the run ID.\n */\n handleLLMEnd?(output: LLMResult, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>): Promise<any> | any;\n /**\n * Called at the start of a Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleChatModelStart?(llm: Serialized, messages: BaseMessage[][], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string): Promise<any> | any;\n /**\n * Called at the start of a Chain run, with the chain name and inputs\n * and the run ID.\n */\n handleChainStart?(chain: Serialized, inputs: ChainValues, runId: string, runType?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string, parentRunId?: string, extra?: Record<string, unknown>): Promise<any> | any;\n /**\n * Called if a Chain run encounters an error\n */\n handleChainError?(err: Error, runId: string, parentRunId?: string, tags?: string[], kwargs?: {\n inputs?: Record<string, unknown>;\n }): Promise<any> | any;\n /**\n * Called at the end of a Chain run, with the outputs and the run ID.\n */\n handleChainEnd?(outputs: ChainValues, runId: string, parentRunId?: string, tags?: string[], kwargs?: {\n inputs?: Record<string, unknown>;\n }): Promise<any> | any;\n /**\n * Called at the start of a Tool run, with the tool name and input\n * and the run ID.\n */\n handleToolStart?(tool: Serialized, input: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string): Promise<any> | any;\n /**\n * Called if a Tool run encounters an error\n */\n handleToolError?(err: Error, runId: string, parentRunId?: string, tags?: string[]): Promise<any> | any;\n /**\n * Called at the end of a Tool run, with the tool output and the run ID.\n */\n handleToolEnd?(output: any, runId: string, parentRunId?: string, tags?: string[]): Promise<any> | any;\n handleText?(text: string, runId: string, parentRunId?: string, tags?: string[]): Promise<void> | void;\n /**\n * Called when an agent is about to execute an action,\n * with the action and the run ID.\n */\n handleAgentAction?(action: AgentAction, runId: string, parentRunId?: string, tags?: string[]): Promise<void> | void;\n /**\n * Called when an agent finishes execution, before it exits.\n * with the final output and the run ID.\n */\n handleAgentEnd?(action: AgentFinish, runId: string, parentRunId?: string, tags?: string[]): Promise<void> | void;\n handleRetrieverStart?(retriever: Serialized, query: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, name?: string): Promise<any> | any;\n handleRetrieverEnd?(documents: DocumentInterface[], runId: string, parentRunId?: string, tags?: string[]): Promise<any> | any;\n handleRetrieverError?(err: Error, runId: string, parentRunId?: string, tags?: string[]): Promise<any> | any;\n handleCustomEvent?(eventName: string, data: any, runId: string, tags?: string[], metadata?: Record<string, any>): Promise<any> | any;\n}\n/**\n * Base interface for callbacks. All methods are optional. If a method is not\n * implemented, it will be ignored. If a method is implemented, it will be\n * called at the appropriate time. All methods are called with the run ID of\n * the LLM/ChatModel/Chain that is running, which is generated by the\n * CallbackManager.\n *\n * @interface\n */\nexport type CallbackHandlerMethods = BaseCallbackHandlerMethodsClass;\n/**\n * Interface for handlers that can indicate a preference for streaming responses.\n * When implemented, this allows the handler to signal whether it prefers to receive\n * streaming responses from language models rather than complete responses.\n */\nexport interface CallbackHandlerPrefersStreaming {\n readonly lc_prefer_streaming: boolean;\n}\nexport declare function callbackHandlerPrefersStreaming(x: BaseCallbackHandler): unknown;\n/**\n * Abstract base class for creating callback handlers in the LangChain\n * framework. It provides a set of optional methods that can be overridden\n * in derived classes to handle various events during the execution of a\n * LangChain application.\n */\nexport declare abstract class BaseCallbackHandler extends BaseCallbackHandlerMethodsClass implements BaseCallbackHandlerInput, Serializable {\n lc_serializable: boolean;\n get lc_namespace(): [\"langchain_core\", \"callbacks\", string];\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n get lc_attributes(): {\n [key: string]: string;\n } | undefined;\n get lc_aliases(): {\n [key: string]: string;\n } | undefined;\n get lc_serializable_keys(): string[] | undefined;\n /**\n * The name of the serializable. Override to provide an alias or\n * to preserve the serialized module name in minified environments.\n *\n * Implemented as a static method to support loading logic.\n */\n static lc_name(): string;\n /**\n * The final serialized identifier for the module.\n */\n get lc_id(): string[];\n lc_kwargs: SerializedFields;\n abstract name: string;\n ignoreLLM: boolean;\n ignoreChain: boolean;\n ignoreAgent: boolean;\n ignoreRetriever: boolean;\n ignoreCustomEvent: boolean;\n raiseError: boolean;\n awaitHandlers: boolean;\n constructor(input?: BaseCallbackHandlerInput);\n copy(): BaseCallbackHandler;\n toJSON(): Serialized;\n toJSONNotImplemented(): SerializedNotImplemented;\n static fromMethods(methods: CallbackHandlerMethods): {\n name: string;\n /**\n * Called at the start of an LLM or Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleLLMStart?(llm: Serialized, prompts: string[], runId: string, parentRunId?: string | undefined, extraParams?: Record<string, unknown> | undefined, tags?: string[] | undefined, metadata?: Record<string, unknown> | undefined, runName?: string | undefined): any;\n /**\n * Called when an LLM/ChatModel in `streaming` mode produces a new token\n */\n handleLLMNewToken?(token: string, idx: NewTokenIndices, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, fields?: HandleLLMNewTokenCallbackFields | undefined): any;\n /**\n * Called if an LLM/ChatModel run encounters an error\n */\n handleLLMError?(err: any, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, extraParams?: Record<string, unknown> | undefined): any;\n /**\n * Called at the end of an LLM/ChatModel run, with the output and the run ID.\n */\n handleLLMEnd?(output: LLMResult, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, extraParams?: Record<string, unknown> | undefined): any;\n /**\n * Called at the start of a Chat Model run, with the prompt(s)\n * and the run ID.\n */\n handleChatModelStart?(llm: Serialized, messages: BaseMessage<import(\"../messages/message.js\").MessageStructure<import(\"../messages/message.js\").MessageToolSet>, import(\"../messages/message.js\").MessageType>[][], runId: string, parentRunId?: string | undefined, extraParams?: Record<string, unknown> | undefined, tags?: string[] | undefined, metadata?: Record<string, unknown> | undefined, runName?: string | undefined): any;\n /**\n * Called at the start of a Chain run, with the chain name and inputs\n * and the run ID.\n */\n handleChainStart?(chain: Serialized, inputs: ChainValues, runId: string, runType?: string | undefined, tags?: string[] | undefined, metadata?: Record<string, unknown> | undefined, runName?: string | undefined, parentRunId?: string | undefined, extra?: Record<string, unknown> | undefined): any;\n /**\n * Called if a Chain run encounters an error\n */\n handleChainError?(err: any, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, kwargs?: {\n inputs?: Record<string, unknown> | undefined;\n } | undefined): any;\n /**\n * Called at the end of a Chain run, with the outputs and the run ID.\n */\n handleChainEnd?(outputs: ChainValues, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, kwargs?: {\n inputs?: Record<string, unknown> | undefined;\n } | undefined): any;\n /**\n * Called at the start of a Tool run, with the tool name and input\n * and the run ID.\n */\n handleToolStart?(tool: Serialized, input: string, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, metadata?: Record<string, unknown> | undefined, runName?: string | undefined): any;\n /**\n * Called if a Tool run encounters an error\n */\n handleToolError?(err: any, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): any;\n /**\n * Called at the end of a Tool run, with the tool output and the run ID.\n */\n handleToolEnd?(output: any, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): any;\n handleText?(text: string, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): void | Promise<void>;\n /**\n * Called when an agent is about to execute an action,\n * with the action and the run ID.\n */\n handleAgentAction?(action: AgentAction, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): void | Promise<void>;\n /**\n * Called when an agent finishes execution, before it exits.\n * with the final output and the run ID.\n */\n handleAgentEnd?(action: AgentFinish, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): void | Promise<void>;\n handleRetrieverStart?(retriever: Serialized, query: string, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined, metadata?: Record<string, unknown> | undefined, name?: string | undefined): any;\n handleRetrieverEnd?(documents: DocumentInterface<Record<string, any>>[], runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): any;\n handleRetrieverError?(err: any, runId: string, parentRunId?: string | undefined, tags?: string[] | undefined): any;\n handleCustomEvent?(eventName: string, data: any, runId: string, tags?: string[] | undefined, metadata?: Record<string, any> | undefined): any;\n lc_serializable: boolean;\n get lc_namespace(): [\"langchain_core\", \"callbacks\", string];\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n get lc_attributes(): {\n [key: string]: string;\n } | undefined;\n get lc_aliases(): {\n [key: string]: string;\n } | undefined;\n get lc_serializable_keys(): string[] | undefined;\n /**\n * The final serialized identifier for the module.\n */\n get lc_id(): string[];\n lc_kwargs: SerializedFields;\n ignoreLLM: boolean;\n ignoreChain: boolean;\n ignoreAgent: boolean;\n ignoreRetriever: boolean;\n ignoreCustomEvent: boolean;\n raiseError: boolean;\n awaitHandlers: boolean;\n copy(): BaseCallbackHandler;\n toJSON(): Serialized;\n toJSONNotImplemented(): SerializedNotImplemented;\n };\n}\nexport declare const isBaseCallbackHandler: (x: unknown) => boolean;\nexport {};\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;;;;;KAOKY,KAAAA;;;AAD6D;AAOlE;AAaA;AAIYG,UAjBKF,wBAAAA,CAiB0B;EAQpBG,SAAAA,CAAAA,EAAAA,OAAAA;EAKER,WAAAA,CAAAA,EAAAA,OAAAA;EAAkFS,WAAAA,CAAAA,EAAAA,OAAAA;EAAqDA,eAAAA,CAAAA,EAAAA,OAAAA;EAA4CC,iBAAAA,CAAAA,EAAAA,OAAAA;EAWnMJ,aAAAA,CAAAA,EAAAA,OAAAA;EAAgFC,UAAAA,CAAAA,EAAAA,OAAAA;;;;;;AAQgBE,UApCxFH,eAAAA,CAoCwFG;EAA0BC,MAAAA,EAAAA,MAAAA;EAKpGV,UAAAA,EAAAA,MAAAA;;AAA0FS,KArC7GF,+BAAAA,GAqC6GE;EAAqDA,KAAAA,CAAAA,EApClKZ,eAoCkKY,GApChJb,mBAoCgJa;CAA4CC;;;;;;uBA7BnMF,+BAAAA,CAsCIJ;EACVK;;;;EAOTC,cAAAA,CAAAA,CAAAA,GAAAA,EAzCiBV,UAyCjBU,EAAAA,OAAAA,EAAAA,MAAAA,EAAAA,EAAAA,KAAAA,EAAAA,MAAAA,EAAAA,WAAAA,CAAAA,EAAAA,MAAAA,EAAAA,WAAAA,CAAAA,EAzCmGD,MAyCnGC,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,EAAAA,IAAAA,CAAAA,EAAAA,MAAAA,EAAAA,EAAAA,QAAAA,CAAAA,EAzCwJD,MAyCxJC,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,EAAAA,OAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EAzCoMA,OAyCpMA,CAAAA,GAAAA,CAAAA,GAAAA,GAAAA;EAKmBV;;;EAIDI,iBAAAA,CAAAA,CAAAA,KAAAA,EAA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;IAAA,CAAiB,GAAA;EAAA;EAAA,IAIjB,aAAA,CAAA;IAAA,CAAoB,GAAA;EAAA;EAAA,IAIpB,UAAA,CAAA;IAAA,CAAiB,GAAA;EAAA;EAAA,IAIjB,oBAAA,CAAA;EAlMK;;;;;;EAAA,OA4MF,OAAA,CAAA;EAvMM;;;EAAA,IA8MT,KAAA,CAAA;EAOJ,SAAA,EAAW,gBAAA;EAAA,SAEF,IAAA;EAET,SAAA;EAEA,WAAA;EAEA,WAAA;EAEA,eAAA;EAEA,iBAAA;EAEA,UAAA;EAEA,aAAA;EAGA,WAAA,CAAY,KAAA,GAAQ,wBAAA;EAgBpB,IAAA,CAAA,GAAQ,mBAAA;EAMR,MAAA,CAAA,GAAU,UAAA;EAIV,oBAAA,CAAA,GAAwB,wBAAA;EAAA,OAIjB,WAAA,CAAY,OAAA,EAAS,sBAAA;;IA/O1B;;;;;IAIoB;;;;IASd;;;;IAGN;;;;IAGA;;;;;IASA;;;;;IAWA;;;;;;IAQA;;;;;;IAWQ;;;;;IAIP;;;;IAQD;;;;;IAMW;;;;;IAIX;;;;;;;;;;;;;;;;;;;;;IAyBA;;;IAAA;;;;;;;;;;;;;;cAmJS,qBAAA,GAAqB,CAAA"}
|
package/dist/callbacks/base.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { Serializable, get_lc_unique_name } from "../load/serializable.js";
|
|
3
3
|
import { getEnvironmentVariable } from "../utils/env.js";
|
|
4
4
|
import * as uuid from "uuid";
|
|
5
5
|
|
|
6
6
|
//#region src/callbacks/base.ts
|
|
7
|
-
var base_exports = {
|
|
8
|
-
__export(base_exports, {
|
|
7
|
+
var base_exports = /* @__PURE__ */ __exportAll({
|
|
9
8
|
BaseCallbackHandler: () => BaseCallbackHandler,
|
|
10
9
|
callbackHandlerPrefersStreaming: () => callbackHandlerPrefersStreaming,
|
|
11
10
|
isBaseCallbackHandler: () => isBaseCallbackHandler
|
|
@@ -34,18 +33,10 @@ var BaseCallbackHandler = class extends BaseCallbackHandlerMethodsClass {
|
|
|
34
33
|
this.name
|
|
35
34
|
];
|
|
36
35
|
}
|
|
37
|
-
get lc_secrets() {
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
get
|
|
41
|
-
return void 0;
|
|
42
|
-
}
|
|
43
|
-
get lc_aliases() {
|
|
44
|
-
return void 0;
|
|
45
|
-
}
|
|
46
|
-
get lc_serializable_keys() {
|
|
47
|
-
return void 0;
|
|
48
|
-
}
|
|
36
|
+
get lc_secrets() {}
|
|
37
|
+
get lc_attributes() {}
|
|
38
|
+
get lc_aliases() {}
|
|
39
|
+
get lc_serializable_keys() {}
|
|
49
40
|
/**
|
|
50
41
|
* The name of the serializable. Override to provide an alias or
|
|
51
42
|
* to preserve the serialized module name in minified environments.
|