@langchain/core 1.2.13 → 1.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/agents.d.cts +3 -4
- package/dist/agents.d.cts.map +1 -1
- package/dist/agents.d.ts +3 -4
- package/dist/agents.d.ts.map +1 -1
- package/dist/caches/index.d.cts +5 -6
- package/dist/caches/index.d.cts.map +1 -1
- package/dist/caches/index.d.ts +5 -6
- package/dist/caches/index.d.ts.map +1 -1
- package/dist/callbacks/base.d.cts +10 -11
- package/dist/callbacks/base.d.cts.map +1 -1
- package/dist/callbacks/base.d.ts +10 -11
- package/dist/callbacks/base.d.ts.map +1 -1
- package/dist/callbacks/dispatch/index.d.cts +1 -2
- package/dist/callbacks/dispatch/index.d.cts.map +1 -1
- package/dist/callbacks/dispatch/index.d.ts +1 -2
- package/dist/callbacks/dispatch/index.d.ts.map +1 -1
- package/dist/callbacks/dispatch/web.d.cts +1 -2
- package/dist/callbacks/dispatch/web.d.cts.map +1 -1
- package/dist/callbacks/dispatch/web.d.ts +1 -2
- package/dist/callbacks/dispatch/web.d.ts.map +1 -1
- package/dist/callbacks/manager.cjs +1 -1
- package/dist/callbacks/manager.cjs.map +1 -1
- package/dist/callbacks/manager.d.cts +12 -13
- package/dist/callbacks/manager.d.cts.map +1 -1
- package/dist/callbacks/manager.d.ts +12 -13
- package/dist/callbacks/manager.d.ts.map +1 -1
- package/dist/callbacks/manager.js +1 -1
- package/dist/callbacks/manager.js.map +1 -1
- package/dist/chat_history.d.cts +3 -4
- package/dist/chat_history.d.cts.map +1 -1
- package/dist/chat_history.d.ts +3 -4
- package/dist/chat_history.d.ts.map +1 -1
- package/dist/context.d.cts +2 -2
- package/dist/context.d.cts.map +1 -1
- package/dist/context.d.ts +2 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/document_loaders/base.d.cts +2 -3
- package/dist/document_loaders/base.d.cts.map +1 -1
- package/dist/document_loaders/base.d.ts +2 -3
- package/dist/document_loaders/base.d.ts.map +1 -1
- package/dist/document_loaders/langsmith.d.cts +2 -3
- package/dist/document_loaders/langsmith.d.cts.map +1 -1
- package/dist/document_loaders/langsmith.d.ts +2 -3
- package/dist/document_loaders/langsmith.d.ts.map +1 -1
- package/dist/documents/document.d.cts +3 -4
- package/dist/documents/document.d.cts.map +1 -1
- package/dist/documents/document.d.ts +3 -4
- package/dist/documents/document.d.ts.map +1 -1
- package/dist/documents/transformers.d.cts +2 -3
- package/dist/documents/transformers.d.cts.map +1 -1
- package/dist/documents/transformers.d.ts +2 -3
- package/dist/documents/transformers.d.ts.map +1 -1
- package/dist/embeddings.d.cts +3 -4
- package/dist/embeddings.d.cts.map +1 -1
- package/dist/embeddings.d.ts +3 -4
- package/dist/embeddings.d.ts.map +1 -1
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.d.cts +13 -19
- package/dist/errors/index.d.cts.map +1 -1
- package/dist/errors/index.d.ts +13 -19
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js.map +1 -1
- package/dist/example_selectors/base.d.cts +1 -2
- package/dist/example_selectors/base.d.cts.map +1 -1
- package/dist/example_selectors/base.d.ts +1 -2
- package/dist/example_selectors/base.d.ts.map +1 -1
- package/dist/example_selectors/conditional.d.cts +5 -6
- package/dist/example_selectors/conditional.d.cts.map +1 -1
- package/dist/example_selectors/conditional.d.ts +5 -6
- package/dist/example_selectors/conditional.d.ts.map +1 -1
- package/dist/example_selectors/length_based.d.cts +2 -3
- package/dist/example_selectors/length_based.d.cts.map +1 -1
- package/dist/example_selectors/length_based.d.ts +2 -3
- package/dist/example_selectors/length_based.d.ts.map +1 -1
- package/dist/example_selectors/semantic_similarity.d.cts +2 -3
- package/dist/example_selectors/semantic_similarity.d.cts.map +1 -1
- package/dist/example_selectors/semantic_similarity.d.ts +2 -3
- package/dist/example_selectors/semantic_similarity.d.ts.map +1 -1
- package/dist/indexing/base.d.cts +9 -10
- package/dist/indexing/base.d.cts.map +1 -1
- package/dist/indexing/base.d.ts +9 -10
- package/dist/indexing/base.d.ts.map +1 -1
- package/dist/indexing/record_manager.d.cts +5 -6
- package/dist/indexing/record_manager.d.cts.map +1 -1
- package/dist/indexing/record_manager.d.ts +5 -6
- package/dist/indexing/record_manager.d.ts.map +1 -1
- package/dist/language_models/base.cjs +1 -1
- package/dist/language_models/base.cjs.map +1 -1
- package/dist/language_models/base.d.cts +24 -25
- package/dist/language_models/base.d.cts.map +1 -1
- package/dist/language_models/base.d.ts +24 -25
- package/dist/language_models/base.d.ts.map +1 -1
- package/dist/language_models/base.js +1 -1
- package/dist/language_models/base.js.map +1 -1
- package/dist/language_models/chat_models.d.cts +9 -10
- package/dist/language_models/chat_models.d.cts.map +1 -1
- package/dist/language_models/chat_models.d.ts +9 -10
- package/dist/language_models/chat_models.d.ts.map +1 -1
- package/dist/language_models/compat.d.cts +2 -3
- package/dist/language_models/compat.d.cts.map +1 -1
- package/dist/language_models/compat.d.ts +2 -3
- package/dist/language_models/compat.d.ts.map +1 -1
- package/dist/language_models/event.d.cts +15 -16
- package/dist/language_models/event.d.cts.map +1 -1
- package/dist/language_models/event.d.ts +15 -16
- package/dist/language_models/event.d.ts.map +1 -1
- package/dist/language_models/llms.d.cts +5 -6
- package/dist/language_models/llms.d.cts.map +1 -1
- package/dist/language_models/llms.d.ts +5 -6
- package/dist/language_models/llms.d.ts.map +1 -1
- package/dist/language_models/openai_completions_stream.d.cts +8 -9
- package/dist/language_models/openai_completions_stream.d.cts.map +1 -1
- package/dist/language_models/openai_completions_stream.d.ts +8 -9
- package/dist/language_models/openai_completions_stream.d.ts.map +1 -1
- package/dist/language_models/profile.cjs.map +1 -1
- package/dist/language_models/profile.d.cts +16 -2
- package/dist/language_models/profile.d.cts.map +1 -1
- package/dist/language_models/profile.d.ts +16 -2
- package/dist/language_models/profile.d.ts.map +1 -1
- package/dist/language_models/profile.js.map +1 -1
- package/dist/language_models/stream.d.cts +5 -6
- package/dist/language_models/stream.d.cts.map +1 -1
- package/dist/language_models/stream.d.ts +5 -6
- package/dist/language_models/stream.d.ts.map +1 -1
- package/dist/language_models/structured_output.d.cts +3 -4
- package/dist/language_models/structured_output.d.cts.map +1 -1
- package/dist/language_models/structured_output.d.ts +3 -4
- package/dist/language_models/structured_output.d.ts.map +1 -1
- package/dist/load/import_type.d.cts +2 -3
- package/dist/load/import_type.d.cts.map +1 -1
- package/dist/load/import_type.d.ts +2 -3
- package/dist/load/import_type.d.ts.map +1 -1
- package/dist/load/index.d.cts +2 -3
- package/dist/load/index.d.cts.map +1 -1
- package/dist/load/index.d.ts +2 -3
- package/dist/load/index.d.ts.map +1 -1
- package/dist/load/map_keys.d.cts +1 -2
- package/dist/load/map_keys.d.cts.map +1 -1
- package/dist/load/map_keys.d.ts +1 -2
- package/dist/load/map_keys.d.ts.map +1 -1
- package/dist/load/serializable.d.cts +9 -10
- package/dist/load/serializable.d.cts.map +1 -1
- package/dist/load/serializable.d.ts +9 -10
- package/dist/load/serializable.d.ts.map +1 -1
- package/dist/memory.d.cts +7 -8
- package/dist/memory.d.cts.map +1 -1
- package/dist/memory.d.ts +7 -8
- package/dist/memory.d.ts.map +1 -1
- package/dist/messages/ai.d.cts +6 -7
- package/dist/messages/ai.d.cts.map +1 -1
- package/dist/messages/ai.d.ts +6 -7
- package/dist/messages/ai.d.ts.map +1 -1
- package/dist/messages/base.d.cts +23 -24
- package/dist/messages/base.d.cts.map +1 -1
- package/dist/messages/base.d.ts +23 -24
- package/dist/messages/base.d.ts.map +1 -1
- package/dist/messages/chat.d.cts +5 -6
- package/dist/messages/chat.d.cts.map +1 -1
- package/dist/messages/chat.d.ts +5 -6
- package/dist/messages/chat.d.ts.map +1 -1
- package/dist/messages/content/base.d.cts +1 -2
- package/dist/messages/content/base.d.cts.map +1 -1
- package/dist/messages/content/base.d.ts +1 -2
- package/dist/messages/content/base.d.ts.map +1 -1
- package/dist/messages/content/data.d.cts +18 -19
- package/dist/messages/content/data.d.cts.map +1 -1
- package/dist/messages/content/data.d.ts +18 -19
- package/dist/messages/content/data.d.ts.map +1 -1
- package/dist/messages/content/index.d.cts +4 -5
- package/dist/messages/content/index.d.cts.map +1 -1
- package/dist/messages/content/index.d.ts +4 -5
- package/dist/messages/content/index.d.ts.map +1 -1
- package/dist/messages/content/multimodal.d.cts +2 -3
- package/dist/messages/content/multimodal.d.cts.map +1 -1
- package/dist/messages/content/multimodal.d.ts +2 -3
- package/dist/messages/content/multimodal.d.ts.map +1 -1
- package/dist/messages/content/tools.d.cts +2 -3
- package/dist/messages/content/tools.d.cts.map +1 -1
- package/dist/messages/content/tools.d.ts +2 -3
- package/dist/messages/content/tools.d.ts.map +1 -1
- package/dist/messages/format.d.cts +1 -2
- package/dist/messages/format.d.cts.map +1 -1
- package/dist/messages/format.d.ts +1 -2
- package/dist/messages/format.d.ts.map +1 -1
- package/dist/messages/function.d.cts +5 -6
- package/dist/messages/function.d.cts.map +1 -1
- package/dist/messages/function.d.ts +5 -6
- package/dist/messages/function.d.ts.map +1 -1
- package/dist/messages/human.d.cts +5 -6
- package/dist/messages/human.d.cts.map +1 -1
- package/dist/messages/human.d.ts +5 -6
- package/dist/messages/human.d.ts.map +1 -1
- package/dist/messages/message.d.cts +20 -21
- package/dist/messages/message.d.cts.map +1 -1
- package/dist/messages/message.d.ts +20 -21
- package/dist/messages/message.d.ts.map +1 -1
- package/dist/messages/metadata.d.cts +7 -8
- package/dist/messages/metadata.d.cts.map +1 -1
- package/dist/messages/metadata.d.ts +7 -8
- package/dist/messages/metadata.d.ts.map +1 -1
- package/dist/messages/modifier.d.cts +2 -3
- package/dist/messages/modifier.d.cts.map +1 -1
- package/dist/messages/modifier.d.ts +2 -3
- package/dist/messages/modifier.d.ts.map +1 -1
- package/dist/messages/system.d.cts +5 -6
- package/dist/messages/system.d.cts.map +1 -1
- package/dist/messages/system.d.ts +5 -6
- package/dist/messages/system.d.ts.map +1 -1
- package/dist/messages/tool.d.cts +11 -12
- package/dist/messages/tool.d.cts.map +1 -1
- package/dist/messages/tool.d.ts +11 -12
- package/dist/messages/tool.d.ts.map +1 -1
- package/dist/messages/transformers.d.cts +12 -13
- package/dist/messages/transformers.d.cts.map +1 -1
- package/dist/messages/transformers.d.ts +12 -13
- package/dist/messages/transformers.d.ts.map +1 -1
- package/dist/messages/utils.d.cts +13 -14
- package/dist/messages/utils.d.cts.map +1 -1
- package/dist/messages/utils.d.ts +13 -14
- package/dist/messages/utils.d.ts.map +1 -1
- package/dist/output_parsers/base.d.cts +4 -5
- package/dist/output_parsers/base.d.cts.map +1 -1
- package/dist/output_parsers/base.d.ts +4 -5
- package/dist/output_parsers/base.d.ts.map +1 -1
- package/dist/output_parsers/bytes.d.cts +1 -2
- package/dist/output_parsers/bytes.d.cts.map +1 -1
- package/dist/output_parsers/bytes.d.ts +1 -2
- package/dist/output_parsers/bytes.d.ts.map +1 -1
- package/dist/output_parsers/json.d.cts +2 -2
- package/dist/output_parsers/json.d.cts.map +1 -1
- package/dist/output_parsers/json.d.ts +2 -2
- package/dist/output_parsers/json.d.ts.map +1 -1
- package/dist/output_parsers/list.d.cts +5 -6
- package/dist/output_parsers/list.d.cts.map +1 -1
- package/dist/output_parsers/list.d.ts +5 -6
- package/dist/output_parsers/list.d.ts.map +1 -1
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts +4 -5
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts.map +1 -1
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts +4 -5
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts.map +1 -1
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts +12 -13
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts.map +1 -1
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts +12 -13
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts.map +1 -1
- package/dist/output_parsers/standard_schema.d.cts +1 -2
- package/dist/output_parsers/standard_schema.d.cts.map +1 -1
- package/dist/output_parsers/standard_schema.d.ts +1 -2
- package/dist/output_parsers/standard_schema.d.ts.map +1 -1
- package/dist/output_parsers/string.d.cts +1 -2
- package/dist/output_parsers/string.d.cts.map +1 -1
- package/dist/output_parsers/string.d.ts +1 -2
- package/dist/output_parsers/string.d.ts.map +1 -1
- package/dist/output_parsers/structured.d.cts +6 -7
- package/dist/output_parsers/structured.d.cts.map +1 -1
- package/dist/output_parsers/structured.d.ts +6 -7
- package/dist/output_parsers/structured.d.ts.map +1 -1
- package/dist/output_parsers/transform.d.cts +3 -4
- package/dist/output_parsers/transform.d.cts.map +1 -1
- package/dist/output_parsers/transform.d.ts +3 -4
- package/dist/output_parsers/transform.d.ts.map +1 -1
- package/dist/output_parsers/xml.d.cts +6 -7
- package/dist/output_parsers/xml.d.cts.map +1 -1
- package/dist/output_parsers/xml.d.ts +6 -7
- package/dist/output_parsers/xml.d.ts.map +1 -1
- package/dist/outputs.d.cts +9 -10
- package/dist/outputs.d.cts.map +1 -1
- package/dist/outputs.d.ts +9 -10
- package/dist/outputs.d.ts.map +1 -1
- package/dist/prompt_values.d.cts +10 -11
- package/dist/prompt_values.d.cts.map +1 -1
- package/dist/prompt_values.d.ts +10 -11
- package/dist/prompt_values.d.ts.map +1 -1
- package/dist/prompts/base.d.cts +4 -5
- package/dist/prompts/base.d.cts.map +1 -1
- package/dist/prompts/base.d.ts +4 -5
- package/dist/prompts/base.d.ts.map +1 -1
- package/dist/prompts/chat.d.cts +14 -15
- package/dist/prompts/chat.d.cts.map +1 -1
- package/dist/prompts/chat.d.ts +14 -15
- package/dist/prompts/chat.d.ts.map +1 -1
- package/dist/prompts/dict.d.cts +1 -2
- package/dist/prompts/dict.d.cts.map +1 -1
- package/dist/prompts/dict.d.ts +1 -2
- package/dist/prompts/dict.d.ts.map +1 -1
- package/dist/prompts/few_shot.d.cts +4 -5
- package/dist/prompts/few_shot.d.cts.map +1 -1
- package/dist/prompts/few_shot.d.ts +4 -5
- package/dist/prompts/few_shot.d.ts.map +1 -1
- package/dist/prompts/image.d.cts +2 -3
- package/dist/prompts/image.d.cts.map +1 -1
- package/dist/prompts/image.d.ts +2 -3
- package/dist/prompts/image.d.ts.map +1 -1
- package/dist/prompts/pipeline.d.cts +3 -4
- package/dist/prompts/pipeline.d.cts.map +1 -1
- package/dist/prompts/pipeline.d.ts +3 -4
- package/dist/prompts/pipeline.d.ts.map +1 -1
- package/dist/prompts/prompt.d.cts +4 -5
- package/dist/prompts/prompt.d.cts.map +1 -1
- package/dist/prompts/prompt.d.ts +4 -5
- package/dist/prompts/prompt.d.ts.map +1 -1
- package/dist/prompts/serde.d.cts +3 -4
- package/dist/prompts/serde.d.cts.map +1 -1
- package/dist/prompts/serde.d.ts +3 -4
- package/dist/prompts/serde.d.ts.map +1 -1
- package/dist/prompts/string.d.cts +1 -2
- package/dist/prompts/string.d.cts.map +1 -1
- package/dist/prompts/string.d.ts +1 -2
- package/dist/prompts/string.d.ts.map +1 -1
- package/dist/prompts/structured.d.cts +2 -3
- package/dist/prompts/structured.d.cts.map +1 -1
- package/dist/prompts/structured.d.ts +2 -3
- package/dist/prompts/structured.d.ts.map +1 -1
- package/dist/prompts/template.d.cts +12 -13
- package/dist/prompts/template.d.cts.map +1 -1
- package/dist/prompts/template.d.ts +12 -13
- package/dist/prompts/template.d.ts.map +1 -1
- package/dist/retrievers/document_compressors/index.d.cts +1 -2
- package/dist/retrievers/document_compressors/index.d.cts.map +1 -1
- package/dist/retrievers/document_compressors/index.d.ts +1 -2
- package/dist/retrievers/document_compressors/index.d.ts.map +1 -1
- package/dist/retrievers/index.d.cts +3 -4
- package/dist/retrievers/index.d.cts.map +1 -1
- package/dist/retrievers/index.d.ts +3 -4
- package/dist/retrievers/index.d.ts.map +1 -1
- package/dist/runnables/base.d.cts +23 -23
- package/dist/runnables/base.d.cts.map +1 -1
- package/dist/runnables/base.d.ts +23 -23
- package/dist/runnables/base.d.ts.map +1 -1
- package/dist/runnables/branch.d.cts +3 -4
- package/dist/runnables/branch.d.cts.map +1 -1
- package/dist/runnables/branch.d.ts +3 -4
- package/dist/runnables/branch.d.ts.map +1 -1
- package/dist/runnables/config.d.cts +6 -6
- package/dist/runnables/config.d.cts.map +1 -1
- package/dist/runnables/config.d.ts +6 -6
- package/dist/runnables/config.d.ts.map +1 -1
- package/dist/runnables/graph.d.cts +2 -2
- package/dist/runnables/graph.d.cts.map +1 -1
- package/dist/runnables/graph.d.ts +2 -2
- package/dist/runnables/graph.d.ts.map +1 -1
- package/dist/runnables/history.d.cts +2 -3
- package/dist/runnables/history.d.cts.map +1 -1
- package/dist/runnables/history.d.ts +2 -3
- package/dist/runnables/history.d.ts.map +1 -1
- package/dist/runnables/passthrough.d.cts +1 -2
- package/dist/runnables/passthrough.d.cts.map +1 -1
- package/dist/runnables/passthrough.d.ts +1 -2
- package/dist/runnables/passthrough.d.ts.map +1 -1
- package/dist/runnables/router.d.cts +2 -3
- package/dist/runnables/router.d.cts.map +1 -1
- package/dist/runnables/router.d.ts +2 -3
- package/dist/runnables/router.d.ts.map +1 -1
- package/dist/runnables/types.d.cts +6 -7
- package/dist/runnables/types.d.cts.map +1 -1
- package/dist/runnables/types.d.ts +6 -7
- package/dist/runnables/types.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/context.d.cts +4 -5
- package/dist/singletons/async_local_storage/context.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/context.d.ts +4 -5
- package/dist/singletons/async_local_storage/context.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/globals.d.cts +2 -3
- package/dist/singletons/async_local_storage/globals.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/globals.d.ts +2 -3
- package/dist/singletons/async_local_storage/globals.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/index.d.cts +2 -2
- package/dist/singletons/async_local_storage/index.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/index.d.ts +2 -2
- package/dist/singletons/async_local_storage/index.d.ts.map +1 -1
- package/dist/singletons/callbacks.d.cts +2 -3
- package/dist/singletons/callbacks.d.cts.map +1 -1
- package/dist/singletons/callbacks.d.ts +2 -3
- package/dist/singletons/callbacks.d.ts.map +1 -1
- package/dist/stores.d.cts +2 -3
- package/dist/stores.d.cts.map +1 -1
- package/dist/stores.d.ts +2 -3
- package/dist/stores.d.ts.map +1 -1
- package/dist/structured_query/base.d.cts +3 -4
- package/dist/structured_query/base.d.cts.map +1 -1
- package/dist/structured_query/base.d.ts +3 -4
- package/dist/structured_query/base.d.ts.map +1 -1
- package/dist/structured_query/functional.d.cts +2 -3
- package/dist/structured_query/functional.d.cts.map +1 -1
- package/dist/structured_query/functional.d.ts +2 -3
- package/dist/structured_query/functional.d.ts.map +1 -1
- package/dist/structured_query/ir.d.cts +23 -24
- package/dist/structured_query/ir.d.cts.map +1 -1
- package/dist/structured_query/ir.d.ts +23 -24
- package/dist/structured_query/ir.d.ts.map +1 -1
- package/dist/structured_query/utils.d.cts +7 -8
- package/dist/structured_query/utils.d.cts.map +1 -1
- package/dist/structured_query/utils.d.ts +7 -8
- package/dist/structured_query/utils.d.ts.map +1 -1
- package/dist/testing/fake_model_builder.d.cts +2 -3
- package/dist/testing/fake_model_builder.d.cts.map +1 -1
- package/dist/testing/fake_model_builder.d.ts +2 -3
- package/dist/testing/fake_model_builder.d.ts.map +1 -1
- package/dist/testing/index.d.cts +1 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/matchers.d.cts +12 -13
- package/dist/testing/matchers.d.cts.map +1 -1
- package/dist/testing/matchers.d.ts +12 -13
- package/dist/testing/matchers.d.ts.map +1 -1
- package/dist/testing/vitest-expect.d.cts +8 -0
- package/dist/testing/vitest-expect.d.cts.map +1 -0
- package/dist/testing/vitest-expect.d.ts +8 -0
- package/dist/testing/vitest-expect.d.ts.map +1 -0
- package/dist/tools/index.d.cts +21 -21
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +21 -21
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/types.d.cts +25 -26
- package/dist/tools/types.d.cts.map +1 -1
- package/dist/tools/types.d.ts +25 -26
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/utils.d.cts +1 -2
- package/dist/tools/utils.d.cts.map +1 -1
- package/dist/tools/utils.d.ts +1 -2
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tracers/base.cjs +7 -4
- package/dist/tracers/base.cjs.map +1 -1
- package/dist/tracers/base.d.cts +7 -8
- package/dist/tracers/base.d.cts.map +1 -1
- package/dist/tracers/base.d.ts +7 -8
- package/dist/tracers/base.d.ts.map +1 -1
- package/dist/tracers/base.js +7 -4
- package/dist/tracers/base.js.map +1 -1
- package/dist/tracers/console.d.cts +1 -2
- package/dist/tracers/console.d.cts.map +1 -1
- package/dist/tracers/console.d.ts +1 -2
- package/dist/tracers/console.d.ts.map +1 -1
- package/dist/tracers/event_stream.d.cts +3 -4
- package/dist/tracers/event_stream.d.cts.map +1 -1
- package/dist/tracers/event_stream.d.ts +3 -4
- package/dist/tracers/event_stream.d.ts.map +1 -1
- package/dist/tracers/log_stream.d.cts +9 -9
- package/dist/tracers/log_stream.d.cts.map +1 -1
- package/dist/tracers/log_stream.d.ts +9 -9
- package/dist/tracers/log_stream.d.ts.map +1 -1
- package/dist/tracers/run_collector.d.cts +1 -2
- package/dist/tracers/run_collector.d.cts.map +1 -1
- package/dist/tracers/run_collector.d.ts +1 -2
- package/dist/tracers/run_collector.d.ts.map +1 -1
- package/dist/tracers/tracer_langchain.d.cts +6 -7
- package/dist/tracers/tracer_langchain.d.cts.map +1 -1
- package/dist/tracers/tracer_langchain.d.ts +6 -7
- package/dist/tracers/tracer_langchain.d.ts.map +1 -1
- package/dist/types/_internal.d.cts +1 -2
- package/dist/types/_internal.d.cts.map +1 -1
- package/dist/types/_internal.d.ts +1 -2
- package/dist/types/_internal.d.ts.map +1 -1
- package/dist/types/type-utils.d.cts +2 -3
- package/dist/types/type-utils.d.cts.map +1 -1
- package/dist/types/type-utils.d.ts +2 -3
- package/dist/types/type-utils.d.ts.map +1 -1
- package/dist/utils/async_caller.d.cts +6 -7
- package/dist/utils/async_caller.d.cts.map +1 -1
- package/dist/utils/async_caller.d.ts +6 -7
- package/dist/utils/async_caller.d.ts.map +1 -1
- package/dist/utils/chunk_array.d.cts +1 -2
- package/dist/utils/chunk_array.d.cts.map +1 -1
- package/dist/utils/chunk_array.d.ts +1 -2
- package/dist/utils/chunk_array.d.ts.map +1 -1
- package/dist/utils/context.d.cts +1 -2
- package/dist/utils/context.d.cts.map +1 -1
- package/dist/utils/context.d.ts +1 -2
- package/dist/utils/context.d.ts.map +1 -1
- package/dist/utils/env.d.cts +9 -10
- package/dist/utils/env.d.cts.map +1 -1
- package/dist/utils/env.d.ts +9 -10
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/event_source_parse.d.cts +6 -7
- package/dist/utils/event_source_parse.d.cts.map +1 -1
- package/dist/utils/event_source_parse.d.ts +6 -7
- package/dist/utils/event_source_parse.d.ts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.d.cts +13 -14
- package/dist/utils/fast-json-patch/src/core.d.cts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.d.ts +13 -14
- package/dist/utils/fast-json-patch/src/core.d.ts.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.d.cts +1 -2
- package/dist/utils/fast-json-patch/src/duplex.d.cts.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.d.ts +1 -2
- package/dist/utils/fast-json-patch/src/duplex.d.ts.map +1 -1
- package/dist/utils/format.d.cts +2 -3
- package/dist/utils/format.d.cts.map +1 -1
- package/dist/utils/format.d.ts +2 -3
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/function_calling.d.cts +3 -3
- package/dist/utils/function_calling.d.cts.map +1 -1
- package/dist/utils/function_calling.d.ts +3 -3
- package/dist/utils/function_calling.d.ts.map +1 -1
- package/dist/utils/gateway.d.cts +4 -5
- package/dist/utils/gateway.d.cts.map +1 -1
- package/dist/utils/gateway.d.ts +4 -5
- package/dist/utils/gateway.d.ts.map +1 -1
- package/dist/utils/hash.d.cts +2 -2
- package/dist/utils/hash.d.cts.map +1 -1
- package/dist/utils/hash.d.ts +2 -2
- package/dist/utils/hash.d.ts.map +1 -1
- package/dist/utils/js-sha256/hash.cjs +2 -2
- package/dist/utils/js-sha256/hash.cjs.map +1 -1
- package/dist/utils/js-sha256/hash.d.cts +1 -2
- package/dist/utils/js-sha256/hash.d.cts.map +1 -1
- package/dist/utils/js-sha256/hash.d.ts +1 -2
- package/dist/utils/js-sha256/hash.d.ts.map +1 -1
- package/dist/utils/js-sha256/hash.js +2 -2
- package/dist/utils/js-sha256/hash.js.map +1 -1
- package/dist/utils/json.d.cts +2 -3
- package/dist/utils/json.d.cts.map +1 -1
- package/dist/utils/json.d.ts +2 -3
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json_schema.d.cts +4 -4
- package/dist/utils/json_schema.d.cts.map +1 -1
- package/dist/utils/json_schema.d.ts +4 -4
- package/dist/utils/json_schema.d.ts.map +1 -1
- package/dist/utils/math.d.cts +6 -7
- package/dist/utils/math.d.cts.map +1 -1
- package/dist/utils/math.d.ts +6 -7
- package/dist/utils/math.d.ts.map +1 -1
- package/dist/utils/ml-distance/similarities.d.cts +1 -2
- package/dist/utils/ml-distance/similarities.d.cts.map +1 -1
- package/dist/utils/ml-distance/similarities.d.ts +1 -2
- package/dist/utils/ml-distance/similarities.d.ts.map +1 -1
- package/dist/utils/namespace.cjs.map +1 -1
- package/dist/utils/namespace.d.cts +2 -3
- package/dist/utils/namespace.d.cts.map +1 -1
- package/dist/utils/namespace.d.ts +2 -3
- package/dist/utils/namespace.d.ts.map +1 -1
- package/dist/utils/namespace.js.map +1 -1
- package/dist/utils/signal.d.cts +1 -2
- package/dist/utils/signal.d.cts.map +1 -1
- package/dist/utils/signal.d.ts +1 -2
- package/dist/utils/signal.d.ts.map +1 -1
- package/dist/utils/ssrf.d.cts +6 -7
- package/dist/utils/ssrf.d.cts.map +1 -1
- package/dist/utils/ssrf.d.ts +6 -7
- package/dist/utils/ssrf.d.ts.map +1 -1
- package/dist/utils/standard_schema.d.cts +4 -5
- package/dist/utils/standard_schema.d.cts.map +1 -1
- package/dist/utils/standard_schema.d.ts +4 -5
- package/dist/utils/standard_schema.d.ts.map +1 -1
- package/dist/utils/stream.d.cts +6 -6
- package/dist/utils/stream.d.cts.map +1 -1
- package/dist/utils/stream.d.ts +6 -6
- package/dist/utils/stream.d.ts.map +1 -1
- package/dist/utils/testing/chat_models.d.cts +8 -9
- package/dist/utils/testing/chat_models.d.cts.map +1 -1
- package/dist/utils/testing/chat_models.d.ts +8 -9
- package/dist/utils/testing/chat_models.d.ts.map +1 -1
- package/dist/utils/testing/embeddings.d.cts +2 -3
- package/dist/utils/testing/embeddings.d.cts.map +1 -1
- package/dist/utils/testing/embeddings.d.ts +2 -3
- package/dist/utils/testing/embeddings.d.ts.map +1 -1
- package/dist/utils/testing/llms.d.cts +2 -3
- package/dist/utils/testing/llms.d.cts.map +1 -1
- package/dist/utils/testing/llms.d.ts +2 -3
- package/dist/utils/testing/llms.d.ts.map +1 -1
- package/dist/utils/testing/message_history.d.cts +3 -4
- package/dist/utils/testing/message_history.d.cts.map +1 -1
- package/dist/utils/testing/message_history.d.ts +3 -4
- package/dist/utils/testing/message_history.d.ts.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.d.cts +6 -7
- package/dist/utils/testing/openai_stream_fixtures.d.cts.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.d.ts +6 -7
- package/dist/utils/testing/openai_stream_fixtures.d.ts.map +1 -1
- package/dist/utils/testing/output_parsers.d.cts +1 -2
- package/dist/utils/testing/output_parsers.d.cts.map +1 -1
- package/dist/utils/testing/output_parsers.d.ts +1 -2
- package/dist/utils/testing/output_parsers.d.ts.map +1 -1
- package/dist/utils/testing/retrievers.d.cts +1 -2
- package/dist/utils/testing/retrievers.d.cts.map +1 -1
- package/dist/utils/testing/retrievers.d.ts +1 -2
- package/dist/utils/testing/retrievers.d.ts.map +1 -1
- package/dist/utils/testing/runnables.d.cts +1 -2
- package/dist/utils/testing/runnables.d.cts.map +1 -1
- package/dist/utils/testing/runnables.d.ts +1 -2
- package/dist/utils/testing/runnables.d.ts.map +1 -1
- package/dist/utils/testing/stream.d.cts +10 -11
- package/dist/utils/testing/stream.d.cts.map +1 -1
- package/dist/utils/testing/stream.d.ts +10 -11
- package/dist/utils/testing/stream.d.ts.map +1 -1
- package/dist/utils/testing/tools.d.cts +2 -3
- package/dist/utils/testing/tools.d.cts.map +1 -1
- package/dist/utils/testing/tools.d.ts +2 -3
- package/dist/utils/testing/tools.d.ts.map +1 -1
- package/dist/utils/testing/tracers.d.cts +1 -2
- package/dist/utils/testing/tracers.d.cts.map +1 -1
- package/dist/utils/testing/tracers.d.ts +1 -2
- package/dist/utils/testing/tracers.d.ts.map +1 -1
- package/dist/utils/testing/vectorstores.d.cts +2 -3
- package/dist/utils/testing/vectorstores.d.cts.map +1 -1
- package/dist/utils/testing/vectorstores.d.ts +2 -3
- package/dist/utils/testing/vectorstores.d.ts.map +1 -1
- package/dist/utils/tiktoken.d.cts +2 -3
- package/dist/utils/tiktoken.d.cts.map +1 -1
- package/dist/utils/tiktoken.d.ts +2 -3
- package/dist/utils/tiktoken.d.ts.map +1 -1
- package/dist/utils/types/index.d.cts +5 -5
- package/dist/utils/types/index.d.cts.map +1 -1
- package/dist/utils/types/index.d.ts +5 -5
- package/dist/utils/types/index.d.ts.map +1 -1
- package/dist/utils/types/zod.d.cts +62 -63
- package/dist/utils/types/zod.d.cts.map +1 -1
- package/dist/utils/types/zod.d.ts +62 -63
- package/dist/utils/types/zod.d.ts.map +1 -1
- package/dist/utils/uuid/index.d.cts +12 -12
- package/dist/utils/uuid/index.d.cts.map +1 -1
- package/dist/utils/uuid/index.d.ts +12 -12
- package/dist/utils/uuid/index.d.ts.map +1 -1
- package/dist/utils/uuid/types.d.cts +6 -7
- package/dist/utils/uuid/types.d.cts.map +1 -1
- package/dist/utils/uuid/types.d.ts +6 -7
- package/dist/utils/uuid/types.d.ts.map +1 -1
- package/dist/utils/uuid/v35.d.cts +2 -3
- package/dist/utils/uuid/v35.d.cts.map +1 -1
- package/dist/utils/uuid/v35.d.ts +2 -3
- package/dist/utils/uuid/v35.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/errorMessages.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/errorMessages.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.cts +2 -3
- package/dist/utils/zod-to-json-schema/parseTypes.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.ts +2 -3
- package/dist/utils/zod-to-json-schema/parseTypes.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/any.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/any.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/any.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/any.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/array.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/array.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/array.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/array.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/date.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/date.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/date.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/date.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/enum.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/enum.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/enum.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/enum.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/literal.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/literal.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/literal.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/literal.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/map.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/map.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/never.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/never.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/never.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/never.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/null.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/null.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/null.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/null.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/number.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/number.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/number.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/number.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/object.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/object.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/object.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/object.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/record.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/record.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/set.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/set.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/string.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/string.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/union.d.cts +2 -3
- package/dist/utils/zod-to-json-schema/parsers/union.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/union.d.ts +2 -3
- package/dist/utils/zod-to-json-schema/parsers/union.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts.map +1 -1
- package/dist/vectorstores.d.cts +8 -9
- package/dist/vectorstores.d.cts.map +1 -1
- package/dist/vectorstores.d.ts +8 -9
- package/dist/vectorstores.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -4,7 +4,7 @@ import { UsageMetadata } from "../messages/metadata.cjs";
|
|
|
4
4
|
/**
|
|
5
5
|
* Emitted once at the start of a model response.
|
|
6
6
|
*/
|
|
7
|
-
interface MessageStartEvent {
|
|
7
|
+
export interface MessageStartEvent {
|
|
8
8
|
event: "message-start";
|
|
9
9
|
/** Optional message ID assigned by the provider. */
|
|
10
10
|
id?: string;
|
|
@@ -22,11 +22,11 @@ interface MessageStartEvent {
|
|
|
22
22
|
* - `"tool_use"`: Model is requesting tool execution.
|
|
23
23
|
* - `"content_filter"`: Content was filtered by safety systems.
|
|
24
24
|
*/
|
|
25
|
-
type FinishReason = "stop" | "length" | "tool_use" | "content_filter";
|
|
25
|
+
export type FinishReason = "stop" | "length" | "tool_use" | "content_filter";
|
|
26
26
|
/**
|
|
27
27
|
* Emitted once when the model response is complete.
|
|
28
28
|
*/
|
|
29
|
-
interface MessageFinishEvent {
|
|
29
|
+
export interface MessageFinishEvent {
|
|
30
30
|
event: "message-finish";
|
|
31
31
|
/** Why the model stopped generating. */
|
|
32
32
|
reason?: FinishReason;
|
|
@@ -44,7 +44,7 @@ interface MessageFinishEvent {
|
|
|
44
44
|
* content: { type: "text", text: "" } }
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
interface ContentBlockStartEvent {
|
|
47
|
+
export interface ContentBlockStartEvent {
|
|
48
48
|
event: "content-block-start";
|
|
49
49
|
/** Positional index of this block within the message. */
|
|
50
50
|
index: number;
|
|
@@ -54,7 +54,7 @@ interface ContentBlockStartEvent {
|
|
|
54
54
|
/**
|
|
55
55
|
* Incremental text content. Append `text` to the active block's `text` field.
|
|
56
56
|
*/
|
|
57
|
-
interface TextDelta {
|
|
57
|
+
export interface TextDelta {
|
|
58
58
|
type: "text-delta";
|
|
59
59
|
/** The new text to append. */
|
|
60
60
|
text: string;
|
|
@@ -63,7 +63,7 @@ interface TextDelta {
|
|
|
63
63
|
* Incremental reasoning content. Append `reasoning` to the active block's
|
|
64
64
|
* `reasoning` field.
|
|
65
65
|
*/
|
|
66
|
-
interface ReasoningDelta {
|
|
66
|
+
export interface ReasoningDelta {
|
|
67
67
|
type: "reasoning-delta";
|
|
68
68
|
/** The new reasoning text to append. */
|
|
69
69
|
reasoning: string;
|
|
@@ -72,7 +72,7 @@ interface ReasoningDelta {
|
|
|
72
72
|
* Incremental encoded data. Append `data` to the active multimodal block's
|
|
73
73
|
* data field.
|
|
74
74
|
*/
|
|
75
|
-
interface DataDelta {
|
|
75
|
+
export interface DataDelta {
|
|
76
76
|
type: "data-delta";
|
|
77
77
|
/** Encoded data chunk to append. */
|
|
78
78
|
data: string;
|
|
@@ -83,7 +83,7 @@ interface DataDelta {
|
|
|
83
83
|
* Generic content block field update. Shallow-merge `fields` onto the active
|
|
84
84
|
* content block.
|
|
85
85
|
*/
|
|
86
|
-
interface BlockDelta {
|
|
86
|
+
export interface BlockDelta {
|
|
87
87
|
type: "block-delta";
|
|
88
88
|
/** Fields to shallow-merge onto the active content block. */
|
|
89
89
|
fields: {
|
|
@@ -93,7 +93,7 @@ interface BlockDelta {
|
|
|
93
93
|
/**
|
|
94
94
|
* Union of all content block delta types.
|
|
95
95
|
*/
|
|
96
|
-
type ContentBlockDelta = TextDelta | ReasoningDelta | DataDelta | BlockDelta;
|
|
96
|
+
export type ContentBlockDelta = TextDelta | ReasoningDelta | DataDelta | BlockDelta;
|
|
97
97
|
/**
|
|
98
98
|
* Emitted for each incremental update within a content block.
|
|
99
99
|
*
|
|
@@ -121,7 +121,7 @@ type ContentBlockDelta = TextDelta | ReasoningDelta | DataDelta | BlockDelta;
|
|
|
121
121
|
* fields: { type: "reasoning", signature: "sig_abc" } } }
|
|
122
122
|
* ```
|
|
123
123
|
*/
|
|
124
|
-
interface ContentBlockDeltaEvent {
|
|
124
|
+
export interface ContentBlockDeltaEvent {
|
|
125
125
|
event: "content-block-delta";
|
|
126
126
|
/** Positional index of the block being updated. */
|
|
127
127
|
index: number;
|
|
@@ -137,7 +137,7 @@ interface ContentBlockDeltaEvent {
|
|
|
137
137
|
* content: { type: "text", text: "Hello world" } }
|
|
138
138
|
* ```
|
|
139
139
|
*/
|
|
140
|
-
interface ContentBlockFinishEvent {
|
|
140
|
+
export interface ContentBlockFinishEvent {
|
|
141
141
|
event: "content-block-finish";
|
|
142
142
|
/** Positional index of the completed block. */
|
|
143
143
|
index: number;
|
|
@@ -148,7 +148,7 @@ interface ContentBlockFinishEvent {
|
|
|
148
148
|
* Emitted whenever the provider reports updated usage information.
|
|
149
149
|
* Each event carries a **running snapshot** (not an additive delta).
|
|
150
150
|
*/
|
|
151
|
-
interface UsageUpdateEvent {
|
|
151
|
+
export interface UsageUpdateEvent {
|
|
152
152
|
event: "usage";
|
|
153
153
|
/** Current usage snapshot. */
|
|
154
154
|
usage: Partial<UsageMetadata>;
|
|
@@ -156,7 +156,7 @@ interface UsageUpdateEvent {
|
|
|
156
156
|
/**
|
|
157
157
|
* Passthrough for native provider events that don't map to standard types.
|
|
158
158
|
*/
|
|
159
|
-
interface ProviderEvent {
|
|
159
|
+
export interface ProviderEvent {
|
|
160
160
|
event: "provider";
|
|
161
161
|
/** Provider identifier (e.g., `"openai"`, `"anthropic"`, `"google"`). */
|
|
162
162
|
provider: string;
|
|
@@ -168,7 +168,7 @@ interface ProviderEvent {
|
|
|
168
168
|
/**
|
|
169
169
|
* Emitted on unrecoverable stream errors.
|
|
170
170
|
*/
|
|
171
|
-
interface StreamErrorEvent {
|
|
171
|
+
export interface StreamErrorEvent {
|
|
172
172
|
event: "error";
|
|
173
173
|
/** Human-readable error message. */
|
|
174
174
|
message: string;
|
|
@@ -178,7 +178,6 @@ interface StreamErrorEvent {
|
|
|
178
178
|
/**
|
|
179
179
|
* Union of all chat model stream event types.
|
|
180
180
|
*/
|
|
181
|
-
type ChatModelStreamEvent = MessageStartEvent | MessageFinishEvent | ContentBlockStartEvent | ContentBlockDeltaEvent | ContentBlockFinishEvent | UsageUpdateEvent | ProviderEvent | StreamErrorEvent;
|
|
181
|
+
export type ChatModelStreamEvent = MessageStartEvent | MessageFinishEvent | ContentBlockStartEvent | ContentBlockDeltaEvent | ContentBlockFinishEvent | UsageUpdateEvent | ProviderEvent | StreamErrorEvent;
|
|
182
182
|
//#endregion
|
|
183
|
-
export { BlockDelta, ChatModelStreamEvent, ContentBlockDelta, ContentBlockDeltaEvent, ContentBlockFinishEvent, ContentBlockStartEvent, DataDelta, FinishReason, MessageFinishEvent, MessageStartEvent, ProviderEvent, ReasoningDelta, StreamErrorEvent, TextDelta, UsageUpdateEvent };
|
|
184
183
|
//# sourceMappingURL=event.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.cts","names":[],"sources":["../../src/language_models/event.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"event.d.cts","names":[],"sources":["../../src/language_models/event.ts"],"mappings":";;;;;;iBA8CiB;EACf;;EAEA;;;;;EAKA,QAAQ,QAAQ;;;;;;;;;;YAWN;;;;iBAKK;EACf;;EAEA,SAAS;;EAET,QAAQ,QAAQ;;EAEhB,mBAAmB;;;;;;;;;;;iBAeJ;EACf;;EAEA;;EAEA,SAAS;;;;;iBAQM;EACf;;EAEA;;;;;;iBAOe;EACf;;EAEA;;;;;;iBAOe;EACf;;EAEA;;EAEA;;;;;;iBAOe;EACf;;EAEA;IAAU;MAAiB;;;;;YAMjB,oBACR,YACA,iBACA,YACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6Ba;EACf;;EAEA;;EAEA,OAAO;;;;;;;;;;;iBAYQ;EACf;;EAEA;;EAEA,SAAS;;;;;;iBASM;EACf;;EAEA,OAAO,QAAQ;;;;;iBAQA;EACf;;EAEA;;EAEA;;EAEA;;;;;iBAQe;EACf;;EAEA;;EAEA;;;;;YAQU,uBACR,oBACA,qBACA,yBACA,yBACA,0BACA,mBACA,gBACA"}
|
|
@@ -4,7 +4,7 @@ import { UsageMetadata } from "../messages/metadata.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* Emitted once at the start of a model response.
|
|
6
6
|
*/
|
|
7
|
-
interface MessageStartEvent {
|
|
7
|
+
export interface MessageStartEvent {
|
|
8
8
|
event: "message-start";
|
|
9
9
|
/** Optional message ID assigned by the provider. */
|
|
10
10
|
id?: string;
|
|
@@ -22,11 +22,11 @@ interface MessageStartEvent {
|
|
|
22
22
|
* - `"tool_use"`: Model is requesting tool execution.
|
|
23
23
|
* - `"content_filter"`: Content was filtered by safety systems.
|
|
24
24
|
*/
|
|
25
|
-
type FinishReason = "stop" | "length" | "tool_use" | "content_filter";
|
|
25
|
+
export type FinishReason = "stop" | "length" | "tool_use" | "content_filter";
|
|
26
26
|
/**
|
|
27
27
|
* Emitted once when the model response is complete.
|
|
28
28
|
*/
|
|
29
|
-
interface MessageFinishEvent {
|
|
29
|
+
export interface MessageFinishEvent {
|
|
30
30
|
event: "message-finish";
|
|
31
31
|
/** Why the model stopped generating. */
|
|
32
32
|
reason?: FinishReason;
|
|
@@ -44,7 +44,7 @@ interface MessageFinishEvent {
|
|
|
44
44
|
* content: { type: "text", text: "" } }
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
interface ContentBlockStartEvent {
|
|
47
|
+
export interface ContentBlockStartEvent {
|
|
48
48
|
event: "content-block-start";
|
|
49
49
|
/** Positional index of this block within the message. */
|
|
50
50
|
index: number;
|
|
@@ -54,7 +54,7 @@ interface ContentBlockStartEvent {
|
|
|
54
54
|
/**
|
|
55
55
|
* Incremental text content. Append `text` to the active block's `text` field.
|
|
56
56
|
*/
|
|
57
|
-
interface TextDelta {
|
|
57
|
+
export interface TextDelta {
|
|
58
58
|
type: "text-delta";
|
|
59
59
|
/** The new text to append. */
|
|
60
60
|
text: string;
|
|
@@ -63,7 +63,7 @@ interface TextDelta {
|
|
|
63
63
|
* Incremental reasoning content. Append `reasoning` to the active block's
|
|
64
64
|
* `reasoning` field.
|
|
65
65
|
*/
|
|
66
|
-
interface ReasoningDelta {
|
|
66
|
+
export interface ReasoningDelta {
|
|
67
67
|
type: "reasoning-delta";
|
|
68
68
|
/** The new reasoning text to append. */
|
|
69
69
|
reasoning: string;
|
|
@@ -72,7 +72,7 @@ interface ReasoningDelta {
|
|
|
72
72
|
* Incremental encoded data. Append `data` to the active multimodal block's
|
|
73
73
|
* data field.
|
|
74
74
|
*/
|
|
75
|
-
interface DataDelta {
|
|
75
|
+
export interface DataDelta {
|
|
76
76
|
type: "data-delta";
|
|
77
77
|
/** Encoded data chunk to append. */
|
|
78
78
|
data: string;
|
|
@@ -83,7 +83,7 @@ interface DataDelta {
|
|
|
83
83
|
* Generic content block field update. Shallow-merge `fields` onto the active
|
|
84
84
|
* content block.
|
|
85
85
|
*/
|
|
86
|
-
interface BlockDelta {
|
|
86
|
+
export interface BlockDelta {
|
|
87
87
|
type: "block-delta";
|
|
88
88
|
/** Fields to shallow-merge onto the active content block. */
|
|
89
89
|
fields: {
|
|
@@ -93,7 +93,7 @@ interface BlockDelta {
|
|
|
93
93
|
/**
|
|
94
94
|
* Union of all content block delta types.
|
|
95
95
|
*/
|
|
96
|
-
type ContentBlockDelta = TextDelta | ReasoningDelta | DataDelta | BlockDelta;
|
|
96
|
+
export type ContentBlockDelta = TextDelta | ReasoningDelta | DataDelta | BlockDelta;
|
|
97
97
|
/**
|
|
98
98
|
* Emitted for each incremental update within a content block.
|
|
99
99
|
*
|
|
@@ -121,7 +121,7 @@ type ContentBlockDelta = TextDelta | ReasoningDelta | DataDelta | BlockDelta;
|
|
|
121
121
|
* fields: { type: "reasoning", signature: "sig_abc" } } }
|
|
122
122
|
* ```
|
|
123
123
|
*/
|
|
124
|
-
interface ContentBlockDeltaEvent {
|
|
124
|
+
export interface ContentBlockDeltaEvent {
|
|
125
125
|
event: "content-block-delta";
|
|
126
126
|
/** Positional index of the block being updated. */
|
|
127
127
|
index: number;
|
|
@@ -137,7 +137,7 @@ interface ContentBlockDeltaEvent {
|
|
|
137
137
|
* content: { type: "text", text: "Hello world" } }
|
|
138
138
|
* ```
|
|
139
139
|
*/
|
|
140
|
-
interface ContentBlockFinishEvent {
|
|
140
|
+
export interface ContentBlockFinishEvent {
|
|
141
141
|
event: "content-block-finish";
|
|
142
142
|
/** Positional index of the completed block. */
|
|
143
143
|
index: number;
|
|
@@ -148,7 +148,7 @@ interface ContentBlockFinishEvent {
|
|
|
148
148
|
* Emitted whenever the provider reports updated usage information.
|
|
149
149
|
* Each event carries a **running snapshot** (not an additive delta).
|
|
150
150
|
*/
|
|
151
|
-
interface UsageUpdateEvent {
|
|
151
|
+
export interface UsageUpdateEvent {
|
|
152
152
|
event: "usage";
|
|
153
153
|
/** Current usage snapshot. */
|
|
154
154
|
usage: Partial<UsageMetadata>;
|
|
@@ -156,7 +156,7 @@ interface UsageUpdateEvent {
|
|
|
156
156
|
/**
|
|
157
157
|
* Passthrough for native provider events that don't map to standard types.
|
|
158
158
|
*/
|
|
159
|
-
interface ProviderEvent {
|
|
159
|
+
export interface ProviderEvent {
|
|
160
160
|
event: "provider";
|
|
161
161
|
/** Provider identifier (e.g., `"openai"`, `"anthropic"`, `"google"`). */
|
|
162
162
|
provider: string;
|
|
@@ -168,7 +168,7 @@ interface ProviderEvent {
|
|
|
168
168
|
/**
|
|
169
169
|
* Emitted on unrecoverable stream errors.
|
|
170
170
|
*/
|
|
171
|
-
interface StreamErrorEvent {
|
|
171
|
+
export interface StreamErrorEvent {
|
|
172
172
|
event: "error";
|
|
173
173
|
/** Human-readable error message. */
|
|
174
174
|
message: string;
|
|
@@ -178,7 +178,6 @@ interface StreamErrorEvent {
|
|
|
178
178
|
/**
|
|
179
179
|
* Union of all chat model stream event types.
|
|
180
180
|
*/
|
|
181
|
-
type ChatModelStreamEvent = MessageStartEvent | MessageFinishEvent | ContentBlockStartEvent | ContentBlockDeltaEvent | ContentBlockFinishEvent | UsageUpdateEvent | ProviderEvent | StreamErrorEvent;
|
|
181
|
+
export type ChatModelStreamEvent = MessageStartEvent | MessageFinishEvent | ContentBlockStartEvent | ContentBlockDeltaEvent | ContentBlockFinishEvent | UsageUpdateEvent | ProviderEvent | StreamErrorEvent;
|
|
182
182
|
//#endregion
|
|
183
|
-
export { BlockDelta, ChatModelStreamEvent, ContentBlockDelta, ContentBlockDeltaEvent, ContentBlockFinishEvent, ContentBlockStartEvent, DataDelta, FinishReason, MessageFinishEvent, MessageStartEvent, ProviderEvent, ReasoningDelta, StreamErrorEvent, TextDelta, UsageUpdateEvent };
|
|
184
183
|
//# sourceMappingURL=event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","names":[],"sources":["../../src/language_models/event.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"event.d.ts","names":[],"sources":["../../src/language_models/event.ts"],"mappings":";;;;;;iBA8CiB;EACf;;EAEA;;;;;EAKA,QAAQ,QAAQ;;;;;;;;;;YAWN;;;;iBAKK;EACf;;EAEA,SAAS;;EAET,QAAQ,QAAQ;;EAEhB,mBAAmB;;;;;;;;;;;iBAeJ;EACf;;EAEA;;EAEA,SAAS;;;;;iBAQM;EACf;;EAEA;;;;;;iBAOe;EACf;;EAEA;;;;;;iBAOe;EACf;;EAEA;;EAEA;;;;;;iBAOe;EACf;;EAEA;IAAU;MAAiB;;;;;YAMjB,oBACR,YACA,iBACA,YACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6Ba;EACf;;EAEA;;EAEA,OAAO;;;;;;;;;;;iBAYQ;EACf;;EAEA;;EAEA,SAAS;;;;;;iBASM;EACf;;EAEA,OAAO,QAAQ;;;;;iBAQA;EACf;;EAEA;;EAEA;;EAEA;;;;;iBAQe;EACf;;EAEA;;EAEA;;;;;YAQU,uBACR,oBACA,qBACA,yBACA,yBACA,0BACA,mBACA,gBACA"}
|
|
@@ -6,16 +6,16 @@ import "../runnables/config.cjs";
|
|
|
6
6
|
import { BasePromptValueInterface } from "../prompt_values.cjs";
|
|
7
7
|
import { BaseLanguageModel, BaseLanguageModelCallOptions, BaseLanguageModelInput, BaseLanguageModelParams } from "./base.cjs";
|
|
8
8
|
//#region src/language_models/llms.d.ts
|
|
9
|
-
type SerializedLLM = {
|
|
9
|
+
export type SerializedLLM = {
|
|
10
10
|
_model: string;
|
|
11
11
|
_type: string;
|
|
12
12
|
} & Record<string, any>;
|
|
13
|
-
interface BaseLLMParams extends BaseLanguageModelParams {}
|
|
14
|
-
interface BaseLLMCallOptions extends BaseLanguageModelCallOptions {}
|
|
13
|
+
export interface BaseLLMParams extends BaseLanguageModelParams {}
|
|
14
|
+
export interface BaseLLMCallOptions extends BaseLanguageModelCallOptions {}
|
|
15
15
|
/**
|
|
16
16
|
* LLM Wrapper. Takes in a prompt (or prompts) and returns a string.
|
|
17
17
|
*/
|
|
18
|
-
declare abstract class BaseLLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLanguageModel<string, CallOptions> {
|
|
18
|
+
export declare abstract class BaseLLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLanguageModel<string, CallOptions> {
|
|
19
19
|
ParsedCallOptions: Omit<CallOptions, Exclude<keyof RunnableConfig, "signal" | "timeout" | "maxConcurrency">>;
|
|
20
20
|
lc_namespace: string[];
|
|
21
21
|
/**
|
|
@@ -82,7 +82,7 @@ declare abstract class BaseLLM<CallOptions extends BaseLLMCallOptions = BaseLLMC
|
|
|
82
82
|
*
|
|
83
83
|
* @augments BaseLLM
|
|
84
84
|
*/
|
|
85
|
-
declare abstract class LLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLLM<CallOptions> {
|
|
85
|
+
export declare abstract class LLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLLM<CallOptions> {
|
|
86
86
|
/**
|
|
87
87
|
* Run the LLM on the given prompt and input.
|
|
88
88
|
*/
|
|
@@ -90,5 +90,4 @@ declare abstract class LLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallO
|
|
|
90
90
|
_generate(prompts: string[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): Promise<LLMResult>;
|
|
91
91
|
}
|
|
92
92
|
//#endregion
|
|
93
|
-
export { BaseLLM, BaseLLMCallOptions, BaseLLMParams, LLM, SerializedLLM };
|
|
94
93
|
//# sourceMappingURL=llms.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llms.d.cts","names":[],"sources":["../../src/language_models/llms.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"llms.d.cts","names":[],"sources":["../../src/language_models/llms.ts"],"mappings":";;;;;;;;YAwBY;EACV;EACA;IAEE;iBAEa,sBAAsB;iBAEtB,2BAA2B;;;;8BAKtB,QACpB,oBAAoB,qBAAqB,4BACjC,0BAA0B;EAE1B,mBAAmB,KACzB,aACA,cAAc;EAIhB;;;;;;;;;EAUM,OACJ,OAAO,wBACP,UAAU,QAAQ,eACjB;EAWI,sBACL,gBACA,qCACA,cAAc,2BACb,eAAe;YAIR,6CACR,UAAU,QAAQ,gBAChB;EAQG,gBACL,OAAO,wBACP,UAAU,QAAQ,eACjB;;;;;;;;;EAmFG,eACJ,cAAc,4BACd,qBAAqB,QAAQ,cAC7B,YAAY,YACX,QAAQ;;;;WAUF,UACP,mBACA,oCACA,aAAa,2BACZ,QAAQ;;;;EAMX,iBAAiB;EAIjB,kBAAkB,WAAW,YAAY;;EA2BnC,kBACJ,mBACA,0CACA,gBAAgB,oBAChB,qBAAqB,6BACpB,QAAQ;EAuGL,kBACJ,SACA,OACA,cACA,eACA,gBACA;IAEA;IACA,OAAO,UAAU;IACjB;IAEA;IACA,gBAAgB;IAChB;MACE,QACF;IACE;IACA,qBAAqB;;;;;EAwHnB,SACJ,mBACA,qBAAqB,QAAQ,cAC7B,YAAY,YACX,QAAQ;;;;EA6DX,sBAAsB;;;;WAOb;EAET;;;;;;;;;8BAYoB,IACpB,oBAAoB,qBAAqB,4BACjC,QAAQ;;;;WAIP,MACP,gBACA,oCACA,aAAa,2BACZ;EAEG,UACJ,mBACA,oCACA,aAAa,2BACZ,QAAQ"}
|
|
@@ -6,16 +6,16 @@ import "../runnables/config.js";
|
|
|
6
6
|
import { BasePromptValueInterface } from "../prompt_values.js";
|
|
7
7
|
import { BaseLanguageModel, BaseLanguageModelCallOptions, BaseLanguageModelInput, BaseLanguageModelParams } from "./base.js";
|
|
8
8
|
//#region src/language_models/llms.d.ts
|
|
9
|
-
type SerializedLLM = {
|
|
9
|
+
export type SerializedLLM = {
|
|
10
10
|
_model: string;
|
|
11
11
|
_type: string;
|
|
12
12
|
} & Record<string, any>;
|
|
13
|
-
interface BaseLLMParams extends BaseLanguageModelParams {}
|
|
14
|
-
interface BaseLLMCallOptions extends BaseLanguageModelCallOptions {}
|
|
13
|
+
export interface BaseLLMParams extends BaseLanguageModelParams {}
|
|
14
|
+
export interface BaseLLMCallOptions extends BaseLanguageModelCallOptions {}
|
|
15
15
|
/**
|
|
16
16
|
* LLM Wrapper. Takes in a prompt (or prompts) and returns a string.
|
|
17
17
|
*/
|
|
18
|
-
declare abstract class BaseLLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLanguageModel<string, CallOptions> {
|
|
18
|
+
export declare abstract class BaseLLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLanguageModel<string, CallOptions> {
|
|
19
19
|
ParsedCallOptions: Omit<CallOptions, Exclude<keyof RunnableConfig, "signal" | "timeout" | "maxConcurrency">>;
|
|
20
20
|
lc_namespace: string[];
|
|
21
21
|
/**
|
|
@@ -82,7 +82,7 @@ declare abstract class BaseLLM<CallOptions extends BaseLLMCallOptions = BaseLLMC
|
|
|
82
82
|
*
|
|
83
83
|
* @augments BaseLLM
|
|
84
84
|
*/
|
|
85
|
-
declare abstract class LLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLLM<CallOptions> {
|
|
85
|
+
export declare abstract class LLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLLM<CallOptions> {
|
|
86
86
|
/**
|
|
87
87
|
* Run the LLM on the given prompt and input.
|
|
88
88
|
*/
|
|
@@ -90,5 +90,4 @@ declare abstract class LLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallO
|
|
|
90
90
|
_generate(prompts: string[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): Promise<LLMResult>;
|
|
91
91
|
}
|
|
92
92
|
//#endregion
|
|
93
|
-
export { BaseLLM, BaseLLMCallOptions, BaseLLMParams, LLM, SerializedLLM };
|
|
94
93
|
//# sourceMappingURL=llms.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llms.d.ts","names":[],"sources":["../../src/language_models/llms.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"llms.d.ts","names":[],"sources":["../../src/language_models/llms.ts"],"mappings":";;;;;;;;YAwBY;EACV;EACA;IAEE;iBAEa,sBAAsB;iBAEtB,2BAA2B;;;;8BAKtB,QACpB,oBAAoB,qBAAqB,4BACjC,0BAA0B;EAE1B,mBAAmB,KACzB,aACA,cAAc;EAIhB;;;;;;;;;EAUM,OACJ,OAAO,wBACP,UAAU,QAAQ,eACjB;EAWI,sBACL,gBACA,qCACA,cAAc,2BACb,eAAe;YAIR,6CACR,UAAU,QAAQ,gBAChB;EAQG,gBACL,OAAO,wBACP,UAAU,QAAQ,eACjB;;;;;;;;;EAmFG,eACJ,cAAc,4BACd,qBAAqB,QAAQ,cAC7B,YAAY,YACX,QAAQ;;;;WAUF,UACP,mBACA,oCACA,aAAa,2BACZ,QAAQ;;;;EAMX,iBAAiB;EAIjB,kBAAkB,WAAW,YAAY;;EA2BnC,kBACJ,mBACA,0CACA,gBAAgB,oBAChB,qBAAqB,6BACpB,QAAQ;EAuGL,kBACJ,SACA,OACA,cACA,eACA,gBACA;IAEA;IACA,OAAO,UAAU;IACjB;IAEA;IACA,gBAAgB;IAChB;MACE,QACF;IACE;IACA,qBAAqB;;;;;EAwHnB,SACJ,mBACA,qBAAqB,QAAQ,cAC7B,YAAY,YACX,QAAQ;;;;EA6DX,sBAAsB;;;;WAOb;EAET;;;;;;;;;8BAYoB,IACpB,oBAAoB,qBAAqB,4BACjC,QAAQ;;;;WAIP,MACP,gBACA,oCACA,aAAa,2BACZ;EAEG,UACJ,mBACA,oCACA,aAAa,2BACZ,QAAQ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChatModelStreamEvent } from "./event.cjs";
|
|
2
2
|
//#region src/language_models/openai_completions_stream.d.ts
|
|
3
|
-
type OpenAICompletionsFinishReason = "stop" | "length" | "max_tokens" | "tool_calls" | "function_call" | "content_filter" | null;
|
|
4
|
-
interface OpenAICompletionsUsage {
|
|
3
|
+
export type OpenAICompletionsFinishReason = "stop" | "length" | "max_tokens" | "tool_calls" | "function_call" | "content_filter" | null;
|
|
4
|
+
export interface OpenAICompletionsUsage {
|
|
5
5
|
prompt_tokens?: number;
|
|
6
6
|
completion_tokens?: number;
|
|
7
7
|
total_tokens?: number;
|
|
@@ -14,7 +14,7 @@ interface OpenAICompletionsUsage {
|
|
|
14
14
|
reasoning_tokens?: number;
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
interface OpenAICompletionsToolCallDelta {
|
|
17
|
+
export interface OpenAICompletionsToolCallDelta {
|
|
18
18
|
index?: number;
|
|
19
19
|
id?: string;
|
|
20
20
|
type?: "function";
|
|
@@ -23,7 +23,7 @@ interface OpenAICompletionsToolCallDelta {
|
|
|
23
23
|
arguments?: string;
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
interface OpenAICompletionsDelta {
|
|
26
|
+
export interface OpenAICompletionsDelta {
|
|
27
27
|
role?: string;
|
|
28
28
|
content?: string | null;
|
|
29
29
|
reasoning_content?: string;
|
|
@@ -36,13 +36,13 @@ interface OpenAICompletionsDelta {
|
|
|
36
36
|
transcript?: string;
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
interface OpenAICompletionsStreamChoice {
|
|
39
|
+
export interface OpenAICompletionsStreamChoice {
|
|
40
40
|
index?: number;
|
|
41
41
|
finish_reason?: OpenAICompletionsFinishReason;
|
|
42
42
|
logprobs?: unknown;
|
|
43
43
|
delta?: OpenAICompletionsDelta;
|
|
44
44
|
}
|
|
45
|
-
interface OpenAICompletionsStreamChunk {
|
|
45
|
+
export interface OpenAICompletionsStreamChunk {
|
|
46
46
|
id?: string;
|
|
47
47
|
model?: string;
|
|
48
48
|
service_tier?: string | null;
|
|
@@ -57,7 +57,7 @@ interface OpenAICompletionsStreamChunk {
|
|
|
57
57
|
};
|
|
58
58
|
choices?: OpenAICompletionsStreamChoice[];
|
|
59
59
|
}
|
|
60
|
-
interface ConvertOpenAICompletionsStreamOptions {
|
|
60
|
+
export interface ConvertOpenAICompletionsStreamOptions {
|
|
61
61
|
streamUsage?: boolean;
|
|
62
62
|
/** Provider id for passthrough events (default `"openai"`). */
|
|
63
63
|
provider?: string;
|
|
@@ -68,7 +68,6 @@ interface ConvertOpenAICompletionsStreamOptions {
|
|
|
68
68
|
* Convert an async iterable of OpenAI Chat Completions-shaped stream chunks into
|
|
69
69
|
* LangChain `ChatModelStreamEvent`s with typed deltas.
|
|
70
70
|
*/
|
|
71
|
-
declare function convertOpenAICompletionsStream(source: AsyncIterable<OpenAICompletionsStreamChunk>, options?: ConvertOpenAICompletionsStreamOptions): AsyncGenerator<ChatModelStreamEvent>;
|
|
71
|
+
export declare function convertOpenAICompletionsStream(source: AsyncIterable<OpenAICompletionsStreamChunk>, options?: ConvertOpenAICompletionsStreamOptions): AsyncGenerator<ChatModelStreamEvent>;
|
|
72
72
|
//#endregion
|
|
73
|
-
export { ConvertOpenAICompletionsStreamOptions, OpenAICompletionsDelta, OpenAICompletionsFinishReason, OpenAICompletionsStreamChoice, OpenAICompletionsStreamChunk, OpenAICompletionsToolCallDelta, OpenAICompletionsUsage, convertOpenAICompletionsStream };
|
|
74
73
|
//# sourceMappingURL=openai_completions_stream.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai_completions_stream.d.cts","names":[],"sources":["../../src/language_models/openai_completions_stream.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"openai_completions_stream.d.cts","names":[],"sources":["../../src/language_models/openai_completions_stream.ts"],"mappings":";;YAgBY;iBASK;EACf;EACA;EACA;EACA;IACE;IACA;;EAEF;IACE;IACA;;;iBAIa;EACf;EACA;EACA;EACA;IACE;IACA;;;iBAIa;EACf;EACA;EACA;EACA;EACA,aAAa;EACb;EACA;IACE;IACA;IACA;;;iBAIa;EACf;EACA,gBAAgB;EAChB;EACA,QAAQ;;iBAGO;EACf;EACA;EACA;EACA;EACA,QAAQ;EACR;IACE;MACE;MACA;MACA;;;EAGJ,UAAU;;iBAGK;EACf;;EAEA;;EAEA,YACE,OAAO,iCACJ;;;;;;wBASgB,+BACrB,QAAQ,cAAc,+BACtB,UAAS,wCACR,eAAe"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChatModelStreamEvent } from "./event.js";
|
|
2
2
|
//#region src/language_models/openai_completions_stream.d.ts
|
|
3
|
-
type OpenAICompletionsFinishReason = "stop" | "length" | "max_tokens" | "tool_calls" | "function_call" | "content_filter" | null;
|
|
4
|
-
interface OpenAICompletionsUsage {
|
|
3
|
+
export type OpenAICompletionsFinishReason = "stop" | "length" | "max_tokens" | "tool_calls" | "function_call" | "content_filter" | null;
|
|
4
|
+
export interface OpenAICompletionsUsage {
|
|
5
5
|
prompt_tokens?: number;
|
|
6
6
|
completion_tokens?: number;
|
|
7
7
|
total_tokens?: number;
|
|
@@ -14,7 +14,7 @@ interface OpenAICompletionsUsage {
|
|
|
14
14
|
reasoning_tokens?: number;
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
interface OpenAICompletionsToolCallDelta {
|
|
17
|
+
export interface OpenAICompletionsToolCallDelta {
|
|
18
18
|
index?: number;
|
|
19
19
|
id?: string;
|
|
20
20
|
type?: "function";
|
|
@@ -23,7 +23,7 @@ interface OpenAICompletionsToolCallDelta {
|
|
|
23
23
|
arguments?: string;
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
interface OpenAICompletionsDelta {
|
|
26
|
+
export interface OpenAICompletionsDelta {
|
|
27
27
|
role?: string;
|
|
28
28
|
content?: string | null;
|
|
29
29
|
reasoning_content?: string;
|
|
@@ -36,13 +36,13 @@ interface OpenAICompletionsDelta {
|
|
|
36
36
|
transcript?: string;
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
interface OpenAICompletionsStreamChoice {
|
|
39
|
+
export interface OpenAICompletionsStreamChoice {
|
|
40
40
|
index?: number;
|
|
41
41
|
finish_reason?: OpenAICompletionsFinishReason;
|
|
42
42
|
logprobs?: unknown;
|
|
43
43
|
delta?: OpenAICompletionsDelta;
|
|
44
44
|
}
|
|
45
|
-
interface OpenAICompletionsStreamChunk {
|
|
45
|
+
export interface OpenAICompletionsStreamChunk {
|
|
46
46
|
id?: string;
|
|
47
47
|
model?: string;
|
|
48
48
|
service_tier?: string | null;
|
|
@@ -57,7 +57,7 @@ interface OpenAICompletionsStreamChunk {
|
|
|
57
57
|
};
|
|
58
58
|
choices?: OpenAICompletionsStreamChoice[];
|
|
59
59
|
}
|
|
60
|
-
interface ConvertOpenAICompletionsStreamOptions {
|
|
60
|
+
export interface ConvertOpenAICompletionsStreamOptions {
|
|
61
61
|
streamUsage?: boolean;
|
|
62
62
|
/** Provider id for passthrough events (default `"openai"`). */
|
|
63
63
|
provider?: string;
|
|
@@ -68,7 +68,6 @@ interface ConvertOpenAICompletionsStreamOptions {
|
|
|
68
68
|
* Convert an async iterable of OpenAI Chat Completions-shaped stream chunks into
|
|
69
69
|
* LangChain `ChatModelStreamEvent`s with typed deltas.
|
|
70
70
|
*/
|
|
71
|
-
declare function convertOpenAICompletionsStream(source: AsyncIterable<OpenAICompletionsStreamChunk>, options?: ConvertOpenAICompletionsStreamOptions): AsyncGenerator<ChatModelStreamEvent>;
|
|
71
|
+
export declare function convertOpenAICompletionsStream(source: AsyncIterable<OpenAICompletionsStreamChunk>, options?: ConvertOpenAICompletionsStreamOptions): AsyncGenerator<ChatModelStreamEvent>;
|
|
72
72
|
//#endregion
|
|
73
|
-
export { ConvertOpenAICompletionsStreamOptions, OpenAICompletionsDelta, OpenAICompletionsFinishReason, OpenAICompletionsStreamChoice, OpenAICompletionsStreamChunk, OpenAICompletionsToolCallDelta, OpenAICompletionsUsage, convertOpenAICompletionsStream };
|
|
74
73
|
//# sourceMappingURL=openai_completions_stream.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai_completions_stream.d.ts","names":[],"sources":["../../src/language_models/openai_completions_stream.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"openai_completions_stream.d.ts","names":[],"sources":["../../src/language_models/openai_completions_stream.ts"],"mappings":";;YAgBY;iBASK;EACf;EACA;EACA;EACA;IACE;IACA;;EAEF;IACE;IACA;;;iBAIa;EACf;EACA;EACA;EACA;IACE;IACA;;;iBAIa;EACf;EACA;EACA;EACA;EACA,aAAa;EACb;EACA;IACE;IACA;IACA;;;iBAIa;EACf;EACA,gBAAgB;EAChB;EACA,QAAQ;;iBAGO;EACf;EACA;EACA;EACA;EACA,QAAQ;EACR;IACE;MACE;MACA;MACA;;;EAGJ,UAAU;;iBAGK;EACf;;EAEA;;EAEA,YACE,OAAO,iCACJ;;;;;;wBASgB,+BACrB,QAAQ,cAAc,+BACtB,UAAS,wCACR,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.cjs","names":[],"sources":["../../src/language_models/profile.ts"],"sourcesContent":["/**\n * Represents the capabilities and constraints of a language model.\n *\n * This interface defines the various features and limitations that a model may have,\n * including input/output constraints, multimodal support, and advanced capabilities\n * like tool calling and structured output.\n */\nexport interface ModelProfile {\n /**\n * Maximum number of tokens that can be included in the input context window.\n *\n * This represents the total token budget for the model's input, including\n * the prompt, system messages, conversation history, and any other context.\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxInputTokens: 128000 // Model supports up to 128k tokens\n * };\n * ```\n */\n maxInputTokens?: number;\n\n /**\n * Whether the model supports image inputs.\n *\n * When `true`, the model can process images as part of its input, enabling\n * multimodal interactions where visual content can be analyzed alongside text.\n *\n * @see {@link imageUrlInputs} for URL-based image input support\n */\n imageInputs?: boolean;\n\n /**\n * Whether the model supports image URL inputs.\n *\n * When `true`, the model can accept URLs pointing to images rather than\n * requiring the image data to be embedded directly in the request. This can\n * be more efficient for large images or when images are already hosted.\n *\n * @see {@link imageInputs} for direct image input support\n */\n imageUrlInputs?: boolean;\n\n /**\n * Whether the model supports PDF document inputs.\n *\n * When `true`, the model can process PDF files as input, allowing it to\n * analyze document content, extract information, or answer questions about\n * PDF documents.\n */\n pdfInputs?: boolean;\n\n /**\n * Whether the model supports audio inputs.\n *\n * When `true`, the model can process audio data as input, enabling\n * capabilities like speech recognition, audio analysis, or multimodal\n * interactions involving sound.\n */\n audioInputs?: boolean;\n\n /**\n * Whether the model supports video inputs.\n *\n * When `true`, the model can process video data as input, enabling\n * capabilities like video analysis, scene understanding, or multimodal\n * interactions involving moving images.\n */\n videoInputs?: boolean;\n\n /**\n * Whether the model supports image content in tool messages.\n *\n * When `true`, tool responses can include images that the model can process\n * and reason about. This enables workflows where tools return visual data\n * that the model needs to interpret.\n */\n imageToolMessage?: boolean;\n\n /**\n * Whether the model supports PDF content in tool messages.\n *\n * When `true`, tool responses can include PDF documents that the model can\n * process and reason about. This enables workflows where tools return\n * document data that the model needs to interpret.\n */\n pdfToolMessage?: boolean;\n\n /**\n * Maximum number of tokens the model can generate in its output.\n *\n * This represents the upper limit on the length of the model's response.\n * The actual output may be shorter depending on the completion criteria\n * (e.g., natural stopping point, stop sequences).\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxOutputTokens: 4096 // Model can generate up to 4k tokens\n * };\n * ```\n */\n maxOutputTokens?: number;\n\n /**\n * Whether the model supports reasoning or chain-of-thought output.\n *\n * When `true`, the model can produce explicit reasoning steps or\n * chain-of-thought explanations as part of its output. This is useful\n * for understanding the model's decision-making process and improving\n * transparency in complex reasoning tasks.\n */\n reasoningOutput?: boolean;\n\n /**\n * Whether the model can generate image outputs.\n *\n * When `true`, the model can produce images as part of its response,\n * enabling capabilities like image generation, editing, or visual\n * content creation.\n */\n imageOutputs?: boolean;\n\n /**\n * Whether the model can generate audio outputs.\n *\n * When `true`, the model can produce audio data as part of its response,\n * enabling capabilities like text-to-speech, audio generation, or\n * sound synthesis.\n */\n audioOutputs?: boolean;\n\n /**\n * Whether the model can generate video outputs.\n *\n * When `true`, the model can produce video data as part of its response,\n * enabling capabilities like video generation, editing, or visual\n * content creation with motion.\n */\n videoOutputs?: boolean;\n\n /**\n * Whether the model supports tool calling (function calling).\n *\n * When `true`, the model can invoke external tools or functions during\n * its reasoning process. The model can decide which tools to call,\n * with what arguments, and can incorporate the tool results into its\n * final response.\n *\n * @see {@link toolChoice} for controlling tool selection behavior\n * @see {@link https://docs.langchain.com/oss/javascript/langchain/models#tool-calling}\n */\n toolCalling?: boolean;\n\n /**\n * Whether the model supports tool choice control.\n *\n * When `true`, the caller can specify how the model should select tools,\n * such as forcing the use of a specific tool, allowing any tool, or\n * preventing tool use entirely. This provides fine-grained control over\n * the model's tool-calling behavior.\n *\n * @see {@link toolCalling} for basic tool calling support\n */\n toolChoice?: boolean;\n\n /**\n * Whether the model supports structured output generation.\n *\n * When `true`, the model can generate responses that conform to a\n * specified schema or structure (e.g., JSON with a particular format).\n * This is useful for ensuring the model's output can be reliably parsed\n * and processed programmatically.\n *\n * @example\n * ```typescript\n * // Model can be instructed to return JSON matching a schema\n * const profile: ModelProfile = {\n * structuredOutput: true\n * };\n * ```\n */\n structuredOutput?: boolean;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"profile.cjs","names":[],"sources":["../../src/language_models/profile.ts"],"sourcesContent":["/**\n * Represents the capabilities and constraints of a language model.\n *\n * This interface defines the various features and limitations that a model may have,\n * including input/output constraints, multimodal support, and advanced capabilities\n * like tool calling and structured output.\n */\nexport interface ModelProfile {\n /**\n * Maximum number of tokens that can be included in the input context window.\n *\n * This represents the total token budget for the model's input, including\n * the prompt, system messages, conversation history, and any other context.\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxInputTokens: 128000 // Model supports up to 128k tokens\n * };\n * ```\n */\n maxInputTokens?: number;\n\n /**\n * Whether the model supports image inputs.\n *\n * When `true`, the model can process images as part of its input, enabling\n * multimodal interactions where visual content can be analyzed alongside text.\n *\n * @see {@link imageUrlInputs} for URL-based image input support\n */\n imageInputs?: boolean;\n\n /**\n * Whether the model supports image URL inputs.\n *\n * When `true`, the model can accept URLs pointing to images rather than\n * requiring the image data to be embedded directly in the request. This can\n * be more efficient for large images or when images are already hosted.\n *\n * @see {@link imageInputs} for direct image input support\n */\n imageUrlInputs?: boolean;\n\n /**\n * Whether the model supports PDF document inputs.\n *\n * When `true`, the model can process PDF files as input, allowing it to\n * analyze document content, extract information, or answer questions about\n * PDF documents.\n */\n pdfInputs?: boolean;\n\n /**\n * Whether the model supports audio inputs.\n *\n * When `true`, the model can process audio data as input, enabling\n * capabilities like speech recognition, audio analysis, or multimodal\n * interactions involving sound.\n */\n audioInputs?: boolean;\n\n /**\n * Whether the model supports video inputs.\n *\n * When `true`, the model can process video data as input, enabling\n * capabilities like video analysis, scene understanding, or multimodal\n * interactions involving moving images.\n */\n videoInputs?: boolean;\n\n /**\n * MIME types the model accepts as generic file inputs.\n *\n * Covers file types beyond those with dedicated flags (e.g. {@link pdfInputs}),\n * such as office documents, source code, or plain text. When undefined, the\n * model's support for generic file inputs is unknown.\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * fileMimeTypes: [\"text/plain\", \"text/csv\", \"application/json\"]\n * };\n * ```\n */\n fileMimeTypes?: readonly string[];\n\n /**\n * Whether the model supports image content in tool messages.\n *\n * When `true`, tool responses can include images that the model can process\n * and reason about. This enables workflows where tools return visual data\n * that the model needs to interpret.\n */\n imageToolMessage?: boolean;\n\n /**\n * Whether the model supports PDF content in tool messages.\n *\n * When `true`, tool responses can include PDF documents that the model can\n * process and reason about. This enables workflows where tools return\n * document data that the model needs to interpret.\n */\n pdfToolMessage?: boolean;\n\n /**\n * Maximum number of tokens the model can generate in its output.\n *\n * This represents the upper limit on the length of the model's response.\n * The actual output may be shorter depending on the completion criteria\n * (e.g., natural stopping point, stop sequences).\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxOutputTokens: 4096 // Model can generate up to 4k tokens\n * };\n * ```\n */\n maxOutputTokens?: number;\n\n /**\n * Whether the model supports reasoning or chain-of-thought output.\n *\n * When `true`, the model can produce explicit reasoning steps or\n * chain-of-thought explanations as part of its output. This is useful\n * for understanding the model's decision-making process and improving\n * transparency in complex reasoning tasks.\n */\n reasoningOutput?: boolean;\n\n /**\n * Whether the model can generate image outputs.\n *\n * When `true`, the model can produce images as part of its response,\n * enabling capabilities like image generation, editing, or visual\n * content creation.\n */\n imageOutputs?: boolean;\n\n /**\n * Whether the model can generate audio outputs.\n *\n * When `true`, the model can produce audio data as part of its response,\n * enabling capabilities like text-to-speech, audio generation, or\n * sound synthesis.\n */\n audioOutputs?: boolean;\n\n /**\n * Whether the model can generate video outputs.\n *\n * When `true`, the model can produce video data as part of its response,\n * enabling capabilities like video generation, editing, or visual\n * content creation with motion.\n */\n videoOutputs?: boolean;\n\n /**\n * Whether the model supports tool calling (function calling).\n *\n * When `true`, the model can invoke external tools or functions during\n * its reasoning process. The model can decide which tools to call,\n * with what arguments, and can incorporate the tool results into its\n * final response.\n *\n * @see {@link toolChoice} for controlling tool selection behavior\n * @see {@link https://docs.langchain.com/oss/javascript/langchain/models#tool-calling}\n */\n toolCalling?: boolean;\n\n /**\n * Whether the model supports tool choice control.\n *\n * When `true`, the caller can specify how the model should select tools,\n * such as forcing the use of a specific tool, allowing any tool, or\n * preventing tool use entirely. This provides fine-grained control over\n * the model's tool-calling behavior.\n *\n * @see {@link toolCalling} for basic tool calling support\n */\n toolChoice?: boolean;\n\n /**\n * Whether the model supports structured output generation.\n *\n * When `true`, the model can generate responses that conform to a\n * specified schema or structure (e.g., JSON with a particular format).\n * This is useful for ensuring the model's output can be reliably parsed\n * and processed programmatically.\n *\n * @example\n * ```typescript\n * // Model can be instructed to return JSON matching a schema\n * const profile: ModelProfile = {\n * structuredOutput: true\n * };\n * ```\n */\n structuredOutput?: boolean;\n}\n"],"mappings":""}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* including input/output constraints, multimodal support, and advanced capabilities
|
|
7
7
|
* like tool calling and structured output.
|
|
8
8
|
*/
|
|
9
|
-
interface ModelProfile {
|
|
9
|
+
export interface ModelProfile {
|
|
10
10
|
/**
|
|
11
11
|
* Maximum number of tokens that can be included in the input context window.
|
|
12
12
|
*
|
|
@@ -64,6 +64,21 @@ interface ModelProfile {
|
|
|
64
64
|
* interactions involving moving images.
|
|
65
65
|
*/
|
|
66
66
|
videoInputs?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* MIME types the model accepts as generic file inputs.
|
|
69
|
+
*
|
|
70
|
+
* Covers file types beyond those with dedicated flags (e.g. {@link pdfInputs}),
|
|
71
|
+
* such as office documents, source code, or plain text. When undefined, the
|
|
72
|
+
* model's support for generic file inputs is unknown.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const profile: ModelProfile = {
|
|
77
|
+
* fileMimeTypes: ["text/plain", "text/csv", "application/json"]
|
|
78
|
+
* };
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
fileMimeTypes?: readonly string[];
|
|
67
82
|
/**
|
|
68
83
|
* Whether the model supports image content in tool messages.
|
|
69
84
|
*
|
|
@@ -170,5 +185,4 @@ interface ModelProfile {
|
|
|
170
185
|
structuredOutput?: boolean;
|
|
171
186
|
}
|
|
172
187
|
//#endregion
|
|
173
|
-
export { ModelProfile };
|
|
174
188
|
//# sourceMappingURL=profile.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.cts","names":[],"sources":["../../src/language_models/profile.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"profile.d.cts","names":[],"sources":["../../src/language_models/profile.ts"],"mappings":";;;;;;;;iBAOiB;;;;;;;;;;;;;;EAcf;;;;;;;;;EAUA;;;;;;;;;;EAWA;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;;;;;;;;EAgBA;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;;;;;;;;EAgBA;;;;;;;;;EAUA;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;;;;;EAaA;;;;;;;;;;;EAYA;;;;;;;;;;;;;;;;;EAkBA"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* including input/output constraints, multimodal support, and advanced capabilities
|
|
7
7
|
* like tool calling and structured output.
|
|
8
8
|
*/
|
|
9
|
-
interface ModelProfile {
|
|
9
|
+
export interface ModelProfile {
|
|
10
10
|
/**
|
|
11
11
|
* Maximum number of tokens that can be included in the input context window.
|
|
12
12
|
*
|
|
@@ -64,6 +64,21 @@ interface ModelProfile {
|
|
|
64
64
|
* interactions involving moving images.
|
|
65
65
|
*/
|
|
66
66
|
videoInputs?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* MIME types the model accepts as generic file inputs.
|
|
69
|
+
*
|
|
70
|
+
* Covers file types beyond those with dedicated flags (e.g. {@link pdfInputs}),
|
|
71
|
+
* such as office documents, source code, or plain text. When undefined, the
|
|
72
|
+
* model's support for generic file inputs is unknown.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const profile: ModelProfile = {
|
|
77
|
+
* fileMimeTypes: ["text/plain", "text/csv", "application/json"]
|
|
78
|
+
* };
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
fileMimeTypes?: readonly string[];
|
|
67
82
|
/**
|
|
68
83
|
* Whether the model supports image content in tool messages.
|
|
69
84
|
*
|
|
@@ -170,5 +185,4 @@ interface ModelProfile {
|
|
|
170
185
|
structuredOutput?: boolean;
|
|
171
186
|
}
|
|
172
187
|
//#endregion
|
|
173
|
-
export { ModelProfile };
|
|
174
188
|
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","names":[],"sources":["../../src/language_models/profile.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"profile.d.ts","names":[],"sources":["../../src/language_models/profile.ts"],"mappings":";;;;;;;;iBAOiB;;;;;;;;;;;;;;EAcf;;;;;;;;;EAUA;;;;;;;;;;EAWA;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;;;;;;;;EAgBA;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;;;;;;;;EAgBA;;;;;;;;;EAUA;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;;;;;EAaA;;;;;;;;;;;EAYA;;;;;;;;;;;;;;;;;EAkBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","names":[],"sources":["../../src/language_models/profile.ts"],"sourcesContent":["/**\n * Represents the capabilities and constraints of a language model.\n *\n * This interface defines the various features and limitations that a model may have,\n * including input/output constraints, multimodal support, and advanced capabilities\n * like tool calling and structured output.\n */\nexport interface ModelProfile {\n /**\n * Maximum number of tokens that can be included in the input context window.\n *\n * This represents the total token budget for the model's input, including\n * the prompt, system messages, conversation history, and any other context.\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxInputTokens: 128000 // Model supports up to 128k tokens\n * };\n * ```\n */\n maxInputTokens?: number;\n\n /**\n * Whether the model supports image inputs.\n *\n * When `true`, the model can process images as part of its input, enabling\n * multimodal interactions where visual content can be analyzed alongside text.\n *\n * @see {@link imageUrlInputs} for URL-based image input support\n */\n imageInputs?: boolean;\n\n /**\n * Whether the model supports image URL inputs.\n *\n * When `true`, the model can accept URLs pointing to images rather than\n * requiring the image data to be embedded directly in the request. This can\n * be more efficient for large images or when images are already hosted.\n *\n * @see {@link imageInputs} for direct image input support\n */\n imageUrlInputs?: boolean;\n\n /**\n * Whether the model supports PDF document inputs.\n *\n * When `true`, the model can process PDF files as input, allowing it to\n * analyze document content, extract information, or answer questions about\n * PDF documents.\n */\n pdfInputs?: boolean;\n\n /**\n * Whether the model supports audio inputs.\n *\n * When `true`, the model can process audio data as input, enabling\n * capabilities like speech recognition, audio analysis, or multimodal\n * interactions involving sound.\n */\n audioInputs?: boolean;\n\n /**\n * Whether the model supports video inputs.\n *\n * When `true`, the model can process video data as input, enabling\n * capabilities like video analysis, scene understanding, or multimodal\n * interactions involving moving images.\n */\n videoInputs?: boolean;\n\n /**\n * Whether the model supports image content in tool messages.\n *\n * When `true`, tool responses can include images that the model can process\n * and reason about. This enables workflows where tools return visual data\n * that the model needs to interpret.\n */\n imageToolMessage?: boolean;\n\n /**\n * Whether the model supports PDF content in tool messages.\n *\n * When `true`, tool responses can include PDF documents that the model can\n * process and reason about. This enables workflows where tools return\n * document data that the model needs to interpret.\n */\n pdfToolMessage?: boolean;\n\n /**\n * Maximum number of tokens the model can generate in its output.\n *\n * This represents the upper limit on the length of the model's response.\n * The actual output may be shorter depending on the completion criteria\n * (e.g., natural stopping point, stop sequences).\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxOutputTokens: 4096 // Model can generate up to 4k tokens\n * };\n * ```\n */\n maxOutputTokens?: number;\n\n /**\n * Whether the model supports reasoning or chain-of-thought output.\n *\n * When `true`, the model can produce explicit reasoning steps or\n * chain-of-thought explanations as part of its output. This is useful\n * for understanding the model's decision-making process and improving\n * transparency in complex reasoning tasks.\n */\n reasoningOutput?: boolean;\n\n /**\n * Whether the model can generate image outputs.\n *\n * When `true`, the model can produce images as part of its response,\n * enabling capabilities like image generation, editing, or visual\n * content creation.\n */\n imageOutputs?: boolean;\n\n /**\n * Whether the model can generate audio outputs.\n *\n * When `true`, the model can produce audio data as part of its response,\n * enabling capabilities like text-to-speech, audio generation, or\n * sound synthesis.\n */\n audioOutputs?: boolean;\n\n /**\n * Whether the model can generate video outputs.\n *\n * When `true`, the model can produce video data as part of its response,\n * enabling capabilities like video generation, editing, or visual\n * content creation with motion.\n */\n videoOutputs?: boolean;\n\n /**\n * Whether the model supports tool calling (function calling).\n *\n * When `true`, the model can invoke external tools or functions during\n * its reasoning process. The model can decide which tools to call,\n * with what arguments, and can incorporate the tool results into its\n * final response.\n *\n * @see {@link toolChoice} for controlling tool selection behavior\n * @see {@link https://docs.langchain.com/oss/javascript/langchain/models#tool-calling}\n */\n toolCalling?: boolean;\n\n /**\n * Whether the model supports tool choice control.\n *\n * When `true`, the caller can specify how the model should select tools,\n * such as forcing the use of a specific tool, allowing any tool, or\n * preventing tool use entirely. This provides fine-grained control over\n * the model's tool-calling behavior.\n *\n * @see {@link toolCalling} for basic tool calling support\n */\n toolChoice?: boolean;\n\n /**\n * Whether the model supports structured output generation.\n *\n * When `true`, the model can generate responses that conform to a\n * specified schema or structure (e.g., JSON with a particular format).\n * This is useful for ensuring the model's output can be reliably parsed\n * and processed programmatically.\n *\n * @example\n * ```typescript\n * // Model can be instructed to return JSON matching a schema\n * const profile: ModelProfile = {\n * structuredOutput: true\n * };\n * ```\n */\n structuredOutput?: boolean;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"profile.js","names":[],"sources":["../../src/language_models/profile.ts"],"sourcesContent":["/**\n * Represents the capabilities and constraints of a language model.\n *\n * This interface defines the various features and limitations that a model may have,\n * including input/output constraints, multimodal support, and advanced capabilities\n * like tool calling and structured output.\n */\nexport interface ModelProfile {\n /**\n * Maximum number of tokens that can be included in the input context window.\n *\n * This represents the total token budget for the model's input, including\n * the prompt, system messages, conversation history, and any other context.\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxInputTokens: 128000 // Model supports up to 128k tokens\n * };\n * ```\n */\n maxInputTokens?: number;\n\n /**\n * Whether the model supports image inputs.\n *\n * When `true`, the model can process images as part of its input, enabling\n * multimodal interactions where visual content can be analyzed alongside text.\n *\n * @see {@link imageUrlInputs} for URL-based image input support\n */\n imageInputs?: boolean;\n\n /**\n * Whether the model supports image URL inputs.\n *\n * When `true`, the model can accept URLs pointing to images rather than\n * requiring the image data to be embedded directly in the request. This can\n * be more efficient for large images or when images are already hosted.\n *\n * @see {@link imageInputs} for direct image input support\n */\n imageUrlInputs?: boolean;\n\n /**\n * Whether the model supports PDF document inputs.\n *\n * When `true`, the model can process PDF files as input, allowing it to\n * analyze document content, extract information, or answer questions about\n * PDF documents.\n */\n pdfInputs?: boolean;\n\n /**\n * Whether the model supports audio inputs.\n *\n * When `true`, the model can process audio data as input, enabling\n * capabilities like speech recognition, audio analysis, or multimodal\n * interactions involving sound.\n */\n audioInputs?: boolean;\n\n /**\n * Whether the model supports video inputs.\n *\n * When `true`, the model can process video data as input, enabling\n * capabilities like video analysis, scene understanding, or multimodal\n * interactions involving moving images.\n */\n videoInputs?: boolean;\n\n /**\n * MIME types the model accepts as generic file inputs.\n *\n * Covers file types beyond those with dedicated flags (e.g. {@link pdfInputs}),\n * such as office documents, source code, or plain text. When undefined, the\n * model's support for generic file inputs is unknown.\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * fileMimeTypes: [\"text/plain\", \"text/csv\", \"application/json\"]\n * };\n * ```\n */\n fileMimeTypes?: readonly string[];\n\n /**\n * Whether the model supports image content in tool messages.\n *\n * When `true`, tool responses can include images that the model can process\n * and reason about. This enables workflows where tools return visual data\n * that the model needs to interpret.\n */\n imageToolMessage?: boolean;\n\n /**\n * Whether the model supports PDF content in tool messages.\n *\n * When `true`, tool responses can include PDF documents that the model can\n * process and reason about. This enables workflows where tools return\n * document data that the model needs to interpret.\n */\n pdfToolMessage?: boolean;\n\n /**\n * Maximum number of tokens the model can generate in its output.\n *\n * This represents the upper limit on the length of the model's response.\n * The actual output may be shorter depending on the completion criteria\n * (e.g., natural stopping point, stop sequences).\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxOutputTokens: 4096 // Model can generate up to 4k tokens\n * };\n * ```\n */\n maxOutputTokens?: number;\n\n /**\n * Whether the model supports reasoning or chain-of-thought output.\n *\n * When `true`, the model can produce explicit reasoning steps or\n * chain-of-thought explanations as part of its output. This is useful\n * for understanding the model's decision-making process and improving\n * transparency in complex reasoning tasks.\n */\n reasoningOutput?: boolean;\n\n /**\n * Whether the model can generate image outputs.\n *\n * When `true`, the model can produce images as part of its response,\n * enabling capabilities like image generation, editing, or visual\n * content creation.\n */\n imageOutputs?: boolean;\n\n /**\n * Whether the model can generate audio outputs.\n *\n * When `true`, the model can produce audio data as part of its response,\n * enabling capabilities like text-to-speech, audio generation, or\n * sound synthesis.\n */\n audioOutputs?: boolean;\n\n /**\n * Whether the model can generate video outputs.\n *\n * When `true`, the model can produce video data as part of its response,\n * enabling capabilities like video generation, editing, or visual\n * content creation with motion.\n */\n videoOutputs?: boolean;\n\n /**\n * Whether the model supports tool calling (function calling).\n *\n * When `true`, the model can invoke external tools or functions during\n * its reasoning process. The model can decide which tools to call,\n * with what arguments, and can incorporate the tool results into its\n * final response.\n *\n * @see {@link toolChoice} for controlling tool selection behavior\n * @see {@link https://docs.langchain.com/oss/javascript/langchain/models#tool-calling}\n */\n toolCalling?: boolean;\n\n /**\n * Whether the model supports tool choice control.\n *\n * When `true`, the caller can specify how the model should select tools,\n * such as forcing the use of a specific tool, allowing any tool, or\n * preventing tool use entirely. This provides fine-grained control over\n * the model's tool-calling behavior.\n *\n * @see {@link toolCalling} for basic tool calling support\n */\n toolChoice?: boolean;\n\n /**\n * Whether the model supports structured output generation.\n *\n * When `true`, the model can generate responses that conform to a\n * specified schema or structure (e.g., JSON with a particular format).\n * This is useful for ensuring the model's output can be reliably parsed\n * and processed programmatically.\n *\n * @example\n * ```typescript\n * // Model can be instructed to return JSON matching a schema\n * const profile: ModelProfile = {\n * structuredOutput: true\n * };\n * ```\n */\n structuredOutput?: boolean;\n}\n"],"mappings":""}
|