@langchain/core 1.2.4 → 1.2.5
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 +8 -0
- package/dist/agents.d.cts.map +1 -1
- package/dist/agents.d.ts.map +1 -1
- package/dist/caches/index.cjs.map +1 -1
- package/dist/caches/index.d.cts +0 -1
- package/dist/caches/index.d.cts.map +1 -1
- package/dist/caches/index.d.ts +0 -1
- package/dist/caches/index.d.ts.map +1 -1
- package/dist/caches/index.js.map +1 -1
- package/dist/callbacks/base.cjs.map +1 -1
- package/dist/callbacks/base.d.cts +68 -36
- package/dist/callbacks/base.d.cts.map +1 -1
- package/dist/callbacks/base.d.ts +68 -36
- package/dist/callbacks/base.d.ts.map +1 -1
- package/dist/callbacks/base.js.map +1 -1
- package/dist/callbacks/dispatch/index.cjs +0 -1
- package/dist/callbacks/dispatch/index.cjs.map +1 -1
- package/dist/callbacks/dispatch/index.d.cts +1 -0
- package/dist/callbacks/dispatch/index.d.cts.map +1 -1
- package/dist/callbacks/dispatch/index.d.ts +1 -0
- package/dist/callbacks/dispatch/index.d.ts.map +1 -1
- package/dist/callbacks/dispatch/index.js.map +1 -1
- package/dist/callbacks/dispatch/web.cjs.map +1 -1
- package/dist/callbacks/dispatch/web.d.cts +1 -0
- package/dist/callbacks/dispatch/web.d.cts.map +1 -1
- package/dist/callbacks/dispatch/web.d.ts +1 -0
- package/dist/callbacks/dispatch/web.d.ts.map +1 -1
- package/dist/callbacks/dispatch/web.js.map +1 -1
- package/dist/callbacks/manager.cjs +8 -0
- package/dist/callbacks/manager.cjs.map +1 -1
- package/dist/callbacks/manager.d.cts +1 -2
- package/dist/callbacks/manager.d.cts.map +1 -1
- package/dist/callbacks/manager.d.ts +1 -2
- package/dist/callbacks/manager.d.ts.map +1 -1
- package/dist/callbacks/manager.js +8 -0
- package/dist/callbacks/manager.js.map +1 -1
- package/dist/chat_history.cjs.map +1 -1
- package/dist/chat_history.d.cts +1 -0
- package/dist/chat_history.d.cts.map +1 -1
- package/dist/chat_history.d.ts +1 -0
- package/dist/chat_history.d.ts.map +1 -1
- package/dist/chat_history.js.map +1 -1
- package/dist/context.cjs +0 -1
- package/dist/context.cjs.map +1 -1
- package/dist/context.d.cts +0 -1
- package/dist/context.d.cts.map +1 -1
- package/dist/context.d.ts +0 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js.map +1 -1
- 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.map +1 -1
- package/dist/document_loaders/langsmith.cjs.map +1 -1
- package/dist/document_loaders/langsmith.d.cts +0 -1
- package/dist/document_loaders/langsmith.d.cts.map +1 -1
- package/dist/document_loaders/langsmith.d.ts +0 -1
- package/dist/document_loaders/langsmith.d.ts.map +1 -1
- 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/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.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.map +1 -1
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.d.cts +0 -1
- package/dist/errors/index.d.cts.map +1 -1
- package/dist/errors/index.d.ts +0 -1
- package/dist/errors/index.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/example_selectors/conditional.d.cts +0 -1
- package/dist/example_selectors/conditional.d.cts.map +1 -1
- package/dist/example_selectors/conditional.d.ts +0 -1
- package/dist/example_selectors/conditional.d.ts.map +1 -1
- package/dist/example_selectors/conditional.js.map +1 -1
- 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.map +1 -1
- package/dist/example_selectors/semantic_similarity.cjs +2 -1
- 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 +2 -1
- package/dist/example_selectors/semantic_similarity.js.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/indexing/base.cjs.map +1 -1
- package/dist/indexing/base.d.cts +0 -1
- package/dist/indexing/base.d.cts.map +1 -1
- package/dist/indexing/base.d.ts +0 -1
- package/dist/indexing/base.d.ts.map +1 -1
- package/dist/indexing/base.js.map +1 -1
- package/dist/indexing/record_manager.cjs.map +1 -1
- package/dist/indexing/record_manager.d.cts +0 -1
- package/dist/indexing/record_manager.d.cts.map +1 -1
- package/dist/indexing/record_manager.d.ts +0 -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 +1 -1
- package/dist/language_models/base.cjs.map +1 -1
- package/dist/language_models/base.d.cts +9 -16
- package/dist/language_models/base.d.cts.map +1 -1
- package/dist/language_models/base.d.ts +9 -16
- package/dist/language_models/base.d.ts.map +1 -1
- package/dist/language_models/base.js +1 -1
- package/dist/language_models/base.js.map +1 -1
- package/dist/language_models/chat_models.cjs +12 -6
- package/dist/language_models/chat_models.cjs.map +1 -1
- package/dist/language_models/chat_models.d.cts +6 -8
- package/dist/language_models/chat_models.d.cts.map +1 -1
- package/dist/language_models/chat_models.d.ts +6 -8
- package/dist/language_models/chat_models.d.ts.map +1 -1
- package/dist/language_models/chat_models.js +12 -6
- package/dist/language_models/chat_models.js.map +1 -1
- package/dist/language_models/compat.cjs.map +1 -1
- package/dist/language_models/compat.d.cts +0 -1
- package/dist/language_models/compat.d.cts.map +1 -1
- package/dist/language_models/compat.d.ts +0 -1
- package/dist/language_models/compat.d.ts.map +1 -1
- package/dist/language_models/compat.js.map +1 -1
- package/dist/language_models/event.d.cts +0 -1
- package/dist/language_models/event.d.cts.map +1 -1
- package/dist/language_models/event.d.ts +0 -1
- package/dist/language_models/event.d.ts.map +1 -1
- package/dist/language_models/llms.cjs.map +1 -1
- package/dist/language_models/llms.d.cts +2 -9
- package/dist/language_models/llms.d.cts.map +1 -1
- package/dist/language_models/llms.d.ts +2 -9
- package/dist/language_models/llms.d.ts.map +1 -1
- package/dist/language_models/llms.js.map +1 -1
- package/dist/language_models/openai_completions_stream.cjs.map +1 -1
- package/dist/language_models/openai_completions_stream.d.cts +0 -1
- package/dist/language_models/openai_completions_stream.d.cts.map +1 -1
- package/dist/language_models/openai_completions_stream.d.ts +0 -1
- package/dist/language_models/openai_completions_stream.d.ts.map +1 -1
- package/dist/language_models/openai_completions_stream.js.map +1 -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/stream.cjs.map +1 -1
- package/dist/language_models/stream.d.cts +2 -1
- package/dist/language_models/stream.d.cts.map +1 -1
- package/dist/language_models/stream.d.ts +2 -1
- package/dist/language_models/stream.d.ts.map +1 -1
- package/dist/language_models/stream.js.map +1 -1
- package/dist/language_models/structured_output.cjs.map +1 -1
- package/dist/language_models/structured_output.d.cts +4 -0
- package/dist/language_models/structured_output.d.cts.map +1 -1
- package/dist/language_models/structured_output.d.ts +4 -0
- package/dist/language_models/structured_output.d.ts.map +1 -1
- package/dist/language_models/structured_output.js.map +1 -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 +410 -0
- package/dist/load/import_map.cjs.map +1 -1
- package/dist/load/import_map.js +3 -1
- package/dist/load/import_map.js.map +1 -1
- 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.map +1 -1
- package/dist/load/index.d.cts +0 -1
- package/dist/load/index.d.cts.map +1 -1
- package/dist/load/index.d.ts +0 -1
- package/dist/load/index.d.ts.map +1 -1
- package/dist/load/index.js.map +1 -1
- 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.map +1 -1
- package/dist/load/serializable.d.cts +0 -1
- package/dist/load/serializable.d.cts.map +1 -1
- package/dist/load/serializable.d.ts +0 -1
- package/dist/load/serializable.d.ts.map +1 -1
- package/dist/load/serializable.js.map +1 -1
- package/dist/load/validation.cjs +3 -0
- package/dist/load/validation.cjs.map +1 -1
- package/dist/load/validation.js +1 -1
- package/dist/load/validation.js.map +1 -1
- package/dist/memory.cjs +8 -2
- 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 +8 -2
- package/dist/memory.js.map +1 -1
- package/dist/messages/ai.cjs.map +1 -1
- package/dist/messages/ai.d.cts +0 -1
- package/dist/messages/ai.d.cts.map +1 -1
- package/dist/messages/ai.d.ts +0 -1
- package/dist/messages/ai.d.ts.map +1 -1
- package/dist/messages/ai.js.map +1 -1
- package/dist/messages/base.cjs.map +1 -1
- package/dist/messages/base.d.cts +6 -9
- package/dist/messages/base.d.cts.map +1 -1
- package/dist/messages/base.d.ts +6 -9
- package/dist/messages/base.d.ts.map +1 -1
- package/dist/messages/base.js.map +1 -1
- package/dist/messages/block_translators/anthropic.cjs +2 -0
- package/dist/messages/block_translators/anthropic.cjs.map +1 -1
- package/dist/messages/block_translators/anthropic.js +1 -1
- package/dist/messages/block_translators/anthropic.js.map +1 -1
- package/dist/messages/block_translators/bedrock_converse.cjs.map +1 -1
- package/dist/messages/block_translators/bedrock_converse.js.map +1 -1
- package/dist/messages/block_translators/data.cjs +1 -0
- package/dist/messages/block_translators/data.cjs.map +1 -1
- package/dist/messages/block_translators/data.js +1 -1
- package/dist/messages/block_translators/data.js.map +1 -1
- package/dist/messages/block_translators/deepseek.cjs +1 -0
- package/dist/messages/block_translators/deepseek.cjs.map +1 -1
- package/dist/messages/block_translators/deepseek.js +1 -1
- package/dist/messages/block_translators/deepseek.js.map +1 -1
- package/dist/messages/block_translators/google.cjs.map +1 -1
- 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.map +1 -1
- package/dist/messages/block_translators/google_vertexai.js.map +1 -1
- package/dist/messages/block_translators/groq.cjs +1 -0
- package/dist/messages/block_translators/groq.cjs.map +1 -1
- package/dist/messages/block_translators/groq.js +1 -1
- package/dist/messages/block_translators/groq.js.map +1 -1
- package/dist/messages/block_translators/index.cjs +1 -1
- package/dist/messages/block_translators/index.cjs.map +1 -1
- package/dist/messages/block_translators/index.js +1 -1
- package/dist/messages/block_translators/index.js.map +1 -1
- package/dist/messages/block_translators/ollama.cjs +1 -0
- package/dist/messages/block_translators/ollama.cjs.map +1 -1
- package/dist/messages/block_translators/ollama.js +1 -1
- package/dist/messages/block_translators/ollama.js.map +1 -1
- package/dist/messages/block_translators/openai.cjs +4 -0
- package/dist/messages/block_translators/openai.cjs.map +1 -1
- package/dist/messages/block_translators/openai.js +1 -1
- package/dist/messages/block_translators/openai.js.map +1 -1
- package/dist/messages/block_translators/openrouter.cjs +1 -0
- package/dist/messages/block_translators/openrouter.cjs.map +1 -1
- package/dist/messages/block_translators/openrouter.js +1 -1
- package/dist/messages/block_translators/openrouter.js.map +1 -1
- package/dist/messages/block_translators/utils.cjs.map +1 -1
- package/dist/messages/block_translators/utils.js.map +1 -1
- package/dist/messages/block_translators/xai.cjs +1 -0
- package/dist/messages/block_translators/xai.cjs.map +1 -1
- package/dist/messages/block_translators/xai.js +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 +0 -1
- package/dist/messages/chat.d.cts.map +1 -1
- package/dist/messages/chat.d.ts +0 -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.map +1 -1
- package/dist/messages/content/data.d.cts +2 -9
- package/dist/messages/content/data.d.cts.map +1 -1
- package/dist/messages/content/data.d.ts +2 -9
- package/dist/messages/content/data.d.ts.map +1 -1
- package/dist/messages/content/data.js.map +1 -1
- package/dist/messages/content/index.cjs.map +1 -1
- package/dist/messages/content/index.d.cts +0 -1
- package/dist/messages/content/index.d.cts.map +1 -1
- package/dist/messages/content/index.d.ts +0 -1
- package/dist/messages/content/index.d.ts.map +1 -1
- 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 +8 -5
- package/dist/messages/content/multimodal.d.cts.map +1 -1
- package/dist/messages/content/multimodal.d.ts +8 -5
- 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 +0 -1
- package/dist/messages/content/tools.d.cts.map +1 -1
- package/dist/messages/content/tools.d.ts +0 -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 +0 -1
- package/dist/messages/function.d.cts.map +1 -1
- package/dist/messages/function.d.ts +0 -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 +0 -1
- package/dist/messages/human.d.cts.map +1 -1
- package/dist/messages/human.d.ts +0 -1
- package/dist/messages/human.d.ts.map +1 -1
- package/dist/messages/human.js.map +1 -1
- package/dist/messages/message.cjs.map +1 -1
- package/dist/messages/message.d.cts +31 -22
- package/dist/messages/message.d.cts.map +1 -1
- package/dist/messages/message.d.ts +31 -22
- package/dist/messages/message.d.ts.map +1 -1
- package/dist/messages/message.js.map +1 -1
- package/dist/messages/metadata.cjs.map +1 -1
- package/dist/messages/metadata.d.cts +0 -1
- package/dist/messages/metadata.d.cts.map +1 -1
- package/dist/messages/metadata.d.ts +0 -1
- package/dist/messages/metadata.d.ts.map +1 -1
- package/dist/messages/metadata.js.map +1 -1
- package/dist/messages/modifier.cjs.map +1 -1
- package/dist/messages/modifier.d.cts +0 -1
- package/dist/messages/modifier.d.cts.map +1 -1
- package/dist/messages/modifier.d.ts +0 -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 +0 -1
- package/dist/messages/system.d.cts.map +1 -1
- package/dist/messages/system.d.ts +0 -1
- package/dist/messages/system.d.ts.map +1 -1
- package/dist/messages/system.js.map +1 -1
- package/dist/messages/tool.cjs.map +1 -1
- package/dist/messages/tool.d.cts +3 -4
- package/dist/messages/tool.d.cts.map +1 -1
- package/dist/messages/tool.d.ts +3 -4
- package/dist/messages/tool.d.ts.map +1 -1
- package/dist/messages/tool.js.map +1 -1
- package/dist/messages/transformers.cjs.map +1 -1
- package/dist/messages/transformers.d.cts +0 -1
- package/dist/messages/transformers.d.cts.map +1 -1
- package/dist/messages/transformers.d.ts +0 -1
- package/dist/messages/transformers.d.ts.map +1 -1
- package/dist/messages/transformers.js.map +1 -1
- package/dist/messages/utils.cjs.map +1 -1
- package/dist/messages/utils.d.cts +4 -5
- package/dist/messages/utils.d.cts.map +1 -1
- package/dist/messages/utils.d.ts +4 -5
- package/dist/messages/utils.d.ts.map +1 -1
- package/dist/messages/utils.js.map +1 -1
- package/dist/output_parsers/base.cjs.map +1 -1
- package/dist/output_parsers/base.d.cts +3 -0
- package/dist/output_parsers/base.d.cts.map +1 -1
- package/dist/output_parsers/base.d.ts +3 -0
- package/dist/output_parsers/base.d.ts.map +1 -1
- 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/json.cjs +2 -0
- package/dist/output_parsers/json.cjs.map +1 -1
- package/dist/output_parsers/json.d.cts +2 -2
- package/dist/output_parsers/json.d.cts.map +1 -1
- package/dist/output_parsers/json.d.ts +2 -2
- package/dist/output_parsers/json.d.ts.map +1 -1
- package/dist/output_parsers/json.js +2 -2
- 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 +2 -5
- package/dist/output_parsers/list.d.cts.map +1 -1
- package/dist/output_parsers/list.d.ts +2 -5
- 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/json_output_functions_parsers.cjs.map +1 -1
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts +1 -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 +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.map +1 -1
- 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 +2 -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 +2 -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.map +1 -1
- package/dist/output_parsers/standard_schema.cjs.map +1 -1
- package/dist/output_parsers/standard_schema.d.cts +1 -1
- package/dist/output_parsers/standard_schema.d.cts.map +1 -1
- package/dist/output_parsers/standard_schema.d.ts +1 -1
- package/dist/output_parsers/standard_schema.d.ts.map +1 -1
- package/dist/output_parsers/standard_schema.js.map +1 -1
- package/dist/output_parsers/string.cjs.map +1 -1
- package/dist/output_parsers/string.d.cts +1 -1
- package/dist/output_parsers/string.d.cts.map +1 -1
- package/dist/output_parsers/string.d.ts +1 -1
- package/dist/output_parsers/string.d.ts.map +1 -1
- package/dist/output_parsers/string.js.map +1 -1
- package/dist/output_parsers/structured.cjs +1 -1
- package/dist/output_parsers/structured.cjs.map +1 -1
- package/dist/output_parsers/structured.d.cts +2 -4
- package/dist/output_parsers/structured.d.cts.map +1 -1
- package/dist/output_parsers/structured.d.ts +2 -4
- package/dist/output_parsers/structured.d.ts.map +1 -1
- package/dist/output_parsers/structured.js +1 -0
- package/dist/output_parsers/structured.js.map +1 -1
- package/dist/output_parsers/transform.cjs +0 -1
- 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.map +1 -1
- package/dist/output_parsers/xml.d.cts +0 -1
- package/dist/output_parsers/xml.d.cts.map +1 -1
- package/dist/output_parsers/xml.d.ts +0 -1
- package/dist/output_parsers/xml.d.ts.map +1 -1
- package/dist/output_parsers/xml.js.map +1 -1
- package/dist/outputs.cjs.map +1 -1
- package/dist/outputs.d.cts +0 -1
- package/dist/outputs.d.cts.map +1 -1
- package/dist/outputs.d.ts +0 -1
- package/dist/outputs.d.ts.map +1 -1
- package/dist/outputs.js.map +1 -1
- package/dist/prompt_values.cjs.map +1 -1
- package/dist/prompt_values.d.cts +3 -2
- package/dist/prompt_values.d.cts.map +1 -1
- package/dist/prompt_values.d.ts +3 -2
- package/dist/prompt_values.d.ts.map +1 -1
- package/dist/prompt_values.js.map +1 -1
- package/dist/prompts/base.cjs.map +1 -1
- package/dist/prompts/base.d.cts +1 -0
- package/dist/prompts/base.d.cts.map +1 -1
- package/dist/prompts/base.d.ts +1 -0
- package/dist/prompts/base.d.ts.map +1 -1
- package/dist/prompts/base.js.map +1 -1
- package/dist/prompts/chat.cjs +3 -2
- package/dist/prompts/chat.cjs.map +1 -1
- package/dist/prompts/chat.d.cts +3 -3
- package/dist/prompts/chat.d.cts.map +1 -1
- package/dist/prompts/chat.d.ts +3 -3
- package/dist/prompts/chat.d.ts.map +1 -1
- package/dist/prompts/chat.js +3 -2
- package/dist/prompts/chat.js.map +1 -1
- package/dist/prompts/dict.cjs.map +1 -1
- package/dist/prompts/dict.d.cts +0 -1
- package/dist/prompts/dict.d.cts.map +1 -1
- package/dist/prompts/dict.d.ts +0 -1
- package/dist/prompts/dict.d.ts.map +1 -1
- package/dist/prompts/dict.js.map +1 -1
- package/dist/prompts/few_shot.cjs +6 -4
- package/dist/prompts/few_shot.cjs.map +1 -1
- package/dist/prompts/few_shot.d.cts +1 -1
- package/dist/prompts/few_shot.d.cts.map +1 -1
- package/dist/prompts/few_shot.d.ts +1 -1
- package/dist/prompts/few_shot.d.ts.map +1 -1
- package/dist/prompts/few_shot.js +6 -4
- package/dist/prompts/few_shot.js.map +1 -1
- package/dist/prompts/image.cjs +3 -2
- package/dist/prompts/image.cjs.map +1 -1
- package/dist/prompts/image.d.cts +1 -1
- package/dist/prompts/image.d.cts.map +1 -1
- package/dist/prompts/image.d.ts +1 -1
- package/dist/prompts/image.d.ts.map +1 -1
- package/dist/prompts/image.js +3 -2
- package/dist/prompts/image.js.map +1 -1
- 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 -7
- package/dist/prompts/prompt.cjs.map +1 -1
- package/dist/prompts/prompt.d.cts +2 -2
- package/dist/prompts/prompt.d.cts.map +1 -1
- package/dist/prompts/prompt.d.ts +2 -2
- package/dist/prompts/prompt.d.ts.map +1 -1
- package/dist/prompts/prompt.js +9 -7
- package/dist/prompts/prompt.js.map +1 -1
- package/dist/prompts/serde.d.cts +1 -1
- package/dist/prompts/serde.d.cts.map +1 -1
- package/dist/prompts/serde.d.ts +1 -1
- package/dist/prompts/serde.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/prompts/structured.cjs.map +1 -1
- package/dist/prompts/structured.d.cts +1 -1
- package/dist/prompts/structured.d.cts.map +1 -1
- package/dist/prompts/structured.d.ts +1 -1
- package/dist/prompts/structured.d.ts.map +1 -1
- package/dist/prompts/structured.js.map +1 -1
- package/dist/prompts/template.cjs +9 -9
- package/dist/prompts/template.cjs.map +1 -1
- package/dist/prompts/template.d.cts +1 -0
- package/dist/prompts/template.d.cts.map +1 -1
- package/dist/prompts/template.d.ts +1 -0
- package/dist/prompts/template.d.ts.map +1 -1
- package/dist/prompts/template.js +9 -9
- package/dist/prompts/template.js.map +1 -1
- 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.map +1 -1
- package/dist/retrievers/index.cjs.map +1 -1
- package/dist/retrievers/index.d.cts +1 -1
- package/dist/retrievers/index.d.cts.map +1 -1
- package/dist/retrievers/index.d.ts +1 -1
- package/dist/retrievers/index.d.ts.map +1 -1
- package/dist/retrievers/index.js.map +1 -1
- package/dist/runnables/base.cjs +2 -1
- package/dist/runnables/base.cjs.map +1 -1
- package/dist/runnables/base.d.cts +7 -19
- package/dist/runnables/base.d.cts.map +1 -1
- package/dist/runnables/base.d.ts +7 -19
- package/dist/runnables/base.d.ts.map +1 -1
- package/dist/runnables/base.js +1 -1
- package/dist/runnables/base.js.map +1 -1
- package/dist/runnables/branch.cjs.map +1 -1
- package/dist/runnables/branch.d.cts +1 -1
- package/dist/runnables/branch.d.cts.map +1 -1
- package/dist/runnables/branch.d.ts +1 -1
- package/dist/runnables/branch.d.ts.map +1 -1
- package/dist/runnables/branch.js.map +1 -1
- package/dist/runnables/config.cjs +3 -2
- package/dist/runnables/config.cjs.map +1 -1
- package/dist/runnables/config.d.cts +2 -10
- package/dist/runnables/config.d.cts.map +1 -1
- package/dist/runnables/config.d.ts +2 -10
- package/dist/runnables/config.d.ts.map +1 -1
- package/dist/runnables/config.js +3 -3
- package/dist/runnables/config.js.map +1 -1
- package/dist/runnables/graph.cjs.map +1 -1
- package/dist/runnables/graph.d.cts +1 -2
- package/dist/runnables/graph.d.cts.map +1 -1
- package/dist/runnables/graph.d.ts +1 -2
- package/dist/runnables/graph.d.ts.map +1 -1
- package/dist/runnables/graph.js.map +1 -1
- package/dist/runnables/graph_mermaid.cjs.map +1 -1
- package/dist/runnables/graph_mermaid.js.map +1 -1
- package/dist/runnables/history.cjs.map +1 -1
- package/dist/runnables/history.d.cts +2 -1
- package/dist/runnables/history.d.cts.map +1 -1
- package/dist/runnables/history.d.ts +2 -1
- package/dist/runnables/history.d.ts.map +1 -1
- package/dist/runnables/history.js.map +1 -1
- package/dist/runnables/iter.cjs.map +1 -1
- package/dist/runnables/iter.js.map +1 -1
- package/dist/runnables/passthrough.cjs.map +1 -1
- package/dist/runnables/passthrough.d.cts +1 -1
- package/dist/runnables/passthrough.d.cts.map +1 -1
- package/dist/runnables/passthrough.d.ts +1 -1
- package/dist/runnables/passthrough.d.ts.map +1 -1
- package/dist/runnables/passthrough.js.map +1 -1
- package/dist/runnables/router.cjs.map +1 -1
- package/dist/runnables/router.d.cts +1 -1
- package/dist/runnables/router.d.cts.map +1 -1
- package/dist/runnables/router.d.ts +1 -1
- package/dist/runnables/router.d.ts.map +1 -1
- package/dist/runnables/router.js.map +1 -1
- package/dist/runnables/types.d.cts +2 -2
- package/dist/runnables/types.d.cts.map +1 -1
- package/dist/runnables/types.d.ts +2 -2
- package/dist/runnables/types.d.ts.map +1 -1
- package/dist/runnables/utils.cjs.map +1 -1
- 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 +0 -1
- 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.map +1 -1
- package/dist/singletons/async_local_storage/globals.cjs +1 -0
- 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 +1 -1
- package/dist/singletons/async_local_storage/globals.js.map +1 -1
- package/dist/singletons/async_local_storage/index.cjs +0 -1
- package/dist/singletons/async_local_storage/index.cjs.map +1 -1
- package/dist/singletons/async_local_storage/index.d.cts +1 -2
- package/dist/singletons/async_local_storage/index.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/index.d.ts +1 -2
- package/dist/singletons/async_local_storage/index.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/index.js.map +1 -1
- package/dist/singletons/callbacks.cjs +1 -0
- package/dist/singletons/callbacks.cjs.map +1 -1
- package/dist/singletons/callbacks.d.cts +1 -0
- 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 -1
- package/dist/singletons/callbacks.js.map +1 -1
- package/dist/singletons/tracer.cjs +0 -1
- package/dist/singletons/tracer.cjs.map +1 -1
- package/dist/singletons/tracer.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/structured_query/ir.cjs +7 -0
- 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 +7 -0
- 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/testing/fake_model_builder.cjs.map +1 -1
- package/dist/testing/fake_model_builder.d.cts +1 -1
- package/dist/testing/fake_model_builder.d.cts.map +1 -1
- package/dist/testing/fake_model_builder.d.ts +1 -1
- package/dist/testing/fake_model_builder.d.ts.map +1 -1
- package/dist/testing/fake_model_builder.js.map +1 -1
- package/dist/testing/matchers.cjs.map +1 -1
- package/dist/testing/matchers.d.cts +0 -1
- package/dist/testing/matchers.d.cts.map +1 -1
- package/dist/testing/matchers.d.ts +0 -1
- package/dist/testing/matchers.d.ts.map +1 -1
- package/dist/testing/matchers.js.map +1 -1
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.d.cts +8 -7
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +8 -7
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/types.cjs.map +1 -1
- package/dist/tools/types.d.cts +4 -3
- package/dist/tools/types.d.cts.map +1 -1
- package/dist/tools/types.d.ts +4 -3
- 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.map +1 -1
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tools/utils.js.map +1 -1
- package/dist/tracers/base.cjs.map +1 -1
- package/dist/tracers/base.d.cts +18 -14
- package/dist/tracers/base.d.cts.map +1 -1
- package/dist/tracers/base.d.ts +18 -14
- package/dist/tracers/base.d.ts.map +1 -1
- package/dist/tracers/base.js.map +1 -1
- 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.map +1 -1
- package/dist/tracers/event_stream.cjs.map +1 -1
- package/dist/tracers/event_stream.d.cts +5 -2
- package/dist/tracers/event_stream.d.cts.map +1 -1
- package/dist/tracers/event_stream.d.ts +5 -2
- package/dist/tracers/event_stream.d.ts.map +1 -1
- package/dist/tracers/event_stream.js.map +1 -1
- package/dist/tracers/log_stream.cjs.map +1 -1
- package/dist/tracers/log_stream.d.cts +30 -15
- package/dist/tracers/log_stream.d.cts.map +1 -1
- package/dist/tracers/log_stream.d.ts +30 -15
- package/dist/tracers/log_stream.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/tracers/run_collector.d.cts +1 -4
- package/dist/tracers/run_collector.d.cts.map +1 -1
- package/dist/tracers/run_collector.d.ts +1 -4
- package/dist/tracers/run_collector.d.ts.map +1 -1
- package/dist/tracers/run_collector.js.map +1 -1
- package/dist/tracers/tracer_langchain.cjs +4 -3
- package/dist/tracers/tracer_langchain.cjs.map +1 -1
- package/dist/tracers/tracer_langchain.d.cts +1 -5
- package/dist/tracers/tracer_langchain.d.cts.map +1 -1
- package/dist/tracers/tracer_langchain.d.ts +1 -5
- package/dist/tracers/tracer_langchain.d.ts.map +1 -1
- package/dist/tracers/tracer_langchain.js +4 -3
- 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.d.cts +1 -1
- package/dist/types/stream.d.ts +1 -1
- package/dist/types/type-utils.d.cts +1 -1
- package/dist/types/type-utils.d.cts.map +1 -1
- package/dist/types/type-utils.d.ts +1 -1
- package/dist/types/type-utils.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/utils/callbacks.cjs.map +1 -1
- package/dist/utils/callbacks.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/utils/event_source_parse.cjs +2 -2
- package/dist/utils/event_source_parse.cjs.map +1 -1
- package/dist/utils/event_source_parse.d.cts +0 -1
- package/dist/utils/event_source_parse.d.cts.map +1 -1
- package/dist/utils/event_source_parse.d.ts +0 -1
- package/dist/utils/event_source_parse.d.ts.map +1 -1
- package/dist/utils/event_source_parse.js +2 -2
- package/dist/utils/event_source_parse.js.map +1 -1
- package/dist/utils/fast-json-patch/index.cjs +9 -1
- package/dist/utils/fast-json-patch/index.cjs.map +1 -1
- package/dist/utils/fast-json-patch/index.js +3 -3
- package/dist/utils/fast-json-patch/index.js.map +1 -1
- package/dist/utils/fast-json-patch/src/core.cjs +7 -0
- package/dist/utils/fast-json-patch/src/core.cjs.map +1 -1
- package/dist/utils/fast-json-patch/src/core.d.cts +1 -1
- package/dist/utils/fast-json-patch/src/core.d.cts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.d.ts +1 -1
- package/dist/utils/fast-json-patch/src/core.d.ts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.js +6 -1
- package/dist/utils/fast-json-patch/src/core.js.map +1 -1
- 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.map +1 -1
- package/dist/utils/fast-json-patch/src/helpers.cjs +4 -0
- package/dist/utils/fast-json-patch/src/helpers.cjs.map +1 -1
- package/dist/utils/fast-json-patch/src/helpers.js +4 -0
- package/dist/utils/fast-json-patch/src/helpers.js.map +1 -1
- package/dist/utils/format.d.cts.map +1 -1
- package/dist/utils/format.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/utils/gateway.cjs +43 -0
- package/dist/utils/gateway.cjs.map +1 -0
- package/dist/utils/gateway.d.cts +13 -0
- package/dist/utils/gateway.d.cts.map +1 -0
- package/dist/utils/gateway.d.ts +13 -0
- package/dist/utils/gateway.d.ts.map +1 -0
- package/dist/utils/gateway.js +36 -0
- package/dist/utils/gateway.js.map +1 -0
- 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/is-network-error/index.cjs +1 -1
- package/dist/utils/is-network-error/index.cjs.map +1 -1
- package/dist/utils/is-network-error/index.js +1 -1
- package/dist/utils/is-network-error/index.js.map +1 -1
- 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.map +1 -1
- package/dist/utils/json.cjs +1 -0
- 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 +1 -1
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/json_schema.cjs.map +1 -1
- package/dist/utils/json_schema.d.cts +1 -1
- package/dist/utils/json_schema.d.cts.map +1 -1
- package/dist/utils/json_schema.d.ts +1 -1
- package/dist/utils/json_schema.d.ts.map +1 -1
- package/dist/utils/json_schema.js.map +1 -1
- 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.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 +1 -0
- package/dist/utils/ml-distance-euclidean/euclidean.cjs.map +1 -1
- package/dist/utils/ml-distance-euclidean/euclidean.js +1 -1
- package/dist/utils/ml-distance-euclidean/euclidean.js.map +1 -1
- package/dist/utils/namespace.cjs +1 -0
- package/dist/utils/namespace.cjs.map +1 -1
- package/dist/utils/namespace.d.cts.map +1 -1
- package/dist/utils/namespace.d.ts.map +1 -1
- package/dist/utils/namespace.js +1 -1
- package/dist/utils/namespace.js.map +1 -1
- package/dist/utils/p-retry/index.cjs +1 -0
- package/dist/utils/p-retry/index.cjs.map +1 -1
- package/dist/utils/p-retry/index.js +1 -1
- package/dist/utils/p-retry/index.js.map +1 -1
- package/dist/utils/sax-js/sax.cjs.map +1 -1
- package/dist/utils/sax-js/sax.js.map +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.map +1 -1
- 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.map +1 -1
- package/dist/utils/standard_schema.cjs.map +1 -1
- package/dist/utils/standard_schema.d.cts +0 -1
- package/dist/utils/standard_schema.d.cts.map +1 -1
- package/dist/utils/standard_schema.d.ts +0 -1
- package/dist/utils/standard_schema.d.ts.map +1 -1
- package/dist/utils/standard_schema.js.map +1 -1
- package/dist/utils/stream.cjs.map +1 -1
- package/dist/utils/stream.d.cts +0 -1
- package/dist/utils/stream.d.cts.map +1 -1
- package/dist/utils/stream.d.ts +0 -1
- package/dist/utils/stream.d.ts.map +1 -1
- package/dist/utils/stream.js.map +1 -1
- package/dist/utils/testing/chat_models.cjs.map +1 -1
- package/dist/utils/testing/chat_models.d.cts +2 -9
- package/dist/utils/testing/chat_models.d.cts.map +1 -1
- package/dist/utils/testing/chat_models.d.ts +2 -9
- package/dist/utils/testing/chat_models.d.ts.map +1 -1
- package/dist/utils/testing/chat_models.js.map +1 -1
- 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.map +1 -1
- package/dist/utils/testing/llms.cjs.map +1 -1
- package/dist/utils/testing/llms.d.cts +0 -1
- package/dist/utils/testing/llms.d.cts.map +1 -1
- package/dist/utils/testing/llms.d.ts +0 -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.map +1 -1
- package/dist/utils/testing/message_history.d.cts +1 -1
- package/dist/utils/testing/message_history.d.cts.map +1 -1
- package/dist/utils/testing/message_history.d.ts +1 -1
- package/dist/utils/testing/message_history.d.ts.map +1 -1
- package/dist/utils/testing/message_history.js.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.cjs.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.d.cts +0 -1
- package/dist/utils/testing/openai_stream_fixtures.d.cts.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.d.ts +0 -1
- package/dist/utils/testing/openai_stream_fixtures.d.ts.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.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.map +1 -1
- package/dist/utils/testing/retrievers.d.cts +0 -1
- package/dist/utils/testing/retrievers.d.cts.map +1 -1
- package/dist/utils/testing/retrievers.d.ts +0 -1
- package/dist/utils/testing/retrievers.d.ts.map +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 +0 -1
- package/dist/utils/testing/runnables.d.cts.map +1 -1
- package/dist/utils/testing/runnables.d.ts +0 -1
- package/dist/utils/testing/runnables.d.ts.map +1 -1
- package/dist/utils/testing/runnables.js.map +1 -1
- package/dist/utils/testing/stream.cjs +5 -0
- package/dist/utils/testing/stream.cjs.map +1 -1
- package/dist/utils/testing/stream.d.cts.map +1 -1
- package/dist/utils/testing/stream.d.ts.map +1 -1
- package/dist/utils/testing/stream.js +1 -1
- package/dist/utils/testing/stream.js.map +1 -1
- package/dist/utils/testing/tools.cjs.map +1 -1
- package/dist/utils/testing/tools.d.cts +0 -1
- package/dist/utils/testing/tools.d.cts.map +1 -1
- package/dist/utils/testing/tools.d.ts +0 -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 +0 -1
- package/dist/utils/testing/tracers.d.cts.map +1 -1
- package/dist/utils/testing/tracers.d.ts +0 -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.map +1 -1
- package/dist/utils/testing/vectorstores.d.cts +1 -5
- package/dist/utils/testing/vectorstores.d.cts.map +1 -1
- package/dist/utils/testing/vectorstores.d.ts +1 -5
- package/dist/utils/testing/vectorstores.d.ts.map +1 -1
- package/dist/utils/testing/vectorstores.js.map +1 -1
- package/dist/utils/tiktoken.cjs +1 -1
- package/dist/utils/tiktoken.cjs.map +1 -1
- package/dist/utils/tiktoken.d.cts +0 -1
- package/dist/utils/tiktoken.d.cts.map +1 -1
- package/dist/utils/tiktoken.d.ts +0 -1
- package/dist/utils/tiktoken.d.ts.map +1 -1
- package/dist/utils/tiktoken.js +1 -1
- package/dist/utils/tiktoken.js.map +1 -1
- 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/zod.cjs +0 -1
- package/dist/utils/types/zod.cjs.map +1 -1
- package/dist/utils/types/zod.d.cts +2 -3
- package/dist/utils/types/zod.d.cts.map +1 -1
- package/dist/utils/types/zod.d.ts +2 -3
- package/dist/utils/types/zod.d.ts.map +1 -1
- package/dist/utils/types/zod.js.map +1 -1
- package/dist/utils/uuid/index.d.cts +10 -11
- package/dist/utils/uuid/index.d.cts.map +1 -1
- package/dist/utils/uuid/index.d.ts +10 -11
- package/dist/utils/uuid/index.d.ts.map +1 -1
- package/dist/utils/uuid/parse.cjs.map +1 -1
- package/dist/utils/uuid/parse.d.cts +1 -3
- package/dist/utils/uuid/parse.d.cts.map +1 -1
- package/dist/utils/uuid/parse.d.ts +1 -2
- package/dist/utils/uuid/parse.d.ts.map +1 -1
- package/dist/utils/uuid/parse.js.map +1 -1
- package/dist/utils/uuid/rng.cjs +1 -1
- package/dist/utils/uuid/rng.cjs.map +1 -1
- package/dist/utils/uuid/rng.js +1 -1
- package/dist/utils/uuid/rng.js.map +1 -1
- package/dist/utils/uuid/sha1.cjs +2 -2
- package/dist/utils/uuid/sha1.cjs.map +1 -1
- package/dist/utils/uuid/sha1.js +2 -2
- package/dist/utils/uuid/sha1.js.map +1 -1
- package/dist/utils/uuid/stringify.cjs.map +1 -1
- package/dist/utils/uuid/stringify.d.cts +1 -2
- package/dist/utils/uuid/stringify.d.cts.map +1 -1
- package/dist/utils/uuid/stringify.d.ts +1 -1
- package/dist/utils/uuid/stringify.d.ts.map +1 -1
- package/dist/utils/uuid/stringify.js.map +1 -1
- package/dist/utils/uuid/types.d.cts.map +1 -1
- package/dist/utils/uuid/types.d.ts.map +1 -1
- package/dist/utils/uuid/v1.cjs +2 -1
- package/dist/utils/uuid/v1.cjs.map +1 -1
- package/dist/utils/uuid/v1.d.cts +1 -3
- package/dist/utils/uuid/v1.d.cts.map +1 -1
- package/dist/utils/uuid/v1.d.ts +1 -2
- package/dist/utils/uuid/v1.d.ts.map +1 -1
- package/dist/utils/uuid/v1.js +2 -2
- package/dist/utils/uuid/v1.js.map +1 -1
- package/dist/utils/uuid/v1ToV6.cjs.map +1 -1
- package/dist/utils/uuid/v1ToV6.js.map +1 -1
- package/dist/utils/uuid/v35.cjs +1 -0
- package/dist/utils/uuid/v35.cjs.map +1 -1
- package/dist/utils/uuid/v35.d.cts +6 -0
- package/dist/utils/uuid/v35.d.cts.map +1 -0
- package/dist/utils/uuid/v35.d.ts +6 -0
- package/dist/utils/uuid/v35.d.ts.map +1 -0
- package/dist/utils/uuid/v35.js +1 -1
- package/dist/utils/uuid/v35.js.map +1 -1
- package/dist/utils/uuid/v4.cjs.map +1 -1
- package/dist/utils/uuid/v4.d.cts +1 -3
- package/dist/utils/uuid/v4.d.cts.map +1 -1
- package/dist/utils/uuid/v4.d.ts +1 -2
- package/dist/utils/uuid/v4.d.ts.map +1 -1
- package/dist/utils/uuid/v4.js.map +1 -1
- package/dist/utils/uuid/v5.cjs.map +1 -1
- package/dist/utils/uuid/v5.d.cts +5 -8
- package/dist/utils/uuid/v5.d.cts.map +1 -1
- package/dist/utils/uuid/v5.d.ts +5 -7
- package/dist/utils/uuid/v5.d.ts.map +1 -1
- package/dist/utils/uuid/v5.js.map +1 -1
- package/dist/utils/uuid/v6.cjs +1 -1
- package/dist/utils/uuid/v6.cjs.map +1 -1
- package/dist/utils/uuid/v6.d.cts +1 -3
- package/dist/utils/uuid/v6.d.cts.map +1 -1
- package/dist/utils/uuid/v6.d.ts +1 -2
- package/dist/utils/uuid/v6.d.ts.map +1 -1
- package/dist/utils/uuid/v6.js +1 -1
- package/dist/utils/uuid/v6.js.map +1 -1
- package/dist/utils/uuid/v7.cjs +2 -1
- package/dist/utils/uuid/v7.cjs.map +1 -1
- package/dist/utils/uuid/v7.d.cts +1 -3
- package/dist/utils/uuid/v7.d.cts.map +1 -1
- package/dist/utils/uuid/v7.d.ts +1 -2
- package/dist/utils/uuid/v7.d.ts.map +1 -1
- package/dist/utils/uuid/v7.js +2 -2
- package/dist/utils/uuid/v7.js.map +1 -1
- package/dist/utils/uuid/validate.cjs.map +1 -1
- package/dist/utils/uuid/validate.d.cts +1 -2
- package/dist/utils/uuid/validate.d.cts.map +1 -1
- package/dist/utils/uuid/validate.d.ts +1 -1
- package/dist/utils/uuid/validate.d.ts.map +1 -1
- package/dist/utils/uuid/validate.js.map +1 -1
- package/dist/utils/uuid/version.cjs.map +1 -1
- package/dist/utils/uuid/version.d.cts +1 -2
- package/dist/utils/uuid/version.d.cts.map +1 -1
- package/dist/utils/uuid/version.d.ts +1 -1
- package/dist/utils/uuid/version.d.ts.map +1 -1
- package/dist/utils/uuid/version.js.map +1 -1
- package/dist/utils/zod-to-json-schema/Options.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/Options.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/Options.d.ts +3 -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.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/Refs.d.ts +3 -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 +2 -1
- package/dist/utils/zod-to-json-schema/errorMessages.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.d.ts +2 -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.cjs +79 -37
- package/dist/utils/zod-to-json-schema/index.d.cts +15 -1
- package/dist/utils/zod-to-json-schema/index.d.ts +15 -1
- package/dist/utils/zod-to-json-schema/index.js +38 -38
- package/dist/utils/zod-to-json-schema/parseDef.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parseDef.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/parseDef.d.ts +3 -1
- package/dist/utils/zod-to-json-schema/parseDef.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.cts +0 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.ts +0 -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 +1 -0
- 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 +1 -0
- 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 +0 -1
- package/dist/utils/zod-to-json-schema/parsers/array.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/array.d.cts +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/parsers/branded.d.ts +3 -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.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/parsers/catch.d.ts +3 -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 +3 -0
- 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 +3 -0
- 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.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/parsers/default.d.ts +3 -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.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/parsers/effects.d.ts +3 -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 +1 -0
- 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 +1 -0
- 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.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts +2 -0
- 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 +2 -0
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts.map +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 +2 -0
- 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 +2 -0
- 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.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.d.cts +3 -0
- 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 +3 -0
- package/dist/utils/zod-to-json-schema/parsers/map.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts +1 -0
- 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 +1 -0
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts.map +1 -1
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts +2 -0
- 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 +2 -0
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts.map +1 -1
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/parsers/optional.d.ts +3 -1
- package/dist/utils/zod-to-json-schema/parsers/optional.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/pipeline.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/pipeline.d.cts +4 -1
- package/dist/utils/zod-to-json-schema/parsers/pipeline.d.ts +4 -1
- 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.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/parsers/promise.d.ts +3 -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.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/parsers/readonly.d.ts +3 -1
- package/dist/utils/zod-to-json-schema/parsers/readonly.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.cjs +0 -1
- package/dist/utils/zod-to-json-schema/parsers/record.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.d.cts +2 -0
- 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 +2 -0
- package/dist/utils/zod-to-json-schema/parsers/record.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.d.cts +2 -0
- 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 +2 -0
- package/dist/utils/zod-to-json-schema/parsers/set.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.js.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.cjs +0 -2
- package/dist/utils/zod-to-json-schema/parsers/string.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.d.cts +2 -0
- 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 +2 -0
- package/dist/utils/zod-to-json-schema/parsers/string.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.js +0 -2
- 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 +2 -0
- 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 +2 -0
- 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 +1 -0
- 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 +1 -0
- 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.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/union.d.cts +2 -0
- 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 +2 -0
- package/dist/utils/zod-to-json-schema/parsers/union.d.ts.map +1 -1
- 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 +1 -0
- 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 +1 -0
- 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 +0 -1
- package/dist/utils/zod-to-json-schema/selectParser.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/selectParser.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/selectParser.d.ts +2 -0
- package/dist/utils/zod-to-json-schema/selectParser.js.map +1 -1
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.cjs.map +1 -1
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.d.cts +3 -1
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.d.ts +3 -1
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.js.map +1 -1
- 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.map +1 -1
- package/package.json +15 -4
- package/utils/gateway.cjs +1 -0
- package/utils/gateway.d.cts +1 -0
- package/utils/gateway.d.ts +1 -0
- package/utils/gateway.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @langchain/core
|
|
2
2
|
|
|
3
|
+
## 1.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#11305](https://github.com/langchain-ai/langchainjs/pull/11305) [`e654022`](https://github.com/langchain-ai/langchainjs/commit/e654022e291b8dae54504ac2d1a3232332406723) Thanks [@jacoblee93](https://github.com/jacoblee93)! - Add LangSmith Gateway environment configuration to OpenAI, Anthropic, and Fireworks chat models.
|
|
8
|
+
|
|
9
|
+
- [#11295](https://github.com/langchain-ai/langchainjs/pull/11295) [`1a1b347`](https://github.com/langchain-ai/langchainjs/commit/1a1b347d18bc68e842df8badffc987493c81d70a) Thanks [@vladislav-nechakhin](https://github.com/vladislav-nechakhin)! - fix(core): pass the mustache escape override per render call
|
|
10
|
+
|
|
3
11
|
## 1.2.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/agents.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.cts","names":[],"sources":["../src/agents.ts"],"mappings":";KAAY
|
|
1
|
+
{"version":3,"file":"agents.d.cts","names":[],"sources":["../src/agents.ts"],"mappings":";KAAY;EACV;EAEA,oBAAoB;EACpB;;KAGU;EAEV,cAAc;EACd;;KAGU;EACV,QAAQ;EACR"}
|
package/dist/agents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","names":[],"sources":["../src/agents.ts"],"mappings":";KAAY
|
|
1
|
+
{"version":3,"file":"agents.d.ts","names":[],"sources":["../src/agents.ts"],"mappings":";KAAY;EACV;EAEA,oBAAoB;EACpB;;KAGU;EAEV,cAAc;EACd;;KAGU;EACV,QAAQ;EACR"}
|
|
@@ -1 +1 @@
|
|
|
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,aAAAA,OAAO,QAAQ,KAAK,
|
|
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,aAAAA,OAAO,QAAQ,KAAK,GAAG,CAAC;AAE1B,SAAgB,4BACd,kBACA;CACA,IAAI,iBAAiB,YAAY,KAAA,GAC/B,OAAO;EACL,MAAM,iBAAiB;EACvB,SAASC,cAAAA,8BAA8B,iBAAiB,OAAO;CACjE;MAEA,OAAO,EAAE,MAAM,iBAAiB,KAAK;AAEzC;AAEA,SAAgB,oBAAoB,YAAwB;CAC1D,MAAM,kBAAoC,EACxC,MAAM,WAAW,KACnB;CACA,IAAK,WAA8B,YAAY,KAAA,GAC7C,gBAAgB,UAAW,WAA8B,QAAQ,OAAO;CAE1E,OAAO;AACT;;;;AAKA,IAAsB,YAAtB,MAAkD;CAChD,aAAuC;;;;;;;CAQvC,sBAAsB,cAAoC;EACxD,KAAK,aAAa;CACpB;AAKF;AAEA,MAAM,6BAAa,IAAI,IAAI;;;;AAK3B,IAAa,gBAAb,MAAa,sBAAwC,UAAa;CAChE;CAEA,YAAY,KAAsB;EAChC,MAAM;EACN,KAAK,QAAQ,uBAAO,IAAI,IAAI;CAC9B;;;;;;;;CASA,OAAO,QAAgB,QAAmC;EACxD,OAAO,QAAQ,QACb,KAAK,MAAM,IAAI,KAAK,WAAW,QAAQ,MAAM,CAAC,KAAK,IACrD;CACF;;;;;;;CAQA,MAAM,OAAO,QAAgB,QAAgB,OAAyB;EACpE,KAAK,MAAM,IAAI,KAAK,WAAW,QAAQ,MAAM,GAAG,KAAK;CACvD;;;;;;CAOA,OAAO,SAAwB;EAC7B,OAAO,IAAI,cAAc,UAAU;CACrC;AACF"}
|
package/dist/caches/index.d.cts
CHANGED
|
@@ -8,7 +8,6 @@ import { SystemMessage } from "../messages/system.cjs";
|
|
|
8
8
|
import { MessageStructure, MessageToolSet } from "../messages/message.cjs";
|
|
9
9
|
import { HashKeyEncoder } from "../utils/hash.cjs";
|
|
10
10
|
import { Generation } from "../outputs.cjs";
|
|
11
|
-
|
|
12
11
|
//#region src/caches/index.d.ts
|
|
13
12
|
declare const defaultHashKeyEncoder: HashKeyEncoder;
|
|
14
13
|
declare function deserializeStoredGeneration(storedGeneration: StoredGeneration): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/caches/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/caches/index.ts"],"mappings":";;;;;;;;;;;cAKa,uBAAuB;iBAGpB,4BACd,kBAAkB;;sCAAA;;;;;iBAYJ,oBAAoB,YAAY,aAAU;;;;uBAapC,UAAU,IAAI;YACxB,YAAY;;;;;;;EAQtB,sBAAsB,cAAc;WAI3B,OAAO,gBAAgB,iBAAiB,QAAQ;WAEhD,OAAO,gBAAgB,gBAAgB,OAAO,IAAI;;;;;cAQhD,cAAc,IAAI,sBAAsB,UAAU;UACrD;EAER,YAAY,MAAM,YAAY;;;;;;;;EAY9B,OAAO,gBAAgB,iBAAiB,QAAQ;;;;;;;EAY1C,OAAO,gBAAgB,gBAAgB,OAAO,IAAI;;;;;;SASjD,UAAU"}
|
package/dist/caches/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { SystemMessage } from "../messages/system.js";
|
|
|
8
8
|
import { MessageStructure, MessageToolSet } from "../messages/message.js";
|
|
9
9
|
import { HashKeyEncoder } from "../utils/hash.js";
|
|
10
10
|
import { Generation } from "../outputs.js";
|
|
11
|
-
|
|
12
11
|
//#region src/caches/index.d.ts
|
|
13
12
|
declare const defaultHashKeyEncoder: HashKeyEncoder;
|
|
14
13
|
declare function deserializeStoredGeneration(storedGeneration: StoredGeneration): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/caches/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/caches/index.ts"],"mappings":";;;;;;;;;;;cAKa,uBAAuB;iBAGpB,4BACd,kBAAkB;;sCAAA;;;;;iBAYJ,oBAAoB,YAAY,aAAU;;;;uBAapC,UAAU,IAAI;YACxB,YAAY;;;;;;;EAQtB,sBAAsB,cAAc;WAI3B,OAAO,gBAAgB,iBAAiB,QAAQ;WAEhD,OAAO,gBAAgB,gBAAgB,OAAO,IAAI;;;;;cAQhD,cAAc,IAAI,sBAAsB,UAAU;UACrD;EAER,YAAY,MAAM,YAAY;;;;;;;;EAY9B,OAAO,gBAAgB,iBAAiB,QAAQ;;;;;;;EAY1C,OAAO,gBAAgB,gBAAgB,OAAO,IAAI;;;;;;SASjD,UAAU"}
|
package/dist/caches/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,GAAG,CAAC;AAE1B,SAAgB,4BACd,kBACA;CACA,IAAI,iBAAiB,YAAY,KAAA,GAC/B,OAAO;EACL,MAAM,iBAAiB;EACvB,SAAS,8BAA8B,iBAAiB,OAAO;CACjE;MAEA,OAAO,EAAE,MAAM,iBAAiB,KAAK;AAEzC;AAEA,SAAgB,oBAAoB,YAAwB;CAC1D,MAAM,kBAAoC,EACxC,MAAM,WAAW,KACnB;CACA,IAAK,WAA8B,YAAY,KAAA,GAC7C,gBAAgB,UAAW,WAA8B,QAAQ,OAAO;CAE1E,OAAO;AACT;;;;AAKA,IAAsB,YAAtB,MAAkD;CAChD,aAAuC;;;;;;;CAQvC,sBAAsB,cAAoC;EACxD,KAAK,aAAa;CACpB;AAKF;AAEA,MAAM,6BAAa,IAAI,IAAI;;;;AAK3B,IAAa,gBAAb,MAAa,sBAAwC,UAAa;CAChE;CAEA,YAAY,KAAsB;EAChC,MAAM;EACN,KAAK,QAAQ,uBAAO,IAAI,IAAI;CAC9B;;;;;;;;CASA,OAAO,QAAgB,QAAmC;EACxD,OAAO,QAAQ,QACb,KAAK,MAAM,IAAI,KAAK,WAAW,QAAQ,MAAM,CAAC,KAAK,IACrD;CACF;;;;;;;CAQA,MAAM,OAAO,QAAgB,QAAgB,OAAyB;EACpE,KAAK,MAAM,IAAI,KAAK,WAAW,QAAQ,MAAM,GAAG,KAAK;CACvD;;;;;;CAOA,OAAO,SAAwB;EAC7B,OAAO,IAAI,cAAc,UAAU;CACrC;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.cjs","names":["get_lc_unique_name","getEnvironmentVariable","Serializable"],"sources":["../../src/callbacks/base.ts"],"sourcesContent":["import * as uuid from \"../utils/uuid/index.js\";\nimport type { ChainValues } from \"../utils/types/index.js\";\nimport type { BaseMessage } from \"../messages/base.js\";\nimport type { ChatModelStreamEvent } from \"../language_models/event.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// oxlint-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 ): // oxlint-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 ): // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called when a Chat Model emits a content-block-centric stream event.\n */\n handleChatModelStreamEvent?(\n event: ChatModelStreamEvent,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 toolCallId?: string\n ): // oxlint-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 ): // oxlint-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 // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n output: any,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called when a streaming tool yields a partial value. Tools that are async generators\n * invoke this once per yielded value.\n */\n handleToolEvent?(\n chunk: unknown,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 ): // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n handleCustomEvent?(\n eventName: string,\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n data: any,\n runId: string,\n tags?: string[],\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n metadata?: Record<string, any>\n ): // oxlint-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 * Interface for handlers that prefer chat model stream events instead of\n * legacy token/chunk callbacks.\n */\nexport interface CallbackHandlerPrefersChatModelStreamEvents {\n readonly lc_prefer_chat_model_stream_events: boolean;\n}\n\nexport function callbackHandlerPrefersChatModelStreamEvents(\n x: BaseCallbackHandler\n) {\n return (\n \"lc_prefer_chat_model_stream_events\" in x &&\n x.lc_prefer_chat_model_stream_events\n );\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":";;;;;;;;;;;;;;;;;AAyDA,IAAe,kCAAf,MAA+C;AA2Q/C,SAAgB,gCAAgC,GAAwB;AACtE,QAAO,yBAAyB,KAAK,EAAE;;AAWzC,SAAgB,4CACd,GACA;AACA,QACE,wCAAwC,KACxC,EAAE;;;;;;;;AAUN,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,0BAAAA,mBAAmB,KAAK,YAA0C,CACnE;;CAGH;CAIA,YAAY;CAEZ,cAAc;CAEd,cAAc;CAEd,kBAAkB;CAElB,oBAAoB;CAEpB,aAAa;CAEb,gBACEC,kBAAAA,uBAAuB,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,0BAAAA,aAAa,UAAU,OAAO,KAAK,KAAK;;CAGjD,uBAAiD;AAC/C,SAAOA,0BAAAA,aAAa,UAAU,qBAAqB,KAAK,KAAK;;CAG/D,OAAO,YAAY,SAAiC;EAClD,MAAM,gBAAgB,oBAAoB;GACxC,OAAA,yBAAA,IAAgB;GAEhB,cAAc;AACZ,WAAO;AACP,WAAO,OAAO,MAAM,QAAQ;;;AAGhC,SAAO,IAAI,SAAS;;;AAIxB,MAAa,yBAAyB,MAAe;CACnD,MAAM,kBAAkB;AACxB,QACE,oBAAoB,KAAA,KACpB,OAAO,gBAAgB,SAAS,cAChC,OAAO,gBAAgB,SAAS,YAChC,OAAO,gBAAgB,kBAAkB"}
|
|
1
|
+
{"version":3,"file":"base.cjs","names":["get_lc_unique_name","getEnvironmentVariable","Serializable"],"sources":["../../src/callbacks/base.ts"],"sourcesContent":["import * as uuid from \"../utils/uuid/index.js\";\nimport type { ChainValues } from \"../utils/types/index.js\";\nimport type { BaseMessage } from \"../messages/base.js\";\nimport type { ChatModelStreamEvent } from \"../language_models/event.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// oxlint-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 ): // oxlint-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 ): // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called when a Chat Model emits a content-block-centric stream event.\n */\n handleChatModelStreamEvent?(\n event: ChatModelStreamEvent,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 toolCallId?: string\n ): // oxlint-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 ): // oxlint-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 // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n output: any,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n /**\n * Called when a streaming tool yields a partial value. Tools that are async generators\n * invoke this once per yielded value.\n */\n handleToolEvent?(\n chunk: unknown,\n runId: string,\n parentRunId?: string,\n tags?: string[]\n ): // oxlint-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 ): // oxlint-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 ): // oxlint-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 ): // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n Promise<any> | any;\n\n handleCustomEvent?(\n eventName: string,\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n data: any,\n runId: string,\n tags?: string[],\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n metadata?: Record<string, any>\n ): // oxlint-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 * Interface for handlers that prefer chat model stream events instead of\n * legacy token/chunk callbacks.\n */\nexport interface CallbackHandlerPrefersChatModelStreamEvents {\n readonly lc_prefer_chat_model_stream_events: boolean;\n}\n\nexport function callbackHandlerPrefersChatModelStreamEvents(\n x: BaseCallbackHandler\n) {\n return (\n \"lc_prefer_chat_model_stream_events\" in x &&\n x.lc_prefer_chat_model_stream_events\n );\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":";;;;;;;;;;;;;;;;;AAyDA,IAAe,kCAAf,MAA+C,CAqP/C;AAsBA,SAAgB,gCAAgC,GAAwB;CACtE,OAAO,yBAAyB,KAAK,EAAE;AACzC;AAUA,SAAgB,4CACd,GACA;CACA,OACE,wCAAwC,KACxC,EAAE;AAEN;;;;;;;AAQA,IAAsB,sBAAtB,cACU,gCAEV;CACE,kBAAkB;CAElB,IAAI,eAAwD;EAC1D,OAAO;GAAC;GAAkB;GAAa,KAAK;EAAI;CAClD;CAEA,IAAI,aAAoD,CAExD;CAEA,IAAI,gBAAuD,CAE3D;CAEA,IAAI,aAAoD,CAExD;CAEA,IAAI,uBAA6C,CAEjD;;;;;;;CAQA,OAAO,UAAkB;EACvB,OAAO,KAAK;CACd;;;;CAKA,IAAI,QAAkB;EACpB,OAAO,CACL,GAAG,KAAK,cACRA,0BAAAA,mBAAmB,KAAK,WAAyC,CACnE;CACF;CAEA;CAIA,YAAY;CAEZ,cAAc;CAEd,cAAc;CAEd,kBAAkB;CAElB,oBAAoB;CAEpB,aAAa;CAEb,gBACEC,kBAAAA,uBAAuB,gCAAgC,MAAM;CAE/D,YAAY,OAAkC;EAC5C,MAAM;EACN,KAAK,YAAY,SAAS,CAAC;EAC3B,IAAI,OAAO;GACT,KAAK,YAAY,MAAM,aAAa,KAAK;GACzC,KAAK,cAAc,MAAM,eAAe,KAAK;GAC7C,KAAK,cAAc,MAAM,eAAe,KAAK;GAC7C,KAAK,kBAAkB,MAAM,mBAAmB,KAAK;GACrD,KAAK,oBACH,MAAM,qBAAqB,KAAK;GAClC,KAAK,aAAa,MAAM,cAAc,KAAK;GAC3C,KAAK,gBACH,KAAK,eAAe,MAAM,iBAAiB,KAAK;EACpD;CACF;CAEA,OAA4B;EAC1B,OAAO,IAAK,KAAK,YAES,IAAI;CAChC;CAEA,SAAqB;EACnB,OAAOC,0BAAAA,aAAa,UAAU,OAAO,KAAK,IAAI;CAChD;CAEA,uBAAiD;EAC/C,OAAOA,0BAAAA,aAAa,UAAU,qBAAqB,KAAK,IAAI;CAC9D;CAEA,OAAO,YAAY,SAAiC;EAClD,MAAM,gBAAgB,oBAAoB;GACxC,OAAA,yBAAA,GAAe;GAEf,cAAc;IACZ,MAAM;IACN,OAAO,OAAO,MAAM,OAAO;GAC7B;EACF;EACA,OAAO,IAAI,QAAQ;CACrB;AACF;AAEA,MAAa,yBAAyB,MAAe;CACnD,MAAM,kBAAkB;CACxB,OACE,oBAAoB,KAAA,KACpB,OAAO,gBAAgB,SAAS,cAChC,OAAO,gBAAgB,SAAS,YAChC,OAAO,gBAAgB,kBAAkB;AAE7C"}
|
|
@@ -6,7 +6,6 @@ import { ChatGenerationChunk, GenerationChunk, LLMResult } from "../outputs.cjs"
|
|
|
6
6
|
import { ChainValues } from "../utils/types/index.cjs";
|
|
7
7
|
import { ChatModelStreamEvent } from "../language_models/event.cjs";
|
|
8
8
|
import { DocumentInterface } from "../documents/document.cjs";
|
|
9
|
-
|
|
10
9
|
//#region src/callbacks/base.d.ts
|
|
11
10
|
type Error = any;
|
|
12
11
|
/**
|
|
@@ -44,7 +43,8 @@ declare abstract class BaseCallbackHandlerMethodsClass {
|
|
|
44
43
|
* Called at the start of an LLM or Chat Model run, with the prompt(s)
|
|
45
44
|
* and the run ID.
|
|
46
45
|
*/
|
|
47
|
-
handleLLMStart?(llm: Serialized, prompts: string[], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string):
|
|
46
|
+
handleLLMStart?(llm: Serialized, prompts: string[], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string):
|
|
47
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
48
|
Promise<any> | any;
|
|
49
49
|
/**
|
|
50
50
|
* Called when an LLM/ChatModel in `streaming` mode produces a new token
|
|
@@ -56,71 +56,82 @@ declare abstract class BaseCallbackHandlerMethodsClass {
|
|
|
56
56
|
* idx.completion is the index of the completion that produced the token
|
|
57
57
|
* (if multiple completions per prompt are requested)
|
|
58
58
|
*/
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
idx: NewTokenIndices, runId: string, parentRunId?: string, tags?: string[], fields?: HandleLLMNewTokenCallbackFields):
|
|
60
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
61
61
|
Promise<any> | any;
|
|
62
62
|
/**
|
|
63
63
|
* Called when a Chat Model emits a content-block-centric stream event.
|
|
64
64
|
*/
|
|
65
|
-
handleChatModelStreamEvent?(event: ChatModelStreamEvent, runId: string, parentRunId?: string, tags?: string[]):
|
|
65
|
+
handleChatModelStreamEvent?(event: ChatModelStreamEvent, runId: string, parentRunId?: string, tags?: string[]):
|
|
66
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
66
67
|
Promise<any> | any;
|
|
67
68
|
/**
|
|
68
69
|
* Called if an LLM/ChatModel run encounters an error
|
|
69
70
|
*/
|
|
70
|
-
handleLLMError?(err: Error, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>):
|
|
71
|
+
handleLLMError?(err: Error, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>):
|
|
72
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
71
73
|
Promise<any> | any;
|
|
72
74
|
/**
|
|
73
75
|
* Called at the end of an LLM/ChatModel run, with the output and the run ID.
|
|
74
76
|
*/
|
|
75
|
-
handleLLMEnd?(output: LLMResult, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>):
|
|
77
|
+
handleLLMEnd?(output: LLMResult, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>):
|
|
78
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
76
79
|
Promise<any> | any;
|
|
77
80
|
/**
|
|
78
81
|
* Called at the start of a Chat Model run, with the prompt(s)
|
|
79
82
|
* and the run ID.
|
|
80
83
|
*/
|
|
81
|
-
handleChatModelStart?(llm: Serialized, messages: BaseMessage[][], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string):
|
|
84
|
+
handleChatModelStart?(llm: Serialized, messages: BaseMessage[][], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string):
|
|
85
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
86
|
Promise<any> | any;
|
|
83
87
|
/**
|
|
84
88
|
* Called at the start of a Chain run, with the chain name and inputs
|
|
85
89
|
* and the run ID.
|
|
86
90
|
*/
|
|
87
|
-
handleChainStart?(chain: Serialized, inputs: ChainValues, runId: string, runType?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string, parentRunId?: string, extra?: Record<string, unknown>):
|
|
91
|
+
handleChainStart?(chain: Serialized, inputs: ChainValues, runId: string, runType?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string, parentRunId?: string, extra?: Record<string, unknown>):
|
|
92
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
88
93
|
Promise<any> | any;
|
|
89
94
|
/**
|
|
90
95
|
* Called if a Chain run encounters an error
|
|
91
96
|
*/
|
|
92
97
|
handleChainError?(err: Error, runId: string, parentRunId?: string, tags?: string[], kwargs?: {
|
|
93
98
|
inputs?: Record<string, unknown>;
|
|
94
|
-
}):
|
|
99
|
+
}):
|
|
100
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
95
101
|
Promise<any> | any;
|
|
96
102
|
/**
|
|
97
103
|
* Called at the end of a Chain run, with the outputs and the run ID.
|
|
98
104
|
*/
|
|
99
105
|
handleChainEnd?(outputs: ChainValues, runId: string, parentRunId?: string, tags?: string[], kwargs?: {
|
|
100
106
|
inputs?: Record<string, unknown>;
|
|
101
|
-
}):
|
|
107
|
+
}):
|
|
108
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
102
109
|
Promise<any> | any;
|
|
103
110
|
/**
|
|
104
111
|
* Called at the start of a Tool run, with the tool name and input
|
|
105
112
|
* and the run ID.
|
|
106
113
|
*/
|
|
107
|
-
handleToolStart?(tool: Serialized, input: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string, toolCallId?: string):
|
|
114
|
+
handleToolStart?(tool: Serialized, input: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string, toolCallId?: string):
|
|
115
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
108
116
|
Promise<any> | any;
|
|
109
117
|
/**
|
|
110
118
|
* Called if a Tool run encounters an error
|
|
111
119
|
*/
|
|
112
|
-
handleToolError?(err: Error, runId: string, parentRunId?: string, tags?: string[]):
|
|
120
|
+
handleToolError?(err: Error, runId: string, parentRunId?: string, tags?: string[]):
|
|
121
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
113
122
|
Promise<any> | any;
|
|
114
123
|
/**
|
|
115
124
|
* Called at the end of a Tool run, with the tool output and the run ID.
|
|
116
125
|
*/
|
|
117
|
-
handleToolEnd?(output: any, runId: string, parentRunId?: string, tags?: string[]):
|
|
126
|
+
handleToolEnd?(output: any, runId: string, parentRunId?: string, tags?: string[]):
|
|
127
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
118
128
|
Promise<any> | any;
|
|
119
129
|
/**
|
|
120
130
|
* Called when a streaming tool yields a partial value. Tools that are async generators
|
|
121
131
|
* invoke this once per yielded value.
|
|
122
132
|
*/
|
|
123
|
-
handleToolEvent?(chunk: unknown, runId: string, parentRunId?: string, tags?: string[]):
|
|
133
|
+
handleToolEvent?(chunk: unknown, runId: string, parentRunId?: string, tags?: string[]):
|
|
134
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
124
135
|
Promise<any> | any;
|
|
125
136
|
handleText?(text: string, runId: string, parentRunId?: string, tags?: string[]): Promise<void> | void;
|
|
126
137
|
/**
|
|
@@ -133,13 +144,17 @@ declare abstract class BaseCallbackHandlerMethodsClass {
|
|
|
133
144
|
* with the final output and the run ID.
|
|
134
145
|
*/
|
|
135
146
|
handleAgentEnd?(action: AgentFinish, runId: string, parentRunId?: string, tags?: string[]): Promise<void> | void;
|
|
136
|
-
handleRetrieverStart?(retriever: Serialized, query: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, name?: string):
|
|
147
|
+
handleRetrieverStart?(retriever: Serialized, query: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, name?: string):
|
|
148
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
137
149
|
Promise<any> | any;
|
|
138
|
-
handleRetrieverEnd?(documents: DocumentInterface[], runId: string, parentRunId?: string, tags?: string[]):
|
|
150
|
+
handleRetrieverEnd?(documents: DocumentInterface[], runId: string, parentRunId?: string, tags?: string[]):
|
|
151
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
139
152
|
Promise<any> | any;
|
|
140
|
-
handleRetrieverError?(err: Error, runId: string, parentRunId?: string, tags?: string[]):
|
|
153
|
+
handleRetrieverError?(err: Error, runId: string, parentRunId?: string, tags?: string[]):
|
|
154
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
141
155
|
Promise<any> | any;
|
|
142
|
-
handleCustomEvent?(eventName: string, data: any, runId: string, tags?: string[], metadata?: Record<string, any>):
|
|
156
|
+
handleCustomEvent?(eventName: string, data: any, runId: string, tags?: string[], metadata?: Record<string, any>):
|
|
157
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
143
158
|
Promise<any> | any;
|
|
144
159
|
}
|
|
145
160
|
/**
|
|
@@ -218,75 +233,88 @@ declare abstract class BaseCallbackHandler extends BaseCallbackHandlerMethodsCla
|
|
|
218
233
|
* Called at the start of an LLM or Chat Model run, with the prompt(s)
|
|
219
234
|
* and the run ID.
|
|
220
235
|
*/
|
|
221
|
-
handleLLMStart?(llm: Serialized, prompts: string[], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string):
|
|
236
|
+
handleLLMStart?(llm: Serialized, prompts: string[], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string):
|
|
237
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
222
238
|
Promise<any> | any;
|
|
223
239
|
/**
|
|
224
240
|
* Called when an LLM/ChatModel in `streaming` mode produces a new token
|
|
225
241
|
*/
|
|
226
|
-
handleLLMNewToken?(token: string, idx: NewTokenIndices, runId: string, parentRunId?: string, tags?: string[], fields?: HandleLLMNewTokenCallbackFields):
|
|
242
|
+
handleLLMNewToken?(token: string, idx: NewTokenIndices, runId: string, parentRunId?: string, tags?: string[], fields?: HandleLLMNewTokenCallbackFields):
|
|
243
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
227
244
|
Promise<any> | any;
|
|
228
245
|
/**
|
|
229
246
|
* Called when a Chat Model emits a content-block-centric stream event.
|
|
230
247
|
*/
|
|
231
|
-
handleChatModelStreamEvent?(event: ChatModelStreamEvent, runId: string, parentRunId?: string, tags?: string[]):
|
|
248
|
+
handleChatModelStreamEvent?(event: ChatModelStreamEvent, runId: string, parentRunId?: string, tags?: string[]):
|
|
249
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
232
250
|
Promise<any> | any;
|
|
233
251
|
/**
|
|
234
252
|
* Called if an LLM/ChatModel run encounters an error
|
|
235
253
|
*/
|
|
236
|
-
handleLLMError?(err: Error, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>):
|
|
254
|
+
handleLLMError?(err: Error, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>):
|
|
255
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
237
256
|
Promise<any> | any;
|
|
238
257
|
/**
|
|
239
258
|
* Called at the end of an LLM/ChatModel run, with the output and the run ID.
|
|
240
259
|
*/
|
|
241
|
-
handleLLMEnd?(output: LLMResult, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>):
|
|
260
|
+
handleLLMEnd?(output: LLMResult, runId: string, parentRunId?: string, tags?: string[], extraParams?: Record<string, unknown>):
|
|
261
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
242
262
|
Promise<any> | any;
|
|
243
263
|
/**
|
|
244
264
|
* Called at the start of a Chat Model run, with the prompt(s)
|
|
245
265
|
* and the run ID.
|
|
246
266
|
*/
|
|
247
|
-
handleChatModelStart?(llm: Serialized, messages: BaseMessage[][], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string):
|
|
267
|
+
handleChatModelStart?(llm: Serialized, messages: BaseMessage[][], runId: string, parentRunId?: string, extraParams?: Record<string, unknown>, tags?: string[], metadata?: Record<string, unknown>, runName?: string):
|
|
268
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
248
269
|
Promise<any> | any;
|
|
249
270
|
/**
|
|
250
271
|
* Called at the start of a Chain run, with the chain name and inputs
|
|
251
272
|
* and the run ID.
|
|
252
273
|
*/
|
|
253
|
-
handleChainStart?(chain: Serialized, inputs: ChainValues, runId: string, runType?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string, parentRunId?: string, extra?: Record<string, unknown>):
|
|
274
|
+
handleChainStart?(chain: Serialized, inputs: ChainValues, runId: string, runType?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string, parentRunId?: string, extra?: Record<string, unknown>):
|
|
275
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
254
276
|
Promise<any> | any;
|
|
255
277
|
/**
|
|
256
278
|
* Called if a Chain run encounters an error
|
|
257
279
|
*/
|
|
258
280
|
handleChainError?(err: Error, runId: string, parentRunId?: string, tags?: string[], kwargs?: {
|
|
259
281
|
inputs?: Record<string, unknown>;
|
|
260
|
-
}):
|
|
282
|
+
}):
|
|
283
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
261
284
|
Promise<any> | any;
|
|
262
285
|
/**
|
|
263
286
|
* Called at the end of a Chain run, with the outputs and the run ID.
|
|
264
287
|
*/
|
|
265
288
|
handleChainEnd?(outputs: ChainValues, runId: string, parentRunId?: string, tags?: string[], kwargs?: {
|
|
266
289
|
inputs?: Record<string, unknown>;
|
|
267
|
-
}):
|
|
290
|
+
}):
|
|
291
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
268
292
|
Promise<any> | any;
|
|
269
293
|
/**
|
|
270
294
|
* Called at the start of a Tool run, with the tool name and input
|
|
271
295
|
* and the run ID.
|
|
272
296
|
*/
|
|
273
|
-
handleToolStart?(tool: Serialized, input: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string, toolCallId?: string):
|
|
297
|
+
handleToolStart?(tool: Serialized, input: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, runName?: string, toolCallId?: string):
|
|
298
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
274
299
|
Promise<any> | any;
|
|
275
300
|
/**
|
|
276
301
|
* Called if a Tool run encounters an error
|
|
277
302
|
*/
|
|
278
|
-
handleToolError?(err: Error, runId: string, parentRunId?: string, tags?: string[]):
|
|
303
|
+
handleToolError?(err: Error, runId: string, parentRunId?: string, tags?: string[]):
|
|
304
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
279
305
|
Promise<any> | any;
|
|
280
306
|
/**
|
|
281
307
|
* Called at the end of a Tool run, with the tool output and the run ID.
|
|
282
308
|
*/
|
|
283
|
-
handleToolEnd?(output: any, runId: string, parentRunId?: string, tags?: string[]):
|
|
309
|
+
handleToolEnd?(output: any, runId: string, parentRunId?: string, tags?: string[]):
|
|
310
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
284
311
|
Promise<any> | any;
|
|
285
312
|
/**
|
|
286
313
|
* Called when a streaming tool yields a partial value. Tools that are async generators
|
|
287
314
|
* invoke this once per yielded value.
|
|
288
315
|
*/
|
|
289
|
-
handleToolEvent?(chunk: unknown, runId: string, parentRunId?: string, tags?: string[]):
|
|
316
|
+
handleToolEvent?(chunk: unknown, runId: string, parentRunId?: string, tags?: string[]):
|
|
317
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
290
318
|
Promise<any> | any;
|
|
291
319
|
handleText?(text: string, runId: string, parentRunId?: string, tags?: string[]): Promise<void> | void;
|
|
292
320
|
/**
|
|
@@ -299,13 +327,17 @@ declare abstract class BaseCallbackHandler extends BaseCallbackHandlerMethodsCla
|
|
|
299
327
|
* with the final output and the run ID.
|
|
300
328
|
*/
|
|
301
329
|
handleAgentEnd?(action: AgentFinish, runId: string, parentRunId?: string, tags?: string[]): Promise<void> | void;
|
|
302
|
-
handleRetrieverStart?(retriever: Serialized, query: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, name?: string):
|
|
330
|
+
handleRetrieverStart?(retriever: Serialized, query: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>, name?: string):
|
|
331
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
303
332
|
Promise<any> | any;
|
|
304
|
-
handleRetrieverEnd?(documents: DocumentInterface[], runId: string, parentRunId?: string, tags?: string[]):
|
|
333
|
+
handleRetrieverEnd?(documents: DocumentInterface[], runId: string, parentRunId?: string, tags?: string[]):
|
|
334
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
305
335
|
Promise<any> | any;
|
|
306
|
-
handleRetrieverError?(err: Error, runId: string, parentRunId?: string, tags?: string[]):
|
|
336
|
+
handleRetrieverError?(err: Error, runId: string, parentRunId?: string, tags?: string[]):
|
|
337
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
307
338
|
Promise<any> | any;
|
|
308
|
-
handleCustomEvent?(eventName: string, data: any, runId: string, tags?: string[], metadata?: Record<string, any>):
|
|
339
|
+
handleCustomEvent?(eventName: string, data: any, runId: string, tags?: string[], metadata?: Record<string, any>):
|
|
340
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
309
341
|
Promise<any> | any;
|
|
310
342
|
lc_serializable: boolean;
|
|
311
343
|
get lc_namespace(): ["langchain_core", "callbacks", string];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.cts","names":[],"sources":["../../src/callbacks/base.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.d.cts","names":[],"sources":["../../src/callbacks/base.ts"],"mappings":";;;;;;;;;KAqBK;;;;;;UAOY;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;UAOe;EACf;EACA;;KAIU;EACV,QAAQ,kBAAkB;;;;;;;uBAQb;;;;;EAKb,gBACE,KAAK,YACL,mBACA,eACA,sBACA,cAAc,yBACd,iBACA,WAAW,yBACX;;EAEA;;;;EAKF,mBACE,eAOA;;;;;;;EAAA,KAAK,iBACL,eACA,sBACA,iBACA,SAAS;;EAET;;;;EAKF,4BACE,OAAO,sBACP,eACA,sBACA;;EAEA;;;;EAKF,gBACE,KAAK,OACL,eACA,sBACA,iBACA,cAAc;;EAEd;;;;EAKF,cACE,QAAQ,WACR,eACA,sBACA,iBACA,cAAc;;EAEd;;;;;EAMF,sBACE,KAAK,YACL,UAAU,iBACV,eACA,sBACA,cAAc,yBACd,iBACA,WAAW,yBACX;;EAEA;;;;;EAMF,kBACE,OAAO,YACP,QAAQ,aACR,eACA,kBACA,iBACA,WAAW,yBACX,kBACA,sBACA,QAAQ;;EAER;;;;EAKF,kBACE,KAAK,OACL,eACA,sBACA,iBACA;IAAW,SAAS;;;EAEpB;;;;EAKF,gBACE,SAAS,aACT,eACA,sBACA,iBACA;IAAW,SAAS;;;EAEpB;;;;;EAMF,iBACE,MAAM,YACN,eACA,eACA,sBACA,iBACA,WAAW,yBACX,kBACA;;EAEA;;;;EAKF,iBACE,KAAK,OACL,eACA,sBACA;;EAEA;;;;EAKF,eAEE,aACA,eACA,sBACA;;EAEA;;;;;EAMF,iBACE,gBACA,eACA,sBACA;;EAEA;EAEF,YACE,cACA,eACA,sBACA,kBACC;;;;;EAMH,mBACE,QAAQ,aACR,eACA,sBACA,kBACC;;;;;EAMH,gBACE,QAAQ,aACR,eACA,sBACA,kBACC;EAEH,sBACE,WAAW,YACX,eACA,eACA,sBACA,iBACA,WAAW,yBACX;;EAEA;EAEF,oBACE,WAAW,qBACX,eACA,sBACA;;EAEA;EAEF,sBACE,KAAK,OACL,eACA,sBACA;;EAEA;EAEF,mBACE,mBAEA,WACA,eACA,iBAEA,WAAW;;EAEX;;;;;;;;;;;KAYQ,yBAAyB;;;;;;UAOpB;WACN;;iBAGK,gCAAgC,GAAG;;;;;UAQlC;WACN;;iBAGK,4CACd,GAAG;;;;;;;uBAciB,4BACZ,2CACG,0BAA0B;EAErC;MAEI;MAIA;KAAiB;;MAIjB;KAAoB;;MAIpB;KAAiB;;MAIjB;;;;;;;SAUG;;;;MAOH;EAOJ,WAAW;WAEF;EAET;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA;EAGA,YAAY,QAAQ;EAgBpB,QAAQ;EAMR,UAAU;EAIV,wBAAwB;SAIjB,YAAY,SAAS;;;;;;IA/XrB,gBAAA,KAAA,YAAU,mBACE,eACJ,sBACO,cACN,yBAAuB,iBACtB,WACJ,yBAAuB;;IAGlC;;;;IAMO,mBAAA,eAAM,KAOR,iBAAe,eACP,sBACO,iBACL,SACN;;IAET;;;;IAMO,4BAAA,OAAA,sBAAoB,eACd,sBACO;;IAGpB;;;;IAMK,gBAAA,KAAA,OAAK,eACG,sBACO,iBACL,cACD;;IAEd;;;;IAMQ,cAAA,QAAA,WAAS,eACJ,sBACO,iBACL,cACD;;IAEd;;;;;IAOK,sBAAA,KAAA,YAAU,UACL,iBAAe,eACZ,sBACO,cACN,yBAAuB,iBACtB,WACJ,yBAAuB;;IAGlC;;;;;IAOO,kBAAA,OAAA,YAAU,QACT,aAAW,eACN,kBACG,iBACD,WACJ,yBAAuB,kBAClB,sBACI,QACZ;;IAER;;;;IAMK,kBAAA,KAAA,OAAK,eACG,sBACO,iBACL;MACJ,SAAS;;;IAEpB;;;;IAMS,gBAAA,SAAA,aAAW,eACP,sBACO,iBACL;MACJ,SAAS;;;IAEpB;;;;;IAOM,iBAAA,MAAA,YAAU,eACH,eACA,sBACO,iBACL,WACJ,yBAAuB,kBAClB;;IAGhB;;;;IAMK,iBAAA,KAAA,OAAK,eACG,sBACO;;IAGpB;;;;IAOQ,eAAA,aAAG,eACE,sBACO;;IAGpB;;;;;IAOO,iBAAA,gBAAO,eACD,sBACO;;IAGpB;IAGM,YAAA,cAAM,eACC,sBACO,kBAEnB;;;;;IAOO,mBAAA,QAAA,aAAW,eACN,sBACO,kBAEnB;;;;;IAOO,gBAAA,QAAA,aAAW,eACN,sBACO,kBAEnB;IAGU,sBAAA,WAAA,YAAU,eACR,eACA,sBACO,iBACL,WACJ,yBAAuB;;IAGlC;IAGW,oBAAA,WAAA,qBAAmB,eACjB,sBACO;;IAGpB;IAGK,sBAAA,KAAA,OAAK,eACG,sBACO;;IAGpB;IAGW,mBAAA,mBAAM,WAER,eACI,iBACE,WAEJ;;IAEX;;QAwDkB;QAIF;OAAG;;QAIA;OAAG;;QAIN;OAAG;;QAIO;;;;QAiBf;IAOF,WAAA;;;;;;;;IAmCH,QAAA;IAME,UAAA;IAIc,wBAAA;;;cAiBb,wBAAqB"}
|