@langchain/core 1.2.13 → 1.2.16
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 +19 -0
- package/dist/agents.d.cts +3 -4
- package/dist/agents.d.cts.map +1 -1
- package/dist/agents.d.ts +3 -4
- package/dist/agents.d.ts.map +1 -1
- package/dist/caches/index.d.cts +5 -6
- package/dist/caches/index.d.cts.map +1 -1
- package/dist/caches/index.d.ts +5 -6
- package/dist/caches/index.d.ts.map +1 -1
- package/dist/callbacks/base.d.cts +10 -11
- package/dist/callbacks/base.d.cts.map +1 -1
- package/dist/callbacks/base.d.ts +10 -11
- package/dist/callbacks/base.d.ts.map +1 -1
- package/dist/callbacks/dispatch/index.d.cts +1 -2
- package/dist/callbacks/dispatch/index.d.cts.map +1 -1
- package/dist/callbacks/dispatch/index.d.ts +1 -2
- package/dist/callbacks/dispatch/index.d.ts.map +1 -1
- package/dist/callbacks/dispatch/web.d.cts +1 -2
- package/dist/callbacks/dispatch/web.d.cts.map +1 -1
- package/dist/callbacks/dispatch/web.d.ts +1 -2
- package/dist/callbacks/dispatch/web.d.ts.map +1 -1
- package/dist/callbacks/manager.cjs +1 -1
- package/dist/callbacks/manager.cjs.map +1 -1
- package/dist/callbacks/manager.d.cts +12 -13
- package/dist/callbacks/manager.d.cts.map +1 -1
- package/dist/callbacks/manager.d.ts +12 -13
- package/dist/callbacks/manager.d.ts.map +1 -1
- package/dist/callbacks/manager.js +1 -1
- package/dist/callbacks/manager.js.map +1 -1
- package/dist/chat_history.d.cts +3 -4
- package/dist/chat_history.d.cts.map +1 -1
- package/dist/chat_history.d.ts +3 -4
- package/dist/chat_history.d.ts.map +1 -1
- package/dist/context.d.cts +2 -2
- package/dist/context.d.cts.map +1 -1
- package/dist/context.d.ts +2 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/document_loaders/base.d.cts +2 -3
- package/dist/document_loaders/base.d.cts.map +1 -1
- package/dist/document_loaders/base.d.ts +2 -3
- package/dist/document_loaders/base.d.ts.map +1 -1
- package/dist/document_loaders/langsmith.d.cts +2 -3
- package/dist/document_loaders/langsmith.d.cts.map +1 -1
- package/dist/document_loaders/langsmith.d.ts +2 -3
- package/dist/document_loaders/langsmith.d.ts.map +1 -1
- package/dist/documents/document.d.cts +3 -4
- package/dist/documents/document.d.cts.map +1 -1
- package/dist/documents/document.d.ts +3 -4
- package/dist/documents/document.d.ts.map +1 -1
- package/dist/documents/transformers.d.cts +2 -3
- package/dist/documents/transformers.d.cts.map +1 -1
- package/dist/documents/transformers.d.ts +2 -3
- package/dist/documents/transformers.d.ts.map +1 -1
- package/dist/embeddings.d.cts +3 -4
- package/dist/embeddings.d.cts.map +1 -1
- package/dist/embeddings.d.ts +3 -4
- package/dist/embeddings.d.ts.map +1 -1
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.d.cts +13 -19
- package/dist/errors/index.d.cts.map +1 -1
- package/dist/errors/index.d.ts +13 -19
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js.map +1 -1
- package/dist/example_selectors/base.d.cts +1 -2
- package/dist/example_selectors/base.d.cts.map +1 -1
- package/dist/example_selectors/base.d.ts +1 -2
- package/dist/example_selectors/base.d.ts.map +1 -1
- package/dist/example_selectors/conditional.d.cts +5 -6
- package/dist/example_selectors/conditional.d.cts.map +1 -1
- package/dist/example_selectors/conditional.d.ts +5 -6
- package/dist/example_selectors/conditional.d.ts.map +1 -1
- package/dist/example_selectors/length_based.d.cts +2 -3
- package/dist/example_selectors/length_based.d.cts.map +1 -1
- package/dist/example_selectors/length_based.d.ts +2 -3
- package/dist/example_selectors/length_based.d.ts.map +1 -1
- package/dist/example_selectors/semantic_similarity.d.cts +2 -3
- package/dist/example_selectors/semantic_similarity.d.cts.map +1 -1
- package/dist/example_selectors/semantic_similarity.d.ts +2 -3
- package/dist/example_selectors/semantic_similarity.d.ts.map +1 -1
- package/dist/indexing/base.d.cts +9 -10
- package/dist/indexing/base.d.cts.map +1 -1
- package/dist/indexing/base.d.ts +9 -10
- package/dist/indexing/base.d.ts.map +1 -1
- package/dist/indexing/record_manager.d.cts +5 -6
- package/dist/indexing/record_manager.d.cts.map +1 -1
- package/dist/indexing/record_manager.d.ts +5 -6
- package/dist/indexing/record_manager.d.ts.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 +24 -25
- package/dist/language_models/base.d.cts.map +1 -1
- package/dist/language_models/base.d.ts +24 -25
- 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.d.cts +9 -10
- package/dist/language_models/chat_models.d.cts.map +1 -1
- package/dist/language_models/chat_models.d.ts +9 -10
- package/dist/language_models/chat_models.d.ts.map +1 -1
- package/dist/language_models/compat.d.cts +2 -3
- package/dist/language_models/compat.d.cts.map +1 -1
- package/dist/language_models/compat.d.ts +2 -3
- package/dist/language_models/compat.d.ts.map +1 -1
- package/dist/language_models/event.d.cts +15 -16
- package/dist/language_models/event.d.cts.map +1 -1
- package/dist/language_models/event.d.ts +15 -16
- package/dist/language_models/event.d.ts.map +1 -1
- package/dist/language_models/llms.d.cts +5 -6
- package/dist/language_models/llms.d.cts.map +1 -1
- package/dist/language_models/llms.d.ts +5 -6
- package/dist/language_models/llms.d.ts.map +1 -1
- package/dist/language_models/openai_completions_stream.d.cts +8 -9
- package/dist/language_models/openai_completions_stream.d.cts.map +1 -1
- package/dist/language_models/openai_completions_stream.d.ts +8 -9
- package/dist/language_models/openai_completions_stream.d.ts.map +1 -1
- package/dist/language_models/profile.cjs.map +1 -1
- package/dist/language_models/profile.d.cts +16 -2
- package/dist/language_models/profile.d.cts.map +1 -1
- package/dist/language_models/profile.d.ts +16 -2
- package/dist/language_models/profile.d.ts.map +1 -1
- package/dist/language_models/profile.js.map +1 -1
- package/dist/language_models/stream.d.cts +5 -6
- package/dist/language_models/stream.d.cts.map +1 -1
- package/dist/language_models/stream.d.ts +5 -6
- package/dist/language_models/stream.d.ts.map +1 -1
- package/dist/language_models/structured_output.d.cts +3 -4
- package/dist/language_models/structured_output.d.cts.map +1 -1
- package/dist/language_models/structured_output.d.ts +3 -4
- package/dist/language_models/structured_output.d.ts.map +1 -1
- package/dist/load/import_type.d.cts +2 -3
- package/dist/load/import_type.d.cts.map +1 -1
- package/dist/load/import_type.d.ts +2 -3
- package/dist/load/import_type.d.ts.map +1 -1
- package/dist/load/index.d.cts +2 -3
- package/dist/load/index.d.cts.map +1 -1
- package/dist/load/index.d.ts +2 -3
- package/dist/load/index.d.ts.map +1 -1
- package/dist/load/map_keys.d.cts +1 -2
- package/dist/load/map_keys.d.cts.map +1 -1
- package/dist/load/map_keys.d.ts +1 -2
- package/dist/load/map_keys.d.ts.map +1 -1
- package/dist/load/serializable.d.cts +9 -10
- package/dist/load/serializable.d.cts.map +1 -1
- package/dist/load/serializable.d.ts +9 -10
- package/dist/load/serializable.d.ts.map +1 -1
- package/dist/memory.d.cts +7 -8
- package/dist/memory.d.cts.map +1 -1
- package/dist/memory.d.ts +7 -8
- package/dist/memory.d.ts.map +1 -1
- package/dist/messages/ai.d.cts +6 -7
- package/dist/messages/ai.d.cts.map +1 -1
- package/dist/messages/ai.d.ts +6 -7
- package/dist/messages/ai.d.ts.map +1 -1
- package/dist/messages/base.d.cts +23 -24
- package/dist/messages/base.d.cts.map +1 -1
- package/dist/messages/base.d.ts +23 -24
- package/dist/messages/base.d.ts.map +1 -1
- package/dist/messages/chat.d.cts +5 -6
- package/dist/messages/chat.d.cts.map +1 -1
- package/dist/messages/chat.d.ts +5 -6
- package/dist/messages/chat.d.ts.map +1 -1
- package/dist/messages/content/base.d.cts +1 -2
- package/dist/messages/content/base.d.cts.map +1 -1
- package/dist/messages/content/base.d.ts +1 -2
- package/dist/messages/content/base.d.ts.map +1 -1
- package/dist/messages/content/data.d.cts +18 -19
- package/dist/messages/content/data.d.cts.map +1 -1
- package/dist/messages/content/data.d.ts +18 -19
- package/dist/messages/content/data.d.ts.map +1 -1
- package/dist/messages/content/index.d.cts +4 -5
- package/dist/messages/content/index.d.cts.map +1 -1
- package/dist/messages/content/index.d.ts +4 -5
- package/dist/messages/content/index.d.ts.map +1 -1
- package/dist/messages/content/multimodal.d.cts +2 -3
- package/dist/messages/content/multimodal.d.cts.map +1 -1
- package/dist/messages/content/multimodal.d.ts +2 -3
- package/dist/messages/content/multimodal.d.ts.map +1 -1
- package/dist/messages/content/tools.d.cts +2 -3
- package/dist/messages/content/tools.d.cts.map +1 -1
- package/dist/messages/content/tools.d.ts +2 -3
- package/dist/messages/content/tools.d.ts.map +1 -1
- package/dist/messages/format.d.cts +1 -2
- package/dist/messages/format.d.cts.map +1 -1
- package/dist/messages/format.d.ts +1 -2
- package/dist/messages/format.d.ts.map +1 -1
- package/dist/messages/function.d.cts +5 -6
- package/dist/messages/function.d.cts.map +1 -1
- package/dist/messages/function.d.ts +5 -6
- package/dist/messages/function.d.ts.map +1 -1
- package/dist/messages/human.d.cts +5 -6
- package/dist/messages/human.d.cts.map +1 -1
- package/dist/messages/human.d.ts +5 -6
- package/dist/messages/human.d.ts.map +1 -1
- package/dist/messages/message.d.cts +20 -21
- package/dist/messages/message.d.cts.map +1 -1
- package/dist/messages/message.d.ts +20 -21
- package/dist/messages/message.d.ts.map +1 -1
- package/dist/messages/metadata.d.cts +7 -8
- package/dist/messages/metadata.d.cts.map +1 -1
- package/dist/messages/metadata.d.ts +7 -8
- package/dist/messages/metadata.d.ts.map +1 -1
- package/dist/messages/modifier.d.cts +2 -3
- package/dist/messages/modifier.d.cts.map +1 -1
- package/dist/messages/modifier.d.ts +2 -3
- package/dist/messages/modifier.d.ts.map +1 -1
- package/dist/messages/system.d.cts +5 -6
- package/dist/messages/system.d.cts.map +1 -1
- package/dist/messages/system.d.ts +5 -6
- package/dist/messages/system.d.ts.map +1 -1
- package/dist/messages/tool.d.cts +11 -12
- package/dist/messages/tool.d.cts.map +1 -1
- package/dist/messages/tool.d.ts +11 -12
- package/dist/messages/tool.d.ts.map +1 -1
- package/dist/messages/transformers.d.cts +12 -13
- package/dist/messages/transformers.d.cts.map +1 -1
- package/dist/messages/transformers.d.ts +12 -13
- package/dist/messages/transformers.d.ts.map +1 -1
- package/dist/messages/utils.d.cts +13 -14
- package/dist/messages/utils.d.cts.map +1 -1
- package/dist/messages/utils.d.ts +13 -14
- package/dist/messages/utils.d.ts.map +1 -1
- package/dist/output_parsers/base.d.cts +4 -5
- package/dist/output_parsers/base.d.cts.map +1 -1
- package/dist/output_parsers/base.d.ts +4 -5
- package/dist/output_parsers/base.d.ts.map +1 -1
- package/dist/output_parsers/bytes.d.cts +1 -2
- package/dist/output_parsers/bytes.d.cts.map +1 -1
- package/dist/output_parsers/bytes.d.ts +1 -2
- package/dist/output_parsers/bytes.d.ts.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/list.d.cts +5 -6
- package/dist/output_parsers/list.d.cts.map +1 -1
- package/dist/output_parsers/list.d.ts +5 -6
- package/dist/output_parsers/list.d.ts.map +1 -1
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts +4 -5
- 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 +4 -5
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts.map +1 -1
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts +12 -13
- 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 +12 -13
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts.map +1 -1
- package/dist/output_parsers/standard_schema.d.cts +1 -2
- package/dist/output_parsers/standard_schema.d.cts.map +1 -1
- package/dist/output_parsers/standard_schema.d.ts +1 -2
- package/dist/output_parsers/standard_schema.d.ts.map +1 -1
- package/dist/output_parsers/string.d.cts +1 -2
- package/dist/output_parsers/string.d.cts.map +1 -1
- package/dist/output_parsers/string.d.ts +1 -2
- package/dist/output_parsers/string.d.ts.map +1 -1
- package/dist/output_parsers/structured.d.cts +6 -7
- package/dist/output_parsers/structured.d.cts.map +1 -1
- package/dist/output_parsers/structured.d.ts +6 -7
- package/dist/output_parsers/structured.d.ts.map +1 -1
- package/dist/output_parsers/transform.d.cts +3 -4
- package/dist/output_parsers/transform.d.cts.map +1 -1
- package/dist/output_parsers/transform.d.ts +3 -4
- package/dist/output_parsers/transform.d.ts.map +1 -1
- package/dist/output_parsers/xml.d.cts +6 -7
- package/dist/output_parsers/xml.d.cts.map +1 -1
- package/dist/output_parsers/xml.d.ts +6 -7
- package/dist/output_parsers/xml.d.ts.map +1 -1
- package/dist/outputs.d.cts +9 -10
- package/dist/outputs.d.cts.map +1 -1
- package/dist/outputs.d.ts +9 -10
- package/dist/outputs.d.ts.map +1 -1
- package/dist/prompt_values.d.cts +10 -11
- package/dist/prompt_values.d.cts.map +1 -1
- package/dist/prompt_values.d.ts +10 -11
- package/dist/prompt_values.d.ts.map +1 -1
- package/dist/prompts/base.d.cts +4 -5
- package/dist/prompts/base.d.cts.map +1 -1
- package/dist/prompts/base.d.ts +4 -5
- package/dist/prompts/base.d.ts.map +1 -1
- package/dist/prompts/chat.d.cts +14 -15
- package/dist/prompts/chat.d.cts.map +1 -1
- package/dist/prompts/chat.d.ts +14 -15
- package/dist/prompts/chat.d.ts.map +1 -1
- package/dist/prompts/dict.d.cts +1 -2
- package/dist/prompts/dict.d.cts.map +1 -1
- package/dist/prompts/dict.d.ts +1 -2
- package/dist/prompts/dict.d.ts.map +1 -1
- package/dist/prompts/few_shot.d.cts +4 -5
- package/dist/prompts/few_shot.d.cts.map +1 -1
- package/dist/prompts/few_shot.d.ts +4 -5
- package/dist/prompts/few_shot.d.ts.map +1 -1
- package/dist/prompts/image.d.cts +2 -3
- package/dist/prompts/image.d.cts.map +1 -1
- package/dist/prompts/image.d.ts +2 -3
- package/dist/prompts/image.d.ts.map +1 -1
- package/dist/prompts/pipeline.d.cts +3 -4
- package/dist/prompts/pipeline.d.cts.map +1 -1
- package/dist/prompts/pipeline.d.ts +3 -4
- package/dist/prompts/pipeline.d.ts.map +1 -1
- package/dist/prompts/prompt.d.cts +4 -5
- package/dist/prompts/prompt.d.cts.map +1 -1
- package/dist/prompts/prompt.d.ts +4 -5
- package/dist/prompts/prompt.d.ts.map +1 -1
- package/dist/prompts/serde.d.cts +3 -4
- package/dist/prompts/serde.d.cts.map +1 -1
- package/dist/prompts/serde.d.ts +3 -4
- package/dist/prompts/serde.d.ts.map +1 -1
- package/dist/prompts/string.d.cts +1 -2
- package/dist/prompts/string.d.cts.map +1 -1
- package/dist/prompts/string.d.ts +1 -2
- package/dist/prompts/string.d.ts.map +1 -1
- package/dist/prompts/structured.d.cts +2 -3
- package/dist/prompts/structured.d.cts.map +1 -1
- package/dist/prompts/structured.d.ts +2 -3
- package/dist/prompts/structured.d.ts.map +1 -1
- package/dist/prompts/template.d.cts +12 -13
- package/dist/prompts/template.d.cts.map +1 -1
- package/dist/prompts/template.d.ts +12 -13
- package/dist/prompts/template.d.ts.map +1 -1
- package/dist/retrievers/document_compressors/index.d.cts +1 -2
- package/dist/retrievers/document_compressors/index.d.cts.map +1 -1
- package/dist/retrievers/document_compressors/index.d.ts +1 -2
- package/dist/retrievers/document_compressors/index.d.ts.map +1 -1
- package/dist/retrievers/index.d.cts +3 -4
- package/dist/retrievers/index.d.cts.map +1 -1
- package/dist/retrievers/index.d.ts +3 -4
- package/dist/retrievers/index.d.ts.map +1 -1
- package/dist/runnables/base.d.cts +23 -23
- package/dist/runnables/base.d.cts.map +1 -1
- package/dist/runnables/base.d.ts +23 -23
- package/dist/runnables/base.d.ts.map +1 -1
- package/dist/runnables/branch.d.cts +3 -4
- package/dist/runnables/branch.d.cts.map +1 -1
- package/dist/runnables/branch.d.ts +3 -4
- package/dist/runnables/branch.d.ts.map +1 -1
- package/dist/runnables/config.d.cts +6 -6
- package/dist/runnables/config.d.cts.map +1 -1
- package/dist/runnables/config.d.ts +6 -6
- package/dist/runnables/config.d.ts.map +1 -1
- package/dist/runnables/graph.d.cts +2 -2
- package/dist/runnables/graph.d.cts.map +1 -1
- package/dist/runnables/graph.d.ts +2 -2
- package/dist/runnables/graph.d.ts.map +1 -1
- package/dist/runnables/history.d.cts +2 -3
- package/dist/runnables/history.d.cts.map +1 -1
- package/dist/runnables/history.d.ts +2 -3
- package/dist/runnables/history.d.ts.map +1 -1
- package/dist/runnables/passthrough.d.cts +1 -2
- package/dist/runnables/passthrough.d.cts.map +1 -1
- package/dist/runnables/passthrough.d.ts +1 -2
- package/dist/runnables/passthrough.d.ts.map +1 -1
- package/dist/runnables/router.d.cts +2 -3
- package/dist/runnables/router.d.cts.map +1 -1
- package/dist/runnables/router.d.ts +2 -3
- package/dist/runnables/router.d.ts.map +1 -1
- package/dist/runnables/types.d.cts +6 -7
- package/dist/runnables/types.d.cts.map +1 -1
- package/dist/runnables/types.d.ts +6 -7
- package/dist/runnables/types.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/context.d.cts +4 -5
- package/dist/singletons/async_local_storage/context.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/context.d.ts +4 -5
- package/dist/singletons/async_local_storage/context.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/globals.d.cts +2 -3
- package/dist/singletons/async_local_storage/globals.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/globals.d.ts +2 -3
- package/dist/singletons/async_local_storage/globals.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/index.d.cts +2 -2
- package/dist/singletons/async_local_storage/index.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/index.d.ts +2 -2
- package/dist/singletons/async_local_storage/index.d.ts.map +1 -1
- package/dist/singletons/callbacks.d.cts +2 -3
- package/dist/singletons/callbacks.d.cts.map +1 -1
- package/dist/singletons/callbacks.d.ts +2 -3
- package/dist/singletons/callbacks.d.ts.map +1 -1
- package/dist/stores.d.cts +2 -3
- package/dist/stores.d.cts.map +1 -1
- package/dist/stores.d.ts +2 -3
- package/dist/stores.d.ts.map +1 -1
- package/dist/structured_query/base.d.cts +3 -4
- package/dist/structured_query/base.d.cts.map +1 -1
- package/dist/structured_query/base.d.ts +3 -4
- package/dist/structured_query/base.d.ts.map +1 -1
- package/dist/structured_query/functional.d.cts +2 -3
- package/dist/structured_query/functional.d.cts.map +1 -1
- package/dist/structured_query/functional.d.ts +2 -3
- package/dist/structured_query/functional.d.ts.map +1 -1
- package/dist/structured_query/ir.d.cts +23 -24
- package/dist/structured_query/ir.d.cts.map +1 -1
- package/dist/structured_query/ir.d.ts +23 -24
- package/dist/structured_query/ir.d.ts.map +1 -1
- package/dist/structured_query/utils.d.cts +7 -8
- package/dist/structured_query/utils.d.cts.map +1 -1
- package/dist/structured_query/utils.d.ts +7 -8
- package/dist/structured_query/utils.d.ts.map +1 -1
- package/dist/testing/fake_model_builder.d.cts +2 -3
- package/dist/testing/fake_model_builder.d.cts.map +1 -1
- package/dist/testing/fake_model_builder.d.ts +2 -3
- package/dist/testing/fake_model_builder.d.ts.map +1 -1
- package/dist/testing/index.d.cts +1 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/matchers.d.cts +12 -13
- package/dist/testing/matchers.d.cts.map +1 -1
- package/dist/testing/matchers.d.ts +12 -13
- package/dist/testing/matchers.d.ts.map +1 -1
- package/dist/testing/vitest-expect.d.cts +8 -0
- package/dist/testing/vitest-expect.d.cts.map +1 -0
- package/dist/testing/vitest-expect.d.ts +8 -0
- package/dist/testing/vitest-expect.d.ts.map +1 -0
- package/dist/tools/index.d.cts +21 -21
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +21 -21
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/types.d.cts +25 -26
- package/dist/tools/types.d.cts.map +1 -1
- package/dist/tools/types.d.ts +25 -26
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/utils.d.cts +1 -2
- package/dist/tools/utils.d.cts.map +1 -1
- package/dist/tools/utils.d.ts +1 -2
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tracers/base.cjs +7 -4
- package/dist/tracers/base.cjs.map +1 -1
- package/dist/tracers/base.d.cts +7 -8
- package/dist/tracers/base.d.cts.map +1 -1
- package/dist/tracers/base.d.ts +7 -8
- package/dist/tracers/base.d.ts.map +1 -1
- package/dist/tracers/base.js +7 -4
- package/dist/tracers/base.js.map +1 -1
- package/dist/tracers/console.d.cts +1 -2
- package/dist/tracers/console.d.cts.map +1 -1
- package/dist/tracers/console.d.ts +1 -2
- package/dist/tracers/console.d.ts.map +1 -1
- package/dist/tracers/event_stream.d.cts +3 -4
- package/dist/tracers/event_stream.d.cts.map +1 -1
- package/dist/tracers/event_stream.d.ts +3 -4
- package/dist/tracers/event_stream.d.ts.map +1 -1
- package/dist/tracers/log_stream.d.cts +9 -9
- package/dist/tracers/log_stream.d.cts.map +1 -1
- package/dist/tracers/log_stream.d.ts +9 -9
- package/dist/tracers/log_stream.d.ts.map +1 -1
- package/dist/tracers/run_collector.d.cts +1 -2
- package/dist/tracers/run_collector.d.cts.map +1 -1
- package/dist/tracers/run_collector.d.ts +1 -2
- package/dist/tracers/run_collector.d.ts.map +1 -1
- package/dist/tracers/tracer_langchain.d.cts +6 -7
- package/dist/tracers/tracer_langchain.d.cts.map +1 -1
- package/dist/tracers/tracer_langchain.d.ts +6 -7
- package/dist/tracers/tracer_langchain.d.ts.map +1 -1
- package/dist/types/_internal.d.cts +1 -2
- package/dist/types/_internal.d.cts.map +1 -1
- package/dist/types/_internal.d.ts +1 -2
- package/dist/types/_internal.d.ts.map +1 -1
- package/dist/types/type-utils.d.cts +2 -3
- package/dist/types/type-utils.d.cts.map +1 -1
- package/dist/types/type-utils.d.ts +2 -3
- package/dist/types/type-utils.d.ts.map +1 -1
- package/dist/utils/async_caller.d.cts +6 -7
- package/dist/utils/async_caller.d.cts.map +1 -1
- package/dist/utils/async_caller.d.ts +6 -7
- package/dist/utils/async_caller.d.ts.map +1 -1
- package/dist/utils/chunk_array.d.cts +1 -2
- package/dist/utils/chunk_array.d.cts.map +1 -1
- package/dist/utils/chunk_array.d.ts +1 -2
- package/dist/utils/chunk_array.d.ts.map +1 -1
- package/dist/utils/context.d.cts +1 -2
- package/dist/utils/context.d.cts.map +1 -1
- package/dist/utils/context.d.ts +1 -2
- package/dist/utils/context.d.ts.map +1 -1
- package/dist/utils/env.d.cts +9 -10
- package/dist/utils/env.d.cts.map +1 -1
- package/dist/utils/env.d.ts +9 -10
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/event_source_parse.d.cts +6 -7
- package/dist/utils/event_source_parse.d.cts.map +1 -1
- package/dist/utils/event_source_parse.d.ts +6 -7
- package/dist/utils/event_source_parse.d.ts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.d.cts +13 -14
- package/dist/utils/fast-json-patch/src/core.d.cts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.d.ts +13 -14
- package/dist/utils/fast-json-patch/src/core.d.ts.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.d.cts +1 -2
- package/dist/utils/fast-json-patch/src/duplex.d.cts.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.d.ts +1 -2
- package/dist/utils/fast-json-patch/src/duplex.d.ts.map +1 -1
- package/dist/utils/format.d.cts +2 -3
- package/dist/utils/format.d.cts.map +1 -1
- package/dist/utils/format.d.ts +2 -3
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/function_calling.d.cts +3 -3
- package/dist/utils/function_calling.d.cts.map +1 -1
- package/dist/utils/function_calling.d.ts +3 -3
- package/dist/utils/function_calling.d.ts.map +1 -1
- package/dist/utils/gateway.d.cts +4 -5
- package/dist/utils/gateway.d.cts.map +1 -1
- package/dist/utils/gateway.d.ts +4 -5
- package/dist/utils/gateway.d.ts.map +1 -1
- package/dist/utils/hash.d.cts +2 -2
- package/dist/utils/hash.d.cts.map +1 -1
- package/dist/utils/hash.d.ts +2 -2
- package/dist/utils/hash.d.ts.map +1 -1
- package/dist/utils/js-sha256/hash.cjs +2 -2
- package/dist/utils/js-sha256/hash.cjs.map +1 -1
- package/dist/utils/js-sha256/hash.d.cts +1 -2
- package/dist/utils/js-sha256/hash.d.cts.map +1 -1
- package/dist/utils/js-sha256/hash.d.ts +1 -2
- package/dist/utils/js-sha256/hash.d.ts.map +1 -1
- package/dist/utils/js-sha256/hash.js +2 -2
- package/dist/utils/js-sha256/hash.js.map +1 -1
- package/dist/utils/json.d.cts +2 -3
- package/dist/utils/json.d.cts.map +1 -1
- package/dist/utils/json.d.ts +2 -3
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json_schema.d.cts +4 -4
- package/dist/utils/json_schema.d.cts.map +1 -1
- package/dist/utils/json_schema.d.ts +4 -4
- package/dist/utils/json_schema.d.ts.map +1 -1
- package/dist/utils/math.d.cts +6 -7
- package/dist/utils/math.d.cts.map +1 -1
- package/dist/utils/math.d.ts +6 -7
- package/dist/utils/math.d.ts.map +1 -1
- package/dist/utils/ml-distance/similarities.d.cts +1 -2
- package/dist/utils/ml-distance/similarities.d.cts.map +1 -1
- package/dist/utils/ml-distance/similarities.d.ts +1 -2
- package/dist/utils/ml-distance/similarities.d.ts.map +1 -1
- package/dist/utils/namespace.cjs.map +1 -1
- package/dist/utils/namespace.d.cts +2 -3
- package/dist/utils/namespace.d.cts.map +1 -1
- package/dist/utils/namespace.d.ts +2 -3
- package/dist/utils/namespace.d.ts.map +1 -1
- package/dist/utils/namespace.js.map +1 -1
- package/dist/utils/signal.d.cts +1 -2
- package/dist/utils/signal.d.cts.map +1 -1
- package/dist/utils/signal.d.ts +1 -2
- package/dist/utils/signal.d.ts.map +1 -1
- package/dist/utils/ssrf.d.cts +6 -7
- package/dist/utils/ssrf.d.cts.map +1 -1
- package/dist/utils/ssrf.d.ts +6 -7
- package/dist/utils/ssrf.d.ts.map +1 -1
- package/dist/utils/standard_schema.d.cts +4 -5
- package/dist/utils/standard_schema.d.cts.map +1 -1
- package/dist/utils/standard_schema.d.ts +4 -5
- package/dist/utils/standard_schema.d.ts.map +1 -1
- package/dist/utils/stream.d.cts +6 -6
- package/dist/utils/stream.d.cts.map +1 -1
- package/dist/utils/stream.d.ts +6 -6
- package/dist/utils/stream.d.ts.map +1 -1
- package/dist/utils/testing/chat_models.d.cts +8 -9
- package/dist/utils/testing/chat_models.d.cts.map +1 -1
- package/dist/utils/testing/chat_models.d.ts +8 -9
- package/dist/utils/testing/chat_models.d.ts.map +1 -1
- package/dist/utils/testing/embeddings.d.cts +2 -3
- package/dist/utils/testing/embeddings.d.cts.map +1 -1
- package/dist/utils/testing/embeddings.d.ts +2 -3
- package/dist/utils/testing/embeddings.d.ts.map +1 -1
- package/dist/utils/testing/llms.d.cts +2 -3
- package/dist/utils/testing/llms.d.cts.map +1 -1
- package/dist/utils/testing/llms.d.ts +2 -3
- package/dist/utils/testing/llms.d.ts.map +1 -1
- package/dist/utils/testing/message_history.d.cts +3 -4
- package/dist/utils/testing/message_history.d.cts.map +1 -1
- package/dist/utils/testing/message_history.d.ts +3 -4
- package/dist/utils/testing/message_history.d.ts.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.d.cts +6 -7
- package/dist/utils/testing/openai_stream_fixtures.d.cts.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.d.ts +6 -7
- package/dist/utils/testing/openai_stream_fixtures.d.ts.map +1 -1
- package/dist/utils/testing/output_parsers.d.cts +1 -2
- package/dist/utils/testing/output_parsers.d.cts.map +1 -1
- package/dist/utils/testing/output_parsers.d.ts +1 -2
- package/dist/utils/testing/output_parsers.d.ts.map +1 -1
- package/dist/utils/testing/retrievers.d.cts +1 -2
- package/dist/utils/testing/retrievers.d.cts.map +1 -1
- package/dist/utils/testing/retrievers.d.ts +1 -2
- package/dist/utils/testing/retrievers.d.ts.map +1 -1
- package/dist/utils/testing/runnables.d.cts +1 -2
- package/dist/utils/testing/runnables.d.cts.map +1 -1
- package/dist/utils/testing/runnables.d.ts +1 -2
- package/dist/utils/testing/runnables.d.ts.map +1 -1
- package/dist/utils/testing/stream.d.cts +10 -11
- package/dist/utils/testing/stream.d.cts.map +1 -1
- package/dist/utils/testing/stream.d.ts +10 -11
- package/dist/utils/testing/stream.d.ts.map +1 -1
- package/dist/utils/testing/tools.d.cts +2 -3
- package/dist/utils/testing/tools.d.cts.map +1 -1
- package/dist/utils/testing/tools.d.ts +2 -3
- package/dist/utils/testing/tools.d.ts.map +1 -1
- package/dist/utils/testing/tracers.d.cts +1 -2
- package/dist/utils/testing/tracers.d.cts.map +1 -1
- package/dist/utils/testing/tracers.d.ts +1 -2
- package/dist/utils/testing/tracers.d.ts.map +1 -1
- package/dist/utils/testing/vectorstores.d.cts +2 -3
- package/dist/utils/testing/vectorstores.d.cts.map +1 -1
- package/dist/utils/testing/vectorstores.d.ts +2 -3
- package/dist/utils/testing/vectorstores.d.ts.map +1 -1
- package/dist/utils/tiktoken.d.cts +2 -3
- package/dist/utils/tiktoken.d.cts.map +1 -1
- package/dist/utils/tiktoken.d.ts +2 -3
- package/dist/utils/tiktoken.d.ts.map +1 -1
- package/dist/utils/types/index.d.cts +5 -5
- package/dist/utils/types/index.d.cts.map +1 -1
- package/dist/utils/types/index.d.ts +5 -5
- package/dist/utils/types/index.d.ts.map +1 -1
- package/dist/utils/types/zod.d.cts +62 -63
- package/dist/utils/types/zod.d.cts.map +1 -1
- package/dist/utils/types/zod.d.ts +62 -63
- package/dist/utils/types/zod.d.ts.map +1 -1
- package/dist/utils/uuid/index.d.cts +12 -12
- package/dist/utils/uuid/index.d.cts.map +1 -1
- package/dist/utils/uuid/index.d.ts +12 -12
- package/dist/utils/uuid/index.d.ts.map +1 -1
- package/dist/utils/uuid/types.d.cts +6 -7
- package/dist/utils/uuid/types.d.cts.map +1 -1
- package/dist/utils/uuid/types.d.ts +6 -7
- package/dist/utils/uuid/types.d.ts.map +1 -1
- package/dist/utils/uuid/v35.d.cts +2 -3
- package/dist/utils/uuid/v35.d.cts.map +1 -1
- package/dist/utils/uuid/v35.d.ts +2 -3
- package/dist/utils/uuid/v35.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/errorMessages.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/errorMessages.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.cts +2 -3
- package/dist/utils/zod-to-json-schema/parseTypes.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.ts +2 -3
- package/dist/utils/zod-to-json-schema/parseTypes.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/any.d.cts +1 -2
- 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 -2
- package/dist/utils/zod-to-json-schema/parsers/any.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/array.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/array.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/date.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/date.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/enum.d.cts +1 -2
- 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 -2
- package/dist/utils/zod-to-json-schema/parsers/enum.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/literal.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/literal.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/map.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts +1 -2
- 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 -2
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/never.d.cts +1 -2
- 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 -2
- package/dist/utils/zod-to-json-schema/parsers/never.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/null.d.cts +1 -2
- 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 -2
- package/dist/utils/zod-to-json-schema/parsers/null.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/number.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/number.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/object.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/object.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/record.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/set.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/string.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.cts +1 -2
- 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 -2
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/union.d.cts +2 -3
- 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 -3
- package/dist/utils/zod-to-json-schema/parsers/union.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.cts +1 -2
- 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 -2
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts.map +1 -1
- package/dist/vectorstores.d.cts +8 -9
- package/dist/vectorstores.d.cts.map +1 -1
- package/dist/vectorstores.d.ts +8 -9
- package/dist/vectorstores.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"similarities.d.ts","names":[],"sources":["../../../src/utils/ml-distance/similarities.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"similarities.d.ts","names":[],"sources":["../../../src/utils/ml-distance/similarities.ts"],"mappings":";;;;;;;wBAMgB,OAAO,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespace.cjs","names":[],"sources":["../../src/utils/namespace.ts"],"sourcesContent":["/* oxlint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * A constructor type that can be used as a base class for branding.\n */\ntype Constructor = abstract new (...args: any[]) => any;\n\n/**\n * The return type of `Namespace.brand()`: the original base class\n * intersected with a polymorphic `isInstance` type guard.\n */\
|
|
1
|
+
{"version":3,"file":"namespace.cjs","names":[],"sources":["../../src/utils/namespace.ts"],"sourcesContent":["/* oxlint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * A constructor type that can be used as a base class for branding.\n */\ntype Constructor = abstract new (...args: any[]) => any;\n\n/**\n * The return type of `Namespace.brand()`: the original base class\n * intersected with a polymorphic `isInstance` type guard.\n */\nexport type BrandedClass<TBase extends Constructor> = TBase & {\n isInstance: IsInstanceFn;\n};\n\n/**\n * A static `isInstance` type guard that resolves to the subclass it's\n * called on via the generic `this` parameter.\n *\n * At call sites TypeScript infers `T` from the class, so\n * `StandardError.isInstance(obj)` narrows `obj` to `StandardError`.\n */\ntype IsInstanceFn = <T extends Constructor>(\n this: T,\n obj: unknown\n) => obj is InstanceType<T>;\n\n/**\n * A namespace object for hierarchical symbol-based branding.\n *\n * Namespaces are internal authoring tools. They are not intended to be\n * part of the public API -- only the branded classes are.\n *\n * @example\n * ```typescript\n * const langchain = createNamespace(\"langchain\");\n * const errorNs = langchain.sub(\"error\");\n *\n * export class LangChainError extends errorNs.brand(Error) {\n * readonly name = \"LangChainError\";\n * }\n *\n * export class ModelAbortError extends errorNs.brand(LangChainError, \"model-abort\") {\n * readonly name = \"ModelAbortError\";\n * }\n * ```\n */\nexport interface Namespace {\n /**\n * Brand a base class with this namespace's symbols.\n *\n * Without a marker, creates a namespace-level base class whose\n * `static isInstance` checks for the namespace's own symbol.\n *\n * With a marker, creates a leaf class whose `static isInstance`\n * checks for the marker-specific symbol.\n *\n * @param Base - The base class to extend\n * @param marker - Optional marker for leaf classes\n * @returns A new class extending Base with symbol branding and static isInstance\n */\n brand<TBase extends Constructor>(\n Base: TBase,\n marker?: string\n ): BrandedClass<TBase>;\n\n /**\n * Create a child namespace.\n *\n * @param childPath - The child segment to append to the current path\n * @returns A new Namespace with the extended path\n */\n sub(childPath: string): Namespace;\n\n /**\n * Check if an object is branded under this namespace (at any level).\n *\n * @param obj - The object to check\n * @returns true if the object carries this namespace's symbol\n */\n isInstance(obj: unknown): boolean;\n}\n\n/**\n * Create a symbol-based namespace for hierarchical `isInstance` checking.\n *\n * Each namespace level gets its own `Symbol.for(path)`. When a class is\n * branded via `.brand()`, only the new symbol for that level is stamped\n * on the prototype. Parent symbols are inherited implicitly through the\n * class extension chain -- `symbol in obj` traverses the prototype chain,\n * so a `ConfigError` instance is recognized by `LangChainError.isInstance()`\n * because it extends `GoogleError` which extends `LangChainError`, whose\n * prototype already carries the `langchain.error` symbol.\n *\n * @param path - The dot-separated namespace path (e.g. \"langchain.error\")\n * @returns A Namespace object with `.brand()`, `.sub()`, and `.isInstance()`\n *\n * @example\n * ```typescript\n * const langchain = createNamespace(\"langchain\");\n * const errorNs = langchain.sub(\"error\");\n * const googleNs = errorNs.sub(\"google\");\n *\n * class LangChainError extends errorNs.brand(Error) {}\n * class GoogleError extends googleNs.brand(LangChainError) {}\n * class ConfigError extends googleNs.brand(GoogleError, \"configuration\") {}\n *\n * const err = new ConfigError(\"bad config\");\n * LangChainError.isInstance(err); // true (checks langchain.error symbol)\n * GoogleError.isInstance(err); // true (checks langchain.error.google symbol)\n * ConfigError.isInstance(err); // true (checks langchain.error.google.configuration symbol)\n * ```\n */\nexport function createNamespace(path: string): Namespace {\n const symbol: symbol = Symbol.for(path);\n\n return {\n brand<TBase extends Constructor>(Base: TBase, marker?: string) {\n const brandSymbol: symbol = marker\n ? Symbol.for(`${path}.${marker}`)\n : symbol;\n\n class _Branded extends (Base as any) {\n readonly [brandSymbol] = true as const;\n\n constructor(...args: any[]) {\n super(...args);\n }\n\n static isInstance(obj: unknown): boolean {\n return (\n typeof obj === \"object\" &&\n obj !== null &&\n brandSymbol in obj &&\n (obj as Record<symbol, unknown>)[brandSymbol] === true\n );\n }\n\n static [Symbol.hasInstance](obj: unknown) {\n return this.isInstance(obj);\n }\n }\n\n // Inherit the base class's name so \"_Branded\" doesn't leak\n // through the static prototype chain.\n Object.defineProperty(_Branded, \"name\", { value: Base.name });\n\n return _Branded as unknown as BrandedClass<TBase>;\n },\n\n sub(childPath: string): Namespace {\n return createNamespace(`${path}.${childPath}`);\n },\n\n isInstance(obj: unknown): boolean {\n return (\n typeof obj === \"object\" &&\n obj !== null &&\n symbol in obj &&\n (obj as Record<symbol, unknown>)[symbol] === true\n );\n },\n };\n}\n\n/** Base namespace used throughout LangChain */\nexport const ns = createNamespace(\"langchain\");\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiHA,SAAgB,gBAAgB,MAAyB;CACvD,MAAM,SAAiB,OAAO,IAAI,IAAI;CAEtC,OAAO;EACL,MAAiC,MAAa,QAAiB;GAC7D,MAAM,cAAsB,SACxB,OAAO,IAAI,GAAG,KAAK,GAAG,QAAQ,IAC9B;GAEJ,MAAM,iBAAkB,KAAa;IACnC,CAAU,eAAe;IAEzB,YAAY,GAAG,MAAa;KAC1B,MAAM,GAAG,IAAI;IACf;IAEA,OAAO,WAAW,KAAuB;KACvC,OACE,OAAO,QAAQ,YACf,QAAQ,QACR,eAAe,OACd,IAAgC,iBAAiB;IAEtD;IAEA,QAAQ,OAAO,aAAa,KAAc;KACxC,OAAO,KAAK,WAAW,GAAG;IAC5B;GACF;GAIA,OAAO,eAAe,UAAU,QAAQ,EAAE,OAAO,KAAK,KAAK,CAAC;GAE5D,OAAO;EACT;EAEA,IAAI,WAA8B;GAChC,OAAO,gBAAgB,GAAG,KAAK,GAAG,WAAW;EAC/C;EAEA,WAAW,KAAuB;GAChC,OACE,OAAO,QAAQ,YACf,QAAQ,QACR,UAAU,OACT,IAAgC,YAAY;EAEjD;CACF;AACF;;AAGA,MAAa,KAAK,gBAAgB,WAAW"}
|
|
@@ -7,7 +7,7 @@ type Constructor = abstract new (...args: any[]) => any;
|
|
|
7
7
|
* The return type of `Namespace.brand()`: the original base class
|
|
8
8
|
* intersected with a polymorphic `isInstance` type guard.
|
|
9
9
|
*/
|
|
10
|
-
type BrandedClass<TBase extends Constructor> = TBase & {
|
|
10
|
+
export type BrandedClass<TBase extends Constructor> = TBase & {
|
|
11
11
|
isInstance: IsInstanceFn;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
@@ -38,7 +38,7 @@ type IsInstanceFn = <T extends Constructor>(this: T, obj: unknown) => obj is Ins
|
|
|
38
38
|
* }
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
interface Namespace {
|
|
41
|
+
export interface Namespace {
|
|
42
42
|
/**
|
|
43
43
|
* Brand a base class with this namespace's symbols.
|
|
44
44
|
*
|
|
@@ -69,5 +69,4 @@ interface Namespace {
|
|
|
69
69
|
isInstance(obj: unknown): boolean;
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
|
-
export { Namespace };
|
|
73
72
|
//# sourceMappingURL=namespace.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespace.d.cts","names":[],"sources":["../../src/utils/namespace.ts"],"mappings":";;;;KAKK,+BAA+B;;;;;
|
|
1
|
+
{"version":3,"file":"namespace.d.cts","names":[],"sources":["../../src/utils/namespace.ts"],"mappings":";;;;KAKK,+BAA+B;;;;;YAMxB,aAAa,cAAc,eAAe;EACpD,YAAY;;;;;;;;;KAUT,gBAAgB,UAAU,aAC7B,MAAM,GACN,iBACG,OAAO,aAAa;;;;;;;;;;;;;;;;;;;;;iBAsBR;;;;;;;;;;;;;;EAcf,MAAM,cAAc,aAClB,MAAM,OACN,kBACC,aAAa;;;;;;;EAQhB,IAAI,oBAAoB;;;;;;;EAQxB,WAAW"}
|
|
@@ -7,7 +7,7 @@ type Constructor = abstract new (...args: any[]) => any;
|
|
|
7
7
|
* The return type of `Namespace.brand()`: the original base class
|
|
8
8
|
* intersected with a polymorphic `isInstance` type guard.
|
|
9
9
|
*/
|
|
10
|
-
type BrandedClass<TBase extends Constructor> = TBase & {
|
|
10
|
+
export type BrandedClass<TBase extends Constructor> = TBase & {
|
|
11
11
|
isInstance: IsInstanceFn;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
@@ -38,7 +38,7 @@ type IsInstanceFn = <T extends Constructor>(this: T, obj: unknown) => obj is Ins
|
|
|
38
38
|
* }
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
interface Namespace {
|
|
41
|
+
export interface Namespace {
|
|
42
42
|
/**
|
|
43
43
|
* Brand a base class with this namespace's symbols.
|
|
44
44
|
*
|
|
@@ -69,5 +69,4 @@ interface Namespace {
|
|
|
69
69
|
isInstance(obj: unknown): boolean;
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
|
-
export { Namespace };
|
|
73
72
|
//# sourceMappingURL=namespace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespace.d.ts","names":[],"sources":["../../src/utils/namespace.ts"],"mappings":";;;;KAKK,+BAA+B;;;;;
|
|
1
|
+
{"version":3,"file":"namespace.d.ts","names":[],"sources":["../../src/utils/namespace.ts"],"mappings":";;;;KAKK,+BAA+B;;;;;YAMxB,aAAa,cAAc,eAAe;EACpD,YAAY;;;;;;;;;KAUT,gBAAgB,UAAU,aAC7B,MAAM,GACN,iBACG,OAAO,aAAa;;;;;;;;;;;;;;;;;;;;;iBAsBR;;;;;;;;;;;;;;EAcf,MAAM,cAAc,aAClB,MAAM,OACN,kBACC,aAAa;;;;;;;EAQhB,IAAI,oBAAoB;;;;;;;EAQxB,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespace.js","names":[],"sources":["../../src/utils/namespace.ts"],"sourcesContent":["/* oxlint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * A constructor type that can be used as a base class for branding.\n */\ntype Constructor = abstract new (...args: any[]) => any;\n\n/**\n * The return type of `Namespace.brand()`: the original base class\n * intersected with a polymorphic `isInstance` type guard.\n */\
|
|
1
|
+
{"version":3,"file":"namespace.js","names":[],"sources":["../../src/utils/namespace.ts"],"sourcesContent":["/* oxlint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * A constructor type that can be used as a base class for branding.\n */\ntype Constructor = abstract new (...args: any[]) => any;\n\n/**\n * The return type of `Namespace.brand()`: the original base class\n * intersected with a polymorphic `isInstance` type guard.\n */\nexport type BrandedClass<TBase extends Constructor> = TBase & {\n isInstance: IsInstanceFn;\n};\n\n/**\n * A static `isInstance` type guard that resolves to the subclass it's\n * called on via the generic `this` parameter.\n *\n * At call sites TypeScript infers `T` from the class, so\n * `StandardError.isInstance(obj)` narrows `obj` to `StandardError`.\n */\ntype IsInstanceFn = <T extends Constructor>(\n this: T,\n obj: unknown\n) => obj is InstanceType<T>;\n\n/**\n * A namespace object for hierarchical symbol-based branding.\n *\n * Namespaces are internal authoring tools. They are not intended to be\n * part of the public API -- only the branded classes are.\n *\n * @example\n * ```typescript\n * const langchain = createNamespace(\"langchain\");\n * const errorNs = langchain.sub(\"error\");\n *\n * export class LangChainError extends errorNs.brand(Error) {\n * readonly name = \"LangChainError\";\n * }\n *\n * export class ModelAbortError extends errorNs.brand(LangChainError, \"model-abort\") {\n * readonly name = \"ModelAbortError\";\n * }\n * ```\n */\nexport interface Namespace {\n /**\n * Brand a base class with this namespace's symbols.\n *\n * Without a marker, creates a namespace-level base class whose\n * `static isInstance` checks for the namespace's own symbol.\n *\n * With a marker, creates a leaf class whose `static isInstance`\n * checks for the marker-specific symbol.\n *\n * @param Base - The base class to extend\n * @param marker - Optional marker for leaf classes\n * @returns A new class extending Base with symbol branding and static isInstance\n */\n brand<TBase extends Constructor>(\n Base: TBase,\n marker?: string\n ): BrandedClass<TBase>;\n\n /**\n * Create a child namespace.\n *\n * @param childPath - The child segment to append to the current path\n * @returns A new Namespace with the extended path\n */\n sub(childPath: string): Namespace;\n\n /**\n * Check if an object is branded under this namespace (at any level).\n *\n * @param obj - The object to check\n * @returns true if the object carries this namespace's symbol\n */\n isInstance(obj: unknown): boolean;\n}\n\n/**\n * Create a symbol-based namespace for hierarchical `isInstance` checking.\n *\n * Each namespace level gets its own `Symbol.for(path)`. When a class is\n * branded via `.brand()`, only the new symbol for that level is stamped\n * on the prototype. Parent symbols are inherited implicitly through the\n * class extension chain -- `symbol in obj` traverses the prototype chain,\n * so a `ConfigError` instance is recognized by `LangChainError.isInstance()`\n * because it extends `GoogleError` which extends `LangChainError`, whose\n * prototype already carries the `langchain.error` symbol.\n *\n * @param path - The dot-separated namespace path (e.g. \"langchain.error\")\n * @returns A Namespace object with `.brand()`, `.sub()`, and `.isInstance()`\n *\n * @example\n * ```typescript\n * const langchain = createNamespace(\"langchain\");\n * const errorNs = langchain.sub(\"error\");\n * const googleNs = errorNs.sub(\"google\");\n *\n * class LangChainError extends errorNs.brand(Error) {}\n * class GoogleError extends googleNs.brand(LangChainError) {}\n * class ConfigError extends googleNs.brand(GoogleError, \"configuration\") {}\n *\n * const err = new ConfigError(\"bad config\");\n * LangChainError.isInstance(err); // true (checks langchain.error symbol)\n * GoogleError.isInstance(err); // true (checks langchain.error.google symbol)\n * ConfigError.isInstance(err); // true (checks langchain.error.google.configuration symbol)\n * ```\n */\nexport function createNamespace(path: string): Namespace {\n const symbol: symbol = Symbol.for(path);\n\n return {\n brand<TBase extends Constructor>(Base: TBase, marker?: string) {\n const brandSymbol: symbol = marker\n ? Symbol.for(`${path}.${marker}`)\n : symbol;\n\n class _Branded extends (Base as any) {\n readonly [brandSymbol] = true as const;\n\n constructor(...args: any[]) {\n super(...args);\n }\n\n static isInstance(obj: unknown): boolean {\n return (\n typeof obj === \"object\" &&\n obj !== null &&\n brandSymbol in obj &&\n (obj as Record<symbol, unknown>)[brandSymbol] === true\n );\n }\n\n static [Symbol.hasInstance](obj: unknown) {\n return this.isInstance(obj);\n }\n }\n\n // Inherit the base class's name so \"_Branded\" doesn't leak\n // through the static prototype chain.\n Object.defineProperty(_Branded, \"name\", { value: Base.name });\n\n return _Branded as unknown as BrandedClass<TBase>;\n },\n\n sub(childPath: string): Namespace {\n return createNamespace(`${path}.${childPath}`);\n },\n\n isInstance(obj: unknown): boolean {\n return (\n typeof obj === \"object\" &&\n obj !== null &&\n symbol in obj &&\n (obj as Record<symbol, unknown>)[symbol] === true\n );\n },\n };\n}\n\n/** Base namespace used throughout LangChain */\nexport const ns = createNamespace(\"langchain\");\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiHA,SAAgB,gBAAgB,MAAyB;CACvD,MAAM,SAAiB,OAAO,IAAI,IAAI;CAEtC,OAAO;EACL,MAAiC,MAAa,QAAiB;GAC7D,MAAM,cAAsB,SACxB,OAAO,IAAI,GAAG,KAAK,GAAG,QAAQ,IAC9B;GAEJ,MAAM,iBAAkB,KAAa;IACnC,CAAU,eAAe;IAEzB,YAAY,GAAG,MAAa;KAC1B,MAAM,GAAG,IAAI;IACf;IAEA,OAAO,WAAW,KAAuB;KACvC,OACE,OAAO,QAAQ,YACf,QAAQ,QACR,eAAe,OACd,IAAgC,iBAAiB;IAEtD;IAEA,QAAQ,OAAO,aAAa,KAAc;KACxC,OAAO,KAAK,WAAW,GAAG;IAC5B;GACF;GAIA,OAAO,eAAe,UAAU,QAAQ,EAAE,OAAO,KAAK,KAAK,CAAC;GAE5D,OAAO;EACT;EAEA,IAAI,WAA8B;GAChC,OAAO,gBAAgB,GAAG,KAAK,GAAG,WAAW;EAC/C;EAEA,WAAW,KAAuB;GAChC,OACE,OAAO,QAAQ,YACf,QAAQ,QACR,UAAU,OACT,IAAgC,YAAY;EAEjD;CACF;AACF;;AAGA,MAAa,KAAK,gBAAgB,WAAW"}
|
package/dist/utils/signal.d.cts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* @param signal - The abort signal.
|
|
8
8
|
* @returns The result of the promise.
|
|
9
9
|
*/
|
|
10
|
-
declare function raceWithSignal<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T>;
|
|
10
|
+
export declare function raceWithSignal<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { raceWithSignal };
|
|
13
12
|
//# sourceMappingURL=signal.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signal.d.cts","names":[],"sources":["../../src/utils/signal.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"signal.d.cts","names":[],"sources":["../../src/utils/signal.ts"],"mappings":";;;;;;;;;wBAQsB,eAAe,GACnC,SAAS,QAAQ,IACjB,SAAS,cACR,QAAQ"}
|
package/dist/utils/signal.d.ts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* @param signal - The abort signal.
|
|
8
8
|
* @returns The result of the promise.
|
|
9
9
|
*/
|
|
10
|
-
declare function raceWithSignal<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T>;
|
|
10
|
+
export declare function raceWithSignal<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { raceWithSignal };
|
|
13
12
|
//# sourceMappingURL=signal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signal.d.ts","names":[],"sources":["../../src/utils/signal.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"signal.d.ts","names":[],"sources":["../../src/utils/signal.ts"],"mappings":";;;;;;;;;wBAQsB,eAAe,GACnC,SAAS,QAAQ,IACjB,SAAS,cACR,QAAQ"}
|
package/dist/utils/ssrf.d.cts
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Check if an IP address is private (RFC 1918, loopback, link-local, etc.)
|
|
4
4
|
*/
|
|
5
|
-
declare function isPrivateIp(ip: string): boolean;
|
|
5
|
+
export declare function isPrivateIp(ip: string): boolean;
|
|
6
6
|
/**
|
|
7
7
|
* Check if a hostname or IP is a known cloud metadata endpoint.
|
|
8
8
|
*/
|
|
9
|
-
declare function isCloudMetadata(hostname: string, ip?: string): boolean;
|
|
9
|
+
export declare function isCloudMetadata(hostname: string, ip?: string): boolean;
|
|
10
10
|
/**
|
|
11
11
|
* Check if a hostname or IP is localhost.
|
|
12
12
|
*/
|
|
13
|
-
declare function isLocalhost(hostname: string, ip?: string): boolean;
|
|
13
|
+
export declare function isLocalhost(hostname: string, ip?: string): boolean;
|
|
14
14
|
/**
|
|
15
15
|
* Validate that a URL is safe to connect to.
|
|
16
16
|
* Performs static validation checks against hostnames and direct IP addresses.
|
|
@@ -22,7 +22,7 @@ declare function isLocalhost(hostname: string, ip?: string): boolean;
|
|
|
22
22
|
* @returns The validated URL
|
|
23
23
|
* @throws Error if URL is not safe
|
|
24
24
|
*/
|
|
25
|
-
declare function validateSafeUrl(url: string, options?: {
|
|
25
|
+
export declare function validateSafeUrl(url: string, options?: {
|
|
26
26
|
allowPrivate?: boolean;
|
|
27
27
|
allowHttp?: boolean;
|
|
28
28
|
}): string;
|
|
@@ -34,7 +34,7 @@ declare function validateSafeUrl(url: string, options?: {
|
|
|
34
34
|
* @param options.allowHttp Allow http:// scheme (default: false)
|
|
35
35
|
* @returns true if URL is safe, false otherwise
|
|
36
36
|
*/
|
|
37
|
-
declare function isSafeUrl(url: string, options?: {
|
|
37
|
+
export declare function isSafeUrl(url: string, options?: {
|
|
38
38
|
allowPrivate?: boolean;
|
|
39
39
|
allowHttp?: boolean;
|
|
40
40
|
}): boolean;
|
|
@@ -46,7 +46,6 @@ declare function isSafeUrl(url: string, options?: {
|
|
|
46
46
|
* @param url2 Second URL
|
|
47
47
|
* @returns true if both URLs have the same origin, false otherwise
|
|
48
48
|
*/
|
|
49
|
-
declare function isSameOrigin(url1: string, url2: string): boolean;
|
|
49
|
+
export declare function isSameOrigin(url1: string, url2: string): boolean;
|
|
50
50
|
//#endregion
|
|
51
|
-
export { isCloudMetadata, isLocalhost, isPrivateIp, isSafeUrl, isSameOrigin, validateSafeUrl };
|
|
52
51
|
//# sourceMappingURL=ssrf.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssrf.d.cts","names":[],"sources":["../../src/utils/ssrf.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"ssrf.d.cts","names":[],"sources":["../../src/utils/ssrf.ts"],"mappings":";;;;wBA+MgB,YAAY;;;;wBAkBZ,gBAAgB,kBAAkB;;;;wBAkBlC,YAAY,kBAAkB;;;;;;;;;;;;wBAiC9B,gBACd,aACA;EAAY;EAAwB;;;;;;;;;;wBAgGtB,UACd,aACA;EAAY;EAAwB;;;;;;;;;;wBAkBtB,aAAa,cAAc"}
|
package/dist/utils/ssrf.d.ts
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Check if an IP address is private (RFC 1918, loopback, link-local, etc.)
|
|
4
4
|
*/
|
|
5
|
-
declare function isPrivateIp(ip: string): boolean;
|
|
5
|
+
export declare function isPrivateIp(ip: string): boolean;
|
|
6
6
|
/**
|
|
7
7
|
* Check if a hostname or IP is a known cloud metadata endpoint.
|
|
8
8
|
*/
|
|
9
|
-
declare function isCloudMetadata(hostname: string, ip?: string): boolean;
|
|
9
|
+
export declare function isCloudMetadata(hostname: string, ip?: string): boolean;
|
|
10
10
|
/**
|
|
11
11
|
* Check if a hostname or IP is localhost.
|
|
12
12
|
*/
|
|
13
|
-
declare function isLocalhost(hostname: string, ip?: string): boolean;
|
|
13
|
+
export declare function isLocalhost(hostname: string, ip?: string): boolean;
|
|
14
14
|
/**
|
|
15
15
|
* Validate that a URL is safe to connect to.
|
|
16
16
|
* Performs static validation checks against hostnames and direct IP addresses.
|
|
@@ -22,7 +22,7 @@ declare function isLocalhost(hostname: string, ip?: string): boolean;
|
|
|
22
22
|
* @returns The validated URL
|
|
23
23
|
* @throws Error if URL is not safe
|
|
24
24
|
*/
|
|
25
|
-
declare function validateSafeUrl(url: string, options?: {
|
|
25
|
+
export declare function validateSafeUrl(url: string, options?: {
|
|
26
26
|
allowPrivate?: boolean;
|
|
27
27
|
allowHttp?: boolean;
|
|
28
28
|
}): string;
|
|
@@ -34,7 +34,7 @@ declare function validateSafeUrl(url: string, options?: {
|
|
|
34
34
|
* @param options.allowHttp Allow http:// scheme (default: false)
|
|
35
35
|
* @returns true if URL is safe, false otherwise
|
|
36
36
|
*/
|
|
37
|
-
declare function isSafeUrl(url: string, options?: {
|
|
37
|
+
export declare function isSafeUrl(url: string, options?: {
|
|
38
38
|
allowPrivate?: boolean;
|
|
39
39
|
allowHttp?: boolean;
|
|
40
40
|
}): boolean;
|
|
@@ -46,7 +46,6 @@ declare function isSafeUrl(url: string, options?: {
|
|
|
46
46
|
* @param url2 Second URL
|
|
47
47
|
* @returns true if both URLs have the same origin, false otherwise
|
|
48
48
|
*/
|
|
49
|
-
declare function isSameOrigin(url1: string, url2: string): boolean;
|
|
49
|
+
export declare function isSameOrigin(url1: string, url2: string): boolean;
|
|
50
50
|
//#endregion
|
|
51
|
-
export { isCloudMetadata, isLocalhost, isPrivateIp, isSafeUrl, isSameOrigin, validateSafeUrl };
|
|
52
51
|
//# sourceMappingURL=ssrf.d.ts.map
|
package/dist/utils/ssrf.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssrf.d.ts","names":[],"sources":["../../src/utils/ssrf.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"ssrf.d.ts","names":[],"sources":["../../src/utils/ssrf.ts"],"mappings":";;;;wBA+MgB,YAAY;;;;wBAkBZ,gBAAgB,kBAAkB;;;;wBAkBlC,YAAY,kBAAkB;;;;;;;;;;;;wBAiC9B,gBACd,aACA;EAAY;EAAwB;;;;;;;;;;wBAgGtB,UACd,aACA;EAAY;EAAwB;;;;;;;;;;wBAkBtB,aAAa,cAAc"}
|
|
@@ -4,23 +4,22 @@ import { StandardJSONSchemaV1, StandardSchemaV1 } from "@standard-schema/spec";
|
|
|
4
4
|
* A schema that supports both runtime validation and JSON Schema generation. Any schema passed
|
|
5
5
|
* to withStructuredOutput must satisfy both interfaces.
|
|
6
6
|
*/
|
|
7
|
-
type SerializableSchema<Input = any, Output = Input> = StandardSchemaV1<Input, Output> & StandardJSONSchemaV1<Input, Output>;
|
|
7
|
+
export type SerializableSchema<Input = any, Output = Input> = StandardSchemaV1<Input, Output> & StandardJSONSchemaV1<Input, Output>;
|
|
8
8
|
/**
|
|
9
9
|
* Type guard for Standard Schema V1. Returns true if the value has a `~standard.validate`
|
|
10
10
|
* interface, indicating it can validate unknown values at runtime (e.g. for parsing LLM output).
|
|
11
11
|
*/
|
|
12
|
-
declare function isStandardSchema<Input = any, Output = Input>(schema: unknown): schema is StandardSchemaV1<Input, Output>;
|
|
12
|
+
export declare function isStandardSchema<Input = any, Output = Input>(schema: unknown): schema is StandardSchemaV1<Input, Output>;
|
|
13
13
|
/**
|
|
14
14
|
* Type guard for Standard JSON Schema V1. Returns true if the value has a `~standard.jsonSchema`
|
|
15
15
|
* interface, indicating it can be converted to a JSON Schema object (e.g. for sending as a tool
|
|
16
16
|
* definition to an LLM).
|
|
17
17
|
*/
|
|
18
|
-
declare function isStandardJsonSchema<Input = any, Output = Input>(schema: unknown): schema is StandardJSONSchemaV1<Input, Output>;
|
|
18
|
+
export declare function isStandardJsonSchema<Input = any, Output = Input>(schema: unknown): schema is StandardJSONSchemaV1<Input, Output>;
|
|
19
19
|
/**
|
|
20
20
|
* Type guard for Standard Schema V1. Returns true if the value has a `~standard.validate` interface,
|
|
21
21
|
* indicating it can validate unknown values at runtime (e.g. for parsing LLM output).
|
|
22
22
|
*/
|
|
23
|
-
declare function isSerializableSchema<Input = any, Output = Input>(schema: unknown): schema is SerializableSchema<Input, Output>;
|
|
23
|
+
export declare function isSerializableSchema<Input = any, Output = Input>(schema: unknown): schema is SerializableSchema<Input, Output>;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { SerializableSchema, isSerializableSchema, isStandardJsonSchema, isStandardSchema };
|
|
26
25
|
//# sourceMappingURL=standard_schema.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard_schema.d.cts","names":[],"sources":["../../src/utils/standard_schema.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"standard_schema.d.cts","names":[],"sources":["../../src/utils/standard_schema.ts"],"mappings":";;;;;;YAOY,mBAAmB,aAAa,SAAS,SAAS,iBAC5D,OACA,UAEA,qBAAqB,OAAO;;;;;wBAOd,iBAAiB,aAAa,SAAS,OACrD,kBACC,UAAU,iBAAiB,OAAO;;;;;;wBAiBrB,qBAAqB,aAAa,SAAS,OACzD,kBACC,UAAU,qBAAqB,OAAO;;;;;wBAgBzB,qBAAqB,aAAa,SAAS,OACzD,kBACC,UAAU,mBAAmB,OAAO"}
|
|
@@ -4,23 +4,22 @@ import { StandardJSONSchemaV1, StandardSchemaV1 } from "@standard-schema/spec";
|
|
|
4
4
|
* A schema that supports both runtime validation and JSON Schema generation. Any schema passed
|
|
5
5
|
* to withStructuredOutput must satisfy both interfaces.
|
|
6
6
|
*/
|
|
7
|
-
type SerializableSchema<Input = any, Output = Input> = StandardSchemaV1<Input, Output> & StandardJSONSchemaV1<Input, Output>;
|
|
7
|
+
export type SerializableSchema<Input = any, Output = Input> = StandardSchemaV1<Input, Output> & StandardJSONSchemaV1<Input, Output>;
|
|
8
8
|
/**
|
|
9
9
|
* Type guard for Standard Schema V1. Returns true if the value has a `~standard.validate`
|
|
10
10
|
* interface, indicating it can validate unknown values at runtime (e.g. for parsing LLM output).
|
|
11
11
|
*/
|
|
12
|
-
declare function isStandardSchema<Input = any, Output = Input>(schema: unknown): schema is StandardSchemaV1<Input, Output>;
|
|
12
|
+
export declare function isStandardSchema<Input = any, Output = Input>(schema: unknown): schema is StandardSchemaV1<Input, Output>;
|
|
13
13
|
/**
|
|
14
14
|
* Type guard for Standard JSON Schema V1. Returns true if the value has a `~standard.jsonSchema`
|
|
15
15
|
* interface, indicating it can be converted to a JSON Schema object (e.g. for sending as a tool
|
|
16
16
|
* definition to an LLM).
|
|
17
17
|
*/
|
|
18
|
-
declare function isStandardJsonSchema<Input = any, Output = Input>(schema: unknown): schema is StandardJSONSchemaV1<Input, Output>;
|
|
18
|
+
export declare function isStandardJsonSchema<Input = any, Output = Input>(schema: unknown): schema is StandardJSONSchemaV1<Input, Output>;
|
|
19
19
|
/**
|
|
20
20
|
* Type guard for Standard Schema V1. Returns true if the value has a `~standard.validate` interface,
|
|
21
21
|
* indicating it can validate unknown values at runtime (e.g. for parsing LLM output).
|
|
22
22
|
*/
|
|
23
|
-
declare function isSerializableSchema<Input = any, Output = Input>(schema: unknown): schema is SerializableSchema<Input, Output>;
|
|
23
|
+
export declare function isSerializableSchema<Input = any, Output = Input>(schema: unknown): schema is SerializableSchema<Input, Output>;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { SerializableSchema, isSerializableSchema, isStandardJsonSchema, isStandardSchema };
|
|
26
25
|
//# sourceMappingURL=standard_schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard_schema.d.ts","names":[],"sources":["../../src/utils/standard_schema.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"standard_schema.d.ts","names":[],"sources":["../../src/utils/standard_schema.ts"],"mappings":";;;;;;YAOY,mBAAmB,aAAa,SAAS,SAAS,iBAC5D,OACA,UAEA,qBAAqB,OAAO;;;;;wBAOd,iBAAiB,aAAa,SAAS,OACrD,kBACC,UAAU,iBAAiB,OAAO;;;;;;wBAiBrB,qBAAqB,aAAa,SAAS,OACzD,kBACC,UAAU,qBAAqB,OAAO;;;;;wBAgBzB,qBAAqB,aAAa,SAAS,OACzD,kBACC,UAAU,mBAAmB,OAAO"}
|
package/dist/utils/stream.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IterableReadableStreamInterface } from "../types/_internal.cjs";
|
|
2
2
|
//#region src/utils/stream.d.ts
|
|
3
|
-
declare class IterableReadableStream<T> extends ReadableStream<T> implements IterableReadableStreamInterface<T> {
|
|
3
|
+
export declare class IterableReadableStream<T> extends ReadableStream<T> implements IterableReadableStreamInterface<T> {
|
|
4
4
|
reader: ReadableStreamDefaultReader<T>;
|
|
5
5
|
ensureReader(): void;
|
|
6
6
|
next(): Promise<IteratorResult<T>>;
|
|
@@ -11,9 +11,9 @@ declare class IterableReadableStream<T> extends ReadableStream<T> implements Ite
|
|
|
11
11
|
static fromReadableStream<T>(stream: ReadableStream<T>): IterableReadableStream<T>;
|
|
12
12
|
static fromAsyncGenerator<T>(generator: AsyncGenerator<T>): IterableReadableStream<T>;
|
|
13
13
|
}
|
|
14
|
-
declare function atee<T>(iter: AsyncGenerator<T>, length?: number): AsyncGenerator<T>[];
|
|
15
|
-
declare function concat<T extends Array<any> | string | number | Record<string, any> | any>(first: T, second: T): T;
|
|
16
|
-
declare class AsyncGeneratorWithSetup<S = unknown, T = unknown, TReturn = unknown, TNext = unknown> implements AsyncGenerator<T, TReturn, TNext> {
|
|
14
|
+
export declare function atee<T>(iter: AsyncGenerator<T>, length?: number): AsyncGenerator<T>[];
|
|
15
|
+
export declare function concat<T extends Array<any> | string | number | Record<string, any> | any>(first: T, second: T): T;
|
|
16
|
+
export declare class AsyncGeneratorWithSetup<S = unknown, T = unknown, TReturn = unknown, TNext = unknown> implements AsyncGenerator<T, TReturn, TNext> {
|
|
17
17
|
private generator;
|
|
18
18
|
setup: Promise<S>;
|
|
19
19
|
config?: unknown;
|
|
@@ -32,10 +32,10 @@ declare class AsyncGeneratorWithSetup<S = unknown, T = unknown, TReturn = unknow
|
|
|
32
32
|
[Symbol.asyncIterator](): this;
|
|
33
33
|
[Symbol.asyncDispose](): Promise<void>;
|
|
34
34
|
}
|
|
35
|
-
declare function pipeGeneratorWithSetup<S, A extends unknown[], T, TReturn, TNext, U, UReturn, UNext>(to: (g: AsyncGenerator<T, TReturn, TNext>, s: S, ...args: A) => AsyncGenerator<U, UReturn, UNext>, generator: AsyncGenerator<T, TReturn, TNext>, startSetup: () => Promise<S>, signal: AbortSignal | undefined, ...args: A): Promise<{
|
|
35
|
+
export declare function pipeGeneratorWithSetup<S, A extends unknown[], T, TReturn, TNext, U, UReturn, UNext>(to: (g: AsyncGenerator<T, TReturn, TNext>, s: S, ...args: A) => AsyncGenerator<U, UReturn, UNext>, generator: AsyncGenerator<T, TReturn, TNext>, startSetup: () => Promise<S>, signal: AbortSignal | undefined, ...args: A): Promise<{
|
|
36
36
|
output: AsyncGenerator<U, UReturn, UNext>;
|
|
37
37
|
setup: Awaited<S>;
|
|
38
38
|
}>;
|
|
39
39
|
//#endregion
|
|
40
|
-
export {
|
|
40
|
+
export type { IterableReadableStreamInterface };
|
|
41
41
|
//# sourceMappingURL=stream.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.cts","names":[],"sources":["../../src/utils/stream.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"stream.d.cts","names":[],"sources":["../../src/utils/stream.ts"],"mappings":";;qBAca,uBAAuB,WAC1B,eAAe,cACZ,gCAAgC;EAEpC,QAAQ,4BAA4B;EAE3C;EAMM,QAAQ,QAAQ,eAAe;EAsB/B,UAAU,QAAQ,eAAe;EAYjC,MAAM,SAAS,QAAQ,eAAe;GAU3C,OAAO;GAMD,OAAO,iBAAa;SAIpB,mBAAmB,GAAG,QAAQ,eAAe,KAAE,uBAAA;SAyB/C,mBAAmB,GAAG,WAAW,eAAe,KAAE,uBAAA;;wBAkB3C,KAAK,GACnB,MAAM,eAAe,IACrB,kBACC,eAAe;wBAqBF,OAEd,UAAU,+BAA+B,2BACzC,OAAO,GAAG,QAAQ,IAAI;qBAgCX,wBACX,aACA,aACA,mBACA,4BACW,eAAe,GAAG,SAAS;UAC9B;EAED,OAAO,QAAQ;EAEf;EAEA,SAAS;UAER;UAEA;EAER,YAAY;IACV,WAAW,eAAe;IAC1B,mBAAmB,QAAQ;IAC3B;IACA,SAAS;;EAiCL,QAAQ,YAAY,SAAS,QAAQ,eAAe;EAuBpD,OACJ,QAAQ,UAAU,YAAY,WAC7B,QAAQ,eAAe;EAIpB,MAAM,GAAG,QAAQ,QAAQ,eAAe;GAI7C,OAAO;GAMD,OAAO,iBAAa;;wBAKP,uBACpB,GACA,qBACA,GACA,SACA,OACA,GACA,SACA,OAEA,KACE,GAAG,eAAe,GAAG,SAAS,QAC9B,GAAG,MACA,MAAM,MACN,eAAe,GAAG,SAAS,QAChC,WAAW,eAAe,GAAG,SAAS,QACtC,kBAAkB,QAAQ,IAC1B,QAAQ,4BACL,MAAM,IAAC"}
|
package/dist/utils/stream.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IterableReadableStreamInterface } from "../types/_internal.js";
|
|
2
2
|
//#region src/utils/stream.d.ts
|
|
3
|
-
declare class IterableReadableStream<T> extends ReadableStream<T> implements IterableReadableStreamInterface<T> {
|
|
3
|
+
export declare class IterableReadableStream<T> extends ReadableStream<T> implements IterableReadableStreamInterface<T> {
|
|
4
4
|
reader: ReadableStreamDefaultReader<T>;
|
|
5
5
|
ensureReader(): void;
|
|
6
6
|
next(): Promise<IteratorResult<T>>;
|
|
@@ -11,9 +11,9 @@ declare class IterableReadableStream<T> extends ReadableStream<T> implements Ite
|
|
|
11
11
|
static fromReadableStream<T>(stream: ReadableStream<T>): IterableReadableStream<T>;
|
|
12
12
|
static fromAsyncGenerator<T>(generator: AsyncGenerator<T>): IterableReadableStream<T>;
|
|
13
13
|
}
|
|
14
|
-
declare function atee<T>(iter: AsyncGenerator<T>, length?: number): AsyncGenerator<T>[];
|
|
15
|
-
declare function concat<T extends Array<any> | string | number | Record<string, any> | any>(first: T, second: T): T;
|
|
16
|
-
declare class AsyncGeneratorWithSetup<S = unknown, T = unknown, TReturn = unknown, TNext = unknown> implements AsyncGenerator<T, TReturn, TNext> {
|
|
14
|
+
export declare function atee<T>(iter: AsyncGenerator<T>, length?: number): AsyncGenerator<T>[];
|
|
15
|
+
export declare function concat<T extends Array<any> | string | number | Record<string, any> | any>(first: T, second: T): T;
|
|
16
|
+
export declare class AsyncGeneratorWithSetup<S = unknown, T = unknown, TReturn = unknown, TNext = unknown> implements AsyncGenerator<T, TReturn, TNext> {
|
|
17
17
|
private generator;
|
|
18
18
|
setup: Promise<S>;
|
|
19
19
|
config?: unknown;
|
|
@@ -32,10 +32,10 @@ declare class AsyncGeneratorWithSetup<S = unknown, T = unknown, TReturn = unknow
|
|
|
32
32
|
[Symbol.asyncIterator](): this;
|
|
33
33
|
[Symbol.asyncDispose](): Promise<void>;
|
|
34
34
|
}
|
|
35
|
-
declare function pipeGeneratorWithSetup<S, A extends unknown[], T, TReturn, TNext, U, UReturn, UNext>(to: (g: AsyncGenerator<T, TReturn, TNext>, s: S, ...args: A) => AsyncGenerator<U, UReturn, UNext>, generator: AsyncGenerator<T, TReturn, TNext>, startSetup: () => Promise<S>, signal: AbortSignal | undefined, ...args: A): Promise<{
|
|
35
|
+
export declare function pipeGeneratorWithSetup<S, A extends unknown[], T, TReturn, TNext, U, UReturn, UNext>(to: (g: AsyncGenerator<T, TReturn, TNext>, s: S, ...args: A) => AsyncGenerator<U, UReturn, UNext>, generator: AsyncGenerator<T, TReturn, TNext>, startSetup: () => Promise<S>, signal: AbortSignal | undefined, ...args: A): Promise<{
|
|
36
36
|
output: AsyncGenerator<U, UReturn, UNext>;
|
|
37
37
|
setup: Awaited<S>;
|
|
38
38
|
}>;
|
|
39
39
|
//#endregion
|
|
40
|
-
export {
|
|
40
|
+
export type { IterableReadableStreamInterface };
|
|
41
41
|
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","names":[],"sources":["../../src/utils/stream.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"stream.d.ts","names":[],"sources":["../../src/utils/stream.ts"],"mappings":";;qBAca,uBAAuB,WAC1B,eAAe,cACZ,gCAAgC;EAEpC,QAAQ,4BAA4B;EAE3C;EAMM,QAAQ,QAAQ,eAAe;EAsB/B,UAAU,QAAQ,eAAe;EAYjC,MAAM,SAAS,QAAQ,eAAe;GAU3C,OAAO;GAMD,OAAO,iBAAa;SAIpB,mBAAmB,GAAG,QAAQ,eAAe,KAAE,uBAAA;SAyB/C,mBAAmB,GAAG,WAAW,eAAe,KAAE,uBAAA;;wBAkB3C,KAAK,GACnB,MAAM,eAAe,IACrB,kBACC,eAAe;wBAqBF,OAEd,UAAU,+BAA+B,2BACzC,OAAO,GAAG,QAAQ,IAAI;qBAgCX,wBACX,aACA,aACA,mBACA,4BACW,eAAe,GAAG,SAAS;UAC9B;EAED,OAAO,QAAQ;EAEf;EAEA,SAAS;UAER;UAEA;EAER,YAAY;IACV,WAAW,eAAe;IAC1B,mBAAmB,QAAQ;IAC3B;IACA,SAAS;;EAiCL,QAAQ,YAAY,SAAS,QAAQ,eAAe;EAuBpD,OACJ,QAAQ,UAAU,YAAY,WAC7B,QAAQ,eAAe;EAIpB,MAAM,GAAG,QAAQ,QAAQ,eAAe;GAI7C,OAAO;GAMD,OAAO,iBAAa;;wBAKP,uBACpB,GACA,qBACA,GACA,SACA,OACA,GACA,SACA,OAEA,KACE,GAAG,eAAe,GAAG,SAAS,QAC9B,GAAG,MACA,MAAM,MACN,eAAe,GAAG,SAAS,QAChC,WAAW,eAAe,GAAG,SAAS,QACtC,kBAAkB,QAAQ,IAC1B,QAAQ,4BACL,MAAM,IAAC"}
|
|
@@ -12,7 +12,7 @@ import { BaseChatModel, BaseChatModelCallOptions, BaseChatModelParams } from "..
|
|
|
12
12
|
import { BaseLLMParams } from "../../language_models/llms.cjs";
|
|
13
13
|
//#region src/utils/testing/chat_models.d.ts
|
|
14
14
|
/** Minimal shape actually needed by `bindTools` */
|
|
15
|
-
interface ToolSpec {
|
|
15
|
+
export interface ToolSpec {
|
|
16
16
|
name: string;
|
|
17
17
|
description?: string;
|
|
18
18
|
schema: InteropZodType | Record<string, unknown>;
|
|
@@ -20,11 +20,11 @@ interface ToolSpec {
|
|
|
20
20
|
/**
|
|
21
21
|
* Interface specific to the Fake Streaming Chat model.
|
|
22
22
|
*/
|
|
23
|
-
interface FakeStreamingChatModelCallOptions extends BaseChatModelCallOptions {}
|
|
23
|
+
export interface FakeStreamingChatModelCallOptions extends BaseChatModelCallOptions {}
|
|
24
24
|
/**
|
|
25
25
|
* Interface for the Constructor-field specific to the Fake Streaming Chat model (all optional because we fill in defaults).
|
|
26
26
|
*/
|
|
27
|
-
interface FakeStreamingChatModelFields extends BaseChatModelParams {
|
|
27
|
+
export interface FakeStreamingChatModelFields extends BaseChatModelParams {
|
|
28
28
|
/** Milliseconds to pause between fallback char-by-char chunks */
|
|
29
29
|
sleep?: number;
|
|
30
30
|
/** Full AI messages to fall back to when no `chunks` supplied */
|
|
@@ -36,12 +36,12 @@ interface FakeStreamingChatModelFields extends BaseChatModelParams {
|
|
|
36
36
|
/** Throw this error instead of streaming (useful in tests) */
|
|
37
37
|
thrownErrorString?: string;
|
|
38
38
|
}
|
|
39
|
-
declare class FakeChatModel extends BaseChatModel {
|
|
39
|
+
export declare class FakeChatModel extends BaseChatModel {
|
|
40
40
|
_combineLLMOutput(): never[];
|
|
41
41
|
_llmType(): string;
|
|
42
42
|
_generate(messages: BaseMessage[], options?: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;
|
|
43
43
|
}
|
|
44
|
-
declare class FakeStreamingChatModel extends BaseChatModel<FakeStreamingChatModelCallOptions> {
|
|
44
|
+
export declare class FakeStreamingChatModel extends BaseChatModel<FakeStreamingChatModelCallOptions> {
|
|
45
45
|
sleep: number;
|
|
46
46
|
responses: BaseMessage[];
|
|
47
47
|
chunks: AIMessageChunk[];
|
|
@@ -57,7 +57,7 @@ declare class FakeStreamingChatModel extends BaseChatModel<FakeStreamingChatMode
|
|
|
57
57
|
/**
|
|
58
58
|
* Interface for the input parameters specific to the Fake List Chat model.
|
|
59
59
|
*/
|
|
60
|
-
interface FakeChatInput extends BaseChatModelParams {
|
|
60
|
+
export interface FakeChatInput extends BaseChatModelParams {
|
|
61
61
|
/** Responses to return */
|
|
62
62
|
responses: string[];
|
|
63
63
|
/** Time to sleep in milliseconds between responses */
|
|
@@ -70,7 +70,7 @@ interface FakeChatInput extends BaseChatModelParams {
|
|
|
70
70
|
*/
|
|
71
71
|
generationInfo?: Record<string, unknown>;
|
|
72
72
|
}
|
|
73
|
-
interface FakeListChatModelCallOptions extends BaseChatModelCallOptions {
|
|
73
|
+
export interface FakeListChatModelCallOptions extends BaseChatModelCallOptions {
|
|
74
74
|
thrownErrorString?: string;
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
@@ -93,7 +93,7 @@ interface FakeListChatModelCallOptions extends BaseChatModelCallOptions {
|
|
|
93
93
|
* console.log({ secondResponse });
|
|
94
94
|
* ```
|
|
95
95
|
*/
|
|
96
|
-
declare class FakeListChatModel extends BaseChatModel<FakeListChatModelCallOptions> {
|
|
96
|
+
export declare class FakeListChatModel extends BaseChatModel<FakeListChatModelCallOptions> {
|
|
97
97
|
static lc_name(): string;
|
|
98
98
|
lc_serializable: boolean;
|
|
99
99
|
responses: string[];
|
|
@@ -125,5 +125,4 @@ declare class FakeListChatModel extends BaseChatModel<FakeListChatModelCallOptio
|
|
|
125
125
|
}>;
|
|
126
126
|
}
|
|
127
127
|
//#endregion
|
|
128
|
-
export { FakeChatInput, FakeChatModel, FakeListChatModel, FakeListChatModelCallOptions, FakeStreamingChatModel, FakeStreamingChatModelCallOptions, FakeStreamingChatModelFields, ToolSpec };
|
|
129
128
|
//# sourceMappingURL=chat_models.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat_models.d.cts","names":[],"sources":["../../../src/utils/testing/chat_models.ts"],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"chat_models.d.cts","names":["_$______messages_message_js0.MessageToolSet","_$______messages_message_js0.MessageStructure"],"sources":["../../../src/utils/testing/chat_models.ts"],"mappings":";;;;;;;;;;;;;;iBAyBiB;EACf;EACA;EACA,QAAQ,iBAAiB;;;;;iBAMV,0CAA0C;;;;iBAI1C,qCAAqC;;EAEpD;;EAGA,YAAY;;EAGZ,SAAS;;EAGT;;EAGA;;qBAGW,sBAAsB;EACjC;EAIA;EAIM,UACJ,UAAU,eACV,qCACA,aAAa,2BACZ,QAAQ;;qBAgCA,+BAA+B,cAAc;EACxD;EAEA,WAAW;EAEX,QAAQ;EAER;EAEA;UAEQ;EAER,cACE,OACA,WACA,QACA,WACA,sBACG,QACF,+BAA+B;EASlC;EAIA,UAAU,QAAQ,iBAAiB,cAAW,SAAA,wBAAA,eAAAC,iBAAAD,kBAAA;EAyDxC,UACJ,UAAU,eACV,qCACA,cAAc,2BACb,QAAQ;EAsBJ,sBACL,WAAW,eACX,oCACA,aAAa,2BACZ,eAAe;;;;;iBA2DH,sBAAsB;;EAErC;;EAGA;EAEA;;;;;;EAOA,iBAAiB;;iBAGF,qCAAqC;EACpD;;;;;;;;;;;;;;;;;;;;;;qBAuBW,0BAA0B,cAAc;SAC5C;EAIP;EAEA;EAEA;EAEA;EAEA;EAEA,iBAAiB;UAET;EAER;EAEA,YAAY,QAAQ;EASpB;EAIA;EAIM,UACJ,WAAW,eACX,qCACA,aAAa,2BACZ,QAAQ;EA0BX,kBAAkB;wCA1BfA;;;EAiCI,sBACL,WAAW,eACX,oCACA,aAAa,2BACZ,eAAe;EA8BZ,qBAAiB;EAMjB,UAAM;EAMZ,qBACE,cAEA,iBAAiB,sBAChB;EAQH;EAIA;EAQA,UAAU,QAAQ,iBAAiB,cAAW,SAAA,wBAAA,eAAAC,iBAAAD,kBAAA;EAyD9C,qBAEE,kBAAkB,sBAAsB,qBAExC,SACI,6BAA6B,oBAC7B,eAAe,aAEf,qBACJ,SAAS,uCACR,SAAS,wBAAwB;EAEpC,qBAEE,kBAAkB,sBAAsB,qBAExC,SACI,6BAA6B,mBAC7B,eAAe,aAEf,qBACJ,SAAS,sCACR,SAAS;IAA0B,KAAK;IAAa,QAAQ"}
|
|
@@ -12,7 +12,7 @@ import { BaseChatModel, BaseChatModelCallOptions, BaseChatModelParams } from "..
|
|
|
12
12
|
import { BaseLLMParams } from "../../language_models/llms.js";
|
|
13
13
|
//#region src/utils/testing/chat_models.d.ts
|
|
14
14
|
/** Minimal shape actually needed by `bindTools` */
|
|
15
|
-
interface ToolSpec {
|
|
15
|
+
export interface ToolSpec {
|
|
16
16
|
name: string;
|
|
17
17
|
description?: string;
|
|
18
18
|
schema: InteropZodType | Record<string, unknown>;
|
|
@@ -20,11 +20,11 @@ interface ToolSpec {
|
|
|
20
20
|
/**
|
|
21
21
|
* Interface specific to the Fake Streaming Chat model.
|
|
22
22
|
*/
|
|
23
|
-
interface FakeStreamingChatModelCallOptions extends BaseChatModelCallOptions {}
|
|
23
|
+
export interface FakeStreamingChatModelCallOptions extends BaseChatModelCallOptions {}
|
|
24
24
|
/**
|
|
25
25
|
* Interface for the Constructor-field specific to the Fake Streaming Chat model (all optional because we fill in defaults).
|
|
26
26
|
*/
|
|
27
|
-
interface FakeStreamingChatModelFields extends BaseChatModelParams {
|
|
27
|
+
export interface FakeStreamingChatModelFields extends BaseChatModelParams {
|
|
28
28
|
/** Milliseconds to pause between fallback char-by-char chunks */
|
|
29
29
|
sleep?: number;
|
|
30
30
|
/** Full AI messages to fall back to when no `chunks` supplied */
|
|
@@ -36,12 +36,12 @@ interface FakeStreamingChatModelFields extends BaseChatModelParams {
|
|
|
36
36
|
/** Throw this error instead of streaming (useful in tests) */
|
|
37
37
|
thrownErrorString?: string;
|
|
38
38
|
}
|
|
39
|
-
declare class FakeChatModel extends BaseChatModel {
|
|
39
|
+
export declare class FakeChatModel extends BaseChatModel {
|
|
40
40
|
_combineLLMOutput(): never[];
|
|
41
41
|
_llmType(): string;
|
|
42
42
|
_generate(messages: BaseMessage[], options?: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;
|
|
43
43
|
}
|
|
44
|
-
declare class FakeStreamingChatModel extends BaseChatModel<FakeStreamingChatModelCallOptions> {
|
|
44
|
+
export declare class FakeStreamingChatModel extends BaseChatModel<FakeStreamingChatModelCallOptions> {
|
|
45
45
|
sleep: number;
|
|
46
46
|
responses: BaseMessage[];
|
|
47
47
|
chunks: AIMessageChunk[];
|
|
@@ -57,7 +57,7 @@ declare class FakeStreamingChatModel extends BaseChatModel<FakeStreamingChatMode
|
|
|
57
57
|
/**
|
|
58
58
|
* Interface for the input parameters specific to the Fake List Chat model.
|
|
59
59
|
*/
|
|
60
|
-
interface FakeChatInput extends BaseChatModelParams {
|
|
60
|
+
export interface FakeChatInput extends BaseChatModelParams {
|
|
61
61
|
/** Responses to return */
|
|
62
62
|
responses: string[];
|
|
63
63
|
/** Time to sleep in milliseconds between responses */
|
|
@@ -70,7 +70,7 @@ interface FakeChatInput extends BaseChatModelParams {
|
|
|
70
70
|
*/
|
|
71
71
|
generationInfo?: Record<string, unknown>;
|
|
72
72
|
}
|
|
73
|
-
interface FakeListChatModelCallOptions extends BaseChatModelCallOptions {
|
|
73
|
+
export interface FakeListChatModelCallOptions extends BaseChatModelCallOptions {
|
|
74
74
|
thrownErrorString?: string;
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
@@ -93,7 +93,7 @@ interface FakeListChatModelCallOptions extends BaseChatModelCallOptions {
|
|
|
93
93
|
* console.log({ secondResponse });
|
|
94
94
|
* ```
|
|
95
95
|
*/
|
|
96
|
-
declare class FakeListChatModel extends BaseChatModel<FakeListChatModelCallOptions> {
|
|
96
|
+
export declare class FakeListChatModel extends BaseChatModel<FakeListChatModelCallOptions> {
|
|
97
97
|
static lc_name(): string;
|
|
98
98
|
lc_serializable: boolean;
|
|
99
99
|
responses: string[];
|
|
@@ -125,5 +125,4 @@ declare class FakeListChatModel extends BaseChatModel<FakeListChatModelCallOptio
|
|
|
125
125
|
}>;
|
|
126
126
|
}
|
|
127
127
|
//#endregion
|
|
128
|
-
export { FakeChatInput, FakeChatModel, FakeListChatModel, FakeListChatModelCallOptions, FakeStreamingChatModel, FakeStreamingChatModelCallOptions, FakeStreamingChatModelFields, ToolSpec };
|
|
129
128
|
//# sourceMappingURL=chat_models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat_models.d.ts","names":[],"sources":["../../../src/utils/testing/chat_models.ts"],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"chat_models.d.ts","names":["_$______messages_message_js0.MessageToolSet","_$______messages_message_js0.MessageStructure"],"sources":["../../../src/utils/testing/chat_models.ts"],"mappings":";;;;;;;;;;;;;;iBAyBiB;EACf;EACA;EACA,QAAQ,iBAAiB;;;;;iBAMV,0CAA0C;;;;iBAI1C,qCAAqC;;EAEpD;;EAGA,YAAY;;EAGZ,SAAS;;EAGT;;EAGA;;qBAGW,sBAAsB;EACjC;EAIA;EAIM,UACJ,UAAU,eACV,qCACA,aAAa,2BACZ,QAAQ;;qBAgCA,+BAA+B,cAAc;EACxD;EAEA,WAAW;EAEX,QAAQ;EAER;EAEA;UAEQ;EAER,cACE,OACA,WACA,QACA,WACA,sBACG,QACF,+BAA+B;EASlC;EAIA,UAAU,QAAQ,iBAAiB,cAAW,SAAA,wBAAA,eAAAC,iBAAAD,kBAAA;EAyDxC,UACJ,UAAU,eACV,qCACA,cAAc,2BACb,QAAQ;EAsBJ,sBACL,WAAW,eACX,oCACA,aAAa,2BACZ,eAAe;;;;;iBA2DH,sBAAsB;;EAErC;;EAGA;EAEA;;;;;;EAOA,iBAAiB;;iBAGF,qCAAqC;EACpD;;;;;;;;;;;;;;;;;;;;;;qBAuBW,0BAA0B,cAAc;SAC5C;EAIP;EAEA;EAEA;EAEA;EAEA;EAEA,iBAAiB;UAET;EAER;EAEA,YAAY,QAAQ;EASpB;EAIA;EAIM,UACJ,WAAW,eACX,qCACA,aAAa,2BACZ,QAAQ;EA0BX,kBAAkB;wCA1BfA;;;EAiCI,sBACL,WAAW,eACX,oCACA,aAAa,2BACZ,eAAe;EA8BZ,qBAAiB;EAMjB,UAAM;EAMZ,qBACE,cAEA,iBAAiB,sBAChB;EAQH;EAIA;EAQA,UAAU,QAAQ,iBAAiB,cAAW,SAAA,wBAAA,eAAAC,iBAAAD,kBAAA;EAyD9C,qBAEE,kBAAkB,sBAAsB,qBAExC,SACI,6BAA6B,oBAC7B,eAAe,aAEf,qBACJ,SAAS,uCACR,SAAS,wBAAwB;EAEpC,qBAEE,kBAAkB,sBAAsB,qBAExC,SACI,6BAA6B,mBAC7B,eAAe,aAEf,qBACJ,SAAS,sCACR,SAAS;IAA0B,KAAK;IAAa,QAAQ"}
|
|
@@ -14,7 +14,7 @@ interface SyntheticEmbeddingsParams extends EmbeddingsParams {
|
|
|
14
14
|
* document into chunks, calculating a numerical value for each chunk, and
|
|
15
15
|
* returning an array of these values as the embedding.
|
|
16
16
|
*/
|
|
17
|
-
declare class SyntheticEmbeddings extends Embeddings implements SyntheticEmbeddingsParams {
|
|
17
|
+
export declare class SyntheticEmbeddings extends Embeddings implements SyntheticEmbeddingsParams {
|
|
18
18
|
vectorSize: number;
|
|
19
19
|
constructor(params?: SyntheticEmbeddingsParams);
|
|
20
20
|
/**
|
|
@@ -36,7 +36,7 @@ declare class SyntheticEmbeddings extends Embeddings implements SyntheticEmbeddi
|
|
|
36
36
|
* A class that provides fake embeddings by overriding the embedDocuments
|
|
37
37
|
* and embedQuery methods to return fixed values.
|
|
38
38
|
*/
|
|
39
|
-
declare class FakeEmbeddings extends Embeddings {
|
|
39
|
+
export declare class FakeEmbeddings extends Embeddings {
|
|
40
40
|
constructor(params?: EmbeddingsParams);
|
|
41
41
|
/**
|
|
42
42
|
* Generates fixed embeddings for a list of documents.
|
|
@@ -52,5 +52,4 @@ declare class FakeEmbeddings extends Embeddings {
|
|
|
52
52
|
embedQuery(_: string): Promise<number[]>;
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
|
-
export { FakeEmbeddings, SyntheticEmbeddings };
|
|
56
55
|
//# sourceMappingURL=embeddings.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.d.cts","names":[],"sources":["../../../src/utils/testing/embeddings.ts"],"mappings":";;;;;;UAMU,kCAAkC;EAC1C;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"embeddings.d.cts","names":[],"sources":["../../../src/utils/testing/embeddings.ts"],"mappings":";;;;;;UAMU,kCAAkC;EAC1C;;;;;;;;;qBAUW,4BACH,sBACG;EAEX;EAEA,YAAY,SAAS;;;;;;EAUf,eAAe,sBAAsB;;;;;;;;EAWrC,WAAW,mBAAmB;;;;;;qBAwCzB,uBAAuB;EAClC,YAAY,SAAS;;;;;;EASrB,eAAe,sBAAsB;;;;;;EASrC,WAAW,YAAY"}
|