@langchain/core 1.3.4 → 1.3.6
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 +16 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/agents.cjs +1 -2
- package/dist/agents.d.cts +0 -2
- package/dist/agents.d.cts.map +1 -1
- package/dist/agents.d.ts +0 -2
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +1 -2
- package/dist/caches/index.cjs +1 -2
- package/dist/caches/index.d.cts +3 -5
- package/dist/caches/index.d.cts.map +1 -1
- package/dist/caches/index.d.ts +3 -5
- package/dist/caches/index.d.ts.map +1 -1
- package/dist/caches/index.js +1 -2
- package/dist/callbacks/base.cjs +2 -3
- package/dist/callbacks/base.d.cts +6 -7
- package/dist/callbacks/base.d.cts.map +1 -1
- package/dist/callbacks/base.d.ts +6 -7
- package/dist/callbacks/base.d.ts.map +1 -1
- package/dist/callbacks/base.js +2 -3
- package/dist/callbacks/dispatch/index.cjs +3 -4
- package/dist/callbacks/dispatch/index.d.cts +0 -2
- package/dist/callbacks/dispatch/index.d.cts.map +1 -1
- package/dist/callbacks/dispatch/index.d.ts +0 -2
- package/dist/callbacks/dispatch/index.d.ts.map +1 -1
- package/dist/callbacks/dispatch/index.js +3 -4
- package/dist/callbacks/dispatch/web.cjs +1 -2
- package/dist/callbacks/dispatch/web.d.cts +0 -2
- package/dist/callbacks/dispatch/web.d.cts.map +1 -1
- package/dist/callbacks/dispatch/web.d.ts +0 -2
- package/dist/callbacks/dispatch/web.d.ts.map +1 -1
- package/dist/callbacks/dispatch/web.js +1 -2
- package/dist/callbacks/manager.cjs +5 -6
- package/dist/callbacks/manager.d.cts +6 -7
- package/dist/callbacks/manager.d.cts.map +1 -1
- package/dist/callbacks/manager.d.ts +6 -7
- package/dist/callbacks/manager.d.ts.map +1 -1
- package/dist/callbacks/manager.js +5 -6
- package/dist/callbacks/promises.cjs +1 -2
- package/dist/callbacks/promises.js +1 -2
- package/dist/chat_history.cjs +1 -2
- package/dist/chat_history.d.cts +0 -2
- package/dist/chat_history.d.cts.map +1 -1
- package/dist/chat_history.d.ts +0 -2
- package/dist/chat_history.d.ts.map +1 -1
- package/dist/chat_history.js +1 -2
- package/dist/context.cjs +3 -4
- package/dist/context.d.cts +0 -2
- package/dist/context.d.cts.map +1 -1
- package/dist/context.d.ts +0 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +3 -4
- package/dist/document_loaders/base.cjs +1 -2
- package/dist/document_loaders/base.d.cts +0 -2
- package/dist/document_loaders/base.d.cts.map +1 -1
- package/dist/document_loaders/base.d.ts +0 -2
- package/dist/document_loaders/base.d.ts.map +1 -1
- package/dist/document_loaders/base.js +1 -2
- package/dist/document_loaders/langsmith.cjs +1 -2
- package/dist/document_loaders/langsmith.d.cts +1 -2
- package/dist/document_loaders/langsmith.d.cts.map +1 -1
- package/dist/document_loaders/langsmith.d.ts +1 -2
- package/dist/document_loaders/langsmith.d.ts.map +1 -1
- package/dist/document_loaders/langsmith.js +1 -2
- package/dist/documents/document.cjs +1 -2
- package/dist/documents/document.d.cts +0 -2
- package/dist/documents/document.d.cts.map +1 -1
- package/dist/documents/document.d.ts +0 -2
- package/dist/documents/document.d.ts.map +1 -1
- package/dist/documents/document.js +1 -2
- package/dist/documents/index.cjs +1 -2
- package/dist/documents/index.js +1 -2
- package/dist/documents/transformers.cjs +1 -2
- package/dist/documents/transformers.d.cts +2 -4
- package/dist/documents/transformers.d.cts.map +1 -1
- package/dist/documents/transformers.d.ts +2 -4
- package/dist/documents/transformers.d.ts.map +1 -1
- package/dist/documents/transformers.js +1 -2
- package/dist/embeddings.cjs +1 -2
- package/dist/embeddings.d.cts +0 -2
- package/dist/embeddings.d.cts.map +1 -1
- package/dist/embeddings.d.ts +0 -2
- package/dist/embeddings.d.ts.map +1 -1
- package/dist/embeddings.js +1 -2
- package/dist/errors/index.cjs +1 -2
- package/dist/errors/index.d.cts +1 -3
- package/dist/errors/index.d.cts.map +1 -1
- package/dist/errors/index.d.ts +1 -3
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +1 -2
- package/dist/example_selectors/base.cjs +1 -2
- package/dist/example_selectors/base.d.cts +0 -2
- package/dist/example_selectors/base.d.cts.map +1 -1
- package/dist/example_selectors/base.d.ts +0 -2
- package/dist/example_selectors/base.d.ts.map +1 -1
- package/dist/example_selectors/base.js +1 -2
- package/dist/example_selectors/conditional.cjs +1 -2
- package/dist/example_selectors/conditional.d.cts +3 -5
- package/dist/example_selectors/conditional.d.cts.map +1 -1
- package/dist/example_selectors/conditional.d.ts +3 -5
- package/dist/example_selectors/conditional.d.ts.map +1 -1
- package/dist/example_selectors/conditional.js +1 -2
- package/dist/example_selectors/index.cjs +1 -2
- package/dist/example_selectors/index.js +1 -2
- package/dist/example_selectors/length_based.cjs +1 -2
- package/dist/example_selectors/length_based.d.cts +0 -2
- package/dist/example_selectors/length_based.d.cts.map +1 -1
- package/dist/example_selectors/length_based.d.ts +0 -2
- package/dist/example_selectors/length_based.d.ts.map +1 -1
- package/dist/example_selectors/length_based.js +1 -2
- package/dist/example_selectors/semantic_similarity.cjs +1 -2
- package/dist/example_selectors/semantic_similarity.d.cts +1 -3
- package/dist/example_selectors/semantic_similarity.d.cts.map +1 -1
- package/dist/example_selectors/semantic_similarity.d.ts +1 -3
- package/dist/example_selectors/semantic_similarity.d.ts.map +1 -1
- package/dist/example_selectors/semantic_similarity.js +1 -2
- package/dist/index.cjs +1 -2
- package/dist/index.js +1 -2
- package/dist/indexing/base.cjs +3 -4
- package/dist/indexing/base.d.cts +3 -4
- package/dist/indexing/base.d.cts.map +1 -1
- package/dist/indexing/base.d.ts +3 -4
- package/dist/indexing/base.d.ts.map +1 -1
- package/dist/indexing/base.js +3 -4
- package/dist/indexing/index.cjs +1 -2
- package/dist/indexing/index.js +1 -2
- package/dist/indexing/record_manager.cjs +1 -2
- package/dist/indexing/record_manager.d.cts +0 -2
- package/dist/indexing/record_manager.d.cts.map +1 -1
- package/dist/indexing/record_manager.d.ts +0 -2
- package/dist/indexing/record_manager.d.ts.map +1 -1
- package/dist/indexing/record_manager.js +1 -2
- package/dist/language_models/base.cjs +5 -6
- package/dist/language_models/base.d.cts +7 -8
- package/dist/language_models/base.d.cts.map +1 -1
- package/dist/language_models/base.d.ts +7 -8
- package/dist/language_models/base.d.ts.map +1 -1
- package/dist/language_models/base.js +5 -6
- package/dist/language_models/chat_models.cjs +9 -10
- package/dist/language_models/chat_models.d.cts +11 -13
- package/dist/language_models/chat_models.d.cts.map +1 -1
- package/dist/language_models/chat_models.d.ts +11 -13
- package/dist/language_models/chat_models.d.ts.map +1 -1
- package/dist/language_models/chat_models.js +9 -10
- package/dist/language_models/compat.cjs +1 -2
- package/dist/language_models/compat.d.cts +0 -2
- package/dist/language_models/compat.d.cts.map +1 -1
- package/dist/language_models/compat.d.ts +0 -2
- package/dist/language_models/compat.d.ts.map +1 -1
- package/dist/language_models/compat.js +1 -2
- package/dist/language_models/event.cjs +1 -2
- package/dist/language_models/event.d.cts +0 -2
- package/dist/language_models/event.d.cts.map +1 -1
- package/dist/language_models/event.d.ts +0 -2
- package/dist/language_models/event.d.ts.map +1 -1
- package/dist/language_models/event.js +1 -2
- package/dist/language_models/llms.cjs +4 -5
- package/dist/language_models/llms.d.cts +3 -5
- package/dist/language_models/llms.d.cts.map +1 -1
- package/dist/language_models/llms.d.ts +3 -5
- package/dist/language_models/llms.d.ts.map +1 -1
- package/dist/language_models/llms.js +4 -5
- package/dist/language_models/openai_completions_stream.cjs +1 -2
- package/dist/language_models/openai_completions_stream.d.cts +0 -2
- package/dist/language_models/openai_completions_stream.d.cts.map +1 -1
- package/dist/language_models/openai_completions_stream.d.ts +0 -2
- package/dist/language_models/openai_completions_stream.d.ts.map +1 -1
- package/dist/language_models/openai_completions_stream.js +1 -2
- package/dist/language_models/profile.cjs +1 -2
- package/dist/language_models/profile.d.cts +0 -2
- package/dist/language_models/profile.d.cts.map +1 -1
- package/dist/language_models/profile.d.ts +0 -2
- package/dist/language_models/profile.d.ts.map +1 -1
- package/dist/language_models/profile.js +1 -2
- package/dist/language_models/stream.cjs +1 -2
- package/dist/language_models/stream.d.cts +2 -3
- package/dist/language_models/stream.d.cts.map +1 -1
- package/dist/language_models/stream.d.ts +2 -3
- package/dist/language_models/stream.d.ts.map +1 -1
- package/dist/language_models/stream.js +1 -2
- package/dist/language_models/structured_output.cjs +5 -6
- package/dist/language_models/structured_output.d.cts +6 -7
- package/dist/language_models/structured_output.d.cts.map +1 -1
- package/dist/language_models/structured_output.d.ts +6 -7
- package/dist/language_models/structured_output.d.ts.map +1 -1
- package/dist/language_models/structured_output.js +5 -6
- package/dist/language_models/utils.cjs +1 -2
- package/dist/language_models/utils.js +1 -2
- package/dist/load/import_constants.cjs +1 -2
- package/dist/load/import_constants.js +1 -2
- package/dist/load/import_map.cjs +33 -34
- package/dist/load/import_map.js +43 -44
- package/dist/load/import_type.d.cts +0 -2
- package/dist/load/import_type.d.cts.map +1 -1
- package/dist/load/import_type.d.ts +0 -2
- package/dist/load/import_type.d.ts.map +1 -1
- package/dist/load/index.cjs +4 -5
- package/dist/load/index.d.cts +0 -2
- package/dist/load/index.d.cts.map +1 -1
- package/dist/load/index.d.ts +0 -2
- package/dist/load/index.d.ts.map +1 -1
- package/dist/load/index.js +4 -5
- package/dist/load/map_keys.cjs +1 -2
- package/dist/load/map_keys.d.cts +0 -2
- package/dist/load/map_keys.d.cts.map +1 -1
- package/dist/load/map_keys.d.ts +0 -2
- package/dist/load/map_keys.d.ts.map +1 -1
- package/dist/load/map_keys.js +1 -2
- package/dist/load/serializable.cjs +1 -2
- package/dist/load/serializable.d.cts +0 -2
- package/dist/load/serializable.d.cts.map +1 -1
- package/dist/load/serializable.d.ts +0 -2
- package/dist/load/serializable.d.ts.map +1 -1
- package/dist/load/serializable.js +1 -2
- package/dist/load/validation.cjs +1 -2
- package/dist/load/validation.js +1 -2
- package/dist/memory.cjs +1 -2
- package/dist/memory.d.cts +0 -2
- package/dist/memory.d.cts.map +1 -1
- package/dist/memory.d.ts +0 -2
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +1 -2
- package/dist/messages/ai.cjs +1 -2
- package/dist/messages/ai.d.cts +2 -4
- package/dist/messages/ai.d.cts.map +1 -1
- package/dist/messages/ai.d.ts +2 -4
- package/dist/messages/ai.d.ts.map +1 -1
- package/dist/messages/ai.js +1 -2
- package/dist/messages/base.cjs +1 -2
- package/dist/messages/base.d.cts +3 -4
- package/dist/messages/base.d.cts.map +1 -1
- package/dist/messages/base.d.ts +3 -4
- package/dist/messages/base.d.ts.map +1 -1
- package/dist/messages/base.js +1 -2
- package/dist/messages/block_translators/anthropic.cjs +1 -2
- package/dist/messages/block_translators/anthropic.js +1 -2
- package/dist/messages/block_translators/bedrock_converse.cjs +1 -2
- package/dist/messages/block_translators/bedrock_converse.js +1 -2
- package/dist/messages/block_translators/data.cjs +1 -2
- package/dist/messages/block_translators/data.js +1 -2
- package/dist/messages/block_translators/deepseek.cjs +1 -2
- package/dist/messages/block_translators/deepseek.js +1 -2
- package/dist/messages/block_translators/google.cjs +1 -2
- package/dist/messages/block_translators/google.js +1 -2
- package/dist/messages/block_translators/google_genai.cjs +1 -2
- package/dist/messages/block_translators/google_genai.js +1 -2
- package/dist/messages/block_translators/google_vertexai.cjs +1 -2
- package/dist/messages/block_translators/google_vertexai.js +1 -2
- package/dist/messages/block_translators/groq.cjs +1 -2
- package/dist/messages/block_translators/groq.js +1 -2
- package/dist/messages/block_translators/index.cjs +2 -3
- package/dist/messages/block_translators/index.js +2 -3
- package/dist/messages/block_translators/ollama.cjs +1 -2
- package/dist/messages/block_translators/ollama.js +1 -2
- package/dist/messages/block_translators/openai.cjs +2 -3
- package/dist/messages/block_translators/openai.js +2 -3
- package/dist/messages/block_translators/openrouter.cjs +1 -2
- package/dist/messages/block_translators/openrouter.js +1 -2
- package/dist/messages/block_translators/utils.cjs +1 -2
- package/dist/messages/block_translators/utils.js +1 -2
- package/dist/messages/block_translators/xai.cjs +1 -2
- package/dist/messages/block_translators/xai.js +1 -2
- package/dist/messages/chat.cjs +1 -2
- package/dist/messages/chat.d.cts +1 -3
- package/dist/messages/chat.d.cts.map +1 -1
- package/dist/messages/chat.d.ts +1 -3
- package/dist/messages/chat.d.ts.map +1 -1
- package/dist/messages/chat.js +1 -2
- package/dist/messages/content/base.d.cts +0 -2
- package/dist/messages/content/base.d.cts.map +1 -1
- package/dist/messages/content/base.d.ts +0 -2
- package/dist/messages/content/base.d.ts.map +1 -1
- package/dist/messages/content/data.cjs +1 -2
- package/dist/messages/content/data.d.cts +0 -2
- package/dist/messages/content/data.d.cts.map +1 -1
- package/dist/messages/content/data.d.ts +0 -2
- package/dist/messages/content/data.d.ts.map +1 -1
- package/dist/messages/content/data.js +1 -2
- package/dist/messages/content/index.cjs +1 -2
- package/dist/messages/content/index.d.cts +0 -2
- package/dist/messages/content/index.d.cts.map +1 -1
- package/dist/messages/content/index.d.ts +0 -2
- package/dist/messages/content/index.d.ts.map +1 -1
- package/dist/messages/content/index.js +1 -2
- package/dist/messages/content/multimodal.cjs +1 -2
- package/dist/messages/content/multimodal.d.cts +0 -2
- package/dist/messages/content/multimodal.d.cts.map +1 -1
- package/dist/messages/content/multimodal.d.ts +0 -2
- package/dist/messages/content/multimodal.d.ts.map +1 -1
- package/dist/messages/content/multimodal.js +1 -2
- package/dist/messages/content/tools.cjs +1 -2
- package/dist/messages/content/tools.d.cts +0 -2
- package/dist/messages/content/tools.d.cts.map +1 -1
- package/dist/messages/content/tools.d.ts +0 -2
- package/dist/messages/content/tools.d.ts.map +1 -1
- package/dist/messages/content/tools.js +1 -2
- package/dist/messages/format.cjs +1 -2
- package/dist/messages/format.d.cts +0 -2
- package/dist/messages/format.d.cts.map +1 -1
- package/dist/messages/format.d.ts +0 -2
- package/dist/messages/format.d.ts.map +1 -1
- package/dist/messages/format.js +1 -2
- package/dist/messages/function.cjs +1 -2
- package/dist/messages/function.d.cts +1 -3
- package/dist/messages/function.d.cts.map +1 -1
- package/dist/messages/function.d.ts +1 -3
- package/dist/messages/function.d.ts.map +1 -1
- package/dist/messages/function.js +1 -2
- package/dist/messages/human.cjs +1 -2
- package/dist/messages/human.d.cts +1 -3
- package/dist/messages/human.d.cts.map +1 -1
- package/dist/messages/human.d.ts +1 -3
- package/dist/messages/human.d.ts.map +1 -1
- package/dist/messages/human.js +1 -2
- package/dist/messages/index.cjs +7 -8
- package/dist/messages/index.d.cts +6 -6
- package/dist/messages/index.d.ts +6 -6
- package/dist/messages/index.js +7 -8
- package/dist/messages/message.cjs +1 -2
- package/dist/messages/message.d.cts +1 -2
- package/dist/messages/message.d.cts.map +1 -1
- package/dist/messages/message.d.ts +1 -2
- package/dist/messages/message.d.ts.map +1 -1
- package/dist/messages/message.js +1 -2
- package/dist/messages/metadata.cjs +1 -2
- package/dist/messages/metadata.d.cts +0 -2
- package/dist/messages/metadata.d.cts.map +1 -1
- package/dist/messages/metadata.d.ts +0 -2
- package/dist/messages/metadata.d.ts.map +1 -1
- package/dist/messages/metadata.js +1 -2
- package/dist/messages/modifier.cjs +1 -2
- package/dist/messages/modifier.d.cts +0 -2
- package/dist/messages/modifier.d.cts.map +1 -1
- package/dist/messages/modifier.d.ts +0 -2
- package/dist/messages/modifier.d.ts.map +1 -1
- package/dist/messages/modifier.js +1 -2
- package/dist/messages/notification.cjs +1 -2
- package/dist/messages/notification.d.cts +0 -2
- package/dist/messages/notification.d.cts.map +1 -1
- package/dist/messages/notification.d.ts +0 -2
- package/dist/messages/notification.d.ts.map +1 -1
- package/dist/messages/notification.js +1 -2
- package/dist/messages/system.cjs +1 -2
- package/dist/messages/system.d.cts +1 -3
- package/dist/messages/system.d.cts.map +1 -1
- package/dist/messages/system.d.ts +1 -3
- package/dist/messages/system.d.ts.map +1 -1
- package/dist/messages/system.js +1 -2
- package/dist/messages/tool.cjs +1 -2
- package/dist/messages/tool.d.cts +1 -3
- package/dist/messages/tool.d.cts.map +1 -1
- package/dist/messages/tool.d.ts +1 -3
- package/dist/messages/tool.d.ts.map +1 -1
- package/dist/messages/tool.js +1 -2
- package/dist/messages/transformers.cjs +8 -9
- package/dist/messages/transformers.cjs.map +1 -1
- package/dist/messages/transformers.d.cts +6 -7
- package/dist/messages/transformers.d.cts.map +1 -1
- package/dist/messages/transformers.d.ts +6 -7
- package/dist/messages/transformers.d.ts.map +1 -1
- package/dist/messages/transformers.js +4 -5
- package/dist/messages/utils.cjs +3 -4
- 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 +3 -4
- package/dist/output_parsers/base.cjs +3 -4
- package/dist/output_parsers/base.d.cts +5 -7
- package/dist/output_parsers/base.d.cts.map +1 -1
- package/dist/output_parsers/base.d.ts +5 -7
- package/dist/output_parsers/base.d.ts.map +1 -1
- package/dist/output_parsers/base.js +3 -4
- package/dist/output_parsers/bytes.cjs +1 -2
- package/dist/output_parsers/bytes.d.cts +0 -2
- package/dist/output_parsers/bytes.d.cts.map +1 -1
- package/dist/output_parsers/bytes.d.ts +0 -2
- package/dist/output_parsers/bytes.d.ts.map +1 -1
- package/dist/output_parsers/bytes.js +1 -2
- package/dist/output_parsers/index.cjs +3 -4
- package/dist/output_parsers/index.d.cts +1 -1
- package/dist/output_parsers/index.d.ts +1 -1
- package/dist/output_parsers/index.js +3 -4
- package/dist/output_parsers/json.cjs +3 -4
- package/dist/output_parsers/json.d.cts +2 -4
- package/dist/output_parsers/json.d.cts.map +1 -1
- package/dist/output_parsers/json.d.ts +2 -4
- package/dist/output_parsers/json.d.ts.map +1 -1
- package/dist/output_parsers/json.js +3 -4
- package/dist/output_parsers/list.cjs +1 -2
- package/dist/output_parsers/list.d.cts +0 -2
- package/dist/output_parsers/list.d.cts.map +1 -1
- package/dist/output_parsers/list.d.ts +0 -2
- package/dist/output_parsers/list.d.ts.map +1 -1
- package/dist/output_parsers/list.js +1 -2
- package/dist/output_parsers/openai_functions/index.cjs +1 -2
- package/dist/output_parsers/openai_functions/index.js +1 -2
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.cjs +2 -3
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts +3 -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 +3 -5
- 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 +2 -3
- package/dist/output_parsers/openai_tools/index.cjs +1 -2
- package/dist/output_parsers/openai_tools/index.js +1 -2
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.cjs +4 -5
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts +4 -5
- 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 +4 -5
- 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 +4 -5
- package/dist/output_parsers/standard_schema.cjs +1 -2
- package/dist/output_parsers/standard_schema.d.cts +1 -3
- package/dist/output_parsers/standard_schema.d.cts.map +1 -1
- package/dist/output_parsers/standard_schema.d.ts +1 -3
- package/dist/output_parsers/standard_schema.d.ts.map +1 -1
- package/dist/output_parsers/standard_schema.js +1 -2
- package/dist/output_parsers/string.cjs +1 -2
- package/dist/output_parsers/string.d.cts +1 -3
- package/dist/output_parsers/string.d.cts.map +1 -1
- package/dist/output_parsers/string.d.ts +1 -3
- package/dist/output_parsers/string.d.ts.map +1 -1
- package/dist/output_parsers/string.js +1 -2
- package/dist/output_parsers/structured.cjs +2 -3
- 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 +2 -3
- package/dist/output_parsers/transform.cjs +6 -7
- package/dist/output_parsers/transform.cjs.map +1 -1
- package/dist/output_parsers/transform.d.cts +2 -4
- package/dist/output_parsers/transform.d.cts.map +1 -1
- package/dist/output_parsers/transform.d.ts +2 -4
- package/dist/output_parsers/transform.d.ts.map +1 -1
- package/dist/output_parsers/transform.js +2 -3
- package/dist/output_parsers/xml.cjs +1 -2
- package/dist/output_parsers/xml.d.cts +2 -4
- package/dist/output_parsers/xml.d.cts.map +1 -1
- package/dist/output_parsers/xml.d.ts +2 -4
- package/dist/output_parsers/xml.d.ts.map +1 -1
- package/dist/output_parsers/xml.js +1 -2
- package/dist/outputs.cjs +1 -2
- package/dist/outputs.d.cts +0 -2
- package/dist/outputs.d.cts.map +1 -1
- package/dist/outputs.d.ts +0 -2
- package/dist/outputs.d.ts.map +1 -1
- package/dist/outputs.js +1 -2
- package/dist/prompt_values.cjs +1 -2
- package/dist/prompt_values.d.cts +1 -3
- package/dist/prompt_values.d.cts.map +1 -1
- package/dist/prompt_values.d.ts +1 -3
- package/dist/prompt_values.d.ts.map +1 -1
- package/dist/prompt_values.js +1 -2
- package/dist/prompts/base.cjs +1 -2
- package/dist/prompts/base.d.cts +3 -5
- package/dist/prompts/base.d.cts.map +1 -1
- package/dist/prompts/base.d.ts +3 -5
- package/dist/prompts/base.d.ts.map +1 -1
- package/dist/prompts/base.js +1 -2
- package/dist/prompts/chat.cjs +6 -7
- package/dist/prompts/chat.d.cts +5 -6
- package/dist/prompts/chat.d.cts.map +1 -1
- package/dist/prompts/chat.d.ts +5 -6
- package/dist/prompts/chat.d.ts.map +1 -1
- package/dist/prompts/chat.js +6 -7
- package/dist/prompts/dict.cjs +10 -8
- package/dist/prompts/dict.cjs.map +1 -1
- package/dist/prompts/dict.d.cts +1 -3
- package/dist/prompts/dict.d.cts.map +1 -1
- package/dist/prompts/dict.d.ts +1 -3
- package/dist/prompts/dict.d.ts.map +1 -1
- package/dist/prompts/dict.js +10 -8
- package/dist/prompts/dict.js.map +1 -1
- package/dist/prompts/few_shot.cjs +1 -2
- package/dist/prompts/few_shot.d.cts +4 -6
- package/dist/prompts/few_shot.d.cts.map +1 -1
- package/dist/prompts/few_shot.d.ts +4 -6
- package/dist/prompts/few_shot.d.ts.map +1 -1
- package/dist/prompts/few_shot.js +1 -2
- package/dist/prompts/image.cjs +1 -2
- package/dist/prompts/image.d.cts +2 -4
- package/dist/prompts/image.d.cts.map +1 -1
- package/dist/prompts/image.d.ts +2 -4
- package/dist/prompts/image.d.ts.map +1 -1
- package/dist/prompts/image.js +1 -2
- package/dist/prompts/index.cjs +6 -7
- package/dist/prompts/index.d.cts +6 -6
- package/dist/prompts/index.d.ts +6 -6
- package/dist/prompts/index.js +6 -7
- package/dist/prompts/pipeline.cjs +1 -2
- package/dist/prompts/pipeline.d.cts +1 -3
- package/dist/prompts/pipeline.d.cts.map +1 -1
- package/dist/prompts/pipeline.d.ts +1 -3
- package/dist/prompts/pipeline.d.ts.map +1 -1
- package/dist/prompts/pipeline.js +1 -2
- package/dist/prompts/prompt.cjs +1 -2
- 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/prompt.js +1 -2
- package/dist/prompts/serde.d.cts +0 -2
- package/dist/prompts/serde.d.cts.map +1 -1
- package/dist/prompts/serde.d.ts +0 -2
- package/dist/prompts/serde.d.ts.map +1 -1
- package/dist/prompts/string.cjs +1 -2
- package/dist/prompts/string.d.cts +0 -2
- package/dist/prompts/string.d.cts.map +1 -1
- package/dist/prompts/string.d.ts +0 -2
- package/dist/prompts/string.d.ts.map +1 -1
- package/dist/prompts/string.js +1 -2
- package/dist/prompts/structured.cjs +1 -2
- package/dist/prompts/structured.d.cts +3 -5
- package/dist/prompts/structured.d.cts.map +1 -1
- package/dist/prompts/structured.d.ts +3 -5
- package/dist/prompts/structured.d.ts.map +1 -1
- package/dist/prompts/structured.js +1 -2
- package/dist/prompts/template.cjs +5 -4
- package/dist/prompts/template.cjs.map +1 -1
- package/dist/prompts/template.d.cts +2 -3
- package/dist/prompts/template.d.cts.map +1 -1
- package/dist/prompts/template.d.ts +2 -3
- package/dist/prompts/template.d.ts.map +1 -1
- package/dist/prompts/template.js +5 -4
- package/dist/prompts/template.js.map +1 -1
- package/dist/prompts/utils.cjs +7 -0
- package/dist/prompts/utils.cjs.map +1 -0
- package/dist/prompts/utils.js +7 -0
- package/dist/prompts/utils.js.map +1 -0
- package/dist/retrievers/document_compressors/index.cjs +1 -2
- package/dist/retrievers/document_compressors/index.d.cts +1 -3
- package/dist/retrievers/document_compressors/index.d.cts.map +1 -1
- package/dist/retrievers/document_compressors/index.d.ts +1 -3
- package/dist/retrievers/document_compressors/index.d.ts.map +1 -1
- package/dist/retrievers/document_compressors/index.js +1 -2
- package/dist/retrievers/index.cjs +2 -3
- package/dist/retrievers/index.d.cts +2 -4
- package/dist/retrievers/index.d.cts.map +1 -1
- package/dist/retrievers/index.d.ts +2 -4
- package/dist/retrievers/index.d.ts.map +1 -1
- package/dist/retrievers/index.js +2 -3
- package/dist/runnables/base.cjs +22 -17
- package/dist/runnables/base.cjs.map +1 -1
- package/dist/runnables/base.d.cts +7 -9
- package/dist/runnables/base.d.cts.map +1 -1
- package/dist/runnables/base.d.ts +7 -9
- package/dist/runnables/base.d.ts.map +1 -1
- package/dist/runnables/base.js +17 -12
- package/dist/runnables/base.js.map +1 -1
- package/dist/runnables/branch.cjs +2 -3
- package/dist/runnables/branch.d.cts +2 -4
- package/dist/runnables/branch.d.cts.map +1 -1
- package/dist/runnables/branch.d.ts +2 -4
- package/dist/runnables/branch.d.ts.map +1 -1
- package/dist/runnables/branch.js +2 -3
- package/dist/runnables/config.cjs +1 -2
- package/dist/runnables/config.d.cts +0 -2
- package/dist/runnables/config.d.cts.map +1 -1
- package/dist/runnables/config.d.ts +0 -2
- package/dist/runnables/config.d.ts.map +1 -1
- package/dist/runnables/config.js +1 -2
- package/dist/runnables/graph.cjs +1 -2
- package/dist/runnables/graph.d.cts +0 -2
- package/dist/runnables/graph.d.cts.map +1 -1
- package/dist/runnables/graph.d.ts +0 -2
- package/dist/runnables/graph.d.ts.map +1 -1
- package/dist/runnables/graph.js +1 -2
- package/dist/runnables/graph_mermaid.cjs +1 -2
- package/dist/runnables/graph_mermaid.js +1 -2
- package/dist/runnables/history.cjs +2 -3
- package/dist/runnables/history.d.cts +4 -5
- package/dist/runnables/history.d.cts.map +1 -1
- package/dist/runnables/history.d.ts +4 -5
- package/dist/runnables/history.d.ts.map +1 -1
- package/dist/runnables/history.js +2 -3
- package/dist/runnables/index.cjs +3 -4
- package/dist/runnables/index.d.cts +1 -1
- package/dist/runnables/index.d.ts +1 -1
- package/dist/runnables/index.js +3 -4
- package/dist/runnables/iter.cjs +1 -2
- package/dist/runnables/iter.js +1 -2
- package/dist/runnables/passthrough.cjs +2 -3
- package/dist/runnables/passthrough.d.cts +2 -3
- package/dist/runnables/passthrough.d.cts.map +1 -1
- package/dist/runnables/passthrough.d.ts +2 -3
- package/dist/runnables/passthrough.d.ts.map +1 -1
- package/dist/runnables/passthrough.js +2 -3
- package/dist/runnables/router.cjs +2 -3
- package/dist/runnables/router.d.cts +2 -4
- package/dist/runnables/router.d.cts.map +1 -1
- package/dist/runnables/router.d.ts +2 -4
- package/dist/runnables/router.d.ts.map +1 -1
- package/dist/runnables/router.js +2 -3
- package/dist/runnables/types.d.cts +1 -3
- package/dist/runnables/types.d.cts.map +1 -1
- package/dist/runnables/types.d.ts +1 -3
- package/dist/runnables/types.d.ts.map +1 -1
- package/dist/runnables/utils.cjs +1 -2
- package/dist/runnables/utils.js +1 -2
- package/dist/runnables/wrappers.cjs +1 -2
- package/dist/runnables/wrappers.js +1 -2
- package/dist/singletons/async_local_storage/context.cjs +1 -2
- package/dist/singletons/async_local_storage/context.d.cts +0 -2
- package/dist/singletons/async_local_storage/context.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/context.d.ts +0 -2
- package/dist/singletons/async_local_storage/context.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/context.js +1 -2
- package/dist/singletons/async_local_storage/globals.cjs +1 -2
- package/dist/singletons/async_local_storage/globals.d.cts +0 -2
- package/dist/singletons/async_local_storage/globals.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/globals.d.ts +0 -2
- package/dist/singletons/async_local_storage/globals.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/globals.js +1 -2
- package/dist/singletons/async_local_storage/index.cjs +1 -2
- package/dist/singletons/async_local_storage/index.d.cts +0 -2
- package/dist/singletons/async_local_storage/index.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/index.d.ts +0 -2
- package/dist/singletons/async_local_storage/index.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/index.js +1 -2
- package/dist/singletons/callbacks.cjs +2 -3
- package/dist/singletons/callbacks.d.cts +0 -2
- package/dist/singletons/callbacks.d.cts.map +1 -1
- package/dist/singletons/callbacks.d.ts +0 -2
- package/dist/singletons/callbacks.d.ts.map +1 -1
- package/dist/singletons/callbacks.js +2 -3
- package/dist/singletons/index.cjs +2 -3
- package/dist/singletons/index.d.cts +1 -1
- package/dist/singletons/index.d.ts +1 -1
- package/dist/singletons/index.js +2 -3
- package/dist/singletons/tracer.cjs +1 -2
- package/dist/singletons/tracer.js +1 -2
- package/dist/stores.cjs +1 -2
- package/dist/stores.d.cts +0 -2
- package/dist/stores.d.cts.map +1 -1
- package/dist/stores.d.ts +0 -2
- package/dist/stores.d.ts.map +1 -1
- package/dist/stores.js +1 -2
- package/dist/structured_query/base.cjs +1 -2
- package/dist/structured_query/base.d.cts +0 -2
- package/dist/structured_query/base.d.cts.map +1 -1
- package/dist/structured_query/base.d.ts +0 -2
- package/dist/structured_query/base.d.ts.map +1 -1
- package/dist/structured_query/base.js +1 -2
- package/dist/structured_query/functional.cjs +2 -3
- package/dist/structured_query/functional.d.cts +1 -2
- package/dist/structured_query/functional.d.cts.map +1 -1
- package/dist/structured_query/functional.d.ts +1 -2
- package/dist/structured_query/functional.d.ts.map +1 -1
- package/dist/structured_query/functional.js +2 -3
- package/dist/structured_query/index.cjs +3 -4
- package/dist/structured_query/index.d.cts +1 -1
- package/dist/structured_query/index.d.ts +1 -1
- package/dist/structured_query/index.js +3 -4
- package/dist/structured_query/ir.cjs +1 -2
- package/dist/structured_query/ir.d.cts +0 -2
- package/dist/structured_query/ir.d.cts.map +1 -1
- package/dist/structured_query/ir.d.ts +0 -2
- package/dist/structured_query/ir.d.ts.map +1 -1
- package/dist/structured_query/ir.js +1 -2
- package/dist/structured_query/utils.cjs +1 -2
- package/dist/structured_query/utils.d.cts +0 -2
- package/dist/structured_query/utils.d.cts.map +1 -1
- package/dist/structured_query/utils.d.ts +0 -2
- package/dist/structured_query/utils.d.ts.map +1 -1
- package/dist/structured_query/utils.js +1 -2
- package/dist/testing/fake_model_builder.cjs +3 -4
- package/dist/testing/fake_model_builder.d.cts +6 -7
- package/dist/testing/fake_model_builder.d.cts.map +1 -1
- package/dist/testing/fake_model_builder.d.ts +6 -7
- package/dist/testing/fake_model_builder.d.ts.map +1 -1
- package/dist/testing/fake_model_builder.js +3 -4
- package/dist/testing/index.cjs +2 -3
- package/dist/testing/index.d.cts +2 -2
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +2 -3
- package/dist/testing/matchers.cjs +2 -3
- package/dist/testing/matchers.d.cts +1 -2
- package/dist/testing/matchers.d.cts.map +1 -1
- package/dist/testing/matchers.d.ts +1 -2
- package/dist/testing/matchers.d.ts.map +1 -1
- package/dist/testing/matchers.js +2 -3
- package/dist/testing/vitest-expect.d.cts +0 -2
- package/dist/testing/vitest-expect.d.cts.map +1 -1
- package/dist/testing/vitest-expect.d.ts +0 -2
- package/dist/testing/vitest-expect.d.ts.map +1 -1
- package/dist/tools/index.cjs +10 -7
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.d.cts +7 -9
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +7 -9
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +10 -7
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/types.cjs +2 -3
- package/dist/tools/types.d.cts +4 -6
- package/dist/tools/types.d.cts.map +1 -1
- package/dist/tools/types.d.ts +4 -6
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js +2 -3
- package/dist/tools/utils.cjs +1 -2
- package/dist/tools/utils.d.cts +0 -2
- package/dist/tools/utils.d.cts.map +1 -1
- package/dist/tools/utils.d.ts +0 -2
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tools/utils.js +1 -2
- package/dist/tracers/base.cjs +2 -3
- package/dist/tracers/base.d.cts +4 -6
- package/dist/tracers/base.d.cts.map +1 -1
- package/dist/tracers/base.d.ts +4 -6
- package/dist/tracers/base.d.ts.map +1 -1
- package/dist/tracers/base.js +2 -3
- package/dist/tracers/console.cjs +1 -2
- package/dist/tracers/console.d.cts +0 -2
- package/dist/tracers/console.d.cts.map +1 -1
- package/dist/tracers/console.d.ts +0 -2
- package/dist/tracers/console.d.ts.map +1 -1
- package/dist/tracers/console.js +1 -2
- package/dist/tracers/event_stream.cjs +10 -6
- package/dist/tracers/event_stream.cjs.map +1 -1
- package/dist/tracers/event_stream.d.cts +1 -3
- package/dist/tracers/event_stream.d.cts.map +1 -1
- package/dist/tracers/event_stream.d.ts +1 -3
- package/dist/tracers/event_stream.d.ts.map +1 -1
- package/dist/tracers/event_stream.js +10 -6
- package/dist/tracers/event_stream.js.map +1 -1
- package/dist/tracers/log_stream.cjs +3 -4
- package/dist/tracers/log_stream.d.cts +1 -3
- package/dist/tracers/log_stream.d.cts.map +1 -1
- package/dist/tracers/log_stream.d.ts +1 -3
- package/dist/tracers/log_stream.d.ts.map +1 -1
- package/dist/tracers/log_stream.js +3 -4
- package/dist/tracers/root_listener.cjs +1 -2
- package/dist/tracers/root_listener.js +1 -2
- package/dist/tracers/run_collector.cjs +1 -2
- package/dist/tracers/run_collector.d.cts +0 -2
- package/dist/tracers/run_collector.d.cts.map +1 -1
- package/dist/tracers/run_collector.d.ts +0 -2
- package/dist/tracers/run_collector.d.ts.map +1 -1
- package/dist/tracers/run_collector.js +1 -2
- package/dist/tracers/trace_policy.cjs +1 -2
- package/dist/tracers/trace_policy.d.cts +0 -2
- package/dist/tracers/trace_policy.d.cts.map +1 -1
- package/dist/tracers/trace_policy.d.ts +0 -2
- package/dist/tracers/trace_policy.d.ts.map +1 -1
- package/dist/tracers/trace_policy.js +1 -2
- package/dist/tracers/tracer_langchain.cjs +3 -4
- package/dist/tracers/tracer_langchain.d.cts +1 -3
- package/dist/tracers/tracer_langchain.d.cts.map +1 -1
- package/dist/tracers/tracer_langchain.d.ts +1 -3
- package/dist/tracers/tracer_langchain.d.ts.map +1 -1
- package/dist/tracers/tracer_langchain.js +3 -4
- package/dist/types/_internal.d.cts +0 -2
- package/dist/types/_internal.d.cts.map +1 -1
- package/dist/types/_internal.d.ts +0 -2
- package/dist/types/_internal.d.ts.map +1 -1
- package/dist/types/stream.cjs +1 -2
- package/dist/types/stream.js +1 -2
- package/dist/types/type-utils.d.cts +0 -2
- package/dist/types/type-utils.d.cts.map +1 -1
- package/dist/types/type-utils.d.ts +0 -2
- package/dist/types/type-utils.d.ts.map +1 -1
- package/dist/utils/async_caller.cjs +1 -2
- package/dist/utils/async_caller.d.cts +1 -2
- package/dist/utils/async_caller.d.cts.map +1 -1
- package/dist/utils/async_caller.d.ts +1 -2
- package/dist/utils/async_caller.d.ts.map +1 -1
- package/dist/utils/async_caller.js +1 -2
- package/dist/utils/callbacks.cjs +1 -2
- package/dist/utils/callbacks.js +1 -2
- package/dist/utils/chunk_array.cjs +1 -2
- package/dist/utils/chunk_array.d.cts +0 -2
- package/dist/utils/chunk_array.d.cts.map +1 -1
- package/dist/utils/chunk_array.d.ts +0 -2
- package/dist/utils/chunk_array.d.ts.map +1 -1
- package/dist/utils/chunk_array.js +1 -2
- package/dist/utils/context.cjs +1 -2
- package/dist/utils/context.d.cts +0 -2
- package/dist/utils/context.d.cts.map +1 -1
- package/dist/utils/context.d.ts +0 -2
- package/dist/utils/context.d.ts.map +1 -1
- package/dist/utils/context.js +1 -2
- package/dist/utils/env.cjs +1 -2
- package/dist/utils/env.d.cts +0 -2
- package/dist/utils/env.d.cts.map +1 -1
- package/dist/utils/env.d.ts +0 -2
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +1 -2
- package/dist/utils/event_source_parse.cjs +1 -2
- package/dist/utils/event_source_parse.d.cts +0 -2
- package/dist/utils/event_source_parse.d.cts.map +1 -1
- package/dist/utils/event_source_parse.d.ts +0 -2
- package/dist/utils/event_source_parse.d.ts.map +1 -1
- package/dist/utils/event_source_parse.js +1 -2
- package/dist/utils/fast-json-patch/index.cjs +1 -2
- package/dist/utils/fast-json-patch/index.js +1 -2
- package/dist/utils/fast-json-patch/src/core.cjs +1 -2
- package/dist/utils/fast-json-patch/src/core.d.cts +0 -2
- package/dist/utils/fast-json-patch/src/core.d.cts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.d.ts +0 -2
- package/dist/utils/fast-json-patch/src/core.d.ts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.js +1 -2
- package/dist/utils/fast-json-patch/src/duplex.cjs +1 -2
- package/dist/utils/fast-json-patch/src/duplex.d.cts +0 -2
- package/dist/utils/fast-json-patch/src/duplex.d.cts.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.d.ts +0 -2
- package/dist/utils/fast-json-patch/src/duplex.d.ts.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.js +1 -2
- package/dist/utils/fast-json-patch/src/helpers.cjs +1 -2
- package/dist/utils/fast-json-patch/src/helpers.js +1 -2
- package/dist/utils/format.cjs +1 -2
- package/dist/utils/format.d.cts +0 -2
- package/dist/utils/format.d.cts.map +1 -1
- package/dist/utils/format.d.ts +0 -2
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +1 -2
- package/dist/utils/function_calling.cjs +2 -3
- package/dist/utils/function_calling.d.cts +2 -4
- package/dist/utils/function_calling.d.cts.map +1 -1
- package/dist/utils/function_calling.d.ts +2 -4
- package/dist/utils/function_calling.d.ts.map +1 -1
- package/dist/utils/function_calling.js +2 -3
- package/dist/utils/gateway.cjs +1 -2
- package/dist/utils/gateway.d.cts +0 -2
- package/dist/utils/gateway.d.cts.map +1 -1
- package/dist/utils/gateway.d.ts +0 -2
- package/dist/utils/gateway.d.ts.map +1 -1
- package/dist/utils/gateway.js +1 -2
- package/dist/utils/hash.cjs +1 -2
- package/dist/utils/hash.d.cts +0 -2
- package/dist/utils/hash.d.cts.map +1 -1
- package/dist/utils/hash.d.ts +0 -2
- package/dist/utils/hash.d.ts.map +1 -1
- package/dist/utils/hash.js +1 -2
- package/dist/utils/is-network-error/index.cjs +1 -2
- package/dist/utils/is-network-error/index.js +1 -2
- package/dist/utils/js-sha256/hash.cjs +1 -2
- package/dist/utils/js-sha256/hash.d.cts +0 -2
- package/dist/utils/js-sha256/hash.d.cts.map +1 -1
- package/dist/utils/js-sha256/hash.d.ts +0 -2
- package/dist/utils/js-sha256/hash.d.ts.map +1 -1
- package/dist/utils/js-sha256/hash.js +1 -2
- package/dist/utils/json.cjs +1 -2
- package/dist/utils/json.d.cts +0 -2
- package/dist/utils/json.d.cts.map +1 -1
- package/dist/utils/json.d.ts +0 -2
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js +1 -2
- package/dist/utils/json_patch.cjs +1 -2
- package/dist/utils/json_patch.d.cts +1 -1
- package/dist/utils/json_patch.d.ts +1 -1
- package/dist/utils/json_patch.js +1 -2
- package/dist/utils/json_schema.cjs +1 -2
- package/dist/utils/json_schema.d.cts +0 -2
- package/dist/utils/json_schema.d.cts.map +1 -1
- package/dist/utils/json_schema.d.ts +0 -2
- package/dist/utils/json_schema.d.ts.map +1 -1
- package/dist/utils/json_schema.js +1 -2
- package/dist/utils/math.cjs +1 -2
- package/dist/utils/math.d.cts +1 -2
- package/dist/utils/math.d.cts.map +1 -1
- package/dist/utils/math.d.ts +1 -2
- package/dist/utils/math.d.ts.map +1 -1
- package/dist/utils/math.js +1 -2
- package/dist/utils/ml-distance/distances.cjs +1 -2
- package/dist/utils/ml-distance/distances.js +1 -2
- package/dist/utils/ml-distance/similarities.cjs +1 -2
- package/dist/utils/ml-distance/similarities.d.cts +0 -2
- package/dist/utils/ml-distance/similarities.d.cts.map +1 -1
- package/dist/utils/ml-distance/similarities.d.ts +0 -2
- package/dist/utils/ml-distance/similarities.d.ts.map +1 -1
- package/dist/utils/ml-distance/similarities.js +1 -2
- package/dist/utils/ml-distance-euclidean/euclidean.cjs +1 -2
- package/dist/utils/ml-distance-euclidean/euclidean.js +1 -2
- package/dist/utils/namespace.cjs +1 -2
- package/dist/utils/namespace.d.cts +1 -2
- package/dist/utils/namespace.d.cts.map +1 -1
- package/dist/utils/namespace.d.ts +1 -2
- package/dist/utils/namespace.d.ts.map +1 -1
- package/dist/utils/namespace.js +1 -2
- package/dist/utils/p-retry/index.cjs +1 -2
- package/dist/utils/p-retry/index.js +1 -2
- package/dist/utils/sax-js/sax.cjs +1 -2
- package/dist/utils/sax-js/sax.js +1 -2
- package/dist/utils/signal.cjs +1 -2
- package/dist/utils/signal.d.cts +0 -2
- package/dist/utils/signal.d.cts.map +1 -1
- package/dist/utils/signal.d.ts +0 -2
- package/dist/utils/signal.d.ts.map +1 -1
- package/dist/utils/signal.js +1 -2
- package/dist/utils/ssrf.cjs +1 -2
- package/dist/utils/ssrf.d.cts +0 -2
- package/dist/utils/ssrf.d.cts.map +1 -1
- package/dist/utils/ssrf.d.ts +0 -2
- package/dist/utils/ssrf.d.ts.map +1 -1
- package/dist/utils/ssrf.js +1 -2
- package/dist/utils/standard_schema.cjs +1 -2
- package/dist/utils/standard_schema.d.cts +0 -2
- package/dist/utils/standard_schema.d.cts.map +1 -1
- package/dist/utils/standard_schema.d.ts +0 -2
- package/dist/utils/standard_schema.d.ts.map +1 -1
- package/dist/utils/standard_schema.js +1 -2
- package/dist/utils/stream.cjs +2 -3
- package/dist/utils/stream.d.cts +0 -2
- package/dist/utils/stream.d.cts.map +1 -1
- package/dist/utils/stream.d.ts +0 -2
- package/dist/utils/stream.d.ts.map +1 -1
- package/dist/utils/stream.js +2 -3
- package/dist/utils/testing/chat_models.cjs +4 -5
- package/dist/utils/testing/chat_models.d.cts +6 -8
- package/dist/utils/testing/chat_models.d.cts.map +1 -1
- package/dist/utils/testing/chat_models.d.ts +6 -8
- package/dist/utils/testing/chat_models.d.ts.map +1 -1
- package/dist/utils/testing/chat_models.js +4 -5
- package/dist/utils/testing/embeddings.cjs +1 -2
- package/dist/utils/testing/embeddings.d.cts +1 -2
- package/dist/utils/testing/embeddings.d.cts.map +1 -1
- package/dist/utils/testing/embeddings.d.ts +1 -2
- package/dist/utils/testing/embeddings.d.ts.map +1 -1
- package/dist/utils/testing/embeddings.js +1 -2
- package/dist/utils/testing/index.cjs +3 -4
- package/dist/utils/testing/index.d.cts +1 -1
- package/dist/utils/testing/index.d.ts +1 -1
- package/dist/utils/testing/index.js +3 -4
- package/dist/utils/testing/llms.cjs +1 -2
- package/dist/utils/testing/llms.d.cts +1 -3
- package/dist/utils/testing/llms.d.cts.map +1 -1
- package/dist/utils/testing/llms.d.ts +1 -3
- package/dist/utils/testing/llms.d.ts.map +1 -1
- package/dist/utils/testing/llms.js +1 -2
- package/dist/utils/testing/message_history.cjs +3 -4
- package/dist/utils/testing/message_history.d.cts +2 -4
- package/dist/utils/testing/message_history.d.cts.map +1 -1
- package/dist/utils/testing/message_history.d.ts +2 -4
- package/dist/utils/testing/message_history.d.ts.map +1 -1
- package/dist/utils/testing/message_history.js +3 -4
- package/dist/utils/testing/openai_stream_fixtures.cjs +1 -2
- package/dist/utils/testing/openai_stream_fixtures.d.cts +0 -2
- package/dist/utils/testing/openai_stream_fixtures.d.cts.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.d.ts +0 -2
- package/dist/utils/testing/openai_stream_fixtures.d.ts.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.js +1 -2
- package/dist/utils/testing/output_parsers.cjs +1 -2
- package/dist/utils/testing/output_parsers.d.cts +0 -2
- package/dist/utils/testing/output_parsers.d.cts.map +1 -1
- package/dist/utils/testing/output_parsers.d.ts +0 -2
- package/dist/utils/testing/output_parsers.d.ts.map +1 -1
- package/dist/utils/testing/output_parsers.js +1 -2
- package/dist/utils/testing/retrievers.cjs +1 -2
- package/dist/utils/testing/retrievers.d.cts +0 -2
- package/dist/utils/testing/retrievers.d.cts.map +1 -1
- package/dist/utils/testing/retrievers.d.ts +0 -2
- package/dist/utils/testing/retrievers.d.ts.map +1 -1
- package/dist/utils/testing/retrievers.js +1 -2
- package/dist/utils/testing/runnables.cjs +1 -2
- package/dist/utils/testing/runnables.d.cts +0 -2
- package/dist/utils/testing/runnables.d.cts.map +1 -1
- package/dist/utils/testing/runnables.d.ts +0 -2
- package/dist/utils/testing/runnables.d.ts.map +1 -1
- package/dist/utils/testing/runnables.js +1 -2
- package/dist/utils/testing/stream.cjs +1 -2
- package/dist/utils/testing/stream.d.cts +1 -2
- package/dist/utils/testing/stream.d.cts.map +1 -1
- package/dist/utils/testing/stream.d.ts +1 -2
- package/dist/utils/testing/stream.d.ts.map +1 -1
- package/dist/utils/testing/stream.js +1 -2
- package/dist/utils/testing/tools.cjs +1 -2
- package/dist/utils/testing/tools.d.cts +2 -4
- package/dist/utils/testing/tools.d.cts.map +1 -1
- package/dist/utils/testing/tools.d.ts +2 -4
- package/dist/utils/testing/tools.d.ts.map +1 -1
- package/dist/utils/testing/tools.js +1 -2
- package/dist/utils/testing/tracers.cjs +1 -2
- package/dist/utils/testing/tracers.d.cts +0 -2
- package/dist/utils/testing/tracers.d.cts.map +1 -1
- package/dist/utils/testing/tracers.d.ts +0 -2
- package/dist/utils/testing/tracers.d.ts.map +1 -1
- package/dist/utils/testing/tracers.js +1 -2
- package/dist/utils/testing/vectorstores.cjs +2 -3
- package/dist/utils/testing/vectorstores.d.cts +1 -2
- package/dist/utils/testing/vectorstores.d.cts.map +1 -1
- package/dist/utils/testing/vectorstores.d.ts +1 -2
- package/dist/utils/testing/vectorstores.d.ts.map +1 -1
- package/dist/utils/testing/vectorstores.js +2 -3
- package/dist/utils/tiktoken.cjs +1 -2
- package/dist/utils/tiktoken.d.cts +0 -2
- package/dist/utils/tiktoken.d.cts.map +1 -1
- package/dist/utils/tiktoken.d.ts +0 -2
- package/dist/utils/tiktoken.d.ts.map +1 -1
- package/dist/utils/tiktoken.js +1 -2
- package/dist/utils/types/index.cjs +1 -2
- package/dist/utils/types/index.d.cts +0 -2
- package/dist/utils/types/index.d.cts.map +1 -1
- package/dist/utils/types/index.d.ts +0 -2
- package/dist/utils/types/index.d.ts.map +1 -1
- package/dist/utils/types/index.js +1 -2
- package/dist/utils/types/zod.cjs +1 -2
- package/dist/utils/types/zod.d.cts +1 -2
- package/dist/utils/types/zod.d.cts.map +1 -1
- package/dist/utils/types/zod.d.ts +1 -2
- package/dist/utils/types/zod.d.ts.map +1 -1
- package/dist/utils/types/zod.js +1 -2
- package/dist/utils/uuid/index.cjs +2 -3
- package/dist/utils/uuid/index.d.cts +1 -3
- package/dist/utils/uuid/index.d.cts.map +1 -1
- package/dist/utils/uuid/index.d.ts +1 -3
- package/dist/utils/uuid/index.d.ts.map +1 -1
- package/dist/utils/uuid/index.js +2 -3
- package/dist/utils/uuid/max.cjs +1 -2
- package/dist/utils/uuid/max.js +1 -2
- package/dist/utils/uuid/nil.cjs +1 -2
- package/dist/utils/uuid/nil.js +1 -2
- package/dist/utils/uuid/parse.cjs +1 -2
- package/dist/utils/uuid/parse.d.cts +0 -1
- package/dist/utils/uuid/parse.d.cts.map +1 -1
- package/dist/utils/uuid/parse.d.ts +0 -2
- package/dist/utils/uuid/parse.d.ts.map +1 -1
- package/dist/utils/uuid/parse.js +1 -2
- package/dist/utils/uuid/regex.cjs +1 -2
- package/dist/utils/uuid/regex.js +1 -2
- package/dist/utils/uuid/rng.cjs +1 -2
- package/dist/utils/uuid/rng.js +1 -2
- package/dist/utils/uuid/sha1.cjs +1 -2
- package/dist/utils/uuid/sha1.js +1 -2
- package/dist/utils/uuid/stringify.cjs +1 -2
- package/dist/utils/uuid/stringify.d.cts +0 -1
- package/dist/utils/uuid/stringify.d.cts.map +1 -1
- package/dist/utils/uuid/stringify.d.ts +0 -2
- package/dist/utils/uuid/stringify.d.ts.map +1 -1
- package/dist/utils/uuid/stringify.js +1 -2
- package/dist/utils/uuid/types.d.cts +0 -2
- package/dist/utils/uuid/types.d.cts.map +1 -1
- package/dist/utils/uuid/types.d.ts +0 -2
- package/dist/utils/uuid/types.d.ts.map +1 -1
- package/dist/utils/uuid/v1.cjs +2 -3
- package/dist/utils/uuid/v1.d.cts +0 -1
- package/dist/utils/uuid/v1.d.cts.map +1 -1
- package/dist/utils/uuid/v1.d.ts +0 -2
- package/dist/utils/uuid/v1.d.ts.map +1 -1
- package/dist/utils/uuid/v1.js +2 -3
- package/dist/utils/uuid/v1ToV6.cjs +1 -2
- package/dist/utils/uuid/v1ToV6.js +1 -2
- package/dist/utils/uuid/v35.cjs +1 -2
- package/dist/utils/uuid/v35.d.cts +0 -2
- package/dist/utils/uuid/v35.d.cts.map +1 -1
- package/dist/utils/uuid/v35.d.ts +0 -2
- package/dist/utils/uuid/v35.d.ts.map +1 -1
- package/dist/utils/uuid/v35.js +1 -2
- package/dist/utils/uuid/v4.cjs +2 -3
- package/dist/utils/uuid/v4.d.cts +0 -1
- package/dist/utils/uuid/v4.d.cts.map +1 -1
- package/dist/utils/uuid/v4.d.ts +0 -2
- package/dist/utils/uuid/v4.d.ts.map +1 -1
- package/dist/utils/uuid/v4.js +2 -3
- package/dist/utils/uuid/v5.cjs +1 -2
- package/dist/utils/uuid/v5.d.cts +0 -1
- package/dist/utils/uuid/v5.d.cts.map +1 -1
- package/dist/utils/uuid/v5.d.ts +0 -2
- package/dist/utils/uuid/v5.d.ts.map +1 -1
- package/dist/utils/uuid/v5.js +1 -2
- package/dist/utils/uuid/v6.cjs +1 -2
- package/dist/utils/uuid/v6.d.cts +0 -1
- package/dist/utils/uuid/v6.d.cts.map +1 -1
- package/dist/utils/uuid/v6.d.ts +0 -2
- package/dist/utils/uuid/v6.d.ts.map +1 -1
- package/dist/utils/uuid/v6.js +1 -2
- package/dist/utils/uuid/v7.cjs +2 -3
- package/dist/utils/uuid/v7.d.cts +0 -1
- package/dist/utils/uuid/v7.d.cts.map +1 -1
- package/dist/utils/uuid/v7.d.ts +0 -2
- package/dist/utils/uuid/v7.d.ts.map +1 -1
- package/dist/utils/uuid/v7.js +2 -3
- package/dist/utils/uuid/validate.cjs +1 -2
- package/dist/utils/uuid/validate.d.cts +0 -1
- package/dist/utils/uuid/validate.d.cts.map +1 -1
- package/dist/utils/uuid/validate.d.ts +0 -2
- package/dist/utils/uuid/validate.d.ts.map +1 -1
- package/dist/utils/uuid/validate.js +1 -2
- package/dist/utils/uuid/version.cjs +1 -2
- package/dist/utils/uuid/version.d.cts +0 -1
- package/dist/utils/uuid/version.d.cts.map +1 -1
- package/dist/utils/uuid/version.d.ts +0 -2
- package/dist/utils/uuid/version.d.ts.map +1 -1
- package/dist/utils/uuid/version.js +1 -2
- package/dist/utils/zod-to-json-schema/Options.cjs +1 -2
- package/dist/utils/zod-to-json-schema/Options.d.cts +1 -1
- package/dist/utils/zod-to-json-schema/Options.d.ts +1 -1
- package/dist/utils/zod-to-json-schema/Options.js +1 -2
- package/dist/utils/zod-to-json-schema/Refs.cjs +1 -2
- package/dist/utils/zod-to-json-schema/Refs.d.cts +1 -1
- package/dist/utils/zod-to-json-schema/Refs.d.ts +1 -1
- package/dist/utils/zod-to-json-schema/Refs.js +1 -2
- package/dist/utils/zod-to-json-schema/errorMessages.cjs +1 -2
- package/dist/utils/zod-to-json-schema/errorMessages.d.cts +0 -2
- package/dist/utils/zod-to-json-schema/errorMessages.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.d.ts +0 -2
- package/dist/utils/zod-to-json-schema/errorMessages.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.js +1 -2
- package/dist/utils/zod-to-json-schema/getRelativePath.cjs +1 -2
- package/dist/utils/zod-to-json-schema/getRelativePath.js +1 -2
- package/dist/utils/zod-to-json-schema/index.cjs +10 -10
- package/dist/utils/zod-to-json-schema/index.d.cts +17 -17
- package/dist/utils/zod-to-json-schema/index.d.ts +17 -17
- package/dist/utils/zod-to-json-schema/index.js +10 -10
- package/dist/utils/zod-to-json-schema/parseDef.cjs +2 -3
- package/dist/utils/zod-to-json-schema/parseDef.d.cts +1 -1
- package/dist/utils/zod-to-json-schema/parseDef.d.ts +1 -1
- package/dist/utils/zod-to-json-schema/parseDef.js +2 -3
- package/dist/utils/zod-to-json-schema/parseTypes.d.cts +4 -5
- package/dist/utils/zod-to-json-schema/parseTypes.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.ts +4 -5
- package/dist/utils/zod-to-json-schema/parseTypes.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/any.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/any.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/any.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/any.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/array.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/array.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/array.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/array.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/bigint.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.cts +1 -3
- 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 -3
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/bigint.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/boolean.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/boolean.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/branded.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/branded.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/catch.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/catch.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/date.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/date.d.cts +1 -3
- 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 -3
- package/dist/utils/zod-to-json-schema/parsers/date.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/date.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/default.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/default.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/effects.cjs +2 -3
- package/dist/utils/zod-to-json-schema/parsers/effects.js +2 -3
- package/dist/utils/zod-to-json-schema/parsers/enum.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/enum.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/enum.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/enum.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/intersection.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/literal.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/literal.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/literal.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/literal.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/map.cjs +3 -4
- package/dist/utils/zod-to-json-schema/parsers/map.d.cts +1 -3
- 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 -3
- package/dist/utils/zod-to-json-schema/parsers/map.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.js +3 -4
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/never.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/never.d.cts +1 -3
- 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 -3
- package/dist/utils/zod-to-json-schema/parsers/never.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/never.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/null.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/null.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/null.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/null.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/nullable.cjs +2 -3
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts +1 -3
- 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 -3
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nullable.js +2 -3
- package/dist/utils/zod-to-json-schema/parsers/number.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/number.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/number.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/number.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/object.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/object.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/object.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/object.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/optional.cjs +2 -3
- package/dist/utils/zod-to-json-schema/parsers/optional.js +2 -3
- package/dist/utils/zod-to-json-schema/parsers/pipeline.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/pipeline.d.cts +1 -1
- package/dist/utils/zod-to-json-schema/parsers/pipeline.d.ts +1 -1
- package/dist/utils/zod-to-json-schema/parsers/pipeline.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/promise.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/promise.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/readonly.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/readonly.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/record.cjs +4 -5
- package/dist/utils/zod-to-json-schema/parsers/record.d.cts +3 -4
- 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 +3 -4
- package/dist/utils/zod-to-json-schema/parsers/record.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.js +4 -5
- package/dist/utils/zod-to-json-schema/parsers/set.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/set.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/set.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/string.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/string.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/string.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/tuple.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.cts +0 -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 +0 -2
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/tuple.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/undefined.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.cts +1 -3
- 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 -3
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/undefined.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/union.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/union.d.cts +1 -2
- 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 +1 -2
- package/dist/utils/zod-to-json-schema/parsers/union.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/union.js +1 -2
- package/dist/utils/zod-to-json-schema/parsers/unknown.cjs +1 -2
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.cts +1 -3
- 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 -3
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/unknown.js +1 -2
- package/dist/utils/zod-to-json-schema/selectParser.cjs +4 -5
- package/dist/utils/zod-to-json-schema/selectParser.d.cts +1 -1
- package/dist/utils/zod-to-json-schema/selectParser.d.ts +1 -1
- package/dist/utils/zod-to-json-schema/selectParser.js +4 -5
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.cjs +2 -3
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.d.cts +1 -1
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.d.ts +1 -1
- package/dist/utils/zod-to-json-schema/zodToJsonSchema.js +2 -3
- package/dist/vectorstores.cjs +2 -3
- package/dist/vectorstores.d.cts +4 -5
- package/dist/vectorstores.d.cts.map +1 -1
- package/dist/vectorstores.d.ts +4 -5
- package/dist/vectorstores.d.ts.map +1 -1
- package/dist/vectorstores.js +2 -3
- package/package.json +6 -6
package/dist/prompts/base.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { SerializedFields } from "../load/map_keys.js";
|
|
2
1
|
import { InputValues, PartialValues, StringWithAutocomplete } from "../utils/types/index.js";
|
|
3
|
-
import { BaseCallbackConfig } from "../callbacks/manager.js";
|
|
4
2
|
import { BasePromptValueInterface } from "../prompt_values.js";
|
|
3
|
+
import "../output_parsers/index.js";
|
|
4
|
+
import { SerializedFields } from "../load/map_keys.js";
|
|
5
5
|
import { Runnable } from "../runnables/base.js";
|
|
6
6
|
import { BaseOutputParser } from "../output_parsers/base.js";
|
|
7
|
-
import "../
|
|
8
|
-
//#region src/prompts/base.d.ts
|
|
7
|
+
import { BaseCallbackConfig } from "../callbacks/manager.js";
|
|
9
8
|
export type TypedPromptInputValues<RunInput> = InputValues<StringWithAutocomplete<Extract<keyof RunInput, string>>>;
|
|
10
9
|
export type Example = Record<string, string>;
|
|
11
10
|
/**
|
|
@@ -79,5 +78,4 @@ export declare abstract class BasePromptTemplate<RunInput extends InputValues =
|
|
|
79
78
|
*/
|
|
80
79
|
abstract _getPromptType(): string;
|
|
81
80
|
}
|
|
82
|
-
//#endregion
|
|
83
81
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","names":[],"sources":["../../src/prompts/base.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.d.ts","names":[],"sources":["../../src/prompts/base.ts"],"mappings":";;;;;;;YAcY,uBAAuB,YAAY,YAC7C,uBAAuB,cAAc;YAG3B,UAAU;;;;iBAKL,wBAEf,uBAAuB,mBAEvB;;;;EAKA,gBAAgB,MAAM,cAAc;;;;EAKpC,eAAe;;EAGf,mBAAmB,cAAc;;;;;;8BAOb,mBAEpB,iBAAiB,mBACjB,kBAAkB,2BAA2B,0BAE7C,kDAEQ,SAAS,UAAU,sBAChB;EAEH,uBAAuB;EAE/B;EAEA;MAEI,iBAAiB;EAMrB,gBAAgB,MAAM,cAAc;EAEpC,eAAe;EAEf,kBAAkB,cAAc;;;;EAKhC,WAAW;;EAGX;EAEA,YAAY,OAAO;WAWV,QACP,QAAQ,gBACP,QAAQ,mBAAmB,UAAU,WAAW;;;;;;EAO7C,6BACJ,eAAe,uBAAuB,YACrC,QACD,YAAY,cAAc,oBAAoB;;;;;;;EA0B1C,OACJ,OAAO,UACP,UAAU,qBACT,QAAQ;;;;;;;;;;;;WAwBF,OAAO,QAAQ,uBAAuB,YAAY;;;;;;WAOlD,kBACP,QAAQ,uBAAuB,YAC9B,QAAQ;;;;WAKF"}
|
package/dist/prompts/base.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Runnable } from "../runnables/base.js";
|
|
2
|
-
|
|
2
|
+
// src/prompts/base.ts
|
|
3
3
|
/**
|
|
4
4
|
* Base class for prompt templates. Exposes a format method that returns a
|
|
5
5
|
* string prompt given a set of input values.
|
|
@@ -64,7 +64,6 @@ var BasePromptTemplate = class extends Runnable {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
//#endregion
|
|
68
67
|
export { BasePromptTemplate };
|
|
69
68
|
|
|
70
69
|
//# sourceMappingURL=base.js.map
|
package/dist/prompts/chat.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
require("../messages/index.cjs");
|
|
2
2
|
const require_base = require("../messages/base.cjs");
|
|
3
3
|
const require_ai = require("../messages/ai.cjs");
|
|
4
4
|
const require_chat = require("../messages/chat.cjs");
|
|
5
5
|
const require_human = require("../messages/human.cjs");
|
|
6
6
|
const require_system = require("../messages/system.cjs");
|
|
7
7
|
const require_utils = require("../messages/utils.cjs");
|
|
8
|
-
const require_base$1 = require("../runnables/base.cjs");
|
|
9
|
-
require("../messages/index.cjs");
|
|
10
8
|
const require_prompt_values = require("../prompt_values.cjs");
|
|
11
|
-
const require_base$
|
|
9
|
+
const require_base$1 = require("../runnables/base.cjs");
|
|
12
10
|
const require_string = require("./string.cjs");
|
|
13
|
-
const
|
|
11
|
+
const require_base$2 = require("./base.cjs");
|
|
14
12
|
const require_prompt = require("./prompt.cjs");
|
|
15
13
|
const require_image = require("./image.cjs");
|
|
14
|
+
const require_template = require("./template.cjs");
|
|
15
|
+
const require_errors_index = require("../errors/index.cjs");
|
|
16
16
|
const require_dict = require("./dict.cjs");
|
|
17
|
-
|
|
17
|
+
// src/prompts/chat.ts
|
|
18
18
|
/**
|
|
19
19
|
* Abstract class that serves as a base for creating message prompt
|
|
20
20
|
* templates. It defines how to format messages for different roles in a
|
|
@@ -523,7 +523,6 @@ var ChatPromptTemplate = class ChatPromptTemplate extends BaseChatPromptTemplate
|
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
525
|
};
|
|
526
|
-
//#endregion
|
|
527
526
|
exports.AIMessagePromptTemplate = AIMessagePromptTemplate;
|
|
528
527
|
exports.BaseChatPromptTemplate = BaseChatPromptTemplate;
|
|
529
528
|
exports.BaseMessagePromptTemplate = BaseMessagePromptTemplate;
|
package/dist/prompts/chat.d.cts
CHANGED
|
@@ -4,18 +4,17 @@ import { ChatMessage } from "../messages/chat.cjs";
|
|
|
4
4
|
import { HumanMessage } from "../messages/human.cjs";
|
|
5
5
|
import { SystemMessage } from "../messages/system.cjs";
|
|
6
6
|
import { MessageStructure, MessageToolSet, MessageType } from "../messages/message.cjs";
|
|
7
|
-
import { InputValues, PartialValues } from "../utils/types/index.cjs";
|
|
8
7
|
import { BaseCallbackConfig } from "../callbacks/manager.cjs";
|
|
8
|
+
import "../messages/index.cjs";
|
|
9
9
|
import { ChatPromptValueInterface } from "../prompt_values.cjs";
|
|
10
|
+
import { InputValues, PartialValues } from "../utils/types/index.cjs";
|
|
10
11
|
import { Runnable } from "../runnables/base.cjs";
|
|
11
|
-
import "../messages/index.cjs";
|
|
12
|
-
import { BasePromptTemplate, BasePromptTemplateInput, TypedPromptInputValues } from "./base.cjs";
|
|
13
12
|
import { BaseStringPromptTemplate } from "./string.cjs";
|
|
14
|
-
import {
|
|
13
|
+
import { BasePromptTemplate, BasePromptTemplateInput, TypedPromptInputValues } from "./base.cjs";
|
|
15
14
|
import { ExtractedFStringParams, PromptTemplateInput } from "./prompt.cjs";
|
|
16
15
|
import { ImagePromptTemplate } from "./image.cjs";
|
|
16
|
+
import { TemplateFormat } from "./template.cjs";
|
|
17
17
|
import { DictPromptTemplate } from "./dict.cjs";
|
|
18
|
-
//#region src/prompts/chat.d.ts
|
|
19
18
|
/**
|
|
20
19
|
* Abstract class that serves as a base for creating message prompt
|
|
21
20
|
* templates. It defines how to format messages for different roles in a
|
|
@@ -243,5 +242,5 @@ export declare class ChatPromptTemplate<RunInput extends InputValues = any, Part
|
|
|
243
242
|
*/
|
|
244
243
|
static fromMessages<RunInput extends InputValues = any, Extra extends ChatPromptTemplateInput<RunInput> = ChatPromptTemplateInput<RunInput>>(promptMessages: (ChatPromptTemplate<InputValues, string> | BaseMessagePromptTemplateLike)[], extra?: Omit<Extra, "inputVariables" | "promptMessages" | "partialVariables">): ChatPromptTemplate<RunInput>;
|
|
245
244
|
}
|
|
246
|
-
|
|
245
|
+
export {};
|
|
247
246
|
//# sourceMappingURL=chat.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.cts","names":["_$___messages_message_js0.MessageToolSet","_$___messages_message_js0.MessageStructure","_$___messages_message_js0.MessageType"],"sources":["../../src/prompts/chat.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat.d.cts","names":["_$___messages_message_js0.MessageToolSet","_$___messages_message_js0.MessageStructure","_$___messages_message_js0.MessageType"],"sources":["../../src/prompts/chat.ts"],"mappings":"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"}
|
package/dist/prompts/chat.d.ts
CHANGED
|
@@ -4,18 +4,17 @@ import { ChatMessage } from "../messages/chat.js";
|
|
|
4
4
|
import { HumanMessage } from "../messages/human.js";
|
|
5
5
|
import { SystemMessage } from "../messages/system.js";
|
|
6
6
|
import { MessageStructure, MessageToolSet, MessageType } from "../messages/message.js";
|
|
7
|
-
import { InputValues, PartialValues } from "../utils/types/index.js";
|
|
8
7
|
import { BaseCallbackConfig } from "../callbacks/manager.js";
|
|
8
|
+
import "../messages/index.js";
|
|
9
9
|
import { ChatPromptValueInterface } from "../prompt_values.js";
|
|
10
|
+
import { InputValues, PartialValues } from "../utils/types/index.js";
|
|
10
11
|
import { Runnable } from "../runnables/base.js";
|
|
11
|
-
import "../messages/index.js";
|
|
12
|
-
import { BasePromptTemplate, BasePromptTemplateInput, TypedPromptInputValues } from "./base.js";
|
|
13
12
|
import { BaseStringPromptTemplate } from "./string.js";
|
|
14
|
-
import {
|
|
13
|
+
import { BasePromptTemplate, BasePromptTemplateInput, TypedPromptInputValues } from "./base.js";
|
|
15
14
|
import { ExtractedFStringParams, PromptTemplateInput } from "./prompt.js";
|
|
16
15
|
import { ImagePromptTemplate } from "./image.js";
|
|
16
|
+
import { TemplateFormat } from "./template.js";
|
|
17
17
|
import { DictPromptTemplate } from "./dict.js";
|
|
18
|
-
//#region src/prompts/chat.d.ts
|
|
19
18
|
/**
|
|
20
19
|
* Abstract class that serves as a base for creating message prompt
|
|
21
20
|
* templates. It defines how to format messages for different roles in a
|
|
@@ -243,5 +242,5 @@ export declare class ChatPromptTemplate<RunInput extends InputValues = any, Part
|
|
|
243
242
|
*/
|
|
244
243
|
static fromMessages<RunInput extends InputValues = any, Extra extends ChatPromptTemplateInput<RunInput> = ChatPromptTemplateInput<RunInput>>(promptMessages: (ChatPromptTemplate<InputValues, string> | BaseMessagePromptTemplateLike)[], extra?: Omit<Extra, "inputVariables" | "promptMessages" | "partialVariables">): ChatPromptTemplate<RunInput>;
|
|
245
244
|
}
|
|
246
|
-
|
|
245
|
+
export {};
|
|
247
246
|
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","names":["_$___messages_message_js0.MessageToolSet","_$___messages_message_js0.MessageStructure","_$___messages_message_js0.MessageType"],"sources":["../../src/prompts/chat.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat.d.ts","names":["_$___messages_message_js0.MessageToolSet","_$___messages_message_js0.MessageStructure","_$___messages_message_js0.MessageType"],"sources":["../../src/prompts/chat.ts"],"mappings":"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"}
|
package/dist/prompts/chat.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../messages/index.js";
|
|
2
2
|
import { BaseMessage, isBaseMessage } from "../messages/base.js";
|
|
3
3
|
import { AIMessage } from "../messages/ai.js";
|
|
4
4
|
import { ChatMessage } from "../messages/chat.js";
|
|
5
5
|
import { HumanMessage } from "../messages/human.js";
|
|
6
6
|
import { SystemMessage } from "../messages/system.js";
|
|
7
7
|
import { coerceMessageLikeToMessage } from "../messages/utils.js";
|
|
8
|
-
import { Runnable } from "../runnables/base.js";
|
|
9
|
-
import "../messages/index.js";
|
|
10
8
|
import { ChatPromptValue } from "../prompt_values.js";
|
|
11
|
-
import {
|
|
9
|
+
import { Runnable } from "../runnables/base.js";
|
|
12
10
|
import { BaseStringPromptTemplate } from "./string.js";
|
|
13
|
-
import {
|
|
11
|
+
import { BasePromptTemplate } from "./base.js";
|
|
14
12
|
import { PromptTemplate } from "./prompt.js";
|
|
15
13
|
import { ImagePromptTemplate } from "./image.js";
|
|
14
|
+
import { parseFString, parseMustache } from "./template.js";
|
|
15
|
+
import { addLangChainErrorFields } from "../errors/index.js";
|
|
16
16
|
import { DictPromptTemplate } from "./dict.js";
|
|
17
|
-
|
|
17
|
+
// src/prompts/chat.ts
|
|
18
18
|
/**
|
|
19
19
|
* Abstract class that serves as a base for creating message prompt
|
|
20
20
|
* templates. It defines how to format messages for different roles in a
|
|
@@ -523,7 +523,6 @@ var ChatPromptTemplate = class ChatPromptTemplate extends BaseChatPromptTemplate
|
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
525
|
};
|
|
526
|
-
//#endregion
|
|
527
526
|
export { AIMessagePromptTemplate, BaseChatPromptTemplate, BaseMessagePromptTemplate, BaseMessageStringPromptTemplate, ChatMessagePromptTemplate, ChatPromptTemplate, HumanMessagePromptTemplate, MessagesPlaceholder, SystemMessagePromptTemplate };
|
|
528
527
|
|
|
529
528
|
//# sourceMappingURL=chat.js.map
|
package/dist/prompts/dict.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const require_base = require("../runnables/base.cjs");
|
|
2
2
|
const require_template = require("./template.cjs");
|
|
3
|
-
|
|
3
|
+
const require_utils = require("./utils.cjs");
|
|
4
|
+
// src/prompts/dict.ts
|
|
4
5
|
var DictPromptTemplate = class extends require_base.Runnable {
|
|
5
6
|
lc_namespace = [
|
|
6
7
|
"langchain_core",
|
|
@@ -32,7 +33,8 @@ var DictPromptTemplate = class extends require_base.Runnable {
|
|
|
32
33
|
return await this._callWithConfig(this.format.bind(this), values, { runType: "prompt" });
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
|
-
function _getInputVariables(template, templateFormat) {
|
|
36
|
+
function _getInputVariables(template, templateFormat, depth = 0) {
|
|
37
|
+
if (depth >= 256) throw require_utils.createPromptTemplateDepthError();
|
|
36
38
|
const inputVariables = [];
|
|
37
39
|
for (const v of Object.values(template)) if (typeof v === "string") require_template.parseTemplate(v, templateFormat).forEach((t) => {
|
|
38
40
|
if (t.type === "variable") inputVariables.push(t.name);
|
|
@@ -41,23 +43,23 @@ function _getInputVariables(template, templateFormat) {
|
|
|
41
43
|
for (const x of v) if (typeof x === "string") require_template.parseTemplate(x, templateFormat).forEach((t) => {
|
|
42
44
|
if (t.type === "variable") inputVariables.push(t.name);
|
|
43
45
|
});
|
|
44
|
-
else if (typeof x === "object") inputVariables.push(..._getInputVariables(x, templateFormat));
|
|
45
|
-
} else if (typeof v === "object" && v !== null) inputVariables.push(..._getInputVariables(v, templateFormat));
|
|
46
|
+
else if (typeof x === "object") inputVariables.push(..._getInputVariables(x, templateFormat, depth + 1));
|
|
47
|
+
} else if (typeof v === "object" && v !== null) inputVariables.push(..._getInputVariables(v, templateFormat, depth + 1));
|
|
46
48
|
return Array.from(new Set(inputVariables));
|
|
47
49
|
}
|
|
48
|
-
function _insertInputVariables(template, inputs, templateFormat) {
|
|
50
|
+
function _insertInputVariables(template, inputs, templateFormat, depth = 0) {
|
|
51
|
+
if (depth >= 256) throw require_utils.createPromptTemplateDepthError();
|
|
49
52
|
const formatted = {};
|
|
50
53
|
for (const [k, v] of Object.entries(template)) if (typeof v === "string") formatted[k] = require_template.renderTemplate(v, templateFormat, inputs);
|
|
51
54
|
else if (Array.isArray(v)) {
|
|
52
55
|
const formattedV = [];
|
|
53
56
|
for (const x of v) if (typeof x === "string") formattedV.push(require_template.renderTemplate(x, templateFormat, inputs));
|
|
54
|
-
else if (typeof x === "object") formattedV.push(_insertInputVariables(x, inputs, templateFormat));
|
|
57
|
+
else if (typeof x === "object") formattedV.push(_insertInputVariables(x, inputs, templateFormat, depth + 1));
|
|
55
58
|
formatted[k] = formattedV;
|
|
56
|
-
} else if (typeof v === "object" && v !== null) formatted[k] = _insertInputVariables(v, inputs, templateFormat);
|
|
59
|
+
} else if (typeof v === "object" && v !== null) formatted[k] = _insertInputVariables(v, inputs, templateFormat, depth + 1);
|
|
57
60
|
else formatted[k] = v;
|
|
58
61
|
return formatted;
|
|
59
62
|
}
|
|
60
|
-
//#endregion
|
|
61
63
|
exports.DictPromptTemplate = DictPromptTemplate;
|
|
62
64
|
|
|
63
65
|
//# sourceMappingURL=dict.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dict.cjs","names":["Runnable","renderTemplate"],"sources":["../../src/prompts/dict.ts"],"sourcesContent":["import { Runnable } from \"../runnables/base.js\";\nimport type { InputValues } from \"../utils/types/index.js\";\nimport { TypedPromptInputValues } from \"./base.js\";\nimport { parseTemplate, renderTemplate, TemplateFormat } from \"./template.js\";\n\nexport class DictPromptTemplate<\n RunInput extends InputValues = InputValues,\n RunOutput extends Record<string, unknown> = Record<string, unknown>,\n> extends Runnable<TypedPromptInputValues<RunInput>, RunOutput> {\n lc_namespace = [\"langchain_core\", \"prompts\", \"dict\"];\n\n lc_serializable = true;\n\n template: Record<string, unknown>;\n\n templateFormat: TemplateFormat;\n\n inputVariables: Array<Extract<keyof RunInput, string>>;\n\n static lc_name() {\n return \"DictPromptTemplate\";\n }\n\n constructor(fields: {\n template: Record<string, unknown>;\n templateFormat?: TemplateFormat;\n }) {\n const templateFormat = fields.templateFormat ?? \"f-string\";\n const inputVariables = _getInputVariables(\n fields.template,\n templateFormat\n ) as Array<Extract<keyof RunInput, string>>;\n super({ inputVariables, ...fields });\n this.template = fields.template;\n this.templateFormat = templateFormat;\n this.inputVariables = inputVariables;\n }\n\n async format(values: TypedPromptInputValues<RunInput>): Promise<RunOutput> {\n return _insertInputVariables(\n this.template,\n values,\n this.templateFormat\n ) as RunOutput;\n }\n\n async invoke(\n values: TypedPromptInputValues<InputValues>\n ): Promise<RunOutput> {\n return await this._callWithConfig(this.format.bind(this), values, {\n runType: \"prompt\",\n });\n }\n}\n\nfunction _getInputVariables(\n template: Record<string, unknown>,\n templateFormat: TemplateFormat\n): Array<Extract<keyof InputValues, string>> {\n const inputVariables: Array<Extract<keyof InputValues, string>> = [];\n for (const v of Object.values(template)) {\n if (typeof v === \"string\") {\n parseTemplate(v, templateFormat).forEach((t) => {\n if (t.type === \"variable\") {\n inputVariables.push(t.name);\n }\n });\n } else if (Array.isArray(v)) {\n for (const x of v) {\n if (typeof x === \"string\") {\n parseTemplate(x, templateFormat).forEach((t) => {\n if (t.type === \"variable\") {\n inputVariables.push(t.name);\n }\n });\n } else if (typeof x === \"object\") {\n inputVariables.push(..._getInputVariables(x, templateFormat));\n }\n }\n } else if (typeof v === \"object\" && v !== null) {\n inputVariables.push(\n ..._getInputVariables(v as Record<string, unknown
|
|
1
|
+
{"version":3,"file":"dict.cjs","names":["Runnable","createPromptTemplateDepthError","renderTemplate"],"sources":["../../src/prompts/dict.ts"],"sourcesContent":["import { Runnable } from \"../runnables/base.js\";\nimport type { InputValues } from \"../utils/types/index.js\";\nimport { TypedPromptInputValues } from \"./base.js\";\nimport { parseTemplate, renderTemplate, TemplateFormat } from \"./template.js\";\nimport {\n MAX_PROMPT_TEMPLATE_DEPTH,\n createPromptTemplateDepthError,\n} from \"./utils.js\";\n\nexport class DictPromptTemplate<\n RunInput extends InputValues = InputValues,\n RunOutput extends Record<string, unknown> = Record<string, unknown>,\n> extends Runnable<TypedPromptInputValues<RunInput>, RunOutput> {\n lc_namespace = [\"langchain_core\", \"prompts\", \"dict\"];\n\n lc_serializable = true;\n\n template: Record<string, unknown>;\n\n templateFormat: TemplateFormat;\n\n inputVariables: Array<Extract<keyof RunInput, string>>;\n\n static lc_name() {\n return \"DictPromptTemplate\";\n }\n\n constructor(fields: {\n template: Record<string, unknown>;\n templateFormat?: TemplateFormat;\n }) {\n const templateFormat = fields.templateFormat ?? \"f-string\";\n const inputVariables = _getInputVariables(\n fields.template,\n templateFormat\n ) as Array<Extract<keyof RunInput, string>>;\n super({ inputVariables, ...fields });\n this.template = fields.template;\n this.templateFormat = templateFormat;\n this.inputVariables = inputVariables;\n }\n\n async format(values: TypedPromptInputValues<RunInput>): Promise<RunOutput> {\n return _insertInputVariables(\n this.template,\n values,\n this.templateFormat\n ) as RunOutput;\n }\n\n async invoke(\n values: TypedPromptInputValues<InputValues>\n ): Promise<RunOutput> {\n return await this._callWithConfig(this.format.bind(this), values, {\n runType: \"prompt\",\n });\n }\n}\n\nfunction _getInputVariables(\n template: Record<string, unknown>,\n templateFormat: TemplateFormat,\n depth = 0\n): Array<Extract<keyof InputValues, string>> {\n if (depth >= MAX_PROMPT_TEMPLATE_DEPTH) {\n throw createPromptTemplateDepthError();\n }\n\n const inputVariables: Array<Extract<keyof InputValues, string>> = [];\n for (const v of Object.values(template)) {\n if (typeof v === \"string\") {\n parseTemplate(v, templateFormat).forEach((t) => {\n if (t.type === \"variable\") {\n inputVariables.push(t.name);\n }\n });\n } else if (Array.isArray(v)) {\n for (const x of v) {\n if (typeof x === \"string\") {\n parseTemplate(x, templateFormat).forEach((t) => {\n if (t.type === \"variable\") {\n inputVariables.push(t.name);\n }\n });\n } else if (typeof x === \"object\") {\n inputVariables.push(\n ..._getInputVariables(x, templateFormat, depth + 1)\n );\n }\n }\n } else if (typeof v === \"object\" && v !== null) {\n inputVariables.push(\n ..._getInputVariables(\n v as Record<string, unknown>,\n templateFormat,\n depth + 1\n )\n );\n }\n }\n return Array.from(new Set(inputVariables));\n}\n\nfunction _insertInputVariables(\n template: Record<string, unknown>,\n inputs: TypedPromptInputValues<InputValues>,\n templateFormat: TemplateFormat,\n depth = 0\n): Record<string, unknown> {\n if (depth >= MAX_PROMPT_TEMPLATE_DEPTH) {\n throw createPromptTemplateDepthError();\n }\n\n const formatted: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(template)) {\n if (typeof v === \"string\") {\n formatted[k] = renderTemplate(v, templateFormat, inputs);\n } else if (Array.isArray(v)) {\n const formattedV: Array<unknown> = [];\n for (const x of v) {\n if (typeof x === \"string\") {\n formattedV.push(renderTemplate(x, templateFormat, inputs));\n } else if (typeof x === \"object\") {\n formattedV.push(\n _insertInputVariables(x, inputs, templateFormat, depth + 1)\n );\n }\n }\n formatted[k] = formattedV;\n } else if (typeof v === \"object\" && v !== null) {\n formatted[k] = _insertInputVariables(\n v as Record<string, unknown>,\n inputs,\n templateFormat,\n depth + 1\n );\n } else {\n formatted[k] = v;\n }\n }\n return formatted;\n}\n"],"mappings":";;;;AASA,IAAa,qBAAb,cAGUA,aAAAA,SAAsD;CAC9D,eAAe;EAAC;EAAkB;EAAW;CAAM;CAEnD,kBAAkB;CAElB;CAEA;CAEA;CAEA,OAAO,UAAU;EACf,OAAO;CACT;CAEA,YAAY,QAGT;EACD,MAAM,iBAAiB,OAAO,kBAAkB;EAChD,MAAM,iBAAiB,mBACrB,OAAO,UACP,cACF;EACA,MAAM;GAAE;GAAgB,GAAG;EAAO,CAAC;EACnC,KAAK,WAAW,OAAO;EACvB,KAAK,iBAAiB;EACtB,KAAK,iBAAiB;CACxB;CAEA,MAAM,OAAO,QAA8D;EACzE,OAAO,sBACL,KAAK,UACL,QACA,KAAK,cACP;CACF;CAEA,MAAM,OACJ,QACoB;EACpB,OAAO,MAAM,KAAK,gBAAgB,KAAK,OAAO,KAAK,IAAI,GAAG,QAAQ,EAChE,SAAS,SACX,CAAC;CACH;AACF;AAEA,SAAS,mBACP,UACA,gBACA,QAAQ,GACmC;CAC3C,IAAI,SAAA,KACF,MAAMC,cAAAA,+BAA+B;CAGvC,MAAM,iBAA4D,CAAC;CACnE,KAAK,MAAM,KAAK,OAAO,OAAO,QAAQ,GACpC,IAAI,OAAO,MAAM,UACf,iBAAA,cAAc,GAAG,cAAc,CAAC,CAAC,SAAS,MAAM;EAC9C,IAAI,EAAE,SAAS,YACb,eAAe,KAAK,EAAE,IAAI;CAE9B,CAAC;MACI,IAAI,MAAM,QAAQ,CAAC,GACnB;OAAA,MAAM,KAAK,GACd,IAAI,OAAO,MAAM,UACf,iBAAA,cAAc,GAAG,cAAc,CAAC,CAAC,SAAS,MAAM;GAC9C,IAAI,EAAE,SAAS,YACb,eAAe,KAAK,EAAE,IAAI;EAE9B,CAAC;OACI,IAAI,OAAO,MAAM,UACtB,eAAe,KACb,GAAG,mBAAmB,GAAG,gBAAgB,QAAQ,CAAC,CACpD;CAAA,OAGC,IAAI,OAAO,MAAM,YAAY,MAAM,MACxC,eAAe,KACb,GAAG,mBACD,GACA,gBACA,QAAQ,CACV,CACF;CAGJ,OAAO,MAAM,KAAK,IAAI,IAAI,cAAc,CAAC;AAC3C;AAEA,SAAS,sBACP,UACA,QACA,gBACA,QAAQ,GACiB;CACzB,IAAI,SAAA,KACF,MAAMA,cAAAA,+BAA+B;CAGvC,MAAM,YAAqC,CAAC;CAC5C,KAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,QAAQ,GAC1C,IAAI,OAAO,MAAM,UACf,UAAU,KAAKC,iBAAAA,eAAe,GAAG,gBAAgB,MAAM;MAClD,IAAI,MAAM,QAAQ,CAAC,GAAG;EAC3B,MAAM,aAA6B,CAAC;EACpC,KAAK,MAAM,KAAK,GACd,IAAI,OAAO,MAAM,UACf,WAAW,KAAKA,iBAAAA,eAAe,GAAG,gBAAgB,MAAM,CAAC;OACpD,IAAI,OAAO,MAAM,UACtB,WAAW,KACT,sBAAsB,GAAG,QAAQ,gBAAgB,QAAQ,CAAC,CAC5D;EAGJ,UAAU,KAAK;CACjB,OAAO,IAAI,OAAO,MAAM,YAAY,MAAM,MACxC,UAAU,KAAK,sBACb,GACA,QACA,gBACA,QAAQ,CACV;MAEA,UAAU,KAAK;CAGnB,OAAO;AACT"}
|
package/dist/prompts/dict.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { InputValues } from "../utils/types/index.cjs";
|
|
2
1
|
import { Runnable } from "../runnables/base.cjs";
|
|
2
|
+
import { InputValues } from "../utils/types/index.cjs";
|
|
3
3
|
import { TypedPromptInputValues } from "./base.cjs";
|
|
4
4
|
import { TemplateFormat } from "./template.cjs";
|
|
5
|
-
//#region src/prompts/dict.d.ts
|
|
6
5
|
export declare class DictPromptTemplate<RunInput extends InputValues = InputValues, RunOutput extends Record<string, unknown> = Record<string, unknown>> extends Runnable<TypedPromptInputValues<RunInput>, RunOutput> {
|
|
7
6
|
lc_namespace: string[];
|
|
8
7
|
lc_serializable: boolean;
|
|
@@ -17,5 +16,4 @@ export declare class DictPromptTemplate<RunInput extends InputValues = InputValu
|
|
|
17
16
|
format(values: TypedPromptInputValues<RunInput>): Promise<RunOutput>;
|
|
18
17
|
invoke(values: TypedPromptInputValues<InputValues>): Promise<RunOutput>;
|
|
19
18
|
}
|
|
20
|
-
//#endregion
|
|
21
19
|
//# sourceMappingURL=dict.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dict.d.cts","names":[],"sources":["../../src/prompts/dict.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dict.d.cts","names":[],"sources":["../../src/prompts/dict.ts"],"mappings":";;;;qBASa,mBACX,iBAAiB,cAAc,aAC/B,kBAAkB,0BAA0B,iCACpC,SAAS,uBAAuB,WAAW;EACnD;EAEA;EAEA,UAAU;EAEV,gBAAgB;EAEhB,gBAAgB,MAAM,cAAc;SAE7B;EAIP,YAAY;IACV,UAAU;IACV,iBAAiB;;EAab,OAAO,QAAQ,uBAAuB,YAAY,QAAQ;EAQ1D,OACJ,QAAQ,uBAAuB,eAC9B,QAAQ"}
|
package/dist/prompts/dict.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { InputValues } from "../utils/types/index.js";
|
|
2
1
|
import { Runnable } from "../runnables/base.js";
|
|
2
|
+
import { InputValues } from "../utils/types/index.js";
|
|
3
3
|
import { TypedPromptInputValues } from "./base.js";
|
|
4
4
|
import { TemplateFormat } from "./template.js";
|
|
5
|
-
//#region src/prompts/dict.d.ts
|
|
6
5
|
export declare class DictPromptTemplate<RunInput extends InputValues = InputValues, RunOutput extends Record<string, unknown> = Record<string, unknown>> extends Runnable<TypedPromptInputValues<RunInput>, RunOutput> {
|
|
7
6
|
lc_namespace: string[];
|
|
8
7
|
lc_serializable: boolean;
|
|
@@ -17,5 +16,4 @@ export declare class DictPromptTemplate<RunInput extends InputValues = InputValu
|
|
|
17
16
|
format(values: TypedPromptInputValues<RunInput>): Promise<RunOutput>;
|
|
18
17
|
invoke(values: TypedPromptInputValues<InputValues>): Promise<RunOutput>;
|
|
19
18
|
}
|
|
20
|
-
//#endregion
|
|
21
19
|
//# sourceMappingURL=dict.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dict.d.ts","names":[],"sources":["../../src/prompts/dict.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dict.d.ts","names":[],"sources":["../../src/prompts/dict.ts"],"mappings":";;;;qBASa,mBACX,iBAAiB,cAAc,aAC/B,kBAAkB,0BAA0B,iCACpC,SAAS,uBAAuB,WAAW;EACnD;EAEA;EAEA,UAAU;EAEV,gBAAgB;EAEhB,gBAAgB,MAAM,cAAc;SAE7B;EAIP,YAAY;IACV,UAAU;IACV,iBAAiB;;EAab,OAAO,QAAQ,uBAAuB,YAAY,QAAQ;EAQ1D,OACJ,QAAQ,uBAAuB,eAC9B,QAAQ"}
|
package/dist/prompts/dict.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Runnable } from "../runnables/base.js";
|
|
2
2
|
import { parseTemplate, renderTemplate } from "./template.js";
|
|
3
|
-
|
|
3
|
+
import { createPromptTemplateDepthError } from "./utils.js";
|
|
4
|
+
// src/prompts/dict.ts
|
|
4
5
|
var DictPromptTemplate = class extends Runnable {
|
|
5
6
|
lc_namespace = [
|
|
6
7
|
"langchain_core",
|
|
@@ -32,7 +33,8 @@ var DictPromptTemplate = class extends Runnable {
|
|
|
32
33
|
return await this._callWithConfig(this.format.bind(this), values, { runType: "prompt" });
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
|
-
function _getInputVariables(template, templateFormat) {
|
|
36
|
+
function _getInputVariables(template, templateFormat, depth = 0) {
|
|
37
|
+
if (depth >= 256) throw createPromptTemplateDepthError();
|
|
36
38
|
const inputVariables = [];
|
|
37
39
|
for (const v of Object.values(template)) if (typeof v === "string") parseTemplate(v, templateFormat).forEach((t) => {
|
|
38
40
|
if (t.type === "variable") inputVariables.push(t.name);
|
|
@@ -41,23 +43,23 @@ function _getInputVariables(template, templateFormat) {
|
|
|
41
43
|
for (const x of v) if (typeof x === "string") parseTemplate(x, templateFormat).forEach((t) => {
|
|
42
44
|
if (t.type === "variable") inputVariables.push(t.name);
|
|
43
45
|
});
|
|
44
|
-
else if (typeof x === "object") inputVariables.push(..._getInputVariables(x, templateFormat));
|
|
45
|
-
} else if (typeof v === "object" && v !== null) inputVariables.push(..._getInputVariables(v, templateFormat));
|
|
46
|
+
else if (typeof x === "object") inputVariables.push(..._getInputVariables(x, templateFormat, depth + 1));
|
|
47
|
+
} else if (typeof v === "object" && v !== null) inputVariables.push(..._getInputVariables(v, templateFormat, depth + 1));
|
|
46
48
|
return Array.from(new Set(inputVariables));
|
|
47
49
|
}
|
|
48
|
-
function _insertInputVariables(template, inputs, templateFormat) {
|
|
50
|
+
function _insertInputVariables(template, inputs, templateFormat, depth = 0) {
|
|
51
|
+
if (depth >= 256) throw createPromptTemplateDepthError();
|
|
49
52
|
const formatted = {};
|
|
50
53
|
for (const [k, v] of Object.entries(template)) if (typeof v === "string") formatted[k] = renderTemplate(v, templateFormat, inputs);
|
|
51
54
|
else if (Array.isArray(v)) {
|
|
52
55
|
const formattedV = [];
|
|
53
56
|
for (const x of v) if (typeof x === "string") formattedV.push(renderTemplate(x, templateFormat, inputs));
|
|
54
|
-
else if (typeof x === "object") formattedV.push(_insertInputVariables(x, inputs, templateFormat));
|
|
57
|
+
else if (typeof x === "object") formattedV.push(_insertInputVariables(x, inputs, templateFormat, depth + 1));
|
|
55
58
|
formatted[k] = formattedV;
|
|
56
|
-
} else if (typeof v === "object" && v !== null) formatted[k] = _insertInputVariables(v, inputs, templateFormat);
|
|
59
|
+
} else if (typeof v === "object" && v !== null) formatted[k] = _insertInputVariables(v, inputs, templateFormat, depth + 1);
|
|
57
60
|
else formatted[k] = v;
|
|
58
61
|
return formatted;
|
|
59
62
|
}
|
|
60
|
-
//#endregion
|
|
61
63
|
export { DictPromptTemplate };
|
|
62
64
|
|
|
63
65
|
//# sourceMappingURL=dict.js.map
|
package/dist/prompts/dict.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dict.js","names":[],"sources":["../../src/prompts/dict.ts"],"sourcesContent":["import { Runnable } from \"../runnables/base.js\";\nimport type { InputValues } from \"../utils/types/index.js\";\nimport { TypedPromptInputValues } from \"./base.js\";\nimport { parseTemplate, renderTemplate, TemplateFormat } from \"./template.js\";\n\nexport class DictPromptTemplate<\n RunInput extends InputValues = InputValues,\n RunOutput extends Record<string, unknown> = Record<string, unknown>,\n> extends Runnable<TypedPromptInputValues<RunInput>, RunOutput> {\n lc_namespace = [\"langchain_core\", \"prompts\", \"dict\"];\n\n lc_serializable = true;\n\n template: Record<string, unknown>;\n\n templateFormat: TemplateFormat;\n\n inputVariables: Array<Extract<keyof RunInput, string>>;\n\n static lc_name() {\n return \"DictPromptTemplate\";\n }\n\n constructor(fields: {\n template: Record<string, unknown>;\n templateFormat?: TemplateFormat;\n }) {\n const templateFormat = fields.templateFormat ?? \"f-string\";\n const inputVariables = _getInputVariables(\n fields.template,\n templateFormat\n ) as Array<Extract<keyof RunInput, string>>;\n super({ inputVariables, ...fields });\n this.template = fields.template;\n this.templateFormat = templateFormat;\n this.inputVariables = inputVariables;\n }\n\n async format(values: TypedPromptInputValues<RunInput>): Promise<RunOutput> {\n return _insertInputVariables(\n this.template,\n values,\n this.templateFormat\n ) as RunOutput;\n }\n\n async invoke(\n values: TypedPromptInputValues<InputValues>\n ): Promise<RunOutput> {\n return await this._callWithConfig(this.format.bind(this), values, {\n runType: \"prompt\",\n });\n }\n}\n\nfunction _getInputVariables(\n template: Record<string, unknown>,\n templateFormat: TemplateFormat\n): Array<Extract<keyof InputValues, string>> {\n const inputVariables: Array<Extract<keyof InputValues, string>> = [];\n for (const v of Object.values(template)) {\n if (typeof v === \"string\") {\n parseTemplate(v, templateFormat).forEach((t) => {\n if (t.type === \"variable\") {\n inputVariables.push(t.name);\n }\n });\n } else if (Array.isArray(v)) {\n for (const x of v) {\n if (typeof x === \"string\") {\n parseTemplate(x, templateFormat).forEach((t) => {\n if (t.type === \"variable\") {\n inputVariables.push(t.name);\n }\n });\n } else if (typeof x === \"object\") {\n inputVariables.push(..._getInputVariables(x, templateFormat));\n }\n }\n } else if (typeof v === \"object\" && v !== null) {\n inputVariables.push(\n ..._getInputVariables(v as Record<string, unknown
|
|
1
|
+
{"version":3,"file":"dict.js","names":[],"sources":["../../src/prompts/dict.ts"],"sourcesContent":["import { Runnable } from \"../runnables/base.js\";\nimport type { InputValues } from \"../utils/types/index.js\";\nimport { TypedPromptInputValues } from \"./base.js\";\nimport { parseTemplate, renderTemplate, TemplateFormat } from \"./template.js\";\nimport {\n MAX_PROMPT_TEMPLATE_DEPTH,\n createPromptTemplateDepthError,\n} from \"./utils.js\";\n\nexport class DictPromptTemplate<\n RunInput extends InputValues = InputValues,\n RunOutput extends Record<string, unknown> = Record<string, unknown>,\n> extends Runnable<TypedPromptInputValues<RunInput>, RunOutput> {\n lc_namespace = [\"langchain_core\", \"prompts\", \"dict\"];\n\n lc_serializable = true;\n\n template: Record<string, unknown>;\n\n templateFormat: TemplateFormat;\n\n inputVariables: Array<Extract<keyof RunInput, string>>;\n\n static lc_name() {\n return \"DictPromptTemplate\";\n }\n\n constructor(fields: {\n template: Record<string, unknown>;\n templateFormat?: TemplateFormat;\n }) {\n const templateFormat = fields.templateFormat ?? \"f-string\";\n const inputVariables = _getInputVariables(\n fields.template,\n templateFormat\n ) as Array<Extract<keyof RunInput, string>>;\n super({ inputVariables, ...fields });\n this.template = fields.template;\n this.templateFormat = templateFormat;\n this.inputVariables = inputVariables;\n }\n\n async format(values: TypedPromptInputValues<RunInput>): Promise<RunOutput> {\n return _insertInputVariables(\n this.template,\n values,\n this.templateFormat\n ) as RunOutput;\n }\n\n async invoke(\n values: TypedPromptInputValues<InputValues>\n ): Promise<RunOutput> {\n return await this._callWithConfig(this.format.bind(this), values, {\n runType: \"prompt\",\n });\n }\n}\n\nfunction _getInputVariables(\n template: Record<string, unknown>,\n templateFormat: TemplateFormat,\n depth = 0\n): Array<Extract<keyof InputValues, string>> {\n if (depth >= MAX_PROMPT_TEMPLATE_DEPTH) {\n throw createPromptTemplateDepthError();\n }\n\n const inputVariables: Array<Extract<keyof InputValues, string>> = [];\n for (const v of Object.values(template)) {\n if (typeof v === \"string\") {\n parseTemplate(v, templateFormat).forEach((t) => {\n if (t.type === \"variable\") {\n inputVariables.push(t.name);\n }\n });\n } else if (Array.isArray(v)) {\n for (const x of v) {\n if (typeof x === \"string\") {\n parseTemplate(x, templateFormat).forEach((t) => {\n if (t.type === \"variable\") {\n inputVariables.push(t.name);\n }\n });\n } else if (typeof x === \"object\") {\n inputVariables.push(\n ..._getInputVariables(x, templateFormat, depth + 1)\n );\n }\n }\n } else if (typeof v === \"object\" && v !== null) {\n inputVariables.push(\n ..._getInputVariables(\n v as Record<string, unknown>,\n templateFormat,\n depth + 1\n )\n );\n }\n }\n return Array.from(new Set(inputVariables));\n}\n\nfunction _insertInputVariables(\n template: Record<string, unknown>,\n inputs: TypedPromptInputValues<InputValues>,\n templateFormat: TemplateFormat,\n depth = 0\n): Record<string, unknown> {\n if (depth >= MAX_PROMPT_TEMPLATE_DEPTH) {\n throw createPromptTemplateDepthError();\n }\n\n const formatted: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(template)) {\n if (typeof v === \"string\") {\n formatted[k] = renderTemplate(v, templateFormat, inputs);\n } else if (Array.isArray(v)) {\n const formattedV: Array<unknown> = [];\n for (const x of v) {\n if (typeof x === \"string\") {\n formattedV.push(renderTemplate(x, templateFormat, inputs));\n } else if (typeof x === \"object\") {\n formattedV.push(\n _insertInputVariables(x, inputs, templateFormat, depth + 1)\n );\n }\n }\n formatted[k] = formattedV;\n } else if (typeof v === \"object\" && v !== null) {\n formatted[k] = _insertInputVariables(\n v as Record<string, unknown>,\n inputs,\n templateFormat,\n depth + 1\n );\n } else {\n formatted[k] = v;\n }\n }\n return formatted;\n}\n"],"mappings":";;;;AASA,IAAa,qBAAb,cAGU,SAAsD;CAC9D,eAAe;EAAC;EAAkB;EAAW;CAAM;CAEnD,kBAAkB;CAElB;CAEA;CAEA;CAEA,OAAO,UAAU;EACf,OAAO;CACT;CAEA,YAAY,QAGT;EACD,MAAM,iBAAiB,OAAO,kBAAkB;EAChD,MAAM,iBAAiB,mBACrB,OAAO,UACP,cACF;EACA,MAAM;GAAE;GAAgB,GAAG;EAAO,CAAC;EACnC,KAAK,WAAW,OAAO;EACvB,KAAK,iBAAiB;EACtB,KAAK,iBAAiB;CACxB;CAEA,MAAM,OAAO,QAA8D;EACzE,OAAO,sBACL,KAAK,UACL,QACA,KAAK,cACP;CACF;CAEA,MAAM,OACJ,QACoB;EACpB,OAAO,MAAM,KAAK,gBAAgB,KAAK,OAAO,KAAK,IAAI,GAAG,QAAQ,EAChE,SAAS,SACX,CAAC;CACH;AACF;AAEA,SAAS,mBACP,UACA,gBACA,QAAQ,GACmC;CAC3C,IAAI,SAAA,KACF,MAAM,+BAA+B;CAGvC,MAAM,iBAA4D,CAAC;CACnE,KAAK,MAAM,KAAK,OAAO,OAAO,QAAQ,GACpC,IAAI,OAAO,MAAM,UACf,cAAc,GAAG,cAAc,CAAC,CAAC,SAAS,MAAM;EAC9C,IAAI,EAAE,SAAS,YACb,eAAe,KAAK,EAAE,IAAI;CAE9B,CAAC;MACI,IAAI,MAAM,QAAQ,CAAC,GACnB;OAAA,MAAM,KAAK,GACd,IAAI,OAAO,MAAM,UACf,cAAc,GAAG,cAAc,CAAC,CAAC,SAAS,MAAM;GAC9C,IAAI,EAAE,SAAS,YACb,eAAe,KAAK,EAAE,IAAI;EAE9B,CAAC;OACI,IAAI,OAAO,MAAM,UACtB,eAAe,KACb,GAAG,mBAAmB,GAAG,gBAAgB,QAAQ,CAAC,CACpD;CAAA,OAGC,IAAI,OAAO,MAAM,YAAY,MAAM,MACxC,eAAe,KACb,GAAG,mBACD,GACA,gBACA,QAAQ,CACV,CACF;CAGJ,OAAO,MAAM,KAAK,IAAI,IAAI,cAAc,CAAC;AAC3C;AAEA,SAAS,sBACP,UACA,QACA,gBACA,QAAQ,GACiB;CACzB,IAAI,SAAA,KACF,MAAM,+BAA+B;CAGvC,MAAM,YAAqC,CAAC;CAC5C,KAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,QAAQ,GAC1C,IAAI,OAAO,MAAM,UACf,UAAU,KAAK,eAAe,GAAG,gBAAgB,MAAM;MAClD,IAAI,MAAM,QAAQ,CAAC,GAAG;EAC3B,MAAM,aAA6B,CAAC;EACpC,KAAK,MAAM,KAAK,GACd,IAAI,OAAO,MAAM,UACf,WAAW,KAAK,eAAe,GAAG,gBAAgB,MAAM,CAAC;OACpD,IAAI,OAAO,MAAM,UACtB,WAAW,KACT,sBAAsB,GAAG,QAAQ,gBAAgB,QAAQ,CAAC,CAC5D;EAGJ,UAAU,KAAK;CACjB,OAAO,IAAI,OAAO,MAAM,YAAY,MAAM,MACxC,UAAU,KAAK,sBACb,GACA,QACA,gBACA,QAAQ,CACV;MAEA,UAAU,KAAK;CAGnB,OAAO;AACT"}
|
|
@@ -2,7 +2,7 @@ const require_string = require("./string.cjs");
|
|
|
2
2
|
const require_template = require("./template.cjs");
|
|
3
3
|
const require_prompt = require("./prompt.cjs");
|
|
4
4
|
const require_chat = require("./chat.cjs");
|
|
5
|
-
|
|
5
|
+
// src/prompts/few_shot.ts
|
|
6
6
|
/**
|
|
7
7
|
* Prompt template that contains few-shot examples.
|
|
8
8
|
* @augments BasePromptTemplate
|
|
@@ -233,7 +233,6 @@ var FewShotChatMessagePromptTemplate = class FewShotChatMessagePromptTemplate ex
|
|
|
233
233
|
return new FewShotChatMessagePromptTemplate(promptDict);
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
|
-
//#endregion
|
|
237
236
|
exports.FewShotChatMessagePromptTemplate = FewShotChatMessagePromptTemplate;
|
|
238
237
|
exports.FewShotPromptTemplate = FewShotPromptTemplate;
|
|
239
238
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { BaseMessage } from "../messages/base.cjs";
|
|
2
|
-
import {
|
|
3
|
-
import "../messages/index.cjs";
|
|
2
|
+
import { BaseStringPromptTemplate } from "./string.cjs";
|
|
4
3
|
import { BasePromptTemplateInput, Example, TypedPromptInputValues } from "./base.cjs";
|
|
5
4
|
import { BaseExampleSelector } from "../example_selectors/base.cjs";
|
|
6
|
-
import { BaseStringPromptTemplate } from "./string.cjs";
|
|
7
5
|
import { TemplateFormat } from "./template.cjs";
|
|
8
|
-
import { SerializedFewShotTemplate } from "./serde.cjs";
|
|
9
6
|
import { PromptTemplate } from "./prompt.cjs";
|
|
7
|
+
import { SerializedFewShotTemplate } from "./serde.cjs";
|
|
8
|
+
import { InputValues, PartialValues } from "../utils/types/index.cjs";
|
|
9
|
+
import "../messages/index.cjs";
|
|
10
10
|
import { BaseChatPromptTemplate, BaseMessagePromptTemplate } from "./chat.cjs";
|
|
11
|
-
//#region src/prompts/few_shot.d.ts
|
|
12
11
|
export interface FewShotPromptTemplateInput extends BasePromptTemplateInput<InputValues> {
|
|
13
12
|
/**
|
|
14
13
|
* Examples to format into the prompt. Exactly one of this or
|
|
@@ -195,5 +194,4 @@ export declare class FewShotChatMessagePromptTemplate<RunInput extends InputValu
|
|
|
195
194
|
*/
|
|
196
195
|
partial(values: PartialValues<PartialVariableName>): Promise<FewShotChatMessagePromptTemplate<RunInput, PartialVariableName>>;
|
|
197
196
|
}
|
|
198
|
-
//#endregion
|
|
199
197
|
//# sourceMappingURL=few_shot.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"few_shot.d.cts","names":[],"sources":["../../src/prompts/few_shot.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"few_shot.d.cts","names":[],"sources":["../../src/prompts/few_shot.ts"],"mappings":";;;;;;;;;;iBAqBiB,mCAAmC,wBAAwB;;;;;;EAM1E,WAAW;;;;;;EAOX,kBAAkB;;;;EAKlB,eAAe;;;;EAKf;;;;;;EAOA;;;;EAKA;;;;EAKA,iBAAiB;;;;EAKjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuCW,8BACH,oCACG;EAEX;EAEA,WAAW;EAEX,kBAAkB;EAElB,eAAe;EAEf;EAEA;EAEA;EAEA,gBAAgB;EAEhB;EAEA,YAAY,OAAO;EA+BnB;SAIO;UAIO;EAeR,QAAQ,uCACZ,QAAQ,cAAc,0BAAuB,QAAA;;;;;;EAsBzC,OAAO,QAAQ,cAAc;EAanC,aAAa;SAuBA,YACX,MAAM,4BACL,QAAQ;;iBA6BI,8CAA8C,wBAAwB;;;;;;EAMrF,WAAW;;;;EAKX,eAAe,4BAA4B;;;;;;EAO3C;;;;;;EAOA,kBAAkB;;;;;;EAOlB;;;;;;EAOA;;;;;;EAOA,iBAAiB;;;;;;EAOjB;;;;;;;qBAQW,iCAEX,iBAAiB,mBAEjB,kDAEQ,kCACG;EAEX;EAEA,WAAW;EAEX,kBAAkB;EAElB,eAAe,4BAA4B;EAE3C;EAEA;EAEA;EAEA,gBAAgB;EAEhB;EAEA;SAIO;EAIP,YAAY,QAAQ;UAuCN;;;;;;EAoBR,eACJ,QAAQ,uBAAuB,YAC9B,QAAQ;;;;;;EA0BL,OAAO,QAAQ,uBAAuB,YAAY;;;;;;EAoBlD,QACJ,QAAQ,cAAc,uBACrB,QAAQ,iCAAiC,UAAU"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { BaseMessage } from "../messages/base.js";
|
|
2
|
-
import {
|
|
3
|
-
import "../messages/index.js";
|
|
2
|
+
import { BaseStringPromptTemplate } from "./string.js";
|
|
4
3
|
import { BasePromptTemplateInput, Example, TypedPromptInputValues } from "./base.js";
|
|
5
4
|
import { BaseExampleSelector } from "../example_selectors/base.js";
|
|
6
|
-
import { BaseStringPromptTemplate } from "./string.js";
|
|
7
5
|
import { TemplateFormat } from "./template.js";
|
|
8
|
-
import { SerializedFewShotTemplate } from "./serde.js";
|
|
9
6
|
import { PromptTemplate } from "./prompt.js";
|
|
7
|
+
import { SerializedFewShotTemplate } from "./serde.js";
|
|
8
|
+
import { InputValues, PartialValues } from "../utils/types/index.js";
|
|
9
|
+
import "../messages/index.js";
|
|
10
10
|
import { BaseChatPromptTemplate, BaseMessagePromptTemplate } from "./chat.js";
|
|
11
|
-
//#region src/prompts/few_shot.d.ts
|
|
12
11
|
export interface FewShotPromptTemplateInput extends BasePromptTemplateInput<InputValues> {
|
|
13
12
|
/**
|
|
14
13
|
* Examples to format into the prompt. Exactly one of this or
|
|
@@ -195,5 +194,4 @@ export declare class FewShotChatMessagePromptTemplate<RunInput extends InputValu
|
|
|
195
194
|
*/
|
|
196
195
|
partial(values: PartialValues<PartialVariableName>): Promise<FewShotChatMessagePromptTemplate<RunInput, PartialVariableName>>;
|
|
197
196
|
}
|
|
198
|
-
//#endregion
|
|
199
197
|
//# sourceMappingURL=few_shot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"few_shot.d.ts","names":[],"sources":["../../src/prompts/few_shot.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"few_shot.d.ts","names":[],"sources":["../../src/prompts/few_shot.ts"],"mappings":";;;;;;;;;;iBAqBiB,mCAAmC,wBAAwB;;;;;;EAM1E,WAAW;;;;;;EAOX,kBAAkB;;;;EAKlB,eAAe;;;;EAKf;;;;;;EAOA;;;;EAKA;;;;EAKA,iBAAiB;;;;EAKjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuCW,8BACH,oCACG;EAEX;EAEA,WAAW;EAEX,kBAAkB;EAElB,eAAe;EAEf;EAEA;EAEA;EAEA,gBAAgB;EAEhB;EAEA,YAAY,OAAO;EA+BnB;SAIO;UAIO;EAeR,QAAQ,uCACZ,QAAQ,cAAc,0BAAuB,QAAA;;;;;;EAsBzC,OAAO,QAAQ,cAAc;EAanC,aAAa;SAuBA,YACX,MAAM,4BACL,QAAQ;;iBA6BI,8CAA8C,wBAAwB;;;;;;EAMrF,WAAW;;;;EAKX,eAAe,4BAA4B;;;;;;EAO3C;;;;;;EAOA,kBAAkB;;;;;;EAOlB;;;;;;EAOA;;;;;;EAOA,iBAAiB;;;;;;EAOjB;;;;;;;qBAQW,iCAEX,iBAAiB,mBAEjB,kDAEQ,kCACG;EAEX;EAEA,WAAW;EAEX,kBAAkB;EAElB,eAAe,4BAA4B;EAE3C;EAEA;EAEA;EAEA,gBAAgB;EAEhB;EAEA;SAIO;EAIP,YAAY,QAAQ;UAuCN;;;;;;EAoBR,eACJ,QAAQ,uBAAuB,YAC9B,QAAQ;;;;;;EA0BL,OAAO,QAAQ,uBAAuB,YAAY;;;;;;EAoBlD,QACJ,QAAQ,cAAc,uBACrB,QAAQ,iCAAiC,UAAU"}
|
package/dist/prompts/few_shot.js
CHANGED
|
@@ -2,7 +2,7 @@ import { BaseStringPromptTemplate } from "./string.js";
|
|
|
2
2
|
import { checkValidTemplate, renderTemplate } from "./template.js";
|
|
3
3
|
import { PromptTemplate } from "./prompt.js";
|
|
4
4
|
import { BaseChatPromptTemplate } from "./chat.js";
|
|
5
|
-
|
|
5
|
+
// src/prompts/few_shot.ts
|
|
6
6
|
/**
|
|
7
7
|
* Prompt template that contains few-shot examples.
|
|
8
8
|
* @augments BasePromptTemplate
|
|
@@ -233,7 +233,6 @@ var FewShotChatMessagePromptTemplate = class FewShotChatMessagePromptTemplate ex
|
|
|
233
233
|
return new FewShotChatMessagePromptTemplate(promptDict);
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
|
-
//#endregion
|
|
237
236
|
export { FewShotChatMessagePromptTemplate, FewShotPromptTemplate };
|
|
238
237
|
|
|
239
238
|
//# sourceMappingURL=few_shot.js.map
|
package/dist/prompts/image.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_prompt_values = require("../prompt_values.cjs");
|
|
2
2
|
const require_base = require("./base.cjs");
|
|
3
3
|
const require_template = require("./template.cjs");
|
|
4
|
-
|
|
4
|
+
// src/prompts/image.ts
|
|
5
5
|
/**
|
|
6
6
|
* An image prompt template for a multimodal model.
|
|
7
7
|
*/
|
|
@@ -87,7 +87,6 @@ var ImagePromptTemplate = class ImagePromptTemplate extends require_base.BasePro
|
|
|
87
87
|
return new require_prompt_values.ImagePromptValue(formattedPrompt);
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
-
//#endregion
|
|
91
90
|
exports.ImagePromptTemplate = ImagePromptTemplate;
|
|
92
91
|
|
|
93
92
|
//# sourceMappingURL=image.cjs.map
|
package/dist/prompts/image.d.cts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ContentBlock } from "../messages/content/index.cjs";
|
|
2
|
-
import { InputValues, PartialValues } from "../utils/types/index.cjs";
|
|
3
|
-
import { ImageContent, ImagePromptValue } from "../prompt_values.cjs";
|
|
4
2
|
import "../messages/index.cjs";
|
|
3
|
+
import { ImageContent, ImagePromptValue } from "../prompt_values.cjs";
|
|
4
|
+
import { InputValues, PartialValues } from "../utils/types/index.cjs";
|
|
5
5
|
import { BasePromptTemplate, BasePromptTemplateInput, TypedPromptInputValues } from "./base.cjs";
|
|
6
6
|
import { TemplateFormat } from "./template.cjs";
|
|
7
|
-
//#region src/prompts/image.d.ts
|
|
8
7
|
/**
|
|
9
8
|
* Inputs to create a {@link ImagePromptTemplate}
|
|
10
9
|
* @augments BasePromptTemplateInput
|
|
@@ -70,5 +69,4 @@ export declare class ImagePromptTemplate<RunInput extends InputValues = any, Par
|
|
|
70
69
|
*/
|
|
71
70
|
formatPromptValue(values: TypedPromptInputValues<RunInput>): Promise<ImagePromptValue>;
|
|
72
71
|
}
|
|
73
|
-
//#endregion
|
|
74
72
|
//# sourceMappingURL=image.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.cts","names":[],"sources":["../../src/prompts/image.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.d.cts","names":[],"sources":["../../src/prompts/image.ts"],"mappings":";;;;;;;;;;iBAkBiB,yBAEf,iBAAiB,mBAEjB,kDACQ,wBAAwB,UAAU;;;;EAI1C,UAAU;;;;;;EAOV,iBAAiB;;;;;;EAOjB;;;;;;EAOA,0BAA0B;;;;;qBAMf,oBAEX,iBAAiB,mBAEjB,kDACQ,mBAAmB,UAAU,kBAAkB;SAChD;EAIP;EAEA,UAAU;EAEV,gBAAgB;EAEhB;;;;;;EAOA,0BAA0B;EAE1B,YAAY,OAAO,yBAAyB,UAAU;EAwBtD;;;;;;EASM,QAAQ,uCACZ,QAAQ,cAAc,0BAAuB,QAAA,oBAAA,YAAA,QAAA,cAAA,mBAAA;;;;;;EA0BzC,OAAO,eAAe,cAC1B,QAAQ,uBAAuB,YAC9B,QAAQ;;;;;;;EA+BL,kBACJ,QAAQ,uBAAuB,YAC9B,QAAQ"}
|
package/dist/prompts/image.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ContentBlock } from "../messages/content/index.js";
|
|
2
|
-
import { InputValues, PartialValues } from "../utils/types/index.js";
|
|
3
|
-
import { ImageContent, ImagePromptValue } from "../prompt_values.js";
|
|
4
2
|
import "../messages/index.js";
|
|
3
|
+
import { ImageContent, ImagePromptValue } from "../prompt_values.js";
|
|
4
|
+
import { InputValues, PartialValues } from "../utils/types/index.js";
|
|
5
5
|
import { BasePromptTemplate, BasePromptTemplateInput, TypedPromptInputValues } from "./base.js";
|
|
6
6
|
import { TemplateFormat } from "./template.js";
|
|
7
|
-
//#region src/prompts/image.d.ts
|
|
8
7
|
/**
|
|
9
8
|
* Inputs to create a {@link ImagePromptTemplate}
|
|
10
9
|
* @augments BasePromptTemplateInput
|
|
@@ -70,5 +69,4 @@ export declare class ImagePromptTemplate<RunInput extends InputValues = any, Par
|
|
|
70
69
|
*/
|
|
71
70
|
formatPromptValue(values: TypedPromptInputValues<RunInput>): Promise<ImagePromptValue>;
|
|
72
71
|
}
|
|
73
|
-
//#endregion
|
|
74
72
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","names":[],"sources":["../../src/prompts/image.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.d.ts","names":[],"sources":["../../src/prompts/image.ts"],"mappings":";;;;;;;;;;iBAkBiB,yBAEf,iBAAiB,mBAEjB,kDACQ,wBAAwB,UAAU;;;;EAI1C,UAAU;;;;;;EAOV,iBAAiB;;;;;;EAOjB;;;;;;EAOA,0BAA0B;;;;;qBAMf,oBAEX,iBAAiB,mBAEjB,kDACQ,mBAAmB,UAAU,kBAAkB;SAChD;EAIP;EAEA,UAAU;EAEV,gBAAgB;EAEhB;;;;;;EAOA,0BAA0B;EAE1B,YAAY,OAAO,yBAAyB,UAAU;EAwBtD;;;;;;EASM,QAAQ,uCACZ,QAAQ,cAAc,0BAAuB,QAAA,oBAAA,YAAA,QAAA,cAAA,mBAAA;;;;;;EA0BzC,OAAO,eAAe,cAC1B,QAAQ,uBAAuB,YAC9B,QAAQ;;;;;;;EA+BL,kBACJ,QAAQ,uBAAuB,YAC9B,QAAQ"}
|
package/dist/prompts/image.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ImagePromptValue } from "../prompt_values.js";
|
|
2
2
|
import { BasePromptTemplate } from "./base.js";
|
|
3
3
|
import { checkValidTemplate, renderTemplate } from "./template.js";
|
|
4
|
-
|
|
4
|
+
// src/prompts/image.ts
|
|
5
5
|
/**
|
|
6
6
|
* An image prompt template for a multimodal model.
|
|
7
7
|
*/
|
|
@@ -87,7 +87,6 @@ var ImagePromptTemplate = class ImagePromptTemplate extends BasePromptTemplate {
|
|
|
87
87
|
return new ImagePromptValue(formattedPrompt);
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
-
//#endregion
|
|
91
90
|
export { ImagePromptTemplate };
|
|
92
91
|
|
|
93
92
|
//# sourceMappingURL=image.js.map
|