@langchain/classic 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/agents/format_scratchpad/log.cjs +1 -0
- package/agents/format_scratchpad/log.d.cts +1 -0
- package/agents/format_scratchpad/log.d.ts +1 -0
- package/agents/format_scratchpad/log.js +1 -0
- package/agents/format_scratchpad/log_to_message.cjs +1 -0
- package/agents/format_scratchpad/log_to_message.d.cts +1 -0
- package/agents/format_scratchpad/log_to_message.d.ts +1 -0
- package/agents/format_scratchpad/log_to_message.js +1 -0
- package/agents/format_scratchpad/openai_functions.cjs +1 -0
- package/agents/format_scratchpad/openai_functions.d.cts +1 -0
- package/agents/format_scratchpad/openai_functions.d.ts +1 -0
- package/agents/format_scratchpad/openai_functions.js +1 -0
- package/agents/format_scratchpad/openai_tools.cjs +1 -0
- package/agents/format_scratchpad/openai_tools.d.cts +1 -0
- package/agents/format_scratchpad/openai_tools.d.ts +1 -0
- package/agents/format_scratchpad/openai_tools.js +1 -0
- package/agents/format_scratchpad/xml.cjs +1 -0
- package/agents/format_scratchpad/xml.d.cts +1 -0
- package/agents/format_scratchpad/xml.d.ts +1 -0
- package/agents/format_scratchpad/xml.js +1 -0
- package/agents/load.cjs +1 -0
- package/agents/load.d.cts +1 -0
- package/agents/load.d.ts +1 -0
- package/agents/load.js +1 -0
- package/agents/openai/output_parser.cjs +1 -0
- package/agents/openai/output_parser.d.cts +1 -0
- package/agents/openai/output_parser.d.ts +1 -0
- package/agents/openai/output_parser.js +1 -0
- package/agents/react/output_parser.cjs +1 -0
- package/agents/react/output_parser.d.cts +1 -0
- package/agents/react/output_parser.d.ts +1 -0
- package/agents/react/output_parser.js +1 -0
- package/agents/toolkits/sql.cjs +1 -0
- package/agents/toolkits/sql.d.cts +1 -0
- package/agents/toolkits/sql.d.ts +1 -0
- package/agents/toolkits/sql.js +1 -0
- package/agents/toolkits.cjs +1 -0
- package/agents/toolkits.d.cts +1 -0
- package/agents/toolkits.d.ts +1 -0
- package/agents/toolkits.js +1 -0
- package/agents/xml/output_parser.cjs +1 -0
- package/agents/xml/output_parser.d.cts +1 -0
- package/agents/xml/output_parser.d.ts +1 -0
- package/agents/xml/output_parser.js +1 -0
- package/agents.cjs +1 -0
- package/agents.d.cts +1 -0
- package/agents.d.ts +1 -0
- package/agents.js +1 -0
- package/cache/file_system.cjs +1 -0
- package/cache/file_system.d.cts +1 -0
- package/cache/file_system.d.ts +1 -0
- package/cache/file_system.js +1 -0
- package/callbacks.cjs +1 -0
- package/callbacks.d.cts +1 -0
- package/callbacks.d.ts +1 -0
- package/callbacks.js +1 -0
- package/chains/combine_documents/reduce.cjs +1 -0
- package/chains/combine_documents/reduce.d.cts +1 -0
- package/chains/combine_documents/reduce.d.ts +1 -0
- package/chains/combine_documents/reduce.js +1 -0
- package/chains/combine_documents.cjs +1 -0
- package/chains/combine_documents.d.cts +1 -0
- package/chains/combine_documents.d.ts +1 -0
- package/chains/combine_documents.js +1 -0
- package/chains/graph_qa/cypher.cjs +1 -0
- package/chains/graph_qa/cypher.d.cts +1 -0
- package/chains/graph_qa/cypher.d.ts +1 -0
- package/chains/graph_qa/cypher.js +1 -0
- package/chains/history_aware_retriever.cjs +1 -0
- package/chains/history_aware_retriever.d.cts +1 -0
- package/chains/history_aware_retriever.d.ts +1 -0
- package/chains/history_aware_retriever.js +1 -0
- package/chains/load.cjs +1 -0
- package/chains/load.d.cts +1 -0
- package/chains/load.d.ts +1 -0
- package/chains/load.js +1 -0
- package/chains/openai_functions.cjs +1 -0
- package/chains/openai_functions.d.cts +1 -0
- package/chains/openai_functions.d.ts +1 -0
- package/chains/openai_functions.js +1 -0
- package/chains/query_constructor/ir.cjs +1 -0
- package/chains/query_constructor/ir.d.cts +1 -0
- package/chains/query_constructor/ir.d.ts +1 -0
- package/chains/query_constructor/ir.js +1 -0
- package/chains/query_constructor.cjs +1 -0
- package/chains/query_constructor.d.cts +1 -0
- package/chains/query_constructor.d.ts +1 -0
- package/chains/query_constructor.js +1 -0
- package/chains/retrieval.cjs +1 -0
- package/chains/retrieval.d.cts +1 -0
- package/chains/retrieval.d.ts +1 -0
- package/chains/retrieval.js +1 -0
- package/chains/sql_db.cjs +1 -0
- package/chains/sql_db.d.cts +1 -0
- package/chains/sql_db.d.ts +1 -0
- package/chains/sql_db.js +1 -0
- package/chains.cjs +1 -0
- package/chains.d.cts +1 -0
- package/chains.d.ts +1 -0
- package/chains.js +1 -0
- package/chat_models/universal.cjs +1 -0
- package/chat_models/universal.d.cts +1 -0
- package/chat_models/universal.d.ts +1 -0
- package/chat_models/universal.js +1 -0
- package/dist/agents/agent.d.cts +0 -6
- package/dist/agents/agent.d.ts +0 -6
- package/dist/agents/chat/outputParser.d.cts +2 -2
- package/dist/agents/chat/outputParser.d.ts +2 -2
- package/dist/agents/executor.d.cts +0 -5
- package/dist/agents/executor.d.ts +0 -5
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/initialize.d.cts +2 -2
- package/dist/agents/mrkl/outputParser.d.ts +1 -1
- package/dist/agents/openai_functions/index.d.ts +1 -0
- package/dist/agents/tool_calling/output_parser.d.ts +1 -0
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts +2 -2
- package/dist/agents/types.d.cts +0 -7
- package/dist/agents/types.d.ts +0 -7
- package/dist/callbacks/handlers/console.d.cts +1 -3
- package/dist/callbacks/handlers/console.d.ts +1 -3
- package/dist/callbacks/handlers/run_collector.d.cts +1 -3
- package/dist/callbacks/handlers/run_collector.d.ts +1 -3
- package/dist/callbacks/handlers/tracer.d.cts +1 -3
- package/dist/callbacks/handlers/tracer.d.ts +1 -3
- package/dist/callbacks/handlers/tracer_langchain.d.cts +1 -3
- package/dist/callbacks/handlers/tracer_langchain.d.ts +1 -3
- package/dist/callbacks/index.d.cts +8 -0
- package/dist/callbacks/index.d.ts +8 -0
- package/dist/callbacks/promises.d.cts +1 -3
- package/dist/callbacks/promises.d.ts +1 -3
- package/dist/chains/question_answering/load.d.ts +2 -2
- package/dist/chains/summarization/load.d.cts +2 -2
- package/dist/chains/summarization/load.d.ts +2 -2
- package/dist/document_transformers/openai_functions.d.ts +1 -1
- package/dist/evaluation/agents/index.d.ts +1 -0
- package/dist/evaluation/base.d.cts +0 -7
- package/dist/evaluation/base.d.ts +1 -7
- package/dist/evaluation/comparison/index.d.ts +1 -0
- package/dist/evaluation/criteria/index.d.ts +1 -0
- package/dist/evaluation/embedding_distance/index.d.ts +1 -0
- package/dist/evaluation/index.d.ts +5 -0
- package/dist/evaluation/loader.d.ts +2 -0
- package/dist/evaluation/qa/index.d.ts +1 -0
- package/dist/experimental/autogpt/prompt.d.ts +2 -2
- package/dist/langchain-core/dist/messages/message.d.cts +1 -1
- package/dist/langchain-core/dist/messages/utils.d.cts +5 -5
- package/dist/langchain-core/dist/tools/types.d.cts +0 -13
- package/dist/libs/langchain-core/dist/language_models/base.d.ts +2 -0
- package/dist/libs/langchain-core/dist/messages/message.d.ts +1 -1
- package/dist/libs/langchain-core/dist/messages/utils.d.ts +5 -5
- package/dist/libs/langchain-core/dist/runnables/config.d.ts +2 -0
- package/dist/libs/langchain-core/dist/tools/types.d.ts +2 -13
- package/dist/libs/langchain-core/dist/tracers/event_stream.d.ts +2 -1
- package/dist/libs/langchain-core/dist/utils/json_schema.d.ts +8 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/Options.d.ts +3 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/Refs.d.ts +3 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/errorMessages.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/index.d.ts +13 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parseDef.d.ts +3 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parseTypes.d.ts +6 -1
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/any.d.ts +1 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/array.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/bigint.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/branded.d.ts +3 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/catch.d.ts +3 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/date.d.ts +3 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/default.d.ts +3 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/effects.d.ts +3 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/intersection.d.ts +1 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/literal.d.ts +1 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/map.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/never.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/null.d.ts +1 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/nullable.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/number.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/object.d.ts +1 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/optional.d.ts +3 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/pipeline.d.ts +4 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/promise.d.ts +3 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/readonly.d.ts +3 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/record.d.ts +1 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/set.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/string.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/tuple.d.ts +1 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/undefined.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/union.d.ts +1 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/unknown.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/selectParser.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/zodToJsonSchema.d.ts +3 -0
- package/dist/load/import_constants.cjs +25 -24
- package/dist/load/import_constants.cjs.map +1 -1
- package/dist/load/import_constants.js +25 -24
- package/dist/load/import_constants.js.map +1 -1
- package/dist/load/import_map.cjs +48 -48
- package/dist/load/import_map.cjs.map +1 -1
- package/dist/load/import_map.js +55 -55
- package/dist/load/import_map.js.map +1 -1
- package/dist/load/serializable.d.cts +1 -3
- package/dist/load/serializable.d.ts +1 -3
- package/dist/retrievers/multi_vector.d.ts +1 -1
- package/dist/retrievers/self_query/index.cjs +1 -1
- package/dist/retrievers/self_query/index.d.ts +1 -1
- package/dist/retrievers/self_query/index.js +1 -1
- package/dist/retrievers/time_weighted.d.ts +1 -1
- package/dist/smith/config.d.ts +1 -0
- package/dist/text_splitter.d.cts +1 -3
- package/dist/text_splitter.d.ts +1 -3
- package/document.cjs +1 -0
- package/document.d.cts +1 -0
- package/document.d.ts +1 -0
- package/document.js +1 -0
- package/document_loaders/base.cjs +1 -0
- package/document_loaders/base.d.cts +1 -0
- package/document_loaders/base.d.ts +1 -0
- package/document_loaders/base.js +1 -0
- package/document_loaders/fs/buffer.cjs +1 -0
- package/document_loaders/fs/buffer.d.cts +1 -0
- package/document_loaders/fs/buffer.d.ts +1 -0
- package/document_loaders/fs/buffer.js +1 -0
- package/document_loaders/fs/directory.cjs +1 -0
- package/document_loaders/fs/directory.d.cts +1 -0
- package/document_loaders/fs/directory.d.ts +1 -0
- package/document_loaders/fs/directory.js +1 -0
- package/document_loaders/fs/json.cjs +1 -0
- package/document_loaders/fs/json.d.cts +1 -0
- package/document_loaders/fs/json.d.ts +1 -0
- package/document_loaders/fs/json.js +1 -0
- package/document_loaders/fs/multi_file.cjs +1 -0
- package/document_loaders/fs/multi_file.d.cts +1 -0
- package/document_loaders/fs/multi_file.d.ts +1 -0
- package/document_loaders/fs/multi_file.js +1 -0
- package/document_loaders/fs/text.cjs +1 -0
- package/document_loaders/fs/text.d.cts +1 -0
- package/document_loaders/fs/text.d.ts +1 -0
- package/document_loaders/fs/text.js +1 -0
- package/document_transformers/openai_functions.cjs +1 -0
- package/document_transformers/openai_functions.d.cts +1 -0
- package/document_transformers/openai_functions.d.ts +1 -0
- package/document_transformers/openai_functions.js +1 -0
- package/embeddings/cache_backed.cjs +1 -0
- package/embeddings/cache_backed.d.cts +1 -0
- package/embeddings/cache_backed.d.ts +1 -0
- package/embeddings/cache_backed.js +1 -0
- package/embeddings/fake.cjs +1 -0
- package/embeddings/fake.d.cts +1 -0
- package/embeddings/fake.d.ts +1 -0
- package/embeddings/fake.js +1 -0
- package/evaluation.cjs +1 -0
- package/evaluation.d.cts +1 -0
- package/evaluation.d.ts +1 -0
- package/evaluation.js +1 -0
- package/experimental/autogpt.cjs +1 -0
- package/experimental/autogpt.d.cts +1 -0
- package/experimental/autogpt.d.ts +1 -0
- package/experimental/autogpt.js +1 -0
- package/experimental/babyagi.cjs +1 -0
- package/experimental/babyagi.d.cts +1 -0
- package/experimental/babyagi.d.ts +1 -0
- package/experimental/babyagi.js +1 -0
- package/experimental/chains/violation_of_expectations.cjs +1 -0
- package/experimental/chains/violation_of_expectations.d.cts +1 -0
- package/experimental/chains/violation_of_expectations.d.ts +1 -0
- package/experimental/chains/violation_of_expectations.js +1 -0
- package/experimental/generative_agents.cjs +1 -0
- package/experimental/generative_agents.d.cts +1 -0
- package/experimental/generative_agents.d.ts +1 -0
- package/experimental/generative_agents.js +1 -0
- package/experimental/masking.cjs +1 -0
- package/experimental/masking.d.cts +1 -0
- package/experimental/masking.d.ts +1 -0
- package/experimental/masking.js +1 -0
- package/experimental/openai_assistant.cjs +1 -0
- package/experimental/openai_assistant.d.cts +1 -0
- package/experimental/openai_assistant.d.ts +1 -0
- package/experimental/openai_assistant.js +1 -0
- package/experimental/openai_files.cjs +1 -0
- package/experimental/openai_files.d.cts +1 -0
- package/experimental/openai_files.d.ts +1 -0
- package/experimental/openai_files.js +1 -0
- package/experimental/plan_and_execute.cjs +1 -0
- package/experimental/plan_and_execute.d.cts +1 -0
- package/experimental/plan_and_execute.d.ts +1 -0
- package/experimental/plan_and_execute.js +1 -0
- package/experimental/prompts/custom_format.cjs +1 -0
- package/experimental/prompts/custom_format.d.cts +1 -0
- package/experimental/prompts/custom_format.d.ts +1 -0
- package/experimental/prompts/custom_format.js +1 -0
- package/experimental/prompts/handlebars.cjs +1 -0
- package/experimental/prompts/handlebars.d.cts +1 -0
- package/experimental/prompts/handlebars.d.ts +1 -0
- package/experimental/prompts/handlebars.js +1 -0
- package/hub/node.cjs +1 -0
- package/hub/node.d.cts +1 -0
- package/hub/node.d.ts +1 -0
- package/hub/node.js +1 -0
- package/hub.cjs +1 -0
- package/hub.d.cts +1 -0
- package/hub.d.ts +1 -0
- package/hub.js +1 -0
- package/indexes.cjs +1 -0
- package/indexes.d.cts +1 -0
- package/indexes.d.ts +1 -0
- package/indexes.js +1 -0
- package/load/serializable.cjs +1 -0
- package/load/serializable.d.cts +1 -0
- package/load/serializable.d.ts +1 -0
- package/load/serializable.js +1 -0
- package/load.cjs +1 -0
- package/load.d.cts +1 -0
- package/load.d.ts +1 -0
- package/load.js +1 -0
- package/memory/chat_memory.cjs +1 -0
- package/memory/chat_memory.d.cts +1 -0
- package/memory/chat_memory.d.ts +1 -0
- package/memory/chat_memory.js +1 -0
- package/memory.cjs +1 -0
- package/memory.d.cts +1 -0
- package/memory.d.ts +1 -0
- package/memory.js +1 -0
- package/output_parsers/expression.cjs +1 -0
- package/output_parsers/expression.d.cts +1 -0
- package/output_parsers/expression.d.ts +1 -0
- package/output_parsers/expression.js +1 -0
- package/output_parsers.cjs +1 -0
- package/output_parsers.d.cts +1 -0
- package/output_parsers.d.ts +1 -0
- package/output_parsers.js +1 -0
- package/package.json +763 -687
- package/retrievers/contextual_compression.cjs +1 -0
- package/retrievers/contextual_compression.d.cts +1 -0
- package/retrievers/contextual_compression.d.ts +1 -0
- package/retrievers/contextual_compression.js +1 -0
- package/retrievers/document_compressors/chain_extract.cjs +1 -0
- package/retrievers/document_compressors/chain_extract.d.cts +1 -0
- package/retrievers/document_compressors/chain_extract.d.ts +1 -0
- package/retrievers/document_compressors/chain_extract.js +1 -0
- package/retrievers/document_compressors/embeddings_filter.cjs +1 -0
- package/retrievers/document_compressors/embeddings_filter.d.cts +1 -0
- package/retrievers/document_compressors/embeddings_filter.d.ts +1 -0
- package/retrievers/document_compressors/embeddings_filter.js +1 -0
- package/retrievers/document_compressors.cjs +1 -0
- package/retrievers/document_compressors.d.cts +1 -0
- package/retrievers/document_compressors.d.ts +1 -0
- package/retrievers/document_compressors.js +1 -0
- package/retrievers/ensemble.cjs +1 -0
- package/retrievers/ensemble.d.cts +1 -0
- package/retrievers/ensemble.d.ts +1 -0
- package/retrievers/ensemble.js +1 -0
- package/retrievers/hyde.cjs +1 -0
- package/retrievers/hyde.d.cts +1 -0
- package/retrievers/hyde.d.ts +1 -0
- package/retrievers/hyde.js +1 -0
- package/retrievers/matryoshka_retriever.cjs +1 -0
- package/retrievers/matryoshka_retriever.d.cts +1 -0
- package/retrievers/matryoshka_retriever.d.ts +1 -0
- package/retrievers/matryoshka_retriever.js +1 -0
- package/retrievers/multi_query.cjs +1 -0
- package/retrievers/multi_query.d.cts +1 -0
- package/retrievers/multi_query.d.ts +1 -0
- package/retrievers/multi_query.js +1 -0
- package/retrievers/multi_vector.cjs +1 -0
- package/retrievers/multi_vector.d.cts +1 -0
- package/retrievers/multi_vector.d.ts +1 -0
- package/retrievers/multi_vector.js +1 -0
- package/retrievers/parent_document.cjs +1 -0
- package/retrievers/parent_document.d.cts +1 -0
- package/retrievers/parent_document.d.ts +1 -0
- package/retrievers/parent_document.js +1 -0
- package/retrievers/score_threshold.cjs +1 -0
- package/retrievers/score_threshold.d.cts +1 -0
- package/retrievers/score_threshold.d.ts +1 -0
- package/retrievers/score_threshold.js +1 -0
- package/retrievers/self_query/functional.cjs +1 -0
- package/retrievers/self_query/functional.d.cts +1 -0
- package/retrievers/self_query/functional.d.ts +1 -0
- package/retrievers/self_query/functional.js +1 -0
- package/retrievers/self_query.cjs +1 -0
- package/retrievers/self_query.d.cts +1 -0
- package/retrievers/self_query.d.ts +1 -0
- package/retrievers/self_query.js +1 -0
- package/retrievers/time_weighted.cjs +1 -0
- package/retrievers/time_weighted.d.cts +1 -0
- package/retrievers/time_weighted.d.ts +1 -0
- package/retrievers/time_weighted.js +1 -0
- package/schema/prompt_template.cjs +1 -0
- package/schema/prompt_template.d.cts +1 -0
- package/schema/prompt_template.d.ts +1 -0
- package/schema/prompt_template.js +1 -0
- package/schema/query_constructor.cjs +1 -0
- package/schema/query_constructor.d.cts +1 -0
- package/schema/query_constructor.d.ts +1 -0
- package/schema/query_constructor.js +1 -0
- package/smith.cjs +1 -0
- package/smith.d.cts +1 -0
- package/smith.d.ts +1 -0
- package/smith.js +1 -0
- package/sql_db.cjs +1 -0
- package/sql_db.d.cts +1 -0
- package/sql_db.d.ts +1 -0
- package/sql_db.js +1 -0
- package/storage/encoder_backed.cjs +1 -0
- package/storage/encoder_backed.d.cts +1 -0
- package/storage/encoder_backed.d.ts +1 -0
- package/storage/encoder_backed.js +1 -0
- package/storage/file_system.cjs +1 -0
- package/storage/file_system.d.cts +1 -0
- package/storage/file_system.d.ts +1 -0
- package/storage/file_system.js +1 -0
- package/storage/in_memory.cjs +1 -0
- package/storage/in_memory.d.cts +1 -0
- package/storage/in_memory.d.ts +1 -0
- package/storage/in_memory.js +1 -0
- package/stores/doc/base.cjs +1 -0
- package/stores/doc/base.d.cts +1 -0
- package/stores/doc/base.d.ts +1 -0
- package/stores/doc/base.js +1 -0
- package/stores/doc/in_memory.cjs +1 -0
- package/stores/doc/in_memory.d.cts +1 -0
- package/stores/doc/in_memory.d.ts +1 -0
- package/stores/doc/in_memory.js +1 -0
- package/stores/file/in_memory.cjs +1 -0
- package/stores/file/in_memory.d.cts +1 -0
- package/stores/file/in_memory.d.ts +1 -0
- package/stores/file/in_memory.js +1 -0
- package/stores/file/node.cjs +1 -0
- package/stores/file/node.d.cts +1 -0
- package/stores/file/node.d.ts +1 -0
- package/stores/file/node.js +1 -0
- package/stores/message/in_memory.cjs +1 -0
- package/stores/message/in_memory.d.cts +1 -0
- package/stores/message/in_memory.d.ts +1 -0
- package/stores/message/in_memory.js +1 -0
- package/text_splitter.cjs +1 -0
- package/text_splitter.d.cts +1 -0
- package/text_splitter.d.ts +1 -0
- package/text_splitter.js +1 -0
- package/tools/chain.cjs +1 -0
- package/tools/chain.d.cts +1 -0
- package/tools/chain.d.ts +1 -0
- package/tools/chain.js +1 -0
- package/tools/render.cjs +1 -0
- package/tools/render.d.cts +1 -0
- package/tools/render.d.ts +1 -0
- package/tools/render.js +1 -0
- package/tools/retriever.cjs +1 -0
- package/tools/retriever.d.cts +1 -0
- package/tools/retriever.d.ts +1 -0
- package/tools/retriever.js +1 -0
- package/tools/sql.cjs +1 -0
- package/tools/sql.d.cts +1 -0
- package/tools/sql.d.ts +1 -0
- package/tools/sql.js +1 -0
- package/tools/webbrowser.cjs +1 -0
- package/tools/webbrowser.d.cts +1 -0
- package/tools/webbrowser.d.ts +1 -0
- package/tools/webbrowser.js +1 -0
- package/tools.cjs +1 -0
- package/tools.d.cts +1 -0
- package/tools.d.ts +1 -0
- package/tools.js +1 -0
- package/util/document.cjs +1 -0
- package/util/document.d.cts +1 -0
- package/util/document.d.ts +1 -0
- package/util/document.js +1 -0
- package/util/math.cjs +1 -0
- package/util/math.d.cts +1 -0
- package/util/math.d.ts +1 -0
- package/util/math.js +1 -0
- package/util/time.cjs +1 -0
- package/util/time.d.cts +1 -0
- package/util/time.d.ts +1 -0
- package/util/time.js +1 -0
- package/vectorstores/memory.cjs +1 -0
- package/vectorstores/memory.d.cts +1 -0
- package/vectorstores/memory.d.ts +1 -0
- package/vectorstores/memory.js +1 -0
- package/dist/agents/agent.d.cts.map +0 -1
- package/dist/agents/agent.d.ts.map +0 -1
- package/dist/agents/chat/index.d.cts.map +0 -1
- package/dist/agents/chat/index.d.ts.map +0 -1
- package/dist/agents/chat/outputParser.d.cts.map +0 -1
- package/dist/agents/chat/outputParser.d.ts.map +0 -1
- package/dist/agents/chat_convo/index.d.cts.map +0 -1
- package/dist/agents/chat_convo/index.d.ts.map +0 -1
- package/dist/agents/chat_convo/outputParser.d.cts.map +0 -1
- package/dist/agents/chat_convo/outputParser.d.ts.map +0 -1
- package/dist/agents/executor.d.cts.map +0 -1
- package/dist/agents/executor.d.ts.map +0 -1
- package/dist/agents/format_scratchpad/log.d.cts.map +0 -1
- package/dist/agents/format_scratchpad/log.d.ts.map +0 -1
- package/dist/agents/format_scratchpad/log_to_message.d.cts.map +0 -1
- package/dist/agents/format_scratchpad/log_to_message.d.ts.map +0 -1
- package/dist/agents/format_scratchpad/openai_functions.d.cts.map +0 -1
- package/dist/agents/format_scratchpad/openai_functions.d.ts.map +0 -1
- package/dist/agents/format_scratchpad/tool_calling.d.cts.map +0 -1
- package/dist/agents/format_scratchpad/tool_calling.d.ts.map +0 -1
- package/dist/agents/format_scratchpad/xml.d.cts.map +0 -1
- package/dist/agents/format_scratchpad/xml.d.ts.map +0 -1
- package/dist/agents/initialize.d.cts.map +0 -1
- package/dist/agents/initialize.d.ts.map +0 -1
- package/dist/agents/load.d.cts.map +0 -1
- package/dist/agents/load.d.ts.map +0 -1
- package/dist/agents/mrkl/index.d.cts.map +0 -1
- package/dist/agents/mrkl/index.d.ts.map +0 -1
- package/dist/agents/mrkl/outputParser.d.cts.map +0 -1
- package/dist/agents/mrkl/outputParser.d.ts.map +0 -1
- package/dist/agents/openai_functions/index.d.cts.map +0 -1
- package/dist/agents/openai_functions/index.d.ts.map +0 -1
- package/dist/agents/openai_functions/output_parser.d.cts.map +0 -1
- package/dist/agents/openai_functions/output_parser.d.ts.map +0 -1
- package/dist/agents/openai_tools/index.d.cts.map +0 -1
- package/dist/agents/openai_tools/index.d.ts.map +0 -1
- package/dist/agents/openai_tools/output_parser.d.cts.map +0 -1
- package/dist/agents/openai_tools/output_parser.d.ts.map +0 -1
- package/dist/agents/react/index.d.cts.map +0 -1
- package/dist/agents/react/index.d.ts.map +0 -1
- package/dist/agents/react/output_parser.d.cts.map +0 -1
- package/dist/agents/react/output_parser.d.ts.map +0 -1
- package/dist/agents/structured_chat/index.d.cts.map +0 -1
- package/dist/agents/structured_chat/index.d.ts.map +0 -1
- package/dist/agents/structured_chat/outputParser.d.cts.map +0 -1
- package/dist/agents/structured_chat/outputParser.d.ts.map +0 -1
- package/dist/agents/tool_calling/index.d.cts.map +0 -1
- package/dist/agents/tool_calling/index.d.ts.map +0 -1
- package/dist/agents/tool_calling/output_parser.d.cts.map +0 -1
- package/dist/agents/tool_calling/output_parser.d.ts.map +0 -1
- package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.cts.map +0 -1
- package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.ts.map +0 -1
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts.map +0 -1
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts.map +0 -1
- package/dist/agents/toolkits/conversational_retrieval/tool.d.cts.map +0 -1
- package/dist/agents/toolkits/conversational_retrieval/tool.d.ts.map +0 -1
- package/dist/agents/toolkits/json/json.d.cts.map +0 -1
- package/dist/agents/toolkits/json/json.d.ts.map +0 -1
- package/dist/agents/toolkits/openapi/openapi.d.cts.map +0 -1
- package/dist/agents/toolkits/openapi/openapi.d.ts.map +0 -1
- package/dist/agents/toolkits/sql/prompt.d.cts.map +0 -1
- package/dist/agents/toolkits/sql/prompt.d.ts.map +0 -1
- package/dist/agents/toolkits/sql/sql.d.cts.map +0 -1
- package/dist/agents/toolkits/sql/sql.d.ts.map +0 -1
- package/dist/agents/toolkits/vectorstore/vectorstore.d.cts.map +0 -1
- package/dist/agents/toolkits/vectorstore/vectorstore.d.ts.map +0 -1
- package/dist/agents/types.d.cts.map +0 -1
- package/dist/agents/types.d.ts.map +0 -1
- package/dist/agents/xml/index.d.cts.map +0 -1
- package/dist/agents/xml/index.d.ts.map +0 -1
- package/dist/agents/xml/output_parser.d.cts.map +0 -1
- package/dist/agents/xml/output_parser.d.ts.map +0 -1
- package/dist/cache/file_system.d.cts.map +0 -1
- package/dist/cache/file_system.d.ts.map +0 -1
- package/dist/callbacks/handlers/console.d.cts.map +0 -1
- package/dist/callbacks/handlers/console.d.ts.map +0 -1
- package/dist/callbacks/handlers/run_collector.d.cts.map +0 -1
- package/dist/callbacks/handlers/run_collector.d.ts.map +0 -1
- package/dist/callbacks/handlers/tracer.d.cts.map +0 -1
- package/dist/callbacks/handlers/tracer.d.ts.map +0 -1
- package/dist/callbacks/handlers/tracer_langchain.d.cts.map +0 -1
- package/dist/callbacks/handlers/tracer_langchain.d.ts.map +0 -1
- package/dist/callbacks/promises.d.cts.map +0 -1
- package/dist/callbacks/promises.d.ts.map +0 -1
- package/dist/chains/analyze_documents_chain.d.cts.map +0 -1
- package/dist/chains/analyze_documents_chain.d.ts.map +0 -1
- package/dist/chains/api/api_chain.d.cts.map +0 -1
- package/dist/chains/api/api_chain.d.ts.map +0 -1
- package/dist/chains/base.d.cts.map +0 -1
- package/dist/chains/base.d.ts.map +0 -1
- package/dist/chains/chat_vector_db_chain.d.cts.map +0 -1
- package/dist/chains/chat_vector_db_chain.d.ts.map +0 -1
- package/dist/chains/combine_docs_chain.d.cts.map +0 -1
- package/dist/chains/combine_docs_chain.d.ts.map +0 -1
- package/dist/chains/combine_documents/reduce.d.cts.map +0 -1
- package/dist/chains/combine_documents/reduce.d.ts.map +0 -1
- package/dist/chains/combine_documents/stuff.d.cts.map +0 -1
- package/dist/chains/combine_documents/stuff.d.ts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.cts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.ts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.cts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.ts.map +0 -1
- package/dist/chains/conversation.d.cts.map +0 -1
- package/dist/chains/conversation.d.ts.map +0 -1
- package/dist/chains/conversational_retrieval_chain.d.cts.map +0 -1
- package/dist/chains/conversational_retrieval_chain.d.ts.map +0 -1
- package/dist/chains/graph_qa/cypher.d.cts.map +0 -1
- package/dist/chains/graph_qa/cypher.d.ts.map +0 -1
- package/dist/chains/history_aware_retriever.d.cts.map +0 -1
- package/dist/chains/history_aware_retriever.d.ts.map +0 -1
- package/dist/chains/llm_chain.d.cts.map +0 -1
- package/dist/chains/llm_chain.d.ts.map +0 -1
- package/dist/chains/load.d.cts.map +0 -1
- package/dist/chains/load.d.ts.map +0 -1
- package/dist/chains/openai_functions/base.d.cts.map +0 -1
- package/dist/chains/openai_functions/base.d.ts.map +0 -1
- package/dist/chains/openai_functions/extraction.d.cts.map +0 -1
- package/dist/chains/openai_functions/extraction.d.ts.map +0 -1
- package/dist/chains/openai_functions/openapi.d.cts.map +0 -1
- package/dist/chains/openai_functions/openapi.d.ts.map +0 -1
- package/dist/chains/openai_functions/tagging.d.cts.map +0 -1
- package/dist/chains/openai_functions/tagging.d.ts.map +0 -1
- package/dist/chains/openai_moderation.d.cts.map +0 -1
- package/dist/chains/openai_moderation.d.ts.map +0 -1
- package/dist/chains/query_constructor/index.d.cts.map +0 -1
- package/dist/chains/query_constructor/index.d.ts.map +0 -1
- package/dist/chains/query_constructor/parser.d.cts.map +0 -1
- package/dist/chains/query_constructor/parser.d.ts.map +0 -1
- package/dist/chains/query_constructor/prompt.d.cts.map +0 -1
- package/dist/chains/query_constructor/prompt.d.ts.map +0 -1
- package/dist/chains/question_answering/load.d.cts.map +0 -1
- package/dist/chains/question_answering/load.d.ts.map +0 -1
- package/dist/chains/retrieval.d.cts.map +0 -1
- package/dist/chains/retrieval.d.ts.map +0 -1
- package/dist/chains/retrieval_qa.d.cts.map +0 -1
- package/dist/chains/retrieval_qa.d.ts.map +0 -1
- package/dist/chains/router/llm_router.d.cts.map +0 -1
- package/dist/chains/router/llm_router.d.ts.map +0 -1
- package/dist/chains/router/multi_prompt.d.cts.map +0 -1
- package/dist/chains/router/multi_prompt.d.ts.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.d.cts.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.d.ts.map +0 -1
- package/dist/chains/router/multi_route.d.cts.map +0 -1
- package/dist/chains/router/multi_route.d.ts.map +0 -1
- package/dist/chains/sequential_chain.d.cts.map +0 -1
- package/dist/chains/sequential_chain.d.ts.map +0 -1
- package/dist/chains/serde.d.cts.map +0 -1
- package/dist/chains/serde.d.ts.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.d.cts.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.d.ts.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.d.cts.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.d.ts.map +0 -1
- package/dist/chains/summarization/load.d.cts.map +0 -1
- package/dist/chains/summarization/load.d.ts.map +0 -1
- package/dist/chains/transform.d.cts.map +0 -1
- package/dist/chains/transform.d.ts.map +0 -1
- package/dist/chains/vector_db_qa.d.cts.map +0 -1
- package/dist/chains/vector_db_qa.d.ts.map +0 -1
- package/dist/chat_models/universal.d.cts.map +0 -1
- package/dist/chat_models/universal.d.ts.map +0 -1
- package/dist/document_loaders/fs/buffer.d.cts.map +0 -1
- package/dist/document_loaders/fs/buffer.d.ts.map +0 -1
- package/dist/document_loaders/fs/directory.d.cts.map +0 -1
- package/dist/document_loaders/fs/directory.d.ts.map +0 -1
- package/dist/document_loaders/fs/json.d.cts.map +0 -1
- package/dist/document_loaders/fs/json.d.ts.map +0 -1
- package/dist/document_loaders/fs/multi_file.d.cts.map +0 -1
- package/dist/document_loaders/fs/multi_file.d.ts.map +0 -1
- package/dist/document_loaders/fs/text.d.cts.map +0 -1
- package/dist/document_loaders/fs/text.d.ts.map +0 -1
- package/dist/document_transformers/openai_functions.d.cts.map +0 -1
- package/dist/document_transformers/openai_functions.d.ts.map +0 -1
- package/dist/embeddings/cache_backed.d.cts.map +0 -1
- package/dist/embeddings/cache_backed.d.ts.map +0 -1
- package/dist/evaluation/agents/trajectory.d.cts.map +0 -1
- package/dist/evaluation/agents/trajectory.d.ts.map +0 -1
- package/dist/evaluation/base.d.cts.map +0 -1
- package/dist/evaluation/base.d.ts.map +0 -1
- package/dist/evaluation/comparison/pairwise.d.cts.map +0 -1
- package/dist/evaluation/comparison/pairwise.d.ts.map +0 -1
- package/dist/evaluation/criteria/criteria.d.cts.map +0 -1
- package/dist/evaluation/criteria/criteria.d.ts.map +0 -1
- package/dist/evaluation/embedding_distance/base.d.cts.map +0 -1
- package/dist/evaluation/embedding_distance/base.d.ts.map +0 -1
- package/dist/evaluation/loader.d.cts.map +0 -1
- package/dist/evaluation/loader.d.ts.map +0 -1
- package/dist/evaluation/qa/eval_chain.d.cts.map +0 -1
- package/dist/evaluation/qa/eval_chain.d.ts.map +0 -1
- package/dist/evaluation/types.d.cts.map +0 -1
- package/dist/evaluation/types.d.ts.map +0 -1
- package/dist/experimental/autogpt/agent.d.cts.map +0 -1
- package/dist/experimental/autogpt/agent.d.ts.map +0 -1
- package/dist/experimental/autogpt/output_parser.d.cts.map +0 -1
- package/dist/experimental/autogpt/output_parser.d.ts.map +0 -1
- package/dist/experimental/autogpt/prompt.d.cts.map +0 -1
- package/dist/experimental/autogpt/prompt.d.ts.map +0 -1
- package/dist/experimental/autogpt/schema.d.cts.map +0 -1
- package/dist/experimental/autogpt/schema.d.ts.map +0 -1
- package/dist/experimental/babyagi/agent.d.cts.map +0 -1
- package/dist/experimental/babyagi/agent.d.ts.map +0 -1
- package/dist/experimental/babyagi/task_creation.d.cts.map +0 -1
- package/dist/experimental/babyagi/task_creation.d.ts.map +0 -1
- package/dist/experimental/babyagi/task_execution.d.cts.map +0 -1
- package/dist/experimental/babyagi/task_execution.d.ts.map +0 -1
- package/dist/experimental/babyagi/task_prioritization.d.cts.map +0 -1
- package/dist/experimental/babyagi/task_prioritization.d.ts.map +0 -1
- package/dist/experimental/chains/violation_of_expectations/types.d.cts.map +0 -1
- package/dist/experimental/chains/violation_of_expectations/types.d.ts.map +0 -1
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.cts.map +0 -1
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts.map +0 -1
- package/dist/experimental/generative_agents/generative_agent.d.cts.map +0 -1
- package/dist/experimental/generative_agents/generative_agent.d.ts.map +0 -1
- package/dist/experimental/generative_agents/generative_agent_memory.d.cts.map +0 -1
- package/dist/experimental/generative_agents/generative_agent_memory.d.ts.map +0 -1
- package/dist/experimental/masking/parser.d.cts.map +0 -1
- package/dist/experimental/masking/parser.d.ts.map +0 -1
- package/dist/experimental/masking/regex_masking_transformer.d.cts.map +0 -1
- package/dist/experimental/masking/regex_masking_transformer.d.ts.map +0 -1
- package/dist/experimental/masking/transformer.d.cts.map +0 -1
- package/dist/experimental/masking/transformer.d.ts.map +0 -1
- package/dist/experimental/masking/types.d.cts.map +0 -1
- package/dist/experimental/masking/types.d.ts.map +0 -1
- package/dist/experimental/openai_assistant/index.d.cts.map +0 -1
- package/dist/experimental/openai_assistant/index.d.ts.map +0 -1
- package/dist/experimental/openai_assistant/schema.d.cts.map +0 -1
- package/dist/experimental/openai_assistant/schema.d.ts.map +0 -1
- package/dist/experimental/openai_files/index.d.cts.map +0 -1
- package/dist/experimental/openai_files/index.d.ts.map +0 -1
- package/dist/experimental/plan_and_execute/agent_executor.d.cts.map +0 -1
- package/dist/experimental/plan_and_execute/agent_executor.d.ts.map +0 -1
- package/dist/experimental/plan_and_execute/base.d.cts.map +0 -1
- package/dist/experimental/plan_and_execute/base.d.ts.map +0 -1
- package/dist/experimental/plan_and_execute/outputParser.d.cts.map +0 -1
- package/dist/experimental/plan_and_execute/outputParser.d.ts.map +0 -1
- package/dist/experimental/prompts/custom_format.d.cts.map +0 -1
- package/dist/experimental/prompts/custom_format.d.ts.map +0 -1
- package/dist/experimental/prompts/handlebars.d.cts.map +0 -1
- package/dist/experimental/prompts/handlebars.d.ts.map +0 -1
- package/dist/hub/base.d.cts.map +0 -1
- package/dist/hub/base.d.ts.map +0 -1
- package/dist/hub/index.d.cts.map +0 -1
- package/dist/hub/index.d.ts.map +0 -1
- package/dist/hub/node.d.cts.map +0 -1
- package/dist/hub/node.d.ts.map +0 -1
- package/dist/langchain-core/dist/load/map_keys.d.cts.map +0 -1
- package/dist/langchain-core/dist/load/serializable.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/base.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/base.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/data.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/index.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/multimodal.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/tools.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/format.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/message.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/metadata.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/utils.d.cts.map +0 -1
- package/dist/langchain-core/dist/prompt_values.d.cts.map +0 -1
- package/dist/langchain-core/dist/tools/types.d.cts.map +0 -1
- package/dist/langchain-core/dist/utils/types/index.d.cts.map +0 -1
- package/dist/libs/langchain-core/dist/load/map_keys.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/load/serializable.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/base.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/base.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/data.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/index.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/multimodal.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/tools.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/format.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/message.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/metadata.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/utils.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/prompt_values.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/tools/types.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/utils/types/index.d.ts.map +0 -1
- package/dist/load/import_type.d.cts.map +0 -1
- package/dist/load/import_type.d.ts.map +0 -1
- package/dist/load/index.d.cts.map +0 -1
- package/dist/load/index.d.ts.map +0 -1
- package/dist/load/map_keys.d.cts.map +0 -1
- package/dist/load/map_keys.d.ts.map +0 -1
- package/dist/load/serializable.d.cts.map +0 -1
- package/dist/load/serializable.d.ts.map +0 -1
- package/dist/memory/buffer_memory.d.cts.map +0 -1
- package/dist/memory/buffer_memory.d.ts.map +0 -1
- package/dist/memory/buffer_token_memory.d.cts.map +0 -1
- package/dist/memory/buffer_token_memory.d.ts.map +0 -1
- package/dist/memory/buffer_window_memory.d.cts.map +0 -1
- package/dist/memory/buffer_window_memory.d.ts.map +0 -1
- package/dist/memory/chat_memory.d.cts.map +0 -1
- package/dist/memory/chat_memory.d.ts.map +0 -1
- package/dist/memory/combined_memory.d.cts.map +0 -1
- package/dist/memory/combined_memory.d.ts.map +0 -1
- package/dist/memory/entity_memory.d.cts.map +0 -1
- package/dist/memory/entity_memory.d.ts.map +0 -1
- package/dist/memory/prompt.d.cts.map +0 -1
- package/dist/memory/prompt.d.ts.map +0 -1
- package/dist/memory/stores/entity/base.d.cts.map +0 -1
- package/dist/memory/stores/entity/base.d.ts.map +0 -1
- package/dist/memory/summary.d.cts.map +0 -1
- package/dist/memory/summary.d.ts.map +0 -1
- package/dist/memory/summary_buffer.d.cts.map +0 -1
- package/dist/memory/summary_buffer.d.ts.map +0 -1
- package/dist/memory/vector_store.d.cts.map +0 -1
- package/dist/memory/vector_store.d.ts.map +0 -1
- package/dist/output_parsers/combining.d.cts.map +0 -1
- package/dist/output_parsers/combining.d.ts.map +0 -1
- package/dist/output_parsers/datetime.d.cts.map +0 -1
- package/dist/output_parsers/datetime.d.ts.map +0 -1
- package/dist/output_parsers/expression.d.cts.map +0 -1
- package/dist/output_parsers/expression.d.ts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.d.ts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.ts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/types.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/types.d.ts.map +0 -1
- package/dist/output_parsers/fix.d.cts.map +0 -1
- package/dist/output_parsers/fix.d.ts.map +0 -1
- package/dist/output_parsers/http_response.d.cts.map +0 -1
- package/dist/output_parsers/http_response.d.ts.map +0 -1
- package/dist/output_parsers/openai_functions.d.cts.map +0 -1
- package/dist/output_parsers/openai_functions.d.ts.map +0 -1
- package/dist/output_parsers/openai_tools.d.cts.map +0 -1
- package/dist/output_parsers/openai_tools.d.ts.map +0 -1
- package/dist/output_parsers/regex.d.cts.map +0 -1
- package/dist/output_parsers/regex.d.ts.map +0 -1
- package/dist/output_parsers/router.d.cts.map +0 -1
- package/dist/output_parsers/router.d.ts.map +0 -1
- package/dist/output_parsers/structured.d.cts.map +0 -1
- package/dist/output_parsers/structured.d.ts.map +0 -1
- package/dist/retrievers/contextual_compression.d.cts.map +0 -1
- package/dist/retrievers/contextual_compression.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/index.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/index.d.ts.map +0 -1
- package/dist/retrievers/ensemble.d.cts.map +0 -1
- package/dist/retrievers/ensemble.d.ts.map +0 -1
- package/dist/retrievers/hyde.d.cts.map +0 -1
- package/dist/retrievers/hyde.d.ts.map +0 -1
- package/dist/retrievers/matryoshka_retriever.d.cts.map +0 -1
- package/dist/retrievers/matryoshka_retriever.d.ts.map +0 -1
- package/dist/retrievers/multi_query.d.cts.map +0 -1
- package/dist/retrievers/multi_query.d.ts.map +0 -1
- package/dist/retrievers/multi_vector.d.cts.map +0 -1
- package/dist/retrievers/multi_vector.d.ts.map +0 -1
- package/dist/retrievers/parent_document.d.cts.map +0 -1
- package/dist/retrievers/parent_document.d.ts.map +0 -1
- package/dist/retrievers/score_threshold.d.cts.map +0 -1
- package/dist/retrievers/score_threshold.d.ts.map +0 -1
- package/dist/retrievers/self_query/index.d.cts.map +0 -1
- package/dist/retrievers/self_query/index.d.ts.map +0 -1
- package/dist/retrievers/time_weighted.d.cts.map +0 -1
- package/dist/retrievers/time_weighted.d.ts.map +0 -1
- package/dist/schema/prompt_template.d.cts.map +0 -1
- package/dist/schema/prompt_template.d.ts.map +0 -1
- package/dist/schema/query_constructor.d.cts.map +0 -1
- package/dist/schema/query_constructor.d.ts.map +0 -1
- package/dist/smith/config.d.cts.map +0 -1
- package/dist/smith/config.d.ts.map +0 -1
- package/dist/smith/runner_utils.d.cts.map +0 -1
- package/dist/smith/runner_utils.d.ts.map +0 -1
- package/dist/sql_db.d.cts.map +0 -1
- package/dist/sql_db.d.ts.map +0 -1
- package/dist/storage/encoder_backed.d.cts.map +0 -1
- package/dist/storage/encoder_backed.d.ts.map +0 -1
- package/dist/storage/file_system.d.cts.map +0 -1
- package/dist/storage/file_system.d.ts.map +0 -1
- package/dist/stores/doc/base.d.cts.map +0 -1
- package/dist/stores/doc/base.d.ts.map +0 -1
- package/dist/stores/doc/in_memory.d.cts.map +0 -1
- package/dist/stores/doc/in_memory.d.ts.map +0 -1
- package/dist/stores/file/base.d.cts.map +0 -1
- package/dist/stores/file/base.d.ts.map +0 -1
- package/dist/stores/file/in_memory.d.cts.map +0 -1
- package/dist/stores/file/in_memory.d.ts.map +0 -1
- package/dist/stores/file/node.d.cts.map +0 -1
- package/dist/stores/file/node.d.ts.map +0 -1
- package/dist/text_splitter.d.cts.map +0 -1
- package/dist/text_splitter.d.ts.map +0 -1
- package/dist/tools/chain.d.cts.map +0 -1
- package/dist/tools/chain.d.ts.map +0 -1
- package/dist/tools/fs.d.cts.map +0 -1
- package/dist/tools/fs.d.ts.map +0 -1
- package/dist/tools/json.d.cts.map +0 -1
- package/dist/tools/json.d.ts.map +0 -1
- package/dist/tools/render.d.cts.map +0 -1
- package/dist/tools/render.d.ts.map +0 -1
- package/dist/tools/requests.d.cts.map +0 -1
- package/dist/tools/requests.d.ts.map +0 -1
- package/dist/tools/retriever.d.cts.map +0 -1
- package/dist/tools/retriever.d.ts.map +0 -1
- package/dist/tools/sql.d.cts.map +0 -1
- package/dist/tools/sql.d.ts.map +0 -1
- package/dist/tools/vectorstore.d.cts.map +0 -1
- package/dist/tools/vectorstore.d.ts.map +0 -1
- package/dist/tools/webbrowser.d.cts.map +0 -1
- package/dist/tools/webbrowser.d.ts.map +0 -1
- package/dist/types/expression-parser.d.cts.map +0 -1
- package/dist/types/expression-parser.d.ts.map +0 -1
- package/dist/types/type-utils.d.cts.map +0 -1
- package/dist/types/type-utils.d.ts.map +0 -1
- package/dist/util/document.d.cts.map +0 -1
- package/dist/util/document.d.ts.map +0 -1
- package/dist/util/load.d.cts.map +0 -1
- package/dist/util/load.d.ts.map +0 -1
- package/dist/util/ml-distance/similarities.d.cts.map +0 -1
- package/dist/util/ml-distance/similarities.d.ts.map +0 -1
- package/dist/util/openapi.d.cts.map +0 -1
- package/dist/util/openapi.d.ts.map +0 -1
- package/dist/util/sql_utils.d.cts.map +0 -1
- package/dist/util/sql_utils.d.ts.map +0 -1
- package/dist/util/time.d.cts.map +0 -1
- package/dist/util/time.d.ts.map +0 -1
- package/dist/vectorstores/memory.d.cts.map +0 -1
- package/dist/vectorstores/memory.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["ClientOptions","OpenAIChatModelId","OpenAIClient","StructuredTool","StructuredToolInterface","Runnable","RunnableConfig","ToolDefinition","OpenAIAssistantFinish","OpenAIAssistantAction","OpenAIToolType","ThreadMessage","RequiredActionFunctionToolCall","ExtractRunOutput","AsAgent","OpenAIAssistantRunnableInput","OpenAIAssistantRunnable","Record","RunInput","model","name","instructions","tools","client","clientOptions","asAgent","pollIntervalMs","fileIds","Omit","Array","Promise","Beta","AssistantDeleted","Assistant","formatToOpenAIAssistantTool"],"sources":["../../../src/experimental/openai_assistant/index.d.ts"],"sourcesContent":["import { type ClientOptions, type OpenAIChatModelId, OpenAIClient } from \"@langchain/openai\";\nimport { StructuredTool, StructuredToolInterface } from \"@langchain/core/tools\";\nimport { Runnable, RunnableConfig } from \"@langchain/core/runnables\";\nimport { ToolDefinition } from \"@langchain/core/language_models/base\";\nimport type { OpenAIAssistantFinish, OpenAIAssistantAction, OpenAIToolType } from \"./schema.js\";\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ThreadMessage = any;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype RequiredActionFunctionToolCall = any;\ntype ExtractRunOutput<AsAgent extends boolean | undefined> = AsAgent extends true ? OpenAIAssistantFinish | OpenAIAssistantAction[] : ThreadMessage[] | RequiredActionFunctionToolCall[];\nexport type OpenAIAssistantRunnableInput<AsAgent extends boolean | undefined = undefined> = {\n client?: OpenAIClient;\n clientOptions?: ClientOptions;\n assistantId: string;\n pollIntervalMs?: number;\n asAgent?: AsAgent;\n};\nexport declare class OpenAIAssistantRunnable<AsAgent extends boolean | undefined, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nRunInput extends Record<string, any> = Record<string, any>> extends Runnable<RunInput, ExtractRunOutput<AsAgent>> {\n lc_namespace: string[];\n private client;\n assistantId: string;\n pollIntervalMs: number;\n asAgent?: AsAgent;\n constructor(fields: OpenAIAssistantRunnableInput<AsAgent>);\n static createAssistant<AsAgent extends boolean>({ model, name, instructions, tools, client, clientOptions, asAgent, pollIntervalMs, fileIds }: Omit<OpenAIAssistantRunnableInput<AsAgent>, \"assistantId\"> & {\n model: OpenAIChatModelId;\n name?: string;\n instructions?: string;\n tools?: OpenAIToolType | Array<StructuredTool>;\n fileIds?: string[];\n }): Promise<OpenAIAssistantRunnable<AsAgent, Record<string, any>>>;\n invoke(input: RunInput, _options?: RunnableConfig): Promise<ExtractRunOutput<AsAgent>>;\n /**\n * Delete an assistant.\n *\n * @link {https://platform.openai.com/docs/api-reference/assistants/deleteAssistant}\n * @returns {Promise<AssistantDeleted>}\n */\n deleteAssistant(): Promise<OpenAIClient.Beta.AssistantDeleted & {\n _request_id?: string | null | undefined;\n }>;\n /**\n * Retrieves an assistant.\n *\n * @link {https://platform.openai.com/docs/api-reference/assistants/getAssistant}\n * @returns {Promise<OpenAIClient.Beta.Assistants.Assistant>}\n */\n getAssistant(): Promise<OpenAIClient.Beta.Assistant & {\n _request_id?: string | null | undefined;\n }>;\n /**\n * Modifies an assistant.\n *\n * @link {https://platform.openai.com/docs/api-reference/assistants/modifyAssistant}\n * @returns {Promise<OpenAIClient.Beta.Assistants.Assistant>}\n */\n modifyAssistant<AsAgent extends boolean>({ model, name, instructions, fileIds }: Omit<OpenAIAssistantRunnableInput<AsAgent>, \"assistantId\" | \"tools\"> & {\n model?: OpenAIChatModelId;\n name?: string;\n instructions?: string;\n fileIds?: string[];\n }): Promise<OpenAIClient.Beta.Assistant & {\n _request_id?: string | null | undefined;\n }>;\n private _parseStepsInput;\n private _createRun;\n private _createThreadAndRun;\n private _waitForRun;\n private _getResponse;\n}\nexport declare function formatToOpenAIAssistantTool(tool: StructuredToolInterface): ToolDefinition;\nexport {};\n"],"mappings":";;;;;;;;KAMKW,aAAAA;AAF2F;AAE9E,KAEbC,8BAAAA,GAA8B,GAAA;AAAA,KAC9BC,gBAAAA,CAAAA,gBAAgB,OAAA,GAAA,SAAA,CAAA,GAAwCC,OAAxC,SAAA,IAAA,GAA+DN,qBAA/D,GAAuFC,qBAAvF,EAAA,GAAiHE,aAAjH,EAAA,GAAmIC,8BAAnI,EAAA;AAAA,KACTG,4BADS,CAAA,gBAAA,OAAA,GAAA,SAAA,GAAA,SAAA,CAAA,GAAA;EAAA,MAAwCD,CAAAA,EAEhDZ,YAFgDY;EAAO,aAAgBN,CAAAA,EAGhER,aAHgEQ;EAAqB,WAAGC,EAAAA,MAAAA;EAAqB,cAAKE,CAAAA,EAAAA,MAAAA;EAAa,OAAKC,CAAAA,EAM1IE,OAN0IF;AAA8B,CAAA;AAC1KG,cAOSC,uBAPmB,CAAA,gBAAA,OAAA,GAAA,SAAA;;iBASvBC,MARJf,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GAQ0Be,MAR1Bf,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,CAAAA,SAQuDG,QARvDH,CAQgEgB,QARhEhB,EAQ0EW,gBAR1EX,CAQ2FY,OAR3FZ,CAAAA,CAAAA,CAAAA;EAAY,YACLF,EAAAA,MAAAA,EAAAA;EAAa,QAGnBc,MAAAA;EAAO,WAAA,EAAA,MAAA;EAEAE,cAAAA,EAAAA,MAAAA;EAAuB,OAAA,CAAA,EAO9BF,OAP8B;EAAA,WAE3BG,CAAAA,MAAAA,EAMOF,4BANPE,CAMoCH,OANpCG,CAAAA;EAAM,OAAgBA,eAAAA,CAAAA,gBAAAA,OAAAA,CAAAA,CAAAA;IAAAA,KAAAA;IAAAA,IAAAA;IAAAA,YAAAA;IAAAA,KAAAA;IAAAA,MAAAA;IAAAA,aAAAA;IAAAA,OAAAA;IAAAA,cAAAA;IAAAA;EAMqB,CANrBA,EAO4GW,IAP5GX,CAOiHF,4BAPjHE,CAO8IH,OAP9IG,CAAAA,EAAAA,aAAAA,CAAAA,GAAAA;IAAsCC,KAAAA,EAQ9DjB,iBAR8DiB;IAA2BJ,IAAAA,CAAAA,EAAAA,MAAAA;IAAjBD,YAAAA,CAAAA,EAAAA,MAAAA;IAKzEC,KAAAA,CAAAA,EAMEJ,cANFI,GAMmBe,KANnBf,CAMyBX,cANzBW,CAAAA;IACuCA,OAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAAO,CAAA,CAAA,EAOpDgB,OAPgBf,CAORC,uBAPQD,CAOgBD,OAPhBC,EAOyBE,MAPzBF,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,CAAAA,CAAAA;EAA4B,MACEI,CAAAA,KAAAA,EAOpCD,QAPoCC,EAAAA,QAAAA,CAAAA,EAOfb,cAPea,CAAAA,EAOEW,OAPFX,CAOUN,gBAPVM,CAO2BL,OAP3BK,CAAAA,CAAAA;EAAK;;;;;;EAA2D,eAAEO,CAAAA,CAAAA,EAcjGI,OAdiGJ,CAczFxB,YAAAA,CAAa6B,IAAAA,CAAKC,gBAduEN,GAAAA;IAAgBC,WAAAA,CAAAA,EAAAA,MAAAA,GAAAA,IAAAA,GAAAA,SAAAA;EAAO,CAAA,CAAA;EAA6C;;;;;;EAItJ,YAEEb,CAAAA,CAAAA,EAiBpBgB,OAjBoBhB,CAiBZZ,YAAAA,CAAa6B,IAAAA,CAAKE,SAjBNnB,GAAAA;IAASG,WAAAA,CAAAA,EAAAA,MAAAA,GAAAA,IAAAA,GAAAA,SAAAA;EAAM,CAAA,CAAA;EAAhB;;;;;;EACwB,eAOhCf,CAAa6B,gBAAKC,OAAAA,CAAAA,CAAAA;IAAAA,KAAAA;IAAAA,IAAAA;IAAAA,YAAAA;IAAAA;EAkBG,CAlBHA,EAkBoCJ,IAlBpCI,CAkByCjB,4BAlBzCiB,CAkBsElB,OAlBtEkB,CAAAA,EAAAA,aAAAA,GAAAA,OAAAA,CAAAA,GAAAA;IAA1BF,KAAAA,CAAAA,EAmBP7B,iBAnBO6B;IASK5B,IAAAA,CAAAA,EAAAA,MAAa6B;IAArBD,YAAAA,CAAAA,EAAAA,MAAAA;IAS2BX,OAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAAK,CAAA,CAAA,EAK5CW,OAL8CV,CAKtClB,YAAAA,CAAa6B,IAAAA,CAAKE,SALoBb,GAAAA;IAAMC,WAAAA,CAAAA,EAAAA,MAAAA,GAAAA,IAAAA,GAAAA,SAAAA;EAAY,CAAA,CAAA;EAAS,QAAsCP,gBAAAA;EAAO,QAApCC,UAAAA;EAA4B,QAAjCa,mBAAAA;EAAI,QACzE3B,WAAAA;EAAiB,QAIjBC,YAAa6B;;AA5CuC1B,iBAqD5C6B,2BAAAA,CArD4C7B,IAAAA,EAqDVD,uBArDUC,CAAAA,EAqDgBE,cArDhBF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.cts","names":["AgentFinish","AgentAction","OpenAIAssistantFinish","OpenAIAssistantAction","OpenAIToolType","Array"],"sources":["../../../src/experimental/openai_assistant/schema.d.ts"],"sourcesContent":["import type { AgentFinish, AgentAction } from \"@langchain/core/agents\";\nexport type OpenAIAssistantFinish = AgentFinish & {\n runId: string;\n threadId: string;\n};\nexport type OpenAIAssistantAction = AgentAction & {\n toolCallId: string;\n runId: string;\n threadId: string;\n};\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type OpenAIToolType = Array<any>;\n"],"mappings":";;;KACYE,qBAAAA,GAAwBF;;EAAxBE,QAAAA,EAAAA,MAAAA;AAIZ,CAAA;AAMYE,KANAD,qBAAAA,GAAwBF,WAMF,GAAA;;;;;;KAAtBG,cAAAA,GAAiBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","names":["AgentFinish","AgentAction","OpenAIAssistantFinish","OpenAIAssistantAction","OpenAIToolType","Array"],"sources":["../../../src/experimental/openai_assistant/schema.d.ts"],"sourcesContent":["import type { AgentFinish, AgentAction } from \"@langchain/core/agents\";\nexport type OpenAIAssistantFinish = AgentFinish & {\n runId: string;\n threadId: string;\n};\nexport type OpenAIAssistantAction = AgentAction & {\n toolCallId: string;\n runId: string;\n threadId: string;\n};\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type OpenAIToolType = Array<any>;\n"],"mappings":";;;KACYE,qBAAAA,GAAwBF;;EAAxBE,QAAAA,EAAAA,MAAAA;AAIZ,CAAA;AAMYE,KANAD,qBAAAA,GAAwBF,WAMF,GAAA;;;;;;KAAtBG,cAAAA,GAAiBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":["OpenAIClient","ClientOptions","Serializable","OpenAIFilesInput","OpenAIFiles","file","purpose","options","FileCreateParams","RequestOptions","FileObject","Promise","fileId","FileDeleted","Files","FileListParams","FileObjectsPage"],"sources":["../../../src/experimental/openai_files/index.d.ts"],"sourcesContent":["import { OpenAIClient, type ClientOptions } from \"@langchain/openai\";\nimport { Serializable } from \"@langchain/core/load/serializable\";\nexport type OpenAIFilesInput = {\n client?: OpenAIClient;\n clientOptions?: ClientOptions;\n};\nexport declare class OpenAIFiles extends Serializable {\n lc_namespace: string[];\n private oaiClient;\n constructor(fields?: OpenAIFilesInput);\n /**\n * Upload file\n * Upload a file that can be used across various endpoints. The size of all the files uploaded by one organization can be up to 100 GB.\n *\n * @note The size of individual files can be a maximum of 512 MB. See the Assistants Tools guide to learn more about the types of files supported. The Fine-tuning API only supports .jsonl files.\n *\n * @link {https://platform.openai.com/docs/api-reference/files/create}\n * @param {OpenAIClient.FileCreateParams['file']} file\n * @param {OpenAIClient.FileCreateParams['purpose']} purpose\n * @param {OpenAIClient.RequestOptions | undefined} options\n * @returns {Promise<OpenAIClient.Files.FileObject>}\n */\n createFile({ file, purpose, options }: OpenAIClient.FileCreateParams & {\n options?: OpenAIClient.RequestOptions;\n }): Promise<OpenAIClient.FileObject & {\n _request_id?: string | null | undefined;\n }>;\n /**\n * Delete a file.\n *\n * @link {https://platform.openai.com/docs/api-reference/files/delete}\n * @param {string} fileId\n * @param {OpenAIClient.RequestOptions | undefined} options\n * @returns {Promise<OpenAIClient.Files.FileDeleted>}\n */\n deleteFile({ fileId, options }: {\n fileId: string;\n options?: OpenAIClient.RequestOptions;\n }): Promise<OpenAIClient.FileDeleted & {\n _request_id?: string | null | undefined;\n }>;\n /**\n * List files\n * Returns a list of files that belong to the user's organization.\n *\n * @link {https://platform.openai.com/docs/api-reference/files/list}\n * @param {OpenAIClient.Files.FileListParams | undefined} query\n * @param {OpenAIClient.RequestOptions | undefined} options\n * @returns {Promise<OpenAIClient.Files.FileObjectsPage>}\n */\n listFiles(props?: {\n query?: OpenAIClient.Files.FileListParams;\n options?: OpenAIClient.RequestOptions;\n }): Promise<OpenAIClient.FileObjectsPage>;\n /**\n * Retrieve file\n * Returns information about a specific file.\n *\n * @link {https://platform.openai.com/docs/api-reference/files/retrieve}\n * @param {string} fileId\n * @param {OpenAIClient.RequestOptions | undefined} options\n * @returns {Promise<OpenAIClient.Files.FileObject>}\n */\n retrieveFile({ fileId, options }: {\n fileId: string;\n options?: OpenAIClient.RequestOptions;\n }): Promise<OpenAIClient.FileObject & {\n _request_id?: string | null | undefined;\n }>;\n /**\n * Retrieve file content\n * Returns the contents of the specified file.\n *\n * @note You can't retrieve the contents of a file that was uploaded with the \"purpose\": \"assistants\" API.\n *\n * @link {https://platform.openai.com/docs/api-reference/files/retrieve-contents}\n * @param {string} fileId\n * @param {OpenAIClient.RequestOptions | undefined} options\n * @returns {Promise<string>}\n */\n retrieveFileContent({ fileId, options }: {\n fileId: string;\n options?: OpenAIClient.RequestOptions;\n }): Promise<OpenAIClient.FileObject & {\n _request_id?: string | null | undefined;\n }>;\n}\n"],"mappings":";;;;KAEYG,gBAAAA;WACCH;EADDG,aAAAA,CAAAA,EAEQF,aAFQ;CAAA;AACfD,cAGQI,WAAAA,SAAoBF,YAAAA,CAH5BF;EAAY,YACLC,EAAAA,MAAAA,EAAAA;EAAa,QAAA,SAAA;EAEZG,WAAAA,CAAAA,MAAW,CAAA,EAGPD,gBAHO;EAAA;;;;;;;;;;;;EA+Ba,UAC7BH,CAAAA;IAAAA,IAAaa;IAAAA,OAAAA;IAAAA;EAAd,CAAcA,EAhBcb,YAAAA,CAAaQ,gBAgB3BK,GAAAA;IAArBF,OAAAA,CAAAA,EAfUX,YAAAA,CAAaS,cAevBE;EAAO,CAAA,CAAA,EAdPA,OA2BQX,CA3BAA,YAAAA,CAAaU,UA2BMK,GAAAA;IACjBf,WAAAA,CAAaS,EAAAA,MAAAA,GAAAA,IAAAA,GAAAA,SAAAA;EAAc,CAAA,CAAA;EACD;;;;;;;;EA2BH,UAEvBT,CAAAA;IAAAA,MAAaS;IAAAA;EAChB,CADgBA,EAAAA;IACfT,MAAAA,EAAAA,MAAaU;IAArBC,OAAAA,CAAAA,EA9CUX,YAAAA,CAAaS,cA8CvBE;EAAO,CAAA,CAAA,EA7CPA,OAhCiCT,CAgCzBF,YAAAA,CAAaa,WAhCYX,GAAAA;IAAY,WAAA,CAAA,EAAA,MAAA,GAAA,IAAA,GAAA,SAAA;;;;;;;;;;;;YA6CrCF,YAAAA,CAAac,KAAAA,CAAMC;cACjBf,YAAAA,CAAaS;MACvBE,QAAQX,YAAAA,CAAagB;;;;;;;;;;;;;;;cAYXhB,YAAAA,CAAaS;MACvBE,QAAQX,YAAAA,CAAaU;;;;;;;;;;;;;;;;;;;cAgBXV,YAAAA,CAAaS;MACvBE,QAAQX,YAAAA,CAAaU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["OpenAIClient","ClientOptions","Serializable","OpenAIFilesInput","OpenAIFiles","file","purpose","options","FileCreateParams","RequestOptions","FileObject","Promise","fileId","FileDeleted","Files","FileListParams","FileObjectsPage"],"sources":["../../../src/experimental/openai_files/index.d.ts"],"sourcesContent":["import { OpenAIClient, type ClientOptions } from \"@langchain/openai\";\nimport { Serializable } from \"@langchain/core/load/serializable\";\nexport type OpenAIFilesInput = {\n client?: OpenAIClient;\n clientOptions?: ClientOptions;\n};\nexport declare class OpenAIFiles extends Serializable {\n lc_namespace: string[];\n private oaiClient;\n constructor(fields?: OpenAIFilesInput);\n /**\n * Upload file\n * Upload a file that can be used across various endpoints. The size of all the files uploaded by one organization can be up to 100 GB.\n *\n * @note The size of individual files can be a maximum of 512 MB. See the Assistants Tools guide to learn more about the types of files supported. The Fine-tuning API only supports .jsonl files.\n *\n * @link {https://platform.openai.com/docs/api-reference/files/create}\n * @param {OpenAIClient.FileCreateParams['file']} file\n * @param {OpenAIClient.FileCreateParams['purpose']} purpose\n * @param {OpenAIClient.RequestOptions | undefined} options\n * @returns {Promise<OpenAIClient.Files.FileObject>}\n */\n createFile({ file, purpose, options }: OpenAIClient.FileCreateParams & {\n options?: OpenAIClient.RequestOptions;\n }): Promise<OpenAIClient.FileObject & {\n _request_id?: string | null | undefined;\n }>;\n /**\n * Delete a file.\n *\n * @link {https://platform.openai.com/docs/api-reference/files/delete}\n * @param {string} fileId\n * @param {OpenAIClient.RequestOptions | undefined} options\n * @returns {Promise<OpenAIClient.Files.FileDeleted>}\n */\n deleteFile({ fileId, options }: {\n fileId: string;\n options?: OpenAIClient.RequestOptions;\n }): Promise<OpenAIClient.FileDeleted & {\n _request_id?: string | null | undefined;\n }>;\n /**\n * List files\n * Returns a list of files that belong to the user's organization.\n *\n * @link {https://platform.openai.com/docs/api-reference/files/list}\n * @param {OpenAIClient.Files.FileListParams | undefined} query\n * @param {OpenAIClient.RequestOptions | undefined} options\n * @returns {Promise<OpenAIClient.Files.FileObjectsPage>}\n */\n listFiles(props?: {\n query?: OpenAIClient.Files.FileListParams;\n options?: OpenAIClient.RequestOptions;\n }): Promise<OpenAIClient.FileObjectsPage>;\n /**\n * Retrieve file\n * Returns information about a specific file.\n *\n * @link {https://platform.openai.com/docs/api-reference/files/retrieve}\n * @param {string} fileId\n * @param {OpenAIClient.RequestOptions | undefined} options\n * @returns {Promise<OpenAIClient.Files.FileObject>}\n */\n retrieveFile({ fileId, options }: {\n fileId: string;\n options?: OpenAIClient.RequestOptions;\n }): Promise<OpenAIClient.FileObject & {\n _request_id?: string | null | undefined;\n }>;\n /**\n * Retrieve file content\n * Returns the contents of the specified file.\n *\n * @note You can't retrieve the contents of a file that was uploaded with the \"purpose\": \"assistants\" API.\n *\n * @link {https://platform.openai.com/docs/api-reference/files/retrieve-contents}\n * @param {string} fileId\n * @param {OpenAIClient.RequestOptions | undefined} options\n * @returns {Promise<string>}\n */\n retrieveFileContent({ fileId, options }: {\n fileId: string;\n options?: OpenAIClient.RequestOptions;\n }): Promise<OpenAIClient.FileObject & {\n _request_id?: string | null | undefined;\n }>;\n}\n"],"mappings":";;;;KAEYG,gBAAAA;WACCH;EADDG,aAAAA,CAAAA,EAEQF,aAFQ;CAAA;AACfD,cAGQI,WAAAA,SAAoBF,YAAAA,CAH5BF;EAAY,YACLC,EAAAA,MAAAA,EAAAA;EAAa,QAAA,SAAA;EAEZG,WAAAA,CAAAA,MAAW,CAAA,EAGPD,gBAHO;EAAA;;;;;;;;;;;;EA+Ba,UAC7BH,CAAAA;IAAAA,IAAaa;IAAAA,OAAAA;IAAAA;EAAd,CAAcA,EAhBcb,YAAAA,CAAaQ,gBAgB3BK,GAAAA;IAArBF,OAAAA,CAAAA,EAfUX,YAAAA,CAAaS,cAevBE;EAAO,CAAA,CAAA,EAdPA,OA2BQX,CA3BAA,YAAAA,CAAaU,UA2BMK,GAAAA;IACjBf,WAAAA,CAAaS,EAAAA,MAAAA,GAAAA,IAAAA,GAAAA,SAAAA;EAAc,CAAA,CAAA;EACD;;;;;;;;EA2BH,UAEvBT,CAAAA;IAAAA,MAAaS;IAAAA;EAChB,CADgBA,EAAAA;IACfT,MAAAA,EAAAA,MAAaU;IAArBC,OAAAA,CAAAA,EA9CUX,YAAAA,CAAaS,cA8CvBE;EAAO,CAAA,CAAA,EA7CPA,OAhCiCT,CAgCzBF,YAAAA,CAAaa,WAhCYX,GAAAA;IAAY,WAAA,CAAA,EAAA,MAAA,GAAA,IAAA,GAAA,SAAA;;;;;;;;;;;;YA6CrCF,YAAAA,CAAac,KAAAA,CAAMC;cACjBf,YAAAA,CAAaS;MACvBE,QAAQX,YAAAA,CAAagB;;;;;;;;;;;;;;;cAYXhB,YAAAA,CAAaS;MACvBE,QAAQX,YAAAA,CAAaU;;;;;;;;;;;;;;;;;;;cAgBXV,YAAAA,CAAaS;MACvBE,QAAQX,YAAAA,CAAaU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent_executor.d.cts","names":["BaseLanguageModelInterface","ChainValues","Tool","DynamicStructuredTool","CallbackManagerForChainRun","BaseChain","ChainInputs","BasePlanner","BaseStepContainer","BaseStepExecutor","LLMPlanner","ChainStepExecutor","SerializedLLMChain","isDynamicStructuredTool","PlanAndExecuteAgentExecutorInput","PlanAndExecuteAgentExecutor","llm","tools","Promise","humanMessageTemplate","Omit"],"sources":["../../../src/experimental/plan_and_execute/agent_executor.d.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { Tool, DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { BaseChain, ChainInputs } from \"../../chains/base.js\";\nimport { BasePlanner, BaseStepContainer, BaseStepExecutor, LLMPlanner, ChainStepExecutor } from \"./base.js\";\nimport { SerializedLLMChain } from \"../../chains/serde.js\";\n/**\n * A utility function to distiguish a dynamicstructuredtool over other tools.\n * @param tool the tool to test\n * @returns bool\n */\nexport declare function isDynamicStructuredTool(tool: Tool | DynamicStructuredTool): tool is DynamicStructuredTool;\n/**\n * Interface for the input to the PlanAndExecuteAgentExecutor class. It\n * extends ChainInputs and includes additional properties for the planner,\n * step executor, step container, and input and output keys.\n */\nexport interface PlanAndExecuteAgentExecutorInput extends ChainInputs {\n planner: BasePlanner;\n stepExecutor: BaseStepExecutor;\n stepContainer?: BaseStepContainer;\n inputKey?: string;\n outputKey?: string;\n}\n/**\n * Class representing a plan-and-execute agent executor. This agent\n * decides on the full sequence of actions upfront, then executes them all\n * without updating the plan. This is suitable for complex or long-running\n * tasks that require maintaining long-term objectives and focus.\n */\nexport declare class PlanAndExecuteAgentExecutor extends BaseChain {\n static lc_name(): string;\n private planner;\n private stepExecutor;\n private stepContainer;\n private inputKey;\n private outputKey;\n constructor(input: PlanAndExecuteAgentExecutorInput);\n get inputKeys(): string[];\n get outputKeys(): string[];\n /**\n * Static method that returns a default planner for the agent. It creates\n * a new LLMChain with a given LLM and a fixed prompt, and uses it to\n * create a new LLMPlanner with a PlanOutputParser.\n * @param llm The Large Language Model (LLM) used to generate responses.\n * @returns A new LLMPlanner instance.\n */\n static getDefaultPlanner({ llm, tools }: {\n llm: BaseLanguageModelInterface;\n tools: Tool[] | DynamicStructuredTool[];\n }): Promise<LLMPlanner>;\n /**\n * Static method that returns a default step executor for the agent. It\n * creates a new ChatAgent from a given LLM and a set of tools, and uses\n * it to create a new ChainStepExecutor.\n * @param llm The Large Language Model (LLM) used to generate responses.\n * @param tools The set of tools used by the agent.\n * @param humanMessageTemplate The template for human messages. If not provided, a default template is used.\n * @returns A new ChainStepExecutor instance.\n */\n static getDefaultStepExecutor({ llm, tools, humanMessageTemplate }: {\n llm: BaseLanguageModelInterface;\n tools: Tool[] | DynamicStructuredTool[];\n humanMessageTemplate?: string;\n }): ChainStepExecutor;\n /**\n * Static method that creates a new PlanAndExecuteAgentExecutor from a\n * given LLM, a set of tools, and optionally a human message template. It\n * uses the getDefaultPlanner and getDefaultStepExecutor methods to create\n * the planner and step executor for the new agent executor.\n * @param llm The Large Language Model (LLM) used to generate responses.\n * @param tools The set of tools used by the agent.\n * @param humanMessageTemplate The template for human messages. If not provided, a default template is used.\n * @returns A new PlanAndExecuteAgentExecutor instance.\n */\n static fromLLMAndTools({ llm, tools, humanMessageTemplate }: {\n llm: BaseLanguageModelInterface;\n tools: Tool[] | DynamicStructuredTool[];\n humanMessageTemplate?: string;\n } & Omit<PlanAndExecuteAgentExecutorInput, \"planner\" | \"stepExecutor\">): Promise<PlanAndExecuteAgentExecutor>;\n /** @ignore */\n _call(inputs: ChainValues, runManager?: CallbackManagerForChainRun): Promise<ChainValues>;\n _chainType(): \"agent_executor\";\n serialize(): SerializedLLMChain;\n}\n"],"mappings":";;;;;;;;;;;;AAkBqE;AAarE;;AAOuBc,UApBNA,gCAAAA,SAAyCR,WAoBnCQ,CAAAA;EAAgC,OAUxBE,EA7BlBT,WA6BkBS;EAAG,YAAEC,EA5BlBR,gBA4BkBQ;EAAK,aAC5BjB,CAAAA,EA5BOQ,iBA4BPR;EAA0B,QACxBE,CAAAA,EAAAA,MAAAA;EAAI,SAAKC,CAAAA,EAAAA,MAAAA;;;;;;;;AAaAA,cAhCHY,2BAAAA,SAAoCV,SAAAA,CAgCjCF;EAAqB,OAErCQ,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAiB,QAWIK,OAAAA;EAAG,QAAEC,YAAAA;EAAK,QAAEE,aAAAA;EAAoB,QAChDnB,QAAAA;EAA0B,QACxBE,SAAAA;EAAI,WAAKC,CAAAA,KAAAA,EAxCDW,gCAwCCX;EAAqB,IAEhCW,SAAAA,CAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAAgC,IAArCM,UAAAA,CAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAAI;;;;;;;EAIuB,OArDsBf,iBAAAA,CAAAA;IAAAA,GAAAA;IAAAA;GAAAA,EAAAA;IAAS,GAAA,EAkBrDL,0BAlBqD;WAmBnDE,SAASC;MAChBe,QAAQR;;;;;;;;;;;;;;;SAWHV;WACEE,SAASC;;MAEhBQ;;;;;;;;;;;;;;;;SAYKX;WACEE,SAASC;;MAEhBiB,KAAKN,gEAAgEI,QAAQH;;gBAEnEd,0BAA0BG,6BAA6Bc,QAAQjB;;eAEhEW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent_executor.d.ts","names":["BaseLanguageModelInterface","ChainValues","Tool","DynamicStructuredTool","CallbackManagerForChainRun","BaseChain","ChainInputs","BasePlanner","BaseStepContainer","BaseStepExecutor","LLMPlanner","ChainStepExecutor","SerializedLLMChain","isDynamicStructuredTool","PlanAndExecuteAgentExecutorInput","PlanAndExecuteAgentExecutor","llm","tools","Promise","humanMessageTemplate","Omit"],"sources":["../../../src/experimental/plan_and_execute/agent_executor.d.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { Tool, DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { BaseChain, ChainInputs } from \"../../chains/base.js\";\nimport { BasePlanner, BaseStepContainer, BaseStepExecutor, LLMPlanner, ChainStepExecutor } from \"./base.js\";\nimport { SerializedLLMChain } from \"../../chains/serde.js\";\n/**\n * A utility function to distiguish a dynamicstructuredtool over other tools.\n * @param tool the tool to test\n * @returns bool\n */\nexport declare function isDynamicStructuredTool(tool: Tool | DynamicStructuredTool): tool is DynamicStructuredTool;\n/**\n * Interface for the input to the PlanAndExecuteAgentExecutor class. It\n * extends ChainInputs and includes additional properties for the planner,\n * step executor, step container, and input and output keys.\n */\nexport interface PlanAndExecuteAgentExecutorInput extends ChainInputs {\n planner: BasePlanner;\n stepExecutor: BaseStepExecutor;\n stepContainer?: BaseStepContainer;\n inputKey?: string;\n outputKey?: string;\n}\n/**\n * Class representing a plan-and-execute agent executor. This agent\n * decides on the full sequence of actions upfront, then executes them all\n * without updating the plan. This is suitable for complex or long-running\n * tasks that require maintaining long-term objectives and focus.\n */\nexport declare class PlanAndExecuteAgentExecutor extends BaseChain {\n static lc_name(): string;\n private planner;\n private stepExecutor;\n private stepContainer;\n private inputKey;\n private outputKey;\n constructor(input: PlanAndExecuteAgentExecutorInput);\n get inputKeys(): string[];\n get outputKeys(): string[];\n /**\n * Static method that returns a default planner for the agent. It creates\n * a new LLMChain with a given LLM and a fixed prompt, and uses it to\n * create a new LLMPlanner with a PlanOutputParser.\n * @param llm The Large Language Model (LLM) used to generate responses.\n * @returns A new LLMPlanner instance.\n */\n static getDefaultPlanner({ llm, tools }: {\n llm: BaseLanguageModelInterface;\n tools: Tool[] | DynamicStructuredTool[];\n }): Promise<LLMPlanner>;\n /**\n * Static method that returns a default step executor for the agent. It\n * creates a new ChatAgent from a given LLM and a set of tools, and uses\n * it to create a new ChainStepExecutor.\n * @param llm The Large Language Model (LLM) used to generate responses.\n * @param tools The set of tools used by the agent.\n * @param humanMessageTemplate The template for human messages. If not provided, a default template is used.\n * @returns A new ChainStepExecutor instance.\n */\n static getDefaultStepExecutor({ llm, tools, humanMessageTemplate }: {\n llm: BaseLanguageModelInterface;\n tools: Tool[] | DynamicStructuredTool[];\n humanMessageTemplate?: string;\n }): ChainStepExecutor;\n /**\n * Static method that creates a new PlanAndExecuteAgentExecutor from a\n * given LLM, a set of tools, and optionally a human message template. It\n * uses the getDefaultPlanner and getDefaultStepExecutor methods to create\n * the planner and step executor for the new agent executor.\n * @param llm The Large Language Model (LLM) used to generate responses.\n * @param tools The set of tools used by the agent.\n * @param humanMessageTemplate The template for human messages. If not provided, a default template is used.\n * @returns A new PlanAndExecuteAgentExecutor instance.\n */\n static fromLLMAndTools({ llm, tools, humanMessageTemplate }: {\n llm: BaseLanguageModelInterface;\n tools: Tool[] | DynamicStructuredTool[];\n humanMessageTemplate?: string;\n } & Omit<PlanAndExecuteAgentExecutorInput, \"planner\" | \"stepExecutor\">): Promise<PlanAndExecuteAgentExecutor>;\n /** @ignore */\n _call(inputs: ChainValues, runManager?: CallbackManagerForChainRun): Promise<ChainValues>;\n _chainType(): \"agent_executor\";\n serialize(): SerializedLLMChain;\n}\n"],"mappings":";;;;;;;;;;;;AAkBqE;AAarE;;AAOuBc,UApBNA,gCAAAA,SAAyCR,WAoBnCQ,CAAAA;EAAgC,OAUxBE,EA7BlBT,WA6BkBS;EAAG,YAAEC,EA5BlBR,gBA4BkBQ;EAAK,aAC5BjB,CAAAA,EA5BOQ,iBA4BPR;EAA0B,QACxBE,CAAAA,EAAAA,MAAAA;EAAI,SAAKC,CAAAA,EAAAA,MAAAA;;;;;;;;AAaAA,cAhCHY,2BAAAA,SAAoCV,SAAAA,CAgCjCF;EAAqB,OAErCQ,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAiB,QAWIK,OAAAA;EAAG,QAAEC,YAAAA;EAAK,QAAEE,aAAAA;EAAoB,QAChDnB,QAAAA;EAA0B,QACxBE,SAAAA;EAAI,WAAKC,CAAAA,KAAAA,EAxCDW,gCAwCCX;EAAqB,IAEhCW,SAAAA,CAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAAgC,IAArCM,UAAAA,CAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAAI;;;;;;;EAIuB,OArDsBf,iBAAAA,CAAAA;IAAAA,GAAAA;IAAAA;GAAAA,EAAAA;IAAS,GAAA,EAkBrDL,0BAlBqD;WAmBnDE,SAASC;MAChBe,QAAQR;;;;;;;;;;;;;;;SAWHV;WACEE,SAASC;;MAEhBQ;;;;;;;;;;;;;;;;SAYKX;WACEE,SAASC;;MAEhBiB,KAAKN,gEAAgEI,QAAQH;;gBAEnEd,0BAA0BG,6BAA6Bc,QAAQjB;;eAEhEW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.cts","names":["BaseOutputParser","ChainValues","CallbackManager","BaseChain","LLMChain","StepAction","StepResult","Step","Plan","BasePlanner","Promise","BaseStepExecutor","BaseStepContainer","ListStepContainer","LLMPlanner","ChainStepExecutor"],"sources":["../../../src/experimental/plan_and_execute/base.d.ts"],"sourcesContent":["import { BaseOutputParser } from \"@langchain/core/output_parsers\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { CallbackManager } from \"@langchain/core/callbacks/manager\";\nimport { BaseChain } from \"../../chains/base.js\";\nimport { LLMChain } from \"../../chains/llm_chain.js\";\n/**\n * Represents an action to be performed in a step.\n */\nexport type StepAction = {\n text: string;\n};\n/**\n * Represents the result of a step.\n */\nexport type StepResult = {\n response: string;\n};\n/**\n * Represents a step, which includes an action and its result.\n */\nexport type Step = {\n action: StepAction;\n result: StepResult;\n};\n/**\n * Represents a plan, which is a sequence of step actions.\n */\nexport type Plan = {\n steps: StepAction[];\n};\n/**\n * Abstract class that defines the structure for a planner. Planners are\n * responsible for generating a plan based on inputs.\n */\nexport declare abstract class BasePlanner {\n abstract plan(inputs: ChainValues, runManager?: CallbackManager): Promise<Plan>;\n}\n/**\n * Abstract class that defines the structure for a step executor. Step\n * executors are responsible for executing a step based on inputs.\n */\nexport declare abstract class BaseStepExecutor {\n abstract step(inputs: ChainValues, runManager?: CallbackManager): Promise<StepResult>;\n}\n/**\n * Abstract class that defines the structure for a step container. Step\n * containers are responsible for managing steps.\n */\nexport declare abstract class BaseStepContainer {\n abstract addStep(action: StepAction, result: StepResult): void;\n abstract getSteps(): Step[];\n abstract getFinalResponse(): string;\n}\n/**\n * Class that extends BaseStepContainer and provides an implementation for\n * its methods. It maintains a list of steps and provides methods to add a\n * step, get all steps, and get the final response.\n */\nexport declare class ListStepContainer extends BaseStepContainer {\n private steps;\n addStep(action: StepAction, result: StepResult): void;\n getSteps(): Step[];\n getFinalResponse(): string;\n}\n/**\n * Class that extends BasePlanner and provides an implementation for the\n * plan method. It uses an instance of LLMChain and an output parser to\n * generate a plan.\n */\nexport declare class LLMPlanner extends BasePlanner {\n private llmChain;\n private outputParser;\n constructor(llmChain: LLMChain, outputParser: BaseOutputParser<Plan>);\n plan(inputs: ChainValues, runManager?: CallbackManager): Promise<Plan>;\n}\n/**\n * Class that extends BaseStepExecutor and provides an implementation for\n * the step method. It uses an instance of BaseChain to execute a step.\n */\nexport declare class ChainStepExecutor extends BaseStepExecutor {\n private chain;\n constructor(chain: BaseChain);\n step(inputs: ChainValues, runManager?: CallbackManager): Promise<StepResult>;\n}\n"],"mappings":";;;;;;;;;;AAQA;AAMYM,KANAD,UAAAA,GAMU;EAMVE,IAAAA,EAAAA,MAAI;CAAA;;;AAEM;AAKVC,KAbAF,UAAAA,GAcDD;EAMmBI,QAAAA,EAAAA,MAAW;CAAA;;;;AAC6BC,KAf1DH,IAAAA,GAe0DG;EAAO,MAAA,EAdjEL,UAciE;EAM/CM,MAAAA,EAnBlBL,UAmBkBK;CAAgB;;;;AACwBD,KAf1DF,IAAAA,GAe0DE;EAAO,KAAA,EAdlEL,UAckE,EAAA;AAM7E,CAAA;;;;;AAE6B,uBAhBCI,WAAAA,CAgBD;EAQRI,SAAAA,IAAAA,CAAAA,MAAiB,EAvBZZ,WAuBY,EAAA,UAAA,CAAA,EAvBcC,eAuBd,CAAA,EAvBgCQ,OAuBhC,CAvBwCF,IAuBxC,CAAA;;;;;;AAA0B,uBAjBlCG,gBAAAA,CAiBkC;EAW3CG,SAAAA,IAAU,CAAA,MAAA,EA3BLb,WA2BK,EAAA,UAAA,CAAA,EA3BqBC,eA2BrB,CAAA,EA3BuCQ,OA2BvC,CA3B+CJ,UA2B/C,CAAA;;;;;;AAIYJ,uBAzBbU,iBAAAA,CAyBaV;EAAe,SAAWM,OAAAA,CAAAA,MAAAA,EAxBxCH,UAwBwCG,EAAAA,MAAAA,EAxBpBF,UAwBoBE,CAAAA,EAAAA,IAAAA;EAAI,SAAZE,QAAAA,CAAAA,CAAAA,EAvBpCH,IAuBoCG,EAAAA;EAAO,SAJ5BD,gBAAAA,CAAAA,CAAAA,EAAAA,MAAAA;AAAW;AAUnD;;;;;AAGqEH,cAxBhDO,iBAAAA,SAA0BD,iBAAAA,CAwBsBN;EAAU,QAAlBI,KAAAA;EAAO,OAHrBC,CAAAA,MAAAA,EAnB3BN,UAmB2BM,EAAAA,MAAAA,EAnBPL,UAmBOK,CAAAA,EAAAA,IAAAA;EAAgB,QAAA,CAAA,CAAA,EAlB/CJ,IAkB+C,EAAA;;;;;;;;cAV1CO,UAAAA,SAAmBL,WAAAA;;;wBAGdL,wBAAwBJ,iBAAiBQ;eAClDP,0BAA0BC,kBAAkBQ,QAAQF;;;;;;cAMhDO,iBAAAA,SAA0BJ,gBAAAA;;qBAExBR;eACNF,0BAA0BC,kBAAkBQ,QAAQJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","names":["BaseOutputParser","ChainValues","CallbackManager","BaseChain","LLMChain","StepAction","StepResult","Step","Plan","BasePlanner","Promise","BaseStepExecutor","BaseStepContainer","ListStepContainer","LLMPlanner","ChainStepExecutor"],"sources":["../../../src/experimental/plan_and_execute/base.d.ts"],"sourcesContent":["import { BaseOutputParser } from \"@langchain/core/output_parsers\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { CallbackManager } from \"@langchain/core/callbacks/manager\";\nimport { BaseChain } from \"../../chains/base.js\";\nimport { LLMChain } from \"../../chains/llm_chain.js\";\n/**\n * Represents an action to be performed in a step.\n */\nexport type StepAction = {\n text: string;\n};\n/**\n * Represents the result of a step.\n */\nexport type StepResult = {\n response: string;\n};\n/**\n * Represents a step, which includes an action and its result.\n */\nexport type Step = {\n action: StepAction;\n result: StepResult;\n};\n/**\n * Represents a plan, which is a sequence of step actions.\n */\nexport type Plan = {\n steps: StepAction[];\n};\n/**\n * Abstract class that defines the structure for a planner. Planners are\n * responsible for generating a plan based on inputs.\n */\nexport declare abstract class BasePlanner {\n abstract plan(inputs: ChainValues, runManager?: CallbackManager): Promise<Plan>;\n}\n/**\n * Abstract class that defines the structure for a step executor. Step\n * executors are responsible for executing a step based on inputs.\n */\nexport declare abstract class BaseStepExecutor {\n abstract step(inputs: ChainValues, runManager?: CallbackManager): Promise<StepResult>;\n}\n/**\n * Abstract class that defines the structure for a step container. Step\n * containers are responsible for managing steps.\n */\nexport declare abstract class BaseStepContainer {\n abstract addStep(action: StepAction, result: StepResult): void;\n abstract getSteps(): Step[];\n abstract getFinalResponse(): string;\n}\n/**\n * Class that extends BaseStepContainer and provides an implementation for\n * its methods. It maintains a list of steps and provides methods to add a\n * step, get all steps, and get the final response.\n */\nexport declare class ListStepContainer extends BaseStepContainer {\n private steps;\n addStep(action: StepAction, result: StepResult): void;\n getSteps(): Step[];\n getFinalResponse(): string;\n}\n/**\n * Class that extends BasePlanner and provides an implementation for the\n * plan method. It uses an instance of LLMChain and an output parser to\n * generate a plan.\n */\nexport declare class LLMPlanner extends BasePlanner {\n private llmChain;\n private outputParser;\n constructor(llmChain: LLMChain, outputParser: BaseOutputParser<Plan>);\n plan(inputs: ChainValues, runManager?: CallbackManager): Promise<Plan>;\n}\n/**\n * Class that extends BaseStepExecutor and provides an implementation for\n * the step method. It uses an instance of BaseChain to execute a step.\n */\nexport declare class ChainStepExecutor extends BaseStepExecutor {\n private chain;\n constructor(chain: BaseChain);\n step(inputs: ChainValues, runManager?: CallbackManager): Promise<StepResult>;\n}\n"],"mappings":";;;;;;;;;;AAQA;AAMYM,KANAD,UAAAA,GAMU;EAMVE,IAAAA,EAAAA,MAAI;CAAA;;;AAEM;AAKVC,KAbAF,UAAAA,GAcDD;EAMmBI,QAAAA,EAAAA,MAAW;CAAA;;;;AAC6BC,KAf1DH,IAAAA,GAe0DG;EAAO,MAAA,EAdjEL,UAciE;EAM/CM,MAAAA,EAnBlBL,UAmBkBK;CAAgB;;;;AACwBD,KAf1DF,IAAAA,GAe0DE;EAAO,KAAA,EAdlEL,UAckE,EAAA;AAM7E,CAAA;;;;;AAE6B,uBAhBCI,WAAAA,CAgBD;EAQRI,SAAAA,IAAAA,CAAAA,MAAiB,EAvBZZ,WAuBY,EAAA,UAAA,CAAA,EAvBcC,eAuBd,CAAA,EAvBgCQ,OAuBhC,CAvBwCF,IAuBxC,CAAA;;;;;;AAA0B,uBAjBlCG,gBAAAA,CAiBkC;EAW3CG,SAAAA,IAAU,CAAA,MAAA,EA3BLb,WA2BK,EAAA,UAAA,CAAA,EA3BqBC,eA2BrB,CAAA,EA3BuCQ,OA2BvC,CA3B+CJ,UA2B/C,CAAA;;;;;;AAIYJ,uBAzBbU,iBAAAA,CAyBaV;EAAe,SAAWM,OAAAA,CAAAA,MAAAA,EAxBxCH,UAwBwCG,EAAAA,MAAAA,EAxBpBF,UAwBoBE,CAAAA,EAAAA,IAAAA;EAAI,SAAZE,QAAAA,CAAAA,CAAAA,EAvBpCH,IAuBoCG,EAAAA;EAAO,SAJ5BD,gBAAAA,CAAAA,CAAAA,EAAAA,MAAAA;AAAW;AAUnD;;;;;AAGqEH,cAxBhDO,iBAAAA,SAA0BD,iBAAAA,CAwBsBN;EAAU,QAAlBI,KAAAA;EAAO,OAHrBC,CAAAA,MAAAA,EAnB3BN,UAmB2BM,EAAAA,MAAAA,EAnBPL,UAmBOK,CAAAA,EAAAA,IAAAA;EAAgB,QAAA,CAAA,CAAA,EAlB/CJ,IAkB+C,EAAA;;;;;;;;cAV1CO,UAAAA,SAAmBL,WAAAA;;;wBAGdL,wBAAwBJ,iBAAiBQ;eAClDP,0BAA0BC,kBAAkBQ,QAAQF;;;;;;cAMhDO,iBAAAA,SAA0BJ,gBAAAA;;qBAExBR;eACNF,0BAA0BC,kBAAkBQ,QAAQJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"outputParser.d.cts","names":["BaseOutputParser","Plan","PlanOutputParser","Promise"],"sources":["../../../src/experimental/plan_and_execute/outputParser.d.ts"],"sourcesContent":["import { BaseOutputParser } from \"@langchain/core/output_parsers\";\nimport { Plan } from \"./base.js\";\n/**\n * Specific implementation of the `BaseOutputParser` class designed to\n * parse the output text into a `Plan` object.\n */\nexport declare class PlanOutputParser extends BaseOutputParser<Plan> {\n lc_namespace: string[];\n /**\n * Parses the output text into a `Plan` object. The steps are extracted by\n * splitting the text on newline followed by a number and a period,\n * indicating the start of a new step. The `<END_OF_PLAN>` tag is then\n * removed from each step.\n * @param text The output text to be parsed.\n * @returns A `Plan` object consisting of a series of steps.\n */\n parse(text: string): Promise<Plan>;\n /**\n * Returns a string that represents the format instructions for the plan.\n * This is defined by the `PLANNER_SYSTEM_PROMPT_MESSAGE_TEMPLATE`\n * constant.\n * @returns A string representing the format instructions for the plan.\n */\n getFormatInstructions(): string;\n}\n"],"mappings":";;;;;;;AAMA;;AAA+DC,cAA1CC,gBAAAA,SAAyBF,gBAAiBC,CAAAA,IAAAA,CAAAA,CAAAA;EAAI,YAUlCA,EAAAA,MAAAA,EAAAA;EAAI;;AAVyB;;;;;;uBAUrCE,QAAQF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"outputParser.d.ts","names":["BaseOutputParser","Plan","PlanOutputParser","Promise"],"sources":["../../../src/experimental/plan_and_execute/outputParser.d.ts"],"sourcesContent":["import { BaseOutputParser } from \"@langchain/core/output_parsers\";\nimport { Plan } from \"./base.js\";\n/**\n * Specific implementation of the `BaseOutputParser` class designed to\n * parse the output text into a `Plan` object.\n */\nexport declare class PlanOutputParser extends BaseOutputParser<Plan> {\n lc_namespace: string[];\n /**\n * Parses the output text into a `Plan` object. The steps are extracted by\n * splitting the text on newline followed by a number and a period,\n * indicating the start of a new step. The `<END_OF_PLAN>` tag is then\n * removed from each step.\n * @param text The output text to be parsed.\n * @returns A `Plan` object consisting of a series of steps.\n */\n parse(text: string): Promise<Plan>;\n /**\n * Returns a string that represents the format instructions for the plan.\n * This is defined by the `PLANNER_SYSTEM_PROMPT_MESSAGE_TEMPLATE`\n * constant.\n * @returns A string representing the format instructions for the plan.\n */\n getFormatInstructions(): string;\n}\n"],"mappings":";;;;;;;AAMA;;AAA+DC,cAA1CC,gBAAAA,SAAyBF,gBAAiBC,CAAAA,IAAAA,CAAAA,CAAAA;EAAI,YAUlCA,EAAAA,MAAAA,EAAAA;EAAI;;AAVyB;;;;;;uBAUrCE,QAAQF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom_format.d.cts","names":["InputValues","ParsedFStringNode","PromptTemplate","PromptTemplateInput","TypedPromptInputValues","CustomFormatPromptTemplateInput","RunInput","Omit","CustomFormatPromptTemplate","PartialVariableName","Record","customParser","Symbol","Promise"],"sources":["../../../src/experimental/prompts/custom_format.d.ts"],"sourcesContent":["import type { InputValues } from \"@langchain/core/utils/types\";\nimport { type ParsedFStringNode, PromptTemplate, type PromptTemplateInput, TypedPromptInputValues } from \"@langchain/core/prompts\";\nexport type CustomFormatPromptTemplateInput<RunInput extends InputValues> = Omit<PromptTemplateInput<RunInput, string>, \"templateFormat\"> & {\n customParser: (template: string) => ParsedFStringNode[];\n templateValidator?: (template: string, inputVariables: string[]) => boolean;\n renderer: (template: string, values: InputValues) => string;\n};\nexport declare class CustomFormatPromptTemplate<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nRunInput extends InputValues = any, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nPartialVariableName extends string = any> extends PromptTemplate<RunInput, PartialVariableName> {\n static lc_name(): string;\n lc_serializable: boolean;\n templateValidator?: (template: string, inputVariables: string[]) => boolean;\n renderer: (template: string, values: InputValues) => string;\n constructor(input: CustomFormatPromptTemplateInput<RunInput>);\n /**\n * Load prompt template from a template\n */\n static fromTemplate<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RunInput extends InputValues = Record<string, any>>(template: string, { customParser, ...rest }: Omit<CustomFormatPromptTemplateInput<RunInput>, \"template\" | \"inputVariables\">): CustomFormatPromptTemplate<RunInput extends Symbol ? never : RunInput, any>;\n /**\n * Formats the prompt template with the provided values.\n * @param values The values to be used to format the prompt template.\n * @returns A promise that resolves to a string which is the formatted prompt.\n */\n format(values: TypedPromptInputValues<RunInput>): Promise<string>;\n}\n"],"mappings":";;;;KAEYK,iDAAiDL,eAAeO,KAAKJ,oBAAoBG;sCAC7DL;EAD5BI,iBAAAA,CAAAA,EAAAA,CAAAA,QAAAA,EAAAA,MAA+B,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,GAAA,OAAA;EAAA,QAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,MAAA,EAGFL,WAHE,EAAA,GAAA,MAAA;CAAA;AAA0DM,cAKhFE,0BALgFF;;iBAOpFN,WAP2DO,GAAAA,GAAAA;;4BAGnCP,MAAAA,GAAAA,GAAAA,CAAAA,SAMSE,cANTF,CAMwBM,QANxBN,EAMkCS,mBANlCT,CAAAA,CAAAA;EAAW,OAAA,OAAA,CAAA,CAAA,EAAA,MAAA;EAE/BQ,eAAAA,EAAAA,OAAAA;EAA0B,iBAAA,CAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,GAAA,OAAA;EAAA,QAE9BR,EAAAA,CAAAA,QAAAA,EAAAA,MAAAA,EAAAA,MAAAA,EAMwBA,WANxBA,EAAAA,GAAAA,MAAAA;EAAW,WAEqCM,CAAAA,KAAAA,EAK1CD,+BAL0CC,CAKVA,QALUA,CAAAA;EAAQ;;;EAKV,OAAxCD,YAAAA;EAA+B;EAMtB,iBAAXL,WAAcU,GAAAA,MAAAA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,CAAAA,CAAAA,QAAAA,EAAAA,MAAAA,EAAAA;IAAAA,YAAAA;IAAAA,GAAAA;EAAAA,CAAAA,EAAkEH,IAAlEG,CAAuEL,+BAAvEK,CAAuGJ,QAAvGI,CAAAA,EAAAA,UAAAA,GAAAA,gBAAAA,CAAAA,CAAAA,EAAmJF,0BAAnJE,CAA8KJ,QAA9KI,SAA+LE,MAA/LF,GAAAA,KAAAA,GAAgNJ,QAAhNI,EAAAA,GAAAA,CAAAA;EAAM;;;;;EAAgL,MAASE,CAAAA,MAAAA,EAM/MR,sBAN+MQ,CAMxLN,QANwLM,CAAAA,CAAAA,EAM5KC,OAN4KD,CAAAA,MAAAA,CAAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom_format.d.ts","names":["InputValues","ParsedFStringNode","PromptTemplate","PromptTemplateInput","TypedPromptInputValues","CustomFormatPromptTemplateInput","RunInput","Omit","CustomFormatPromptTemplate","PartialVariableName","Record","customParser","Symbol","Promise"],"sources":["../../../src/experimental/prompts/custom_format.d.ts"],"sourcesContent":["import type { InputValues } from \"@langchain/core/utils/types\";\nimport { type ParsedFStringNode, PromptTemplate, type PromptTemplateInput, TypedPromptInputValues } from \"@langchain/core/prompts\";\nexport type CustomFormatPromptTemplateInput<RunInput extends InputValues> = Omit<PromptTemplateInput<RunInput, string>, \"templateFormat\"> & {\n customParser: (template: string) => ParsedFStringNode[];\n templateValidator?: (template: string, inputVariables: string[]) => boolean;\n renderer: (template: string, values: InputValues) => string;\n};\nexport declare class CustomFormatPromptTemplate<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nRunInput extends InputValues = any, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nPartialVariableName extends string = any> extends PromptTemplate<RunInput, PartialVariableName> {\n static lc_name(): string;\n lc_serializable: boolean;\n templateValidator?: (template: string, inputVariables: string[]) => boolean;\n renderer: (template: string, values: InputValues) => string;\n constructor(input: CustomFormatPromptTemplateInput<RunInput>);\n /**\n * Load prompt template from a template\n */\n static fromTemplate<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RunInput extends InputValues = Record<string, any>>(template: string, { customParser, ...rest }: Omit<CustomFormatPromptTemplateInput<RunInput>, \"template\" | \"inputVariables\">): CustomFormatPromptTemplate<RunInput extends Symbol ? never : RunInput, any>;\n /**\n * Formats the prompt template with the provided values.\n * @param values The values to be used to format the prompt template.\n * @returns A promise that resolves to a string which is the formatted prompt.\n */\n format(values: TypedPromptInputValues<RunInput>): Promise<string>;\n}\n"],"mappings":";;;;KAEYK,iDAAiDL,eAAeO,KAAKJ,oBAAoBG;sCAC7DL;EAD5BI,iBAAAA,CAAAA,EAAAA,CAAAA,QAAAA,EAAAA,MAA+B,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,GAAA,OAAA;EAAA,QAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,MAAA,EAGFL,WAHE,EAAA,GAAA,MAAA;CAAA;AAA0DM,cAKhFE,0BALgFF;;iBAOpFN,WAP2DO,GAAAA,GAAAA;;4BAGnCP,MAAAA,GAAAA,GAAAA,CAAAA,SAMSE,cANTF,CAMwBM,QANxBN,EAMkCS,mBANlCT,CAAAA,CAAAA;EAAW,OAAA,OAAA,CAAA,CAAA,EAAA,MAAA;EAE/BQ,eAAAA,EAAAA,OAAAA;EAA0B,iBAAA,CAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,GAAA,OAAA;EAAA,QAE9BR,EAAAA,CAAAA,QAAAA,EAAAA,MAAAA,EAAAA,MAAAA,EAMwBA,WANxBA,EAAAA,GAAAA,MAAAA;EAAW,WAEqCM,CAAAA,KAAAA,EAK1CD,+BAL0CC,CAKVA,QALUA,CAAAA;EAAQ;;;EAKV,OAAxCD,YAAAA;EAA+B;EAMtB,iBAAXL,WAAcU,GAAAA,MAAAA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,CAAAA,CAAAA,QAAAA,EAAAA,MAAAA,EAAAA;IAAAA,YAAAA;IAAAA,GAAAA;EAAAA,CAAAA,EAAkEH,IAAlEG,CAAuEL,+BAAvEK,CAAuGJ,QAAvGI,CAAAA,EAAAA,UAAAA,GAAAA,gBAAAA,CAAAA,CAAAA,EAAmJF,0BAAnJE,CAA8KJ,QAA9KI,SAA+LE,MAA/LF,GAAAA,KAAAA,GAAgNJ,QAAhNI,EAAAA,GAAAA,CAAAA;EAAM;;;;;EAAgL,MAASE,CAAAA,MAAAA,EAM/MR,sBAN+MQ,CAMxLN,QANwLM,CAAAA,CAAAA,EAM5KC,OAN4KD,CAAAA,MAAAA,CAAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handlebars.d.cts","names":["InputValues","CustomFormatPromptTemplate","CustomFormatPromptTemplateInput","parseHandlebars","_langchain_core_prompts0","ParsedTemplateNode","interpolateHandlebars","HandlebarsPromptTemplateInput","RunInput","HandlebarsPromptTemplate","Record","Omit","Symbol"],"sources":["../../../src/experimental/prompts/handlebars.d.ts"],"sourcesContent":["import type { InputValues } from \"@langchain/core/utils/types\";\nimport { CustomFormatPromptTemplate, CustomFormatPromptTemplateInput } from \"./custom_format.js\";\nexport declare const parseHandlebars: (template: string) => import(\"@langchain/core/prompts\").ParsedTemplateNode[];\nexport declare const interpolateHandlebars: (template: string, values: InputValues) => string;\nexport type HandlebarsPromptTemplateInput<RunInput extends InputValues> = CustomFormatPromptTemplateInput<RunInput>;\nexport declare class HandlebarsPromptTemplate<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nRunInput extends InputValues = any> extends CustomFormatPromptTemplate<RunInput> {\n static lc_name(): string;\n /**\n * Load prompt template from a template\n */\n static fromTemplate<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RunInput extends InputValues = Record<string, any>>(template: string, params?: Omit<HandlebarsPromptTemplateInput<RunInput>, \"template\" | \"inputVariables\" | \"customParser\" | \"templateValidator\" | \"renderer\">): CustomFormatPromptTemplate<RunInput extends Symbol ? never : RunInput, any>;\n}\n"],"mappings":";;;;;cAEqBG,uCAA6FC,wBAAAA,CAApBC,kBAAkB;cAC3FC,kDAAkDN;KAC3DO,+CAA+CP,eAAeE,gCAAgCM;AAFrFL,cAGAM,wBAH6FL;AAClH;AACA,iBAGiBJ,WAHLO,GAAAA,GAAAA,CAAAA,SAGgCN,0BAHH,CAG8BO,QAH9B,CAAA,CAAA;EAAA,OAAA,OAAA,CAAA,CAAA,EAAA,MAAA;EAAA;;;EAAgE,OAAA,YAAA;EACpFC;EAAwB,iBASxBT,WATwB,GASVU,MATU,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,QAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EASsCC,IATtC,CAS2CJ,6BAT3C,CASyEC,QATzE,CAAA,EAAA,UAAA,GAAA,gBAAA,GAAA,cAAA,GAAA,mBAAA,GAAA,UAAA,CAAA,CAAA,EASyKP,0BATzK,CASoMO,QATpM,SASqNI,MATrN,GAAA,KAAA,GASsOJ,QATtO,EAAA,GAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handlebars.d.ts","names":["InputValues","CustomFormatPromptTemplate","CustomFormatPromptTemplateInput","parseHandlebars","_langchain_core_prompts0","ParsedTemplateNode","interpolateHandlebars","HandlebarsPromptTemplateInput","RunInput","HandlebarsPromptTemplate","Record","Omit","Symbol"],"sources":["../../../src/experimental/prompts/handlebars.d.ts"],"sourcesContent":["import type { InputValues } from \"@langchain/core/utils/types\";\nimport { CustomFormatPromptTemplate, CustomFormatPromptTemplateInput } from \"./custom_format.js\";\nexport declare const parseHandlebars: (template: string) => import(\"@langchain/core/prompts\").ParsedTemplateNode[];\nexport declare const interpolateHandlebars: (template: string, values: InputValues) => string;\nexport type HandlebarsPromptTemplateInput<RunInput extends InputValues> = CustomFormatPromptTemplateInput<RunInput>;\nexport declare class HandlebarsPromptTemplate<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nRunInput extends InputValues = any> extends CustomFormatPromptTemplate<RunInput> {\n static lc_name(): string;\n /**\n * Load prompt template from a template\n */\n static fromTemplate<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RunInput extends InputValues = Record<string, any>>(template: string, params?: Omit<HandlebarsPromptTemplateInput<RunInput>, \"template\" | \"inputVariables\" | \"customParser\" | \"templateValidator\" | \"renderer\">): CustomFormatPromptTemplate<RunInput extends Symbol ? never : RunInput, any>;\n}\n"],"mappings":";;;;;cAEqBG,uCAA6FC,wBAAAA,CAApBC,kBAAkB;cAC3FC,kDAAkDN;KAC3DO,+CAA+CP,eAAeE,gCAAgCM;AAFrFL,cAGAM,wBAH6FL;AAClH;AACA,iBAGiBJ,WAHLO,GAAAA,GAAAA,CAAAA,SAGgCN,0BAHH,CAG8BO,QAH9B,CAAA,CAAA;EAAA,OAAA,OAAA,CAAA,CAAA,EAAA,MAAA;EAAA;;;EAAgE,OAAA,YAAA;EACpFC;EAAwB,iBASxBT,WATwB,GASVU,MATU,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,QAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EASsCC,IATtC,CAS2CJ,6BAT3C,CASyEC,QATzE,CAAA,EAAA,UAAA,GAAA,gBAAA,GAAA,cAAA,GAAA,mBAAA,GAAA,UAAA,CAAA,CAAA,EASyKP,0BATzK,CASoMO,QATpM,SASqNI,MATrN,GAAA,KAAA,GASsOJ,QATtO,EAAA,GAAA,CAAA"}
|
package/dist/hub/base.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.cts","names":["BaseLanguageModel","Runnable","PromptCommit","basePush","Promise","basePull","generateModelImportMap","Record","generateOptionalImportMap","bindOutputSchema","T"],"sources":["../../src/hub/base.d.ts"],"sourcesContent":["import type { BaseLanguageModel } from \"@langchain/core/language_models/base\";\nimport type { Runnable } from \"@langchain/core/runnables\";\nimport type { PromptCommit } from \"langsmith/schemas\";\n/**\n * Push a prompt to the hub.\n * If the specified repo doesn't already exist, it will be created.\n * @param repoFullName The full name of the repo.\n * @param runnable The prompt to push.\n * @param options\n * @returns The URL of the newly pushed prompt in the hub.\n */\nexport declare function basePush(repoFullName: string, runnable: Runnable, options?: {\n apiKey?: string;\n apiUrl?: string;\n parentCommitHash?: string;\n /** @deprecated Use isPublic instead. */\n newRepoIsPublic?: boolean;\n isPublic?: boolean;\n /** @deprecated Use description instead. */\n newRepoDescription?: string;\n description?: string;\n readme?: string;\n tags?: string[];\n}): Promise<string>;\nexport declare function basePull(ownerRepoCommit: string, options?: {\n apiKey?: string;\n apiUrl?: string;\n includeModel?: boolean;\n}): Promise<PromptCommit>;\nexport declare function generateModelImportMap(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nmodelClass?: new (...args: any[]) => BaseLanguageModel): Record<string, any>;\nexport declare function generateOptionalImportMap(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nmodelClass?: new (...args: any[]) => BaseLanguageModel): Record<string, any>;\nexport declare function bindOutputSchema<T extends Runnable>(loadedSequence: T): T;\n"],"mappings":";;;;;;AAWA;;;;AAYW;;;iBAZaG,QAAAA,iCAAyCF;;;;;;;;;;;;IAY7DG"}
|
package/dist/hub/base.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","names":["BaseLanguageModel","Runnable","PromptCommit","basePush","Promise","basePull","generateModelImportMap","Record","generateOptionalImportMap","bindOutputSchema","T"],"sources":["../../src/hub/base.d.ts"],"sourcesContent":["import type { BaseLanguageModel } from \"@langchain/core/language_models/base\";\nimport type { Runnable } from \"@langchain/core/runnables\";\nimport type { PromptCommit } from \"langsmith/schemas\";\n/**\n * Push a prompt to the hub.\n * If the specified repo doesn't already exist, it will be created.\n * @param repoFullName The full name of the repo.\n * @param runnable The prompt to push.\n * @param options\n * @returns The URL of the newly pushed prompt in the hub.\n */\nexport declare function basePush(repoFullName: string, runnable: Runnable, options?: {\n apiKey?: string;\n apiUrl?: string;\n parentCommitHash?: string;\n /** @deprecated Use isPublic instead. */\n newRepoIsPublic?: boolean;\n isPublic?: boolean;\n /** @deprecated Use description instead. */\n newRepoDescription?: string;\n description?: string;\n readme?: string;\n tags?: string[];\n}): Promise<string>;\nexport declare function basePull(ownerRepoCommit: string, options?: {\n apiKey?: string;\n apiUrl?: string;\n includeModel?: boolean;\n}): Promise<PromptCommit>;\nexport declare function generateModelImportMap(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nmodelClass?: new (...args: any[]) => BaseLanguageModel): Record<string, any>;\nexport declare function generateOptionalImportMap(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nmodelClass?: new (...args: any[]) => BaseLanguageModel): Record<string, any>;\nexport declare function bindOutputSchema<T extends Runnable>(loadedSequence: T): T;\n"],"mappings":";;;;;;AAWA;;;;AAYW;;;iBAZaG,QAAAA,iCAAyCF;;;;;;;;;;;;IAY7DG"}
|
package/dist/hub/index.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":["Runnable","BaseLanguageModel","basePush","push","pull","T","Promise"],"sources":["../../src/hub/index.d.ts"],"sourcesContent":["import { Runnable } from \"@langchain/core/runnables\";\nimport type { BaseLanguageModel } from \"@langchain/core/language_models/base\";\nimport { basePush } from \"./base.js\";\nexport { basePush as push };\n/**\n * Pull a prompt from the hub.\n *\n * @param ownerRepoCommit The name of the repo containing the prompt, as well as an optional commit hash separated by a slash.\n * @param options.apiKey LangSmith API key to use when pulling the prompt\n * @param options.apiUrl LangSmith API URL to use when pulling the prompt\n * @param options.includeModel Whether to also instantiate and attach a model instance to the prompt,\n * if the prompt has associated model metadata. If set to true, invoking the resulting pulled prompt will\n * also invoke the instantiated model. For non-OpenAI models, you must also set \"modelClass\" to the\n * correct class of the model.\n * @param options.modelClass If includeModel is true, the class of the model to instantiate. Required\n * for non-OpenAI models. If you are running in Node or another environment that supports dynamic imports,\n * you may instead import this function from \"langchain/hub/node\" and pass \"includeModel: true\" instead\n * of specifying this parameter.\n * @returns\n */\nexport declare function pull<T extends Runnable>(ownerRepoCommit: string, options?: {\n apiKey?: string;\n apiUrl?: string;\n includeModel?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n modelClass?: new (...args: any[]) => BaseLanguageModel;\n}): Promise<T>;\n"],"mappings":";;;;;;;AAoBA;;;;;;AAMW;;;;;;;;;iBANaI,eAAeJ;;;;;uCAKEC;IACrCK,QAAQD"}
|
package/dist/hub/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["Runnable","BaseLanguageModel","basePush","push","pull","T","Promise"],"sources":["../../src/hub/index.d.ts"],"sourcesContent":["import { Runnable } from \"@langchain/core/runnables\";\nimport type { BaseLanguageModel } from \"@langchain/core/language_models/base\";\nimport { basePush } from \"./base.js\";\nexport { basePush as push };\n/**\n * Pull a prompt from the hub.\n *\n * @param ownerRepoCommit The name of the repo containing the prompt, as well as an optional commit hash separated by a slash.\n * @param options.apiKey LangSmith API key to use when pulling the prompt\n * @param options.apiUrl LangSmith API URL to use when pulling the prompt\n * @param options.includeModel Whether to also instantiate and attach a model instance to the prompt,\n * if the prompt has associated model metadata. If set to true, invoking the resulting pulled prompt will\n * also invoke the instantiated model. For non-OpenAI models, you must also set \"modelClass\" to the\n * correct class of the model.\n * @param options.modelClass If includeModel is true, the class of the model to instantiate. Required\n * for non-OpenAI models. If you are running in Node or another environment that supports dynamic imports,\n * you may instead import this function from \"langchain/hub/node\" and pass \"includeModel: true\" instead\n * of specifying this parameter.\n * @returns\n */\nexport declare function pull<T extends Runnable>(ownerRepoCommit: string, options?: {\n apiKey?: string;\n apiUrl?: string;\n includeModel?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n modelClass?: new (...args: any[]) => BaseLanguageModel;\n}): Promise<T>;\n"],"mappings":";;;;;;;AAoBA;;;;;;AAMW;;;;;;;;;iBANaI,eAAeJ;;;;;uCAKEC;IACrCK,QAAQD"}
|
package/dist/hub/node.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.cts","names":["Runnable","basePush","push","pull","T","Promise"],"sources":["../../src/hub/node.d.ts"],"sourcesContent":["import { Runnable } from \"@langchain/core/runnables\";\n// TODO: Make this the default, add web entrypoint in next breaking release\nexport { basePush as push } from \"./base.js\";\n/**\n * Pull a prompt from the hub.\n * @param ownerRepoCommit The name of the repo containing the prompt, as well as an optional commit hash separated by a slash.\n * @param options.apiKey LangSmith API key to use when pulling the prompt\n * @param options.apiUrl LangSmith API URL to use when pulling the prompt\n * @param options.includeModel Whether to also instantiate and attach a model instance to the prompt,\n * if the prompt has associated model metadata. If set to true, invoking the resulting pulled prompt will\n * also invoke the instantiated model. You must have the appropriate LangChain integration package installed.\n * @returns\n */\nexport declare function pull<T extends Runnable>(ownerRepoCommit: string, options?: {\n apiKey?: string;\n apiUrl?: string;\n includeModel?: boolean;\n}): Promise<T>;\n"],"mappings":";;;;;;AAaA;;;;;AAIW;;;;iBAJaG,eAAeH;;;;IAInCK,QAAQD"}
|
package/dist/hub/node.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","names":["Runnable","basePush","push","pull","T","Promise"],"sources":["../../src/hub/node.d.ts"],"sourcesContent":["import { Runnable } from \"@langchain/core/runnables\";\n// TODO: Make this the default, add web entrypoint in next breaking release\nexport { basePush as push } from \"./base.js\";\n/**\n * Pull a prompt from the hub.\n * @param ownerRepoCommit The name of the repo containing the prompt, as well as an optional commit hash separated by a slash.\n * @param options.apiKey LangSmith API key to use when pulling the prompt\n * @param options.apiUrl LangSmith API URL to use when pulling the prompt\n * @param options.includeModel Whether to also instantiate and attach a model instance to the prompt,\n * if the prompt has associated model metadata. If set to true, invoking the resulting pulled prompt will\n * also invoke the instantiated model. You must have the appropriate LangChain integration package installed.\n * @returns\n */\nexport declare function pull<T extends Runnable>(ownerRepoCommit: string, options?: {\n apiKey?: string;\n apiUrl?: string;\n includeModel?: boolean;\n}): Promise<T>;\n"],"mappings":";;;;;;AAaA;;;;;AAIW;;;;iBAJaG,eAAeH;;;;IAInCK,QAAQD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map_keys.d.cts","names":["SerializedFields"],"sources":["../../../../../langchain-core/dist/load/map_keys.d.ts"],"sourcesContent":["//#region src/load/map_keys.d.ts\ninterface SerializedFields {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n//#endregion\nexport { SerializedFields };\n//# sourceMappingURL=map_keys.d.ts.map"],"mappings":";;UACUA,gBAAAA,CAAgB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serializable.d.cts","names":["SerializedFields","BaseSerialized","T","Record","SerializedConstructor","SerializedSecret","SerializedNotImplemented","Serialized","get_lc_unique_name","Serializable","SerializableInterface"],"sources":["../../../../../langchain-core/dist/load/serializable.d.ts"],"sourcesContent":["import { SerializedFields } from \"./map_keys.js\";\n\n//#region src/load/serializable.d.ts\ninterface BaseSerialized<T extends string> {\n lc: number;\n type: T;\n id: string[];\n name?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n graph?: Record<string, any>;\n}\ninterface SerializedConstructor extends BaseSerialized<\"constructor\"> {\n kwargs: SerializedFields;\n}\ninterface SerializedSecret extends BaseSerialized<\"secret\"> {}\ninterface SerializedNotImplemented extends BaseSerialized<\"not_implemented\"> {}\ntype Serialized = SerializedConstructor | SerializedSecret | SerializedNotImplemented;\n/**\n * Get a unique name for the module, rather than parent class implementations.\n * Should not be subclassed, subclass lc_name above instead.\n */\ndeclare function get_lc_unique_name(serializableClass: typeof Serializable): string;\ninterface SerializableInterface {\n get lc_id(): string[];\n}\ndeclare abstract class Serializable implements SerializableInterface {\n lc_serializable: boolean;\n lc_kwargs: SerializedFields;\n /**\n * A path to the module that contains the class, eg. [\"langchain\", \"llms\"]\n * Usually should be the same as the entrypoint the class is exported from.\n */\n abstract lc_namespace: string[];\n /**\n * The name of the serializable. Override to provide an alias or\n * to preserve the serialized module name in minified environments.\n *\n * Implemented as a static method to support loading logic.\n */\n static lc_name(): string;\n /**\n * The final serialized identifier for the module.\n */\n get lc_id(): string[];\n /**\n * A map of secrets, which will be omitted from serialization.\n * Keys are paths to the secret in constructor args, e.g. \"foo.bar.baz\".\n * Values are the secret ids, which will be used when deserializing.\n */\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n /**\n * A map of additional attributes to merge with constructor args.\n * Keys are the attribute names, e.g. \"foo\".\n * Values are the attribute values, which will be serialized.\n * These attributes need to be accepted by the constructor as arguments.\n */\n get lc_attributes(): SerializedFields | undefined;\n /**\n * A map of aliases for constructor args.\n * Keys are the attribute names, e.g. \"foo\".\n * Values are the alias that will replace the key in serialization.\n * This is used to eg. make argument names match Python.\n */\n get lc_aliases(): {\n [key: string]: string;\n } | undefined;\n /**\n * A manual list of keys that should be serialized.\n * If not overridden, all fields passed into the constructor will be serialized.\n */\n get lc_serializable_keys(): string[] | undefined;\n constructor(kwargs?: SerializedFields, ..._args: never[]);\n toJSON(): Serialized;\n toJSONNotImplemented(): SerializedNotImplemented;\n}\n//#endregion\nexport { BaseSerialized, Serializable, SerializableInterface, Serialized, SerializedConstructor, SerializedNotImplemented, SerializedSecret, get_lc_unique_name };\n//# sourceMappingURL=serializable.d.ts.map"],"mappings":";;;;AAAiD,UAGvCC,cAAc,CAAA,UAAA,MAAA,CAAA,CAAA;EAAA,EAAA,EAAA,MAAA;EAAA,IAAA,EAEhBC,CAAAA;EAAC,EAAA,EAAA,MAICC,EAAAA;EAAM,IAAA,CAAA,EAAA,MAAA;EAAA;EAEe,KAAA,CAAA,EAFrBA,MAEqB,CAAA,MAAA,EAAA,GAAA,CAAA;;UAArBC,qBAAAA,SAA8BH,cAAAA,CAAAA,aAAAA,CAAAA,CAAAA;EAAc,MAAA,EAC5CD,gBAD4C;AAAA;AAGL,UAAvCK,gBAAAA,SAAyBJ,cACQA,CAAAA,QAAc,CAAA,CAAA,CAAA;AAAA,UAA/CK,wBAAAA,SAAiCL,cAC5B,CAAA,iBAAA,CAAA,CAAA,CAAA;KAAVM,UAAAA,GAAaH,qBAAH,GAA2BC,gBAA3B,GAA8CC,wBAA9C;;;;AAAsE;;AAMtD,UAArBI,qBAAAA,CAGyB;EAAA,IAAA,KAAA,EAAA,EAAA,MAAA,EAAA;;uBAAZD,YAAAA,YAAwBC,qBAiCxBV,CAAAA;EAAgB,eAehBA,EAAAA,OAAAA;EAAgB,SAC3BO,EA/CCP,gBA+CDO;EAAU;;AAjD8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAiC7CP;;;;;;;;;;;;;;;uBAeAA;YACXO;0BACcD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.cts","names":["ContentBlock","Serializable","SerializedConstructor","MessageStringFormat","$InferMessageContent","$InferResponseMetadata","Message","MessageStructure","MessageType","MESSAGE_SYMBOL","StoredMessageData","Record","StoredMessage","StoredGeneration","StoredMessageV1","MessageContent","Array","FunctionCall","BaseMessageFields","TStructure","TRole","Standard","OpenAIToolCall","Partial","mergeContent","_mergeStatus","BaseMessage","NonNullable","Symbol","toStringTag","isOpenAIToolCallArray","_mergeDicts","_mergeLists","Content","_mergeObj","T","BaseMessageChunk","MessageFieldWithRole","_isMessageFieldWithRole","BaseMessageLike","isBaseMessage","isBaseMessageChunk"],"sources":["../../../../../langchain-core/dist/messages/base.d.ts"],"sourcesContent":["import { ContentBlock } from \"./content/index.js\";\nimport { Serializable, SerializedConstructor } from \"../load/serializable.js\";\nimport { MessageStringFormat } from \"./format.js\";\nimport { $InferMessageContent, $InferResponseMetadata, Message, MessageStructure, MessageType } from \"./message.js\";\n\n//#region src/messages/base.d.ts\n/** @internal */\ndeclare const MESSAGE_SYMBOL: unique symbol;\ninterface StoredMessageData {\n content: string;\n role: string | undefined;\n name: string | undefined;\n tool_call_id: string | undefined;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n additional_kwargs?: Record<string, any>;\n /** Response metadata. For example: response headers, logprobs, token counts, model name. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n response_metadata?: Record<string, any>;\n id?: string;\n}\ninterface StoredMessage {\n type: string;\n data: StoredMessageData;\n}\ninterface StoredGeneration {\n text: string;\n message?: StoredMessage;\n}\ninterface StoredMessageV1 {\n type: string;\n role: string | undefined;\n text: string;\n}\ntype MessageContent = string | Array<ContentBlock>;\ninterface FunctionCall {\n /**\n * The arguments to call the function with, as generated by the model in JSON\n * format. Note that the model does not always generate valid JSON, and may\n * hallucinate parameters not defined by your function schema. Validate the\n * arguments in your code before calling your function.\n */\n arguments: string;\n /**\n * The name of the function to call.\n */\n name: string;\n}\ntype BaseMessageFields<TStructure extends MessageStructure = MessageStructure, TRole extends MessageType = MessageType> = {\n id?: string;\n name?: string;\n content?: $InferMessageContent<TStructure, TRole>;\n contentBlocks?: Array<ContentBlock.Standard>;\n /** @deprecated */\n additional_kwargs?: {\n /**\n * @deprecated Use \"tool_calls\" field on AIMessages instead\n */\n function_call?: FunctionCall;\n /**\n * @deprecated Use \"tool_calls\" field on AIMessages instead\n */\n tool_calls?: OpenAIToolCall[];\n [key: string]: unknown;\n };\n response_metadata?: Partial<$InferResponseMetadata<TStructure, TRole>>;\n};\ndeclare function mergeContent(firstContent: MessageContent, secondContent: MessageContent): MessageContent;\n/**\n * 'Merge' two statuses. If either value passed is 'error', it will return 'error'. Else\n * it will return 'success'.\n *\n * @param {\"success\" | \"error\" | undefined} left The existing value to 'merge' with the new value.\n * @param {\"success\" | \"error\" | undefined} right The new value to 'merge' with the existing value\n * @returns {\"success\" | \"error\"} The 'merged' value.\n */\ndeclare function _mergeStatus(left?: \"success\" | \"error\", right?: \"success\" | \"error\"): \"success\" | \"error\" | undefined;\n/**\n * Base class for all types of messages in a conversation. It includes\n * properties like `content`, `name`, and `additional_kwargs`. It also\n * includes methods like `toDict()` and `_getType()`.\n */\ndeclare abstract class BaseMessage<TStructure extends MessageStructure = MessageStructure, TRole extends MessageType = MessageType> extends Serializable implements Message<TStructure, TRole> {\n lc_namespace: string[];\n lc_serializable: boolean;\n get lc_aliases(): Record<string, string>;\n readonly [MESSAGE_SYMBOL]: true;\n abstract readonly type: TRole;\n id?: string;\n name?: string;\n content: $InferMessageContent<TStructure, TRole>;\n additional_kwargs: NonNullable<BaseMessageFields<TStructure, TRole>[\"additional_kwargs\"]>;\n response_metadata: NonNullable<BaseMessageFields<TStructure, TRole>[\"response_metadata\"]>;\n /**\n * @deprecated Use .getType() instead or import the proper typeguard.\n * For example:\n *\n * ```ts\n * import { isAIMessage } from \"@langchain/core/messages\";\n *\n * const message = new AIMessage(\"Hello!\");\n * isAIMessage(message); // true\n * ```\n */\n _getType(): MessageType;\n /**\n * @deprecated Use .type instead\n * The type of the message.\n */\n getType(): MessageType;\n constructor(arg: $InferMessageContent<TStructure, TRole> | BaseMessageFields<TStructure, TRole>);\n /** Get text content of the message. */\n get text(): string;\n get contentBlocks(): Array<ContentBlock.Standard>;\n toDict(): StoredMessage;\n static lc_name(): string;\n // Can't be protected for silly reasons\n get _printableFields(): Record<string, unknown>;\n static isInstance(obj: unknown): obj is BaseMessage;\n // this private method is used to update the ID for the runtime\n // value as well as in lc_kwargs for serialisation\n _updateId(value: string | undefined): void;\n get [Symbol.toStringTag](): any;\n toFormattedString(format?: MessageStringFormat): string;\n}\n/**\n * @deprecated Use \"tool_calls\" field on AIMessages instead\n */\ntype OpenAIToolCall = {\n /**\n * The ID of the tool call.\n */\n id: string;\n /**\n * The function that the model called.\n */\n function: FunctionCall;\n /**\n * The type of the tool. Currently, only `function` is supported.\n */\n type: \"function\";\n index?: number;\n};\ndeclare function isOpenAIToolCallArray(value?: unknown): value is OpenAIToolCall[];\ndeclare function _mergeDicts(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nleft?: Record<string, any>,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nright?: Record<string, any>\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n): Record<string, any>;\ndeclare function _mergeLists<Content extends ContentBlock>(left?: Content[], right?: Content[]): Content[] | undefined;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare function _mergeObj<T = any>(left: T | undefined, right: T | undefined): T;\n/**\n * Represents a chunk of a message, which can be concatenated with other\n * message chunks. It includes a method `_merge_kwargs_dict()` for merging\n * additional keyword arguments from another `BaseMessageChunk` into this\n * one. It also overrides the `__add__()` method to support concatenation\n * of `BaseMessageChunk` instances.\n */\ndeclare abstract class BaseMessageChunk<TStructure extends MessageStructure = MessageStructure, TRole extends MessageType = MessageType> extends BaseMessage<TStructure, TRole> {\n abstract concat(chunk: BaseMessageChunk): BaseMessageChunk<TStructure, TRole>;\n static isInstance(obj: unknown): obj is BaseMessageChunk;\n}\ntype MessageFieldWithRole = {\n role: MessageType;\n content: MessageContent;\n name?: string;\n} & Record<string, unknown>;\ndeclare function _isMessageFieldWithRole(x: BaseMessageLike): x is MessageFieldWithRole;\ntype BaseMessageLike = BaseMessage | MessageFieldWithRole | [MessageType, MessageContent] | string\n/**\n * @deprecated Specifying \"type\" is deprecated and will be removed in 0.4.0.\n */ | ({\n type: MessageType | \"user\" | \"assistant\" | \"placeholder\";\n} & BaseMessageFields & Record<string, unknown>) | SerializedConstructor;\n/**\n * @deprecated Use {@link BaseMessage.isInstance} instead\n */\ndeclare function isBaseMessage(messageLike?: unknown): messageLike is BaseMessage;\n/**\n * @deprecated Use {@link BaseMessageChunk.isInstance} instead\n */\ndeclare function isBaseMessageChunk(messageLike?: unknown): messageLike is BaseMessageChunk;\n//#endregion\nexport { BaseMessage, BaseMessageChunk, BaseMessageFields, BaseMessageLike, FunctionCall, MessageContent, MessageFieldWithRole, OpenAIToolCall, StoredGeneration, StoredMessage, StoredMessageData, StoredMessageV1, _isMessageFieldWithRole, _mergeDicts, _mergeLists, _mergeObj, _mergeStatus, isBaseMessage, isBaseMessageChunk, isOpenAIToolCallArray, mergeContent };\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;;;AAGoH;AAIzE,cAA7BS,cACa,EAAA,OAAA,MAAA;UAAjBC,iBAAAA,CAAiB;EAAA,OAMLC,EAAAA,MAAAA;EAAM,IAAA,EAGNA,MAAAA,GAAAA,SAAAA;EAAM,IAAA,EAAA,MAAA,GAAA,SAAA;EAAA,YAGlBC,EAAAA,MAAa,GAAA,SAEfF;EAW4B;EACd,iBAajBQ,CAAAA,EAjCiBP,MAiCA,CAAA,MAAA,EAAA,GAAA,CAAA;EAAA;EAAA;EAAoC,iBAAGJ,CAAAA,EA9BvCI,MA8BuCJ,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;EAAgB,EAAA,CAAA,EAAgBC,MAAAA;;UA3BnFI,aAAAA,CA8BuBO;EAAU,IAAA,EAAEC,MAAAA;EAAK,IAAA,EA5B1CV,iBA4BIN;;UAhBFa,YAAAA,CA+C4CV;EAAgB;;;;;;EAG5C,SACdE,EAAAA,MAAAA;EAAc;;;EAIuB,IAAA,EAAtCL,MAAAA;;KA1CNc,iBA2C0DE,CAAAA,mBA3CrBb,gBA2CqBa,GA3CFb,gBA2CEa,EAAAA,cA3C8BZ,WA2C9BY,GA3C4CZ,WA2C5CY,CAAAA,GAAAA;EAAK,EAAA,CAAA,EAAnCF,MAAAA;EAAiB,IAAA,CAA7BS,EAAAA,MAAAA;EAAW,OACmBR,CAAAA,EAzCvCf,oBAyCuCe,CAzClBA,UAyCkBA,EAzCNC,KAyCMD,CAAAA;EAAU,aAAEC,CAAAA,EAxC7CJ,KAwC6CI,CAxCvCpB,YAAAA,CAAaqB,QAwC0BD,CAAAA;EAAK;EAAlB,iBAA7BO,CAAAA,EAAAA;IAAW;;;IAkBkB,aAAEP,CAAAA,EApDhCH,YAoDgCG;IAAK;;;IAAuC,UAAnCF,CAAAA,EAhD5CI,cAgD4CJ,EAAAA;IAAiB,CAAA,GAGjDlB,EAAAA,MAAAA,CAAAA,EAAAA,OAAaqB;EAAQ,CAAA;EAAtB,iBAChBT,CAAAA,EAjDUW,OAiDVX,CAjDkBP,sBAiDlBO,CAjDyCO,UAiDzCP,EAjDqDQ,KAiDrDR,CAAAA,CAAAA;CAAa;;;;;;uBAhCFc,+BAA+BnB,mBAAmBA,gCAAgCC,cAAcA,qBAAqBP,YAAAA,YAAwBK,QAAQa,YAAYC;;;oBAGpKT;YACRF,cAAAA;0BACcW;;;WAGfhB,qBAAqBe,YAAYC;qBACvBO,YAAYT,kBAAkBC,YAAYC;qBAC1CO,YAAYT,kBAAkBC,YAAYC;;;;;;;;;;;;cAYjDZ;;;;;aAKDA;mBACMJ,qBAAqBe,YAAYC,SAASF,kBAAkBC,YAAYC;;;uBAGpEJ,MAAMhB,YAAAA,CAAaqB;YAC9BT;;;0BAGcD;0CACgBe;;;;OAInCE,MAAAA,CAAOC,WAAAA;6BACe1B;;;;;KAKxBmB,cAAAA;;;;;;;;YAQOL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.cts","names":["BaseContentBlock"],"sources":["../../../../../../langchain-core/dist/messages/content/base.d.ts"],"sourcesContent":["//#region src/messages/content/base.d.ts\ninterface BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: string;\n /**\n * Content block identifier, which can be either\n * - generated by the provider (e.g., a provider-specific ID)\n * - generated by LangChain upon creation (a uuid prefixed with 'lc-')\n */\n id?: string;\n /**\n * Arbitrary properties\n */\n [key: string]: unknown;\n}\n//#endregion\nexport { BaseContentBlock };\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;UACUA,gBAAAA,CAAgB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.cts","names":["BaseContentBlock","ImageDetail","MessageContentText","MessageContentImageUrl","MessageContentComplex","Record","Data","BaseDataContentBlock","URLContentBlock","Base64ContentBlock","PlainTextContentBlock","IDContentBlock","DataContentBlock","isDataContentBlock","isURLContentBlock","isBase64ContentBlock","isPlainTextContentBlock","isIDContentBlock","convertToOpenAIImageBlock","parseMimeType","parseBase64DataUrl","dataUrl","asTypedArray","Uint8Array","ProviderFormatTypes","TextFormat","ImageFormat","AudioFormat","FileFormat","VideoFormat","StandardContentBlockConverter","Partial","StandardImageBlock","Formats","StandardAudioBlock","StandardFileBlock","StandardTextBlock","convertToProviderContentBlock"],"sources":["../../../../../../langchain-core/dist/messages/content/data.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\n\n//#region src/messages/content/data.d.ts\n\n/**\n * @deprecated\n * Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ntype ImageDetail = \"auto\" | \"low\" | \"high\";\n/**\n * @deprecated\n * Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ntype MessageContentText = {\n type: \"text\";\n text: string;\n};\n/**\n * @deprecated\n * Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ntype MessageContentImageUrl = {\n type: \"image_url\";\n image_url: string | {\n url: string;\n detail?: ImageDetail;\n };\n};\n/**\n * @deprecated\n * Use {@link ContentBlock} instead.\n */\ntype MessageContentComplex = MessageContentText | MessageContentImageUrl\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n| (Record<string, any> & {\n type?: \"text\" | \"image_url\" | string;\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n| (Record<string, any> & {\n type?: never;\n});\ntype Data = never;\n// eslint-disable-next-line @typescript-eslint/no-namespace\ndeclare namespace Data {\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n interface BaseDataContentBlock extends BaseContentBlock {\n mime_type?: string;\n metadata?: Record<string, unknown>;\n }\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n interface URLContentBlock extends BaseDataContentBlock {\n type: \"image\" | \"audio\" | \"file\";\n source_type: \"url\";\n url: string;\n }\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n interface Base64ContentBlock extends BaseDataContentBlock {\n type: \"image\" | \"audio\" | \"file\";\n source_type: \"base64\";\n data: string;\n }\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n interface PlainTextContentBlock extends BaseDataContentBlock {\n type: \"file\" | \"text\";\n source_type: \"text\";\n text: string;\n }\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n interface IDContentBlock extends BaseDataContentBlock {\n type: \"image\" | \"audio\" | \"file\";\n source_type: \"id\";\n id: string;\n }\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Standard} instead\n */\n type DataContentBlock = URLContentBlock | Base64ContentBlock | PlainTextContentBlock | IDContentBlock;\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Standard} instead\n */\n type StandardImageBlock = (URLContentBlock | Base64ContentBlock | IDContentBlock) & {\n type: \"image\";\n };\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Standard} instead\n */\n type StandardAudioBlock = (URLContentBlock | Base64ContentBlock | IDContentBlock) & {\n type: \"audio\";\n };\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Standard} instead\n */\n type StandardFileBlock = (URLContentBlock | Base64ContentBlock | IDContentBlock | PlainTextContentBlock) & {\n type: \"file\";\n };\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Standard} instead\n */\n type StandardTextBlock = PlainTextContentBlock & {\n type: \"text\";\n };\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n type DataContentBlockType = DataContentBlock[\"type\"];\n}\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function isDataContentBlock(content_block: object): content_block is Data.DataContentBlock;\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function isURLContentBlock(content_block: object): content_block is Data.URLContentBlock;\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function isBase64ContentBlock(content_block: object): content_block is Data.Base64ContentBlock;\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function isPlainTextContentBlock(content_block: object): content_block is Data.PlainTextContentBlock;\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function isIDContentBlock(content_block: object): content_block is Data.IDContentBlock;\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function convertToOpenAIImageBlock(content_block: Data.URLContentBlock | Data.Base64ContentBlock): {\n type: string;\n image_url: {\n url: string;\n };\n};\n/**\n * Utility function for ChatModelProviders. Parses a mime type into a type, subtype, and parameters.\n *\n * @param mime_type - The mime type to parse.\n * @returns An object containing the type, subtype, and parameters.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function parseMimeType(mime_type: string): {\n type: string;\n subtype: string;\n parameters: Record<string, string>;\n};\n/**\n * Utility function for ChatModelProviders. Parses a base64 data URL into a typed array or string.\n *\n * @param dataUrl - The base64 data URL to parse.\n * @param asTypedArray - Whether to return the data as a typed array.\n * @returns An object containing the parsed data and mime type, or undefined if the data URL is invalid.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function parseBase64DataUrl({\n dataUrl,\n asTypedArray\n}: {\n dataUrl: string;\n asTypedArray: true;\n}): {\n data: Uint8Array;\n mime_type: string;\n} | undefined;\n/**\n * Utility function for ChatModelProviders. Parses a base64 data URL into a typed array or string.\n *\n * @param dataUrl - The base64 data URL to parse.\n * @param asTypedArray - Whether to return the data as a typed array.\n * @returns The parsed data and mime type, or undefined if the data URL is invalid.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function parseBase64DataUrl({\n dataUrl,\n asTypedArray\n}: {\n dataUrl: string;\n asTypedArray?: false;\n}): {\n data: string;\n mime_type: string;\n} | undefined;\n/**\n * A bag of provider-specific content block types.\n *\n * Allows implementations of {@link StandardContentBlockConverter} and related to be defined only in\n * terms of the types they support. Also allows for forward compatibility as the set of known\n * standard types grows, as the set of types can be extended without breaking existing\n * implementations of the aforementioned interfaces.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ntype ProviderFormatTypes<TextFormat = unknown, ImageFormat = unknown, AudioFormat = unknown, FileFormat = unknown, VideoFormat = unknown> = {\n text: TextFormat;\n image: ImageFormat;\n audio: AudioFormat;\n file: FileFormat;\n video: VideoFormat;\n};\n/**\n * Utility interface for converting between standard and provider-specific data content blocks, to be\n * used when implementing chat model providers.\n *\n * Meant to be used with {@link convertToProviderContentBlock} and\n * {@link convertToStandardContentBlock} rather than being consumed directly.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ninterface StandardContentBlockConverter<Formats extends Partial<ProviderFormatTypes>> {\n /**\n * The name of the provider type that corresponds to the provider-specific content block types\n * that this converter supports.\n */\n providerName: string;\n /**\n * Convert from a standard image block to a provider's proprietary image block format.\n * @param block - The standard image block to convert.\n * @returns The provider image block.\n */\n fromStandardImageBlock?(block: Data.StandardImageBlock): Formats[\"image\"];\n /**\n * Convert from a standard audio block to a provider's proprietary audio block format.\n * @param block - The standard audio block to convert.\n * @returns The provider audio block.\n */\n fromStandardAudioBlock?(block: Data.StandardAudioBlock): Formats[\"audio\"];\n /**\n * Convert from a standard file block to a provider's proprietary file block format.\n * @param block - The standard file block to convert.\n * @returns The provider file block.\n */\n fromStandardFileBlock?(block: Data.StandardFileBlock): Formats[\"file\"];\n /**\n * Convert from a standard text block to a provider's proprietary text block format.\n * @param block - The standard text block to convert.\n * @returns The provider text block.\n */\n fromStandardTextBlock?(block: Data.StandardTextBlock): Formats[\"text\"];\n}\n/**\n * Convert from a standard data content block to a provider's proprietary data content block format.\n *\n * Don't override this method. Instead, override the more specific conversion methods and use this\n * method unmodified.\n *\n * @param block - The standard data content block to convert.\n * @returns The provider data content block.\n * @throws An error if the standard data content block type is not supported.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function convertToProviderContentBlock<Formats extends Partial<ProviderFormatTypes>>(block: Data.DataContentBlock, converter: StandardContentBlockConverter<Formats>): Formats[keyof Formats];\n//#endregion\nexport { Data, ImageDetail, MessageContentComplex, MessageContentImageUrl, MessageContentText, ProviderFormatTypes, StandardContentBlockConverter, convertToOpenAIImageBlock, convertToProviderContentBlock, isBase64ContentBlock, isDataContentBlock, isIDContentBlock, isPlainTextContentBlock, isURLContentBlock, parseBase64DataUrl, parseMimeType };\n//# sourceMappingURL=data.d.ts.map"],"mappings":";;;;KAyCKM,IAAAA;;kBAEaA,IAAAA;;;;;yCAKuBN;;eAE1BK;;;;;;oCAMqBE;;;;;;;;;uCASGA;;;;;;;;;0CASGA;;;;;;;;;mCASPA;;;;;;;;;0BASTC,kBAAkBC,qBAAqBC,wBAAwBC;;;;;6BAK5DH,kBAAkBC,qBAAqBE;;;;;;;6BAOvCH,kBAAkBC,qBAAqBE;;;;;;;4BAOxCH,kBAAkBC,qBAAqBE,iBAAiBD;;;;;;;2BAOzDA;;;;;;;8BAOGE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":["BaseContentBlock","Tools","Multimodal","Data","ContentBlock","KNOWN_BLOCK_TYPES","Citation","Array","Record","TValue","Text","Reasoning","NonStandard","Standard"],"sources":["../../../../../../langchain-core/dist/messages/content/index.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\nimport { Tools } from \"./tools.js\";\nimport { Multimodal } from \"./multimodal.js\";\nimport { Data } from \"./data.js\";\n\n//#region src/messages/content/index.d.ts\ninterface ContentBlock extends BaseContentBlock {}\ndeclare const KNOWN_BLOCK_TYPES: string[];\n// eslint-disable-next-line @typescript-eslint/no-namespace\ndeclare namespace ContentBlock {\n /**\n * Annotation for citing data from a document.\n */\n export interface Citation {\n /**\n * Type of the content block\n */\n readonly type: \"citation\";\n /**\n * Source type for the citation.\n */\n source?: string;\n /**\n * URL of the document source\n */\n url?: string;\n /**\n * Source document title.\n *\n * For example, the page title for a web page or the title of a paper.\n */\n title?: string;\n /**\n * Start index of the **response text** for which the annotation applies.\n *\n * @see {Text}\n */\n startIndex?: number;\n /**\n * End index of the **response text** for which the annotation applies.\n *\n * @see {Text}\n */\n endIndex?: number;\n /**\n * Excerpt of source text being cited.\n */\n citedText?: string;\n }\n /**\n * Text output from a LLM.\n *\n * This typically represents the main text content of a message, such as the response\n * from a language model or the text of a user message.\n */\n export interface Text extends ContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"text\";\n /**\n * Block text.\n */\n text: string;\n /**\n * Index of block in aggregate response. Used during streaming.\n */\n index?: number;\n /**\n * Citations and other annotations.\n */\n annotations?: Array<Citation | BaseContentBlock>;\n }\n /**\n * Reasoning output from a LLM.\n */\n export interface Reasoning extends ContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"reasoning\";\n /**\n * Reasoning text.\n *\n * Either the thought summary or the raw reasoning text itself.\n * This is often parsed from `<think>` tags in the model's response.\n */\n reasoning: string;\n /**\n * Index of block in aggregate response. Used during streaming.\n */\n index?: number;\n }\n /**\n * Provider-specific content block.\n *\n * This is used to represent content blocks that are not part of the standard LangChain content model.\n * If a provider's non-standard output includes reasoning and tool calls, it should be\n * the adapter's job to parse that payload and emit the corresponding standard reasoning and tool call blocks.\n */\n export interface NonStandard<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TValue extends Record<string, any> = Record<string, any>> extends ContentBlock {\n /**\n * Type of the content block\n */\n type: \"non_standard\";\n /**\n * Provider-specific data\n */\n value: TValue;\n }\n export { Tools };\n export { Multimodal };\n export { Data };\n export type Standard = Text | Reasoning | NonStandard | Tools.Standard | Multimodal.Standard;\n}\n//#endregion\nexport { ContentBlock, KNOWN_BLOCK_TYPES };\n//# sourceMappingURL=index.d.ts.map"],"mappings":";;;;;;;AAGiC,UAGvBI,YAAAA,SAAqBJ,gBAAgB,CAAA,CAAA;;kBAG7BI,YAAAA,CA8DME;EAAQ;;;EAhBY,OAqBPF,UAAAA,QAAAA,CAAAA;IAAY;;;IAkChC,SARmDA,IAAAA,EAAAA,UAAAA;IAAY;;;IAYjE,MACUM,CAAAA,EAAAA,MAAAA;IAAI;;;IAA2C,GAAGR,CAAAA,EAAAA,MAAAA;IAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA5D9DE;;;;;;;;;;;;;;;;kBAgBdG,MAAMD,WAAWN;;;;;qCAKEI;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BpBI,sBAAsBA,6BAA6BJ;;;;;;;;WAQzDK;;WAEAR;WACAC;WACAC;yBACcO,OAAOC,YAAYC,cAAcX,KAAAA,CAAMY,WAAWX,UAAAA,CAAWW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multimodal.d.cts","names":["BaseContentBlock","Multimodal","BaseDataRecord","Uint8Array","DataRecordFileId","DataRecordUrl","DataRecordBase64","Record","DataRecord","TMetadata","Data","Image","Video","Audio","PlainText","File"],"sources":["../../../../../../langchain-core/dist/messages/content/multimodal.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\n\n//#region src/messages/content/multimodal.d.ts\ntype Multimodal = never;\n// eslint-disable-next-line @typescript-eslint/no-namespace\ndeclare namespace Multimodal {\n type BaseDataRecord = {\n /**\n * MIME type of the file.\n *\n * @see https://www.iana.org/assignments/media-types/media-types.xhtml#image\n */\n mimeType?: string | undefined;\n };\n type DataRecordFileId = BaseDataRecord & {\n /**\n * ID of the data file, e.g. from a provider's file api\n */\n fileId: string;\n url?: never;\n data?: never;\n };\n type DataRecordUrl = BaseDataRecord & {\n fileId?: never;\n /**\n * URL of the data file\n */\n url: string;\n data?: never;\n };\n type DataRecordBase64 = BaseDataRecord & {\n fileId?: never;\n url?: never;\n /**\n * MIME type of the file. Required for base64 encoding.\n *\n * @see https://www.iana.org/assignments/media-types/media-types.xhtml#image\n */\n mimeType: string;\n /**\n * Base64 encoded string or binary data of the data\n */\n data: string | Uint8Array;\n };\n type DataRecord = DataRecordFileId | DataRecordUrl | DataRecordBase64;\n /** Content block for multimodal data */\n type Data<TMetadata = Record<string, unknown>> = BaseContentBlock & DataRecord & {\n /**\n * MIME type of the file. Required for base64 encoding.\n */\n mimeType?: string;\n /**\n * Metadata of the file\n */\n metadata?: TMetadata;\n /**\n * Content block identifier for multimodal content, e.g. image, video, audio, file or plain text. This can be either:\n * - generated by the provider (e.g., an OpenAI block ID)\n * - generated by LangChain upon creation\n */\n id?: string;\n };\n /** Content block for image data */\n type Image = Data & {\n /** Type of the content block */\n readonly type: \"image\";\n };\n /** Content block for video data */\n type Video = Data & {\n /** Type of the content block */\n readonly type: \"video\";\n };\n /** Content block for audio data */\n type Audio = Data & {\n /** Type of the content block */\n readonly type: \"audio\";\n };\n /** Content block for plain text data */\n type PlainText = Data & {\n /** Type of the content block */\n readonly type: \"text-plain\";\n /**\n * Plaintext content. This is optional if the data is base64 encoded.\n */\n text?: string;\n /**\n * Title of the file, e.g. the title of a document\n */\n title?: string;\n /**\n * Context for the text, e.g. a description or a summary of the text's content\n */\n context?: string;\n };\n /** Content block for file data */\n type File = Data & {\n /**\n * Non-descript multimodal content block\n *\n * This block is intended for files that aren't covered by existing content block types.\n */\n readonly type: \"file\";\n };\n type Standard = Image | Video | Audio | PlainText | File;\n}\n//#endregion\nexport { Multimodal };\n//# sourceMappingURL=multimodal.d.ts.map"],"mappings":";;;;AAA6C,KAGxCC,UAAAA,GAAU,KAAA;AAAA;kBAEGA,UAAAA,CAAU;EAAA,KASFC,cAAAA,GAAAA;IAAc;;;;;IA8BY,QAAGI,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA;EAAgB,CAAA;EAEzC,KAAqBN,gBAAAA,GAhCzBE,cAgCyBF,GAAAA;IAAgB;;;IAiBhD,MAKJU,EAAAA,MAAAA;IAAI,GAKJA,CAAAA,EAAAA,KAAAA;IAAI,IAKAA,CAAAA,EAAAA,KAAAA;EAAI,CAAA;EAiBL,KAQAC,aAAAA,GAjFKT,cAiFLS,GAAAA;IAAK,MAAGC,CAAAA,EAAAA,KAAAA;IAAK;;;IAA2B,GAAA,EAAA,MAAA;;;0BAzEhCV;;;;;;;;;;;;mBAYPC;;oBAECC,mBAAmBC,gBAAgBC;;wBAE/BC,2BAA2BP,mBAAmBQ;;;;;;;;eAQvDC;;;;;;;;;eASAC;;;;;eAKAA;;;;;eAKAA;;;;;mBAKIA;;;;;;;;;;;;;;;;;cAiBLA;;;;;;;;kBAQIC,QAAQC,QAAQC,QAAQC,YAAYC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.cts","names":["BaseContentBlock","Tools","TName","TArgs","Record","TOutput","ToolCall","ToolCallChunk","InvalidToolCall","ServerToolCall","ServerToolCallChunk","ServerToolCallResult"],"sources":["../../../../../../langchain-core/dist/messages/content/tools.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\n\n//#region src/messages/content/tools.d.ts\ntype Tools = never;\n// eslint-disable-next-line @typescript-eslint/no-namespace\ndeclare namespace Tools {\n /**\n * Represents a request to call a tool.\n *\n * @example\n * ```ts\n * const toolCall: ToolCall = {\n * type: \"tool_call\",\n * name: \"foo\",\n * args: { a: 1 },\n * callId: \"123\"\n * };\n * ```\n * This represents a request to call the tool named \"foo\" with arguments {\"a\": 1}\n * and an identifier of \"123\".\n */\n interface ToolCall<TName extends string = string, TArgs = unknown> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"tool_call\";\n /**\n * The name of the tool being called\n */\n name: TName;\n /**\n * The arguments to the tool call\n */\n args: TArgs;\n }\n /** Content block to represent partial data of a tool call */\n interface ToolCallChunk<TName extends string = string> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"tool_call_chunk\";\n /**\n * The name of the tool being called\n */\n name?: TName;\n /**\n * The arguments to the tool call\n */\n args?: string;\n /**\n * The index of the tool call chunk\n */\n index?: number;\n }\n /** Content block to represent an invalid tool call */\n interface InvalidToolCall<TName extends string = string> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"invalid_tool_call\";\n /**\n * The name of the tool being called\n */\n name?: TName;\n /**\n * The arguments to the tool call\n */\n args?: string;\n /**\n * An error message associated with the tool call\n */\n error?: string;\n /**\n * Index of block in aggregate response\n */\n index?: string | number;\n }\n interface ServerToolCall<TName extends string = string, TArgs = unknown> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"server_tool_call\";\n /**\n * The name of the tool being called\n */\n name: TName;\n /**\n * The arguments to the tool call\n */\n args: TArgs;\n }\n interface ServerToolCallChunk<TName extends string = string> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"server_tool_call_chunk\";\n /**\n * The name of the tool being called\n */\n name?: TName;\n /**\n * The arguments to the tool call\n */\n args?: string;\n }\n interface ServerToolCallResult<TOutput = Record<string, unknown>> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"server_tool_call_result\";\n /**\n * The unique identifier of the tool call that this result corresponds to\n */\n toolCallId: string;\n /**\n * The status of the server tool call\n */\n status: \"success\" | \"error\";\n /**\n * The output of the server tool call\n */\n output: TOutput;\n }\n type Standard = ToolCall | ToolCallChunk | InvalidToolCall | ServerToolCall | ServerToolCallChunk | ServerToolCallResult;\n}\n//#endregion\nexport { Tools };\n//# sourceMappingURL=tools.d.ts.map"],"mappings":";;;;AAA6C,KAGxCC,KAAAA,GAAK,KAAA;AAAA;kBAEQA,KAAAA,CAAK;EAAA;;;;;;;;;;;;;;;EAoGqE,UAkB1EK,QAAAA,CAAAA,cAAAA,MAAAA,GAAAA,MAAAA,EAAAA,QAAAA,OAAAA,CAAAA,SAtG2DN,gBAsG3DM,CAAAA;IAAQ;;;IAAmD,SAAGI,IAAAA,EAAAA,WAAAA;IAAmB;AAAuB;;UA9FhHR;;;;UAIAC;;;iEAGuDH;;;;;;;;WAQtDE;;;;;;;;;;;mEAWwDF;;;;;;;;WAQxDE;;;;;;;;;;;;;;mFAcwEF;;;;;;;;UAQzEE;;;;UAIAC;;uEAE6DH;;;;;;;;WAQ5DE;;;;;;2CAMgCE,iCAAiCJ;;;;;;;;;;;;;;;;YAgBhEK;;kBAEMC,WAAWC,gBAAgBC,kBAAkBC,iBAAiBC,sBAAsBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.cts","names":["MessageStringFormat"],"sources":["../../../../../langchain-core/dist/messages/format.d.ts"],"sourcesContent":["//#region src/messages/format.d.ts\ntype MessageStringFormat = \"pretty\";\n//#endregion\nexport { MessageStringFormat };\n//# sourceMappingURL=format.d.ts.map"],"mappings":";;KACKA,mBAAAA,GAAmB,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.cts","names":["ContentBlock","ResponseMetadata","UsageMetadata","$MergeDiscriminatedUnion","$MergeObjects","MessageType","NonNullable","MessageOutputVersion","MessageToolDefinition","TInput","TOutput","MessageToolSet","$MessageToolCallBlock","MessageStructure","TStructure","K","Tools","ToolCall","Partial","Record","$NormalizeMessageOutputVersion","T","Extract","$MergeOutputVersion","U","TV","UV","Exclude","$MergeContentDefinition","$MergeMessageStructure","StandardMessageStructure","Text","$NormalizedMessageStructure","$InferMessageContentBlocks","S","C","PropertyKey","TRole","$InferMessageContent","Array","$InferMessageProperties","P","Omit","$InferMessageProperty","$InferResponseMetadata","Message","isMessage"],"sources":["../../../../../langchain-core/dist/messages/message.d.ts"],"sourcesContent":["import { ContentBlock } from \"./content/index.js\";\nimport { ResponseMetadata, UsageMetadata } from \"./metadata.js\";\nimport { $MergeDiscriminatedUnion, $MergeObjects } from \"./utils.js\";\n\n//#region src/messages/message.d.ts\n\n/**\n * Represents the possible types of messages in the system.\n * Includes standard message types (\"ai\", \"human\", \"tool\", \"system\")\n * and allows for custom string types that are non-null.\n *\n * @example\n * ```ts\n * // Standard message types\n * const messageType1: MessageType = \"ai\";\n * const messageType2: MessageType = \"human\";\n *\n * // Custom message type\n * const messageType3: MessageType = \"custom_type\";\n * ```\n */\ntype MessageType = \"ai\" | \"human\" | \"tool\" | \"system\" | (string & NonNullable<unknown>);\n/**\n * Represents the output version format for message content.\n *\n * This type determines how the content field is structured in a message:\n * - \"v0\": Content is represented as a simple string or array of content blocks\n * - provides backward compatibility with simpler content representations\n * - \"v1\": Content follows the structured ContentBlock format with typed discriminated unions\n * - enables full type safety and structured content block handling\n *\n * @example\n * ```ts\n * // v0 format - simple content representation\n * const v0Message: Message<{ outputVersion: \"v0\", content: ... }> = {\n * type: \"human\",\n * content: \"Hello world\" // string | Array<ContentBlock | ContentBlock.Text>\n * };\n *\n * // v1 format - structured content blocks\n * const v1Message: Message<{ outputVersion: \"v1\", content: ... }> = {\n * type: \"human\",\n * content: [\n * { type: \"text\", text: \"Hello world\" },\n * { type: \"image\", image_url: \"...\" }\n * ] // Array<ContentBlock | ...> (determined by the structure)\n * };\n * ```\n */\ntype MessageOutputVersion = \"v0\" | \"v1\";\n/**\n * Represents the input and output types of a tool that can be used in messages.\n *\n * @template TInput - The type of input the tool accepts.\n * @template TOutput - The type of output the tool produces.\n *\n * @example\n * ```ts\n * // Tool that takes a string input and returns a number\n * interface StringToNumberTool extends MessageToolDefinition<string, number> {\n * input: string;\n * output: number;\n * }\n * ```\n */\ninterface MessageToolDefinition<TInput = unknown, TOutput = unknown> {\n input: TInput;\n output: TOutput;\n}\n/**\n * Represents a structured set of tools by mapping tool names to definitions\n * that can be used in messages.\n *\n * @example\n * ```ts\n * interface MyToolSet extends MessageToolSet {\n * calculator: MessageToolDefinition<\n * { operation: string; numbers: number[] },\n * number\n * >;\n * translator: MessageToolDefinition<\n * { text: string; targetLanguage: string },\n * string\n * >;\n * }\n * ```\n */\ninterface MessageToolSet {\n [key: string]: MessageToolDefinition;\n}\n/**\n * Represents a tool call block within a message structure by mapping tool names to their\n * corresponding tool call formats, including the input arguments and an optional identifier.\n *\n * @template TStructure - A message structure type that may contain tool definitions\n *\n * @example\n * ```ts\n * // Given a message structure with a calculator tool:\n * interface MyStructure extends MessageStructure {\n * tools: {\n * calculator: MessageToolDefinition<{ operation: string, numbers: number[] }, number>\n * }\n * }\n *\n * // The tool call block would be:\n * type CalcToolCall = $MessageToolCallBlock<MyStructure>;\n * // Resolves to:\n * // {\n * // type: \"tool_call\";\n * // name: \"calculator\";\n * // args: { operation: string, numbers: number[] };\n * // id?: string;\n * // }\n * ```\n */\ntype $MessageToolCallBlock<TStructure extends MessageStructure> = TStructure[\"tools\"] extends MessageToolSet ? { [K in keyof TStructure[\"tools\"]]: K extends string ? TStructure[\"tools\"][K] extends MessageToolDefinition ? ContentBlock.Tools.ToolCall<K, TStructure[\"tools\"][K][\"input\"]> : never : never }[keyof TStructure[\"tools\"]] : never;\n/**\n * Core interface that defines the structure of messages.\n *\n * @example\n * ```ts\n * // Basic message structure with just content blocks\n * interface SimpleMessageStructure extends MessageStructure {\n * content: {\n * human: ContentBlock.Text;\n * // allows for text + reasoning blocks in ai messages\n * ai: ContentBlock.Text | ContentBlock.Reasoning;\n * }\n * }\n *\n * // Message structure with tools and properties\n * interface AdvancedMessageStructure extends MessageStructure {\n * tools: {\n * calculator: MessageToolDefinition<\n * { operation: string; numbers: number[] },\n * number\n * >;\n * };\n * content: {\n * // allows for text + image blocks in human messages\n * human: ContentBlock.Text | ContentBlock.Multimodal.Image;\n * // only allows for text blocks in ai messages\n * ai: ContentBlock.Text;\n * };\n * properties: {\n * // pins properties to ai messages\n * ai: {\n * response_metadata: {\n * confidence: number;\n * model: string;\n * };\n * };\n * }\n * }\n *\n * // Using with $MergeMessageStructure to combine structures\n * // The resulting type when passed into BaseMessage will have a calculator tool,\n * // allow for text + image blocks in human messages,\n * // and text + reasoning blocks + additional arbitrary properties in ai messages.\n * type CombinedStructure = $MergeMessageStructure<\n * SimpleMessageStructure,\n * AdvancedMessageStructure\n * >;\n *\n * // Using in a Message object\n * const message: Message<CombinedStructure> = {\n * id: \"msg-123\",\n * type: \"human\",\n * content: [\n * { type: \"text\", text: \"Hello!\" }\n * { type: \"image\", mimeType: \"image/jpeg\", url: \"https://example.com/image.jpg\" }\n * // this block will throw an error because it's not defined in the structure\n * { type: \"reasoning\", reasoning: \"The answer is 42\" }\n * ]\n * };\n * ```\n */\ninterface MessageStructure {\n /**\n * Optional output version for the message structure.\n * If not provided, defaults to \"v0\".\n */\n readonly outputVersion?: MessageOutputVersion;\n /**\n * Optional set of tool definitions that can be used in messages.\n * Each tool is defined with input/output types and can be referenced in tool messages.\n */\n readonly tools?: MessageToolSet;\n /**\n * Optional mapping of message types to their allowed content blocks.\n * Each message type can specify what content block types it supports (text, images, etc).\n */\n readonly content?: Partial<{ [key in MessageType]: ContentBlock }>;\n /**\n * Optional mapping of message types to arbitrary property objects.\n * Allows attaching custom metadata or other information to specific message types.\n */\n readonly properties?: Partial<{ [key in MessageType]: Record<string, unknown> }>;\n}\n/**\n * Normalizes an arbitrary type to a message output version or undefined.\n * Accepts unknown and narrows to a valid MessageOutputVersion if present.\n */\ntype $NormalizeMessageOutputVersion<T> = Extract<T, MessageOutputVersion> | undefined;\n/**\n * Merges two output version types from message structures.\n *\n * This utility type determines the resulting output version when combining two message structures.\n * The merge logic follows these rules:\n *\n * - If both T and U are undefined, defaults to \"v0\" for backwards compatibility\n * - If T is undefined but U is defined, uses U's version\n * - If U is undefined but T is defined, uses T's version\n * - If both T and U are defined, U takes precedence (later structure wins)\n *\n * @template T - The output version from the first message structure\n * @template U - The output version from the second message structure\n *\n * @example\n * ```ts\n * // Both undefined - defaults to \"v0\"\n * type Result1 = $MergeOutputVersion<undefined, undefined>; // \"v0\"\n *\n * // One defined - uses the defined version\n * type Result2 = $MergeOutputVersion<undefined, \"v1\">; // \"v1\"\n * type Result3 = $MergeOutputVersion<\"v0\", undefined>; // \"v0\"\n *\n * // Both defined - second takes precedence\n * type Result4 = $MergeOutputVersion<\"v0\", \"v1\">; // \"v1\"\n * ```\n */\ntype $MergeOutputVersion<T, U> = $NormalizeMessageOutputVersion<T> extends infer TV ? $NormalizeMessageOutputVersion<U> extends infer UV ? [TV, UV] extends [undefined, undefined] ? \"v0\" : [TV] extends [undefined] ? Exclude<UV, undefined> : [UV] extends [undefined] ? Exclude<TV, undefined> : UV : never : never;\n/**\n * Merges two content definition objects from message structures.\n *\n * This utility type combines content definitions from two message structures, handling\n * the merging of content block types for each message type. The merge logic follows\n * these rules:\n *\n * - For keys that exist in both T and U: Merges the content blocks using discriminated\n * union merging based on the \"type\" property. This allows combining different content\n * block types (e.g., text + image) for the same message type.\n * - For keys that exist only in T: Uses T's content definition as-is\n * - For keys that exist only in U: Uses U's content definition as-is\n *\n * @template T - The content definition from the first message structure\n * @template U - The content definition from the second message structure\n *\n * @example\n * ```ts\n * // T allows text content for human messages\n * type ContentA = {\n * human: ContentBlock.Text;\n * };\n *\n * // U allows image content for human messages and text for AI messages\n * type ContentB = {\n * human: ContentBlock.Multimodal.Image;\n * ai: ContentBlock.Text;\n * };\n *\n * // Merged result allows both text and images for human messages, text for AI\n * type Merged = $MergeContentDefinition<ContentA, ContentB>;\n * // Result: {\n * // human: ContentBlock.Text | ContentBlock.Multimodal.Image;\n * // ai: ContentBlock.Text;\n * // }\n * ```\n */\ntype $MergeContentDefinition<T, U> = { [K in keyof T | keyof U as Extract<(K extends keyof T ? T[K] : never) | (K extends keyof U ? U[K] : never), ContentBlock> extends never ? never : K]: K extends keyof T ? K extends keyof U ? $MergeDiscriminatedUnion<Extract<T[K], ContentBlock>, Extract<U[K], ContentBlock>, \"type\"> : Extract<T[K], ContentBlock> : K extends keyof U ? Extract<U[K], ContentBlock> : never };\n/**\n * Merges two message structures A and B into a combined structure.\n * This is a type utility that handles merging of tools, content blocks, and properties\n * from two message structures. The resulting type is usable as its own message structure.\n *\n * @example\n * ```ts\n * // Structure A allows text in human messages and has a confidence property on AI messages\n * interface StructureA extends MessageStructure {\n * content: {\n * human: ContentBlock.Text;\n * };\n * properties: {\n * ai: { confidence: number };\n * }\n * }\n *\n * // Structure B allows images in human messages and has a model property on AI messages\n * interface StructureB extends MessageStructure {\n * content: {\n * human: ContentBlock.Multimodal.Image;\n * };\n * properties: {\n * ai: { model: string };\n * }\n * }\n *\n * // Merged structure allows both text and images in human messages\n * // AI messages have both confidence and model properties\n * type Merged = $MergeMessageStructure<StructureA, StructureB>;\n * ```\n *\n * @template A - First message structure to merge\n * @template B - Second message structure to merge (takes precedence over A)\n */\ntype $MergeMessageStructure<T extends MessageStructure, U extends MessageStructure> = {\n outputVersion: $MergeOutputVersion<T[\"outputVersion\"], U[\"outputVersion\"]>;\n tools: $MergeObjects<T[\"tools\"], U[\"tools\"]>;\n content: $MergeContentDefinition<T[\"content\"], U[\"content\"]>;\n properties: $MergeObjects<T[\"properties\"], U[\"properties\"]>;\n};\n/**\n * Standard message structured used to define the most basic message structure that's\n * used throughout the library.\n *\n * This is also the message structure that's used when a message structure is not provided.\n */\ninterface StandardMessageStructure extends MessageStructure {\n content: {\n /** Text content for AI messages */\n ai: ContentBlock.Text;\n /** Text content for human messages */\n human: ContentBlock.Text;\n /** Text content for system messages */\n system: ContentBlock.Text;\n /** Text content for tool messages */\n tool: ContentBlock.Text;\n };\n properties: {\n /** Properties specific to AI messages */\n ai: {\n /** Metadata about the AI model response */\n response_metadata: ResponseMetadata;\n /** Usage statistics for the AI response */\n usage_metadata: UsageMetadata;\n };\n human: {\n /** Metadata about the human message */\n response_metadata: Record<string, unknown>;\n };\n system: {\n /** Metadata about the system message */\n response_metadata: Record<string, unknown>;\n };\n tool: {\n /** Metadata about the tool message */\n response_metadata: Record<string, unknown>;\n };\n };\n}\n/**\n * Takes a message structure type T and normalizes it by merging it with the standard message structure.\n * If T is already a standard message structure, returns T unchanged.\n *\n * This ensures that any custom message structure includes all the standard message structure fields\n * by default while allowing overrides and extensions.\n *\n * @template T - The message structure type to normalize, must extend MessageStructure\n * @returns Either T if it's already a standard structure, or the merged result of T with standard structure\n */\ntype $NormalizedMessageStructure<T extends MessageStructure> = T extends StandardMessageStructure ? T : $MergeMessageStructure<StandardMessageStructure, T>;\n/**\n * Infers the content blocks for a specific message type in a message structure.\n *\n * This utility type extracts the content block type that corresponds to a given message type\n * from the message structure's content definition.\n *\n * @template TStructure - The message structure to infer content from\n * @template TRole - The message role/type to get content for (e.g., \"ai\", \"human\", \"system\", \"tool\")\n * @returns The content block type for the specified type, or never if its not defined in the structure\n *\n * @example\n * ```ts\n * interface MyStructure extends MessageStructure {\n * content: {\n * human: ContentBlock.Text;\n * ai: ContentBlock.Text | ContentBlock.ToolCall;\n * };\n * }\n *\n * type HumanContent = $InferMessageContentBlocks<MyStructure, \"human\">;\n * // HumanContent = ContentBlock.Text\n *\n * type AIContent = $InferMessageContentBlocks<MyStructure, \"ai\">;\n * // AIContent = ContentBlock.Text | ContentBlock.ToolCall\n * ```\n */\ntype $InferMessageContentBlocks<TStructure extends MessageStructure, TRole extends MessageType> = $NormalizedMessageStructure<TStructure> extends infer S ? S extends MessageStructure ? S[\"content\"] extends infer C ? C extends Record<PropertyKey, ContentBlock> ? TRole extends keyof C ? [$MessageToolCallBlock<TStructure>] extends [never] ? C[TRole] : $MergeDiscriminatedUnion<NonNullable<C[TRole]>, $MessageToolCallBlock<TStructure>, \"type\"> : never : never : never : never : never;\n/**\n * Infers the content type for a specific message type from a message structure.\n *\n * This utility type determines the appropriate content type based on the message structure's\n * output version and the specified message type. The content type varies depending on the\n * output version (see {@link MessageOutputVersion})\n *\n * @template TStructure - The message structure to infer content from\n * @template TRole - The message role/type to get content for (e.g., \"ai\", \"human\", \"system\", \"tool\")\n * @returns The content type for the specified role based on the output version\n *\n * @example\n * ```ts\n * interface MyStructure extends MessageStructure {\n * outputVersion: \"v0\";\n * content: {\n * human: ContentBlock.Text;\n * ai: ContentBlock.Text | ContentBlock.ToolCall;\n * };\n * }\n *\n * type HumanContentV0 = $InferMessageContent<MyStructure, \"human\">;\n * // HumanContentV0 = string | Array<ContentBlock | ContentBlock.Text>\n *\n * interface MyStructureV1 extends MessageStructure {\n * outputVersion: \"v1\";\n * content: {\n * human: ContentBlock.Text;\n * ai: ContentBlock.Text | ContentBlock.Reasoning;\n * };\n * }\n *\n * type HumanContentV1 = $InferMessageContent<MyStructureV1, \"human\">;\n * // HumanContentV1 = ContentBlock.Text\n *\n * type AIContentV1 = $InferMessageContent<MyStructureV1, \"ai\">;\n * // AIContentV1 = ContentBlock.Text | ContentBlock.Reasoning\n * ```\n */\ntype $InferMessageContent<TStructure extends MessageStructure, TRole extends MessageType> = TStructure[\"outputVersion\"] extends \"v1\" ? Array<$InferMessageContentBlocks<TStructure, TRole>> : string | Array<ContentBlock | ContentBlock.Text>;\n/**\n * Infers the properties for a specific message type from a message structure.\n *\n * This utility type extracts the properties object that corresponds to a given message type\n * from the message structure's properties definition, and excludes the reserved\n * \"content\" and \"type\" properties to avoid conflicts with the core message structure.\n *\n * If the specified type is not defined in the message structure's properties, it returns\n * a generic Record<string, unknown> type to allow for arbitrary properties.\n *\n * @template TStructure - The message structure to infer properties from\n * @template TRole - The message type/role to get properties for (e.g., \"ai\", \"human\", \"system\", \"tool\")\n * @returns The properties object type for the specified type, excluding \"content\" and \"type\"\n *\n * @example\n * ```ts\n * interface MyStructure extends MessageStructure {\n * properties: {\n * ai: {\n * response_metadata: { model: string };\n * usage_metadata: { tokens: number };\n * content: string; // This will be omitted\n * type: string; // This will be omitted\n * };\n * human: { metadata: Record<string, unknown> };\n * };\n * }\n *\n * type AIProperties = $InferMessageProperties<MyStructure, \"ai\">;\n * // AIProperties = { response_metadata: { model: string }; usage_metadata: { tokens: number } }\n *\n * type HumanProperties = $InferMessageProperties<MyStructure, \"human\">;\n * // HumanProperties = { metadata: Record<string, unknown> }\n *\n * type SystemProperties = $InferMessageProperties<MyStructure, \"system\">;\n * // SystemProperties = Record<string, unknown> (fallback for undefined role)\n * ```\n */\ntype $InferMessageProperties<TStructure extends MessageStructure, TRole extends MessageType> = $NormalizedMessageStructure<TStructure> extends infer S ? S extends MessageStructure ? S[\"properties\"] extends infer P | undefined ? P extends Record<PropertyKey, unknown> ? TRole extends keyof P ? Omit<P[TRole], \"content\" | \"type\"> : Record<string, unknown> : Record<string, unknown> : Record<string, unknown> : never : never;\n/**\n * Infers the type of a specific property for a message type from a message structure.\n *\n * This utility type extracts the type of a single property by name from the properties\n * object that corresponds to a given message type. If the specified property key does\n * not exist in the type's properties, it returns `never`.\n *\n * @template TStructure - The message structure to infer the property from\n * @template TRole - The message type/role to get the property for (e.g., \"ai\", \"human\", \"system\", \"tool\")\n * @template K - The property key to extract the type for\n * @returns The type of the specified property, or `never` if the property doesn't exist\n *\n * @example\n * ```ts\n * interface MyStructure extends MessageStructure {\n * properties: {\n * ai: {\n * response_metadata: { model: string; temperature: number };\n * usage_metadata: { input_tokens: number; output_tokens: number };\n * };\n * human: { metadata: Record<string, unknown> };\n * };\n * }\n *\n * type ResponseMetadata = $InferMessageProperty<MyStructure, \"ai\", \"response_metadata\">;\n * // ResponseMetadata = { model: string; temperature: number }\n *\n * type UsageMetadata = $InferMessageProperty<MyStructure, \"ai\", \"usage_metadata\">;\n * // UsageMetadata = { input_tokens: number; output_tokens: number }\n *\n * type NonExistentProperty = $InferMessageProperty<MyStructure, \"ai\", \"nonExistent\">;\n * // NonExistentProperty = Record<string, unknown>\n *\n * type HumanMetadata = $InferMessageProperty<MyStructure, \"human\", \"metadata\">;\n * // HumanMetadata = Record<string, unknown>\n * ```\n */\ntype $InferMessageProperty<TStructure extends MessageStructure, TRole extends MessageType, K extends string> = K extends keyof $InferMessageProperties<TStructure, TRole> ? $InferMessageProperties<TStructure, TRole>[K] : never;\n/**\n * Infers the response metadata type for a specific message type from a message structure.\n *\n * This utility type extracts the `response_metadata` property type for a given message type.\n *\n * @template TStructure - The message structure to infer the response metadata from\n * @template TRole - The message type/role to get the response metadata for (e.g., \"ai\", \"human\", \"system\", \"tool\")\n * @returns The type of the response_metadata property, or `Record<string, unknown>` as fallback\n *\n * @example\n * ```ts\n * interface MyStructure extends MessageStructure {\n * properties: {\n * ai: {\n * response_metadata: { model: string; temperature: number; tokens: number };\n * };\n * human: { metadata: Record<string, unknown> };\n * };\n * }\n *\n * type AIResponseMetadata = $InferResponseMetadata<MyStructure, \"ai\">;\n * // AIResponseMetadata = { model: string; temperature: number; tokens: number }\n *\n * type HumanResponseMetadata = $InferResponseMetadata<MyStructure, \"human\">;\n * // HumanResponseMetadata = Record<string, unknown> (fallback since not defined)\n * ```\n */\ntype $InferResponseMetadata<TStructure extends MessageStructure, TRole extends MessageType> = $InferMessageProperty<TStructure, TRole, \"response_metadata\"> extends infer P ? [P] extends [never] ? Record<string, unknown> : P : never;\n/**\n * Represents a message object that organizes context for an LLM.\n *\n * @example\n * ```ts\n * // Basic message with text content\n * const message: Message = {\n * id: \"msg-123\",\n * name: \"user\",\n * type: \"human\",\n * content: [{ type: \"text\", text: \"Hello!\" }]\n * };\n *\n * // Basic ai message interface extension\n * interface MyMessage extends Message<StandardMessageStructure, \"ai\"> {\n * // Additional AI-specific properties can be added here\n * }\n *`\n * // Custom message structure\n * interface CustomStructure extends MessageStructure {\n * content: {\n * ai: ContentBlock.Text | ContentBlock.ToolCall<\"search\", { query: string }>;\n * human: ContentBlock.Text | ContentBlock.Multimodal.Image;\n * };\n * }\n *\n * // Create a message with custom structure\n * const message: Message<CustomStructure> = {\n * id: \"msg-123\",\n * name: \"user\",\n * type: \"ai\",\n * content: [\n * { type: \"text\", text: \"Hello!\" },\n * {\n * type: \"tool_call\",\n * name: \"search\",\n * args: { query: \"What is the capital of France?\" }\n * }\n * ]\n * };\n * ```\n */\ninterface Message<TStructure extends MessageStructure = StandardMessageStructure, TRole extends MessageType = MessageType> {\n /** The message type/role */\n readonly type: TRole;\n /** Unique identifier for this message */\n id?: string;\n /** Optional name/identifier for the entity that created this message */\n name?: string;\n /** Array of content blocks that make up the message content */\n content: $InferMessageContent<TStructure, TRole>;\n /** Metadata about the message */\n response_metadata?: Partial<$InferResponseMetadata<TStructure, TRole>>;\n}\n/**\n * Type guard to check if a value is a valid Message object.\n *\n * @param message - The value to check\n * @returns true if the value is a valid Message object, false otherwise\n */\ndeclare function isMessage(message: unknown): message is Message;\n//#endregion\nexport { $InferMessageContent, $InferMessageContentBlocks, $InferMessageProperties, $InferMessageProperty, $InferResponseMetadata, $MergeContentDefinition, $MergeMessageStructure, $MergeOutputVersion, $MessageToolCallBlock, $NormalizedMessageStructure, Message, MessageOutputVersion, MessageStructure, MessageToolDefinition, MessageToolSet, MessageType, StandardMessageStructure, isMessage };\n//# sourceMappingURL=message.d.ts.map"],"mappings":";;;;;;;AAqB6E;AA4BpD;;;;AAkBR;AAAA;AAqBqB;;;;;;;;KAnEjCK,WAAAA,GA+FqLU,IAAAA,GAAAA,OAAAA,GAAAA,MAAAA,GAAAA,QAAAA,GAAAA,CAAAA,MAAAA,GA/FxHT,WA+FwHS,CAAAA,OAAAA,CAAAA,CAAAA;;;;;;;AAAqI;AAAA;;;;;;;;;;AAkFhS;AAAA;;;;;AAMiB;AAAA;;;KA3J3CR,oBAAAA,GAuL4Ba,IAAAA,GAAAA,IAAAA;;;;;;;;;;;;AAAqQ;AAAA;;;UAvK5RZ,qBA6MmDgB,CAAAA,SAAAA,OAAAA,EAAAA,UAAAA,OAAAA,CAAAA,CAAAA;EAAC,KAAaT,EA5MlEN,MA4MkEM;EAAC,MAAeM,EA3MjFX,OA2MiFW;;;;;;;;;;;;;;;;;;;;UAvLjFV,cAAAA,CAuL+RX;EAAY,CAAA,GAAA,EAA1BsB,MAAAA,CAAAA,EAtL1Qd,qBAsL0Qc;;;;;;;;;;;;AAAgG;AAAA;;;;;;;;;;;;;;;KA1JtXV,qBAkMSR,CAAAA,mBAlMgCS,gBAkMhCT,CAAAA,GAlMoDU,UAkMpDV,CAAAA,OAAAA,CAAAA,SAlMgFO,cAkMhFP,GAAAA,QAAAA,MAlM+GU,UAkM/GV,CAAAA,OAAAA,CAAAA,GAlMqIW,CAkMrIX,SAAAA,MAAAA,GAlMwJU,UAkMxJV,CAAAA,OAAAA,CAAAA,CAlM4KW,CAkM5KX,CAAAA,SAlMuLI,qBAkMvLJ,GAlM+MJ,YAAAA,CAAagB,KAAAA,CAAMC,QAkMlOb,CAlM2OW,CAkM3OX,EAlM8OU,UAkM9OV,CAAAA,OAAAA,CAAAA,CAlMkQW,CAkMlQX,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA,GAAAA,KAAAA,GAAAA,KAAAA,EAAAA,CAAAA,MAlMuSU,UAkMvSV,CAAAA,OAAAA,CAAAA,CAAAA,GAAAA,KAAAA;AAAa;AAAA;;;;;;;;;;;;AAQgC;AAAA;;;;;;;;;AA2CmE;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;AA2ByP;AAAA;;;;;;;;;;;UAlN7WS,gBAAAA,CA0P6L0B;EAAK;AAAA;;;EAuC5I,SAAgBlC,aAAAA,CAAAA,EA5RrDE,oBA4RqDF;EAAW;;;;EAAwF,SAAG6B,KAAAA,CAAAA,EAvRnKvB,cAuRmKuB;EAAC;;;;EAA2F,SAAeO,OAAAA,CAAAA,EAlR5QvB,OAkR4QuB,CAAAA,UAlR1PpC,WAkR0PoC,GAlR5OzC,YAkR4OyC,EAAAA,CAAAA;EAAC;;;;EAA8C,SAAoBtB,UAAAA,CAAAA,EA7Q5UD,OA6Q4UC,CAAAA,UA7Q1Td,WA6Q0Tc,GA7Q5SA,MA6Q4SA,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,EAAAA,CAAAA;;AAAgC;AAAA;;;KAvQ/XC,8BA6SyEf,CAAAA,CAAAA,CAAAA,GA7SrCiB,OA6SqCjB,CA7S7BgB,CA6S6BhB,EA7S1BE,oBA6S0BF,CAAAA,GAAAA,SAAAA;;;;;;;;;AAA0I;AAAA;;;;;;;;;;AA4BO;AAAA;;;;;;;KA7S1NkB,mBAgW2BT,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GAhWCM,8BAgWDN,CAhWgCO,CAgWhCP,CAAAA,SAAAA,KAAAA,GAAAA,GAhWsDM,8BAgWtDN,CAhWqFU,CAgWrFV,CAAAA,SAAAA,KAAAA,GAAAA,GAAAA,CAhW4GW,EAgW5GX,EAhWgHY,EAgWhHZ,CAAAA,SAAAA,CAAAA,SAAAA,EAAAA,SAAAA,CAAAA,GAAAA,IAAAA,GAAAA,CAhW6JW,EAgW7JX,CAAAA,SAAAA,CAAAA,SAAAA,CAAAA,GAhWuLa,OAgWvLb,CAhW+LY,EAgW/LZ,EAAAA,SAAAA,CAAAA,GAAAA,CAhWiNY,EAgWjNZ,CAAAA,SAAAA,CAAAA,SAAAA,CAAAA,GAhW2Oa,OAgW3Ob,CAhWmPW,EAgWnPX,EAAAA,SAAAA,CAAAA,GAhWoQY,EAgWpQZ,GAAAA,KAAAA,GAAAA,KAAAA;;;;;;;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA5TxBc,8CAA8CP,UAAUG,KAAKF,SAASP,gBAAgBM,IAAIA,EAAEN,eAAeA,gBAAgBS,IAAIA,EAAET,aAAaf,sCAAsCe,IAAIA,gBAAgBM,IAAIN,gBAAgBS,IAAIrB,yBAAyBmB,QAAQD,EAAEN,IAAIf,eAAesB,QAAQE,EAAET,IAAIf,yBAAyBsB,QAAQD,EAAEN,IAAIf,gBAAgBe,gBAAgBS,IAAIF,QAAQE,EAAET,IAAIf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoC7X6B,iCAAiChB,4BAA4BA;iBACjDU,oBAAoBF,oBAAoBG;SAChDpB,cAAciB,YAAYG;WACxBI,wBAAwBP,cAAcG;cACnCpB,cAAciB,iBAAiBG;;;;;;;;UAQnCM,wBAAAA,SAAiCjB;;;QAGnCb,YAAAA,CAAa+B;;WAEV/B,YAAAA,CAAa+B;;YAEZ/B,YAAAA,CAAa+B;;UAEf/B,YAAAA,CAAa+B;;;;;;yBAME9B;;sBAEHC;;;;yBAIGiB;;;;yBAIAA;;;;yBAIAA;;;;;;;;;;;;;;KAcpBa,sCAAsCnB,oBAAoBQ,UAAUS,2BAA2BT,IAAIQ,uBAAuBC,0BAA0BT;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BpJY,8CAA8CpB,gCAAgCR,eAAe2B,4BAA4BlB,8BAA8BoB,UAAUrB,mBAAmBqB,+BAA+BC,UAAUhB,OAAOiB,aAAapC,gBAAgBqC,oBAAoBF,KAAKvB,sBAAsBE,+BAA+BqB,EAAEE,SAASlC,yBAAyBG,YAAY6B,EAAEE,SAASzB,sBAAsBE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwChawB,wCAAwCzB,gCAAgCR,eAAeS,2CAA2CyB,MAAMN,2BAA2BnB,YAAYuB,mBAAmBE,MAAMvC,eAAeA,YAAAA,CAAa+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuCpOS,2CAA2C3B,gCAAgCR,eAAe2B,4BAA4BlB,8BAA8BoB,UAAUrB,mBAAmBqB,8CAA8CO,UAAUtB,OAAOiB,wBAAwBC,oBAAoBI,IAAIC,KAAKD,EAAEJ,8BAA8BlB,0BAA0BA,0BAA0BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsCzXwB,yCAAyC9B,gCAAgCR,iCAAiCU,gBAAgByB,wBAAwB1B,YAAYuB,SAASG,wBAAwB1B,YAAYuB,OAAOtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BlN6B,0CAA0C/B,gCAAgCR,eAAesC,sBAAsB7B,YAAYuB,+CAA+CI,qBAAqBtB,0BAA0BsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA2CpNI,2BAA2BhC,mBAAmBiB,wCAAwCzB,cAAcA;;iBAE7FgC;;;;;;WAMNC,qBAAqBxB,YAAYuB;;sBAEtBnB,QAAQ0B,uBAAuB9B,YAAYuB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.cts","names":["MessageOutputVersion","ResponseMetadata","mergeResponseMetadata","ModalitiesTokenDetails","InputTokenDetails","OutputTokenDetails","UsageMetadata","mergeUsageMetadata"],"sources":["../../../../../langchain-core/dist/messages/metadata.d.ts"],"sourcesContent":["import { MessageOutputVersion } from \"./message.js\";\n\n//#region src/messages/metadata.d.ts\ntype ResponseMetadata = {\n model_provider?: string;\n model_name?: string;\n output_version?: MessageOutputVersion;\n [key: string]: unknown;\n};\ndeclare function mergeResponseMetadata(a?: ResponseMetadata, b?: ResponseMetadata): ResponseMetadata;\ntype ModalitiesTokenDetails = {\n /**\n * Text tokens.\n * Does not need to be reported, but some models will do so.\n */\n text?: number;\n /**\n * Image (non-video) tokens.\n */\n image?: number;\n /**\n * Audio tokens.\n */\n audio?: number;\n /**\n * Video tokens.\n */\n video?: number;\n /**\n * Document tokens.\n * e.g. PDF\n */\n document?: number;\n};\n/**\n * Breakdown of input token counts.\n *\n * Does not *need* to sum to full input token count. Does *not* need to have all keys.\n */\ntype InputTokenDetails = ModalitiesTokenDetails & {\n /**\n * Input tokens that were cached and there was a cache hit.\n *\n * Since there was a cache hit, the tokens were read from the cache.\n * More precisely, the model state given these tokens was read from the cache.\n */\n cache_read?: number;\n /**\n * Input tokens that were cached and there was a cache miss.\n *\n * Since there was a cache miss, the cache was created from these tokens.\n */\n cache_creation?: number;\n};\n/**\n * Breakdown of output token counts.\n *\n * Does *not* need to sum to full output token count. Does *not* need to have all keys.\n */\ntype OutputTokenDetails = ModalitiesTokenDetails & {\n /**\n * Reasoning output tokens.\n *\n * Tokens generated by the model in a chain of thought process (i.e. by\n * OpenAI's o1 models) that are not returned as part of model output.\n */\n reasoning?: number;\n};\n/**\n * Usage metadata for a message, such as token counts.\n */\ntype UsageMetadata = {\n /**\n * Count of input (or prompt) tokens. Sum of all input token types.\n */\n input_tokens: number;\n /**\n * Count of output (or completion) tokens. Sum of all output token types.\n */\n output_tokens: number;\n /**\n * Total token count. Sum of input_tokens + output_tokens.\n */\n total_tokens: number;\n /**\n * Breakdown of input token counts.\n *\n * Does *not* need to sum to full input token count. Does *not* need to have all keys.\n */\n input_token_details?: InputTokenDetails;\n /**\n * Breakdown of output token counts.\n *\n * Does *not* need to sum to full output token count. Does *not* need to have all keys.\n */\n output_token_details?: OutputTokenDetails;\n};\ndeclare function mergeUsageMetadata(a?: UsageMetadata, b?: UsageMetadata): UsageMetadata;\n//#endregion\nexport { InputTokenDetails, ModalitiesTokenDetails, OutputTokenDetails, ResponseMetadata, UsageMetadata, mergeResponseMetadata, mergeUsageMetadata };\n//# sourceMappingURL=metadata.d.ts.map"],"mappings":";;;;AAAoD,KAG/CC,gBAAAA,GAAgB;EAM+E,cAC/FE,CAAAA,EAAAA,MAAAA;EAAsB,UA6BtBC,CAAAA,EAAAA,MAAAA;EAA0C,cAoB1CC,CAAAA,EArDcL,oBAqDOG;EAAsB,CAAA,GAY3CG,EAAAA,MAAAA,CAAAA,EAAAA,OAAa;CAAA;KA7DbH,sBAAAA,GAqFoBE;EAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAxDtCD,iBAAAA,GAAoBD;;;;;;;;;;;;;;;;;;;;KAoBpBE,kBAAAA,GAAqBF;;;;;;;;;;;;KAYrBG,aAAAA;;;;;;;;;;;;;;;;;;wBAkBmBF;;;;;;yBAMCC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.cts","names":["BaseMessage","BaseMessageLike","StoredMessage","ToolMessage","AIMessage","AIMessageChunk","ChatMessage","ChatMessageChunk","FunctionMessage","FunctionMessageChunk","HumanMessage","HumanMessageChunk","SystemMessage","SystemMessageChunk","MessageStructure","$Expand","T","U","K","$KnownKeys","$HasIndexSignature","$OnlyIndexSignatures","$MergeObjects","Record","$MergeDiscriminatedUnion","Key","PropertyKey","A","B","Extract","Constructor","iife","coerceMessageLikeToMessage","getBufferString","mapStoredMessageToChatMessage","mapStoredMessagesToChatMessages","mapChatMessagesToStoredMessages","convertToChunk"],"sources":["../../../../../langchain-core/dist/messages/utils.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageLike, StoredMessage } from \"./base.js\";\nimport { ToolMessage } from \"./tool.js\";\nimport { AIMessage, AIMessageChunk } from \"./ai.js\";\nimport { ChatMessage, ChatMessageChunk } from \"./chat.js\";\nimport { FunctionMessage, FunctionMessageChunk } from \"./function.js\";\nimport { HumanMessage, HumanMessageChunk } from \"./human.js\";\nimport { SystemMessage, SystemMessageChunk } from \"./system.js\";\nimport { MessageStructure } from \"./message.js\";\n\n//#region src/messages/utils.d.ts\ntype $Expand<T> = T extends infer U ? { [K in keyof U]: U[K] } : never;\n/**\n * Extracts the explicitly declared keys from a type T.\n *\n * @template T - The type to extract keys from\n * @returns A union of keys that are not string, number, or symbol\n */\ntype $KnownKeys<T> = { [K in keyof T]: string extends K ? never : number extends K ? never : symbol extends K ? never : K }[keyof T];\n/**\n * Detects if T has an index signature.\n *\n * @template T - The type to check for index signatures\n * @returns True if T has an index signature, false otherwise\n */\ntype $HasIndexSignature<T> = string extends keyof T ? true : number extends keyof T ? true : symbol extends keyof T ? true : false;\n/**\n * Detects if T has an index signature and no known keys.\n *\n * @template T - The type to check for index signatures and no known keys\n * @returns True if T has an index signature and no known keys, false otherwise\n */\ntype $OnlyIndexSignatures<T> = $HasIndexSignature<T> extends true ? [$KnownKeys<T>] extends [never] ? true : false : false;\n/**\n * Recursively merges two object types T and U, with U taking precedence over T.\n *\n * This utility type performs a deep merge of two object types:\n * - For keys that exist in both T and U:\n * - If both values are objects (Record<string, unknown>), recursively merge them\n * - Otherwise, U's value takes precedence\n * - For keys that exist only in T, use T's value\n * - For keys that exist only in U, use U's value\n *\n * @template T - The first object type to merge\n * @template U - The second object type to merge (takes precedence over T)\n *\n * @example\n * ```ts\n * type ObjectA = {\n * shared: { a: string; b: number };\n * onlyInA: boolean;\n * };\n *\n * type ObjectB = {\n * shared: { b: string; c: Date };\n * onlyInB: symbol;\n * };\n *\n * type Merged = $MergeObjects<ObjectA, ObjectB>;\n * // Result: {\n * // shared: { a: string; b: string; c: Date };\n * // onlyInA: boolean;\n * // onlyInB: symbol;\n * // }\n * ```\n */\ntype $MergeObjects<T, U> =\n// If U is purely index-signature based, prefer U as a whole\n$OnlyIndexSignatures<U> extends true ? U : $OnlyIndexSignatures<T> extends true ? U : { [K in keyof T | keyof U]: K extends keyof T ? K extends keyof U ? T[K] extends Record<string, unknown> ? U[K] extends Record<string, unknown> ? $MergeObjects<T[K], U[K]> : U[K] : U[K] : T[K] : K extends keyof U ? U[K] : never };\n/**\n * Merges two discriminated unions A and B based on a discriminator key (defaults to \"type\").\n * For each possible value of the discriminator across both unions:\n * - If B has a member with that discriminator value, use B's member\n * - Otherwise use A's member with that discriminator value\n * This effectively merges the unions while giving B's members precedence over A's members.\n *\n * @template A - First discriminated union type that extends Record<Key, PropertyKey>\n * @template B - Second discriminated union type that extends Record<Key, PropertyKey>\n * @template Key - The discriminator key property, defaults to \"type\"\n */\ntype $MergeDiscriminatedUnion<A extends Record<Key, PropertyKey>, B extends Record<Key, PropertyKey>, Key extends PropertyKey = \"type\"> = { [T in A[Key] | B[Key]]: [Extract<B, Record<Key, T>>] extends [never] // Check if B has a member with this discriminator value\n? Extract<A, Record<Key, T>> : [Extract<A, Record<Key, T>>] extends [never] ? Extract<B, Record<Key, T>> : $MergeObjects<Extract<A, Record<Key, T>>, Extract<B, Record<Key, T>>> }[A[Key] | B[Key]];\ntype Constructor<T> = new (...args: unknown[]) => T;\n/**\n * Immediately-invoked function expression.\n *\n * @param fn - The function to execute\n * @returns The result of the function\n */\ndeclare const iife: <T>(fn: () => T) => T;\ndeclare function coerceMessageLikeToMessage(messageLike: BaseMessageLike): BaseMessage;\n/**\n * This function is used by memory classes to get a string representation\n * of the chat message history, based on the message content and role.\n */\ndeclare function getBufferString(messages: BaseMessage[], humanPrefix?: string, aiPrefix?: string): string;\ndeclare function mapStoredMessageToChatMessage(message: StoredMessage): AIMessage<MessageStructure> | ChatMessage<MessageStructure> | FunctionMessage<MessageStructure> | HumanMessage<MessageStructure> | SystemMessage<MessageStructure> | ToolMessage<MessageStructure>;\n/**\n * Transforms an array of `StoredMessage` instances into an array of\n * `BaseMessage` instances. It uses the `mapV1MessageToStoredMessage`\n * function to ensure all messages are in the `StoredMessage` format, then\n * creates new instances of the appropriate `BaseMessage` subclass based\n * on the type of each message. This function is used to prepare stored\n * messages for use in a chat context.\n */\ndeclare function mapStoredMessagesToChatMessages(messages: StoredMessage[]): BaseMessage[];\n/**\n * Transforms an array of `BaseMessage` instances into an array of\n * `StoredMessage` instances. It does this by calling the `toDict` method\n * on each `BaseMessage`, which returns a `StoredMessage`. This function\n * is used to prepare chat messages for storage.\n */\ndeclare function mapChatMessagesToStoredMessages(messages: BaseMessage[]): StoredMessage[];\ndeclare function convertToChunk(message: BaseMessage): AIMessageChunk<MessageStructure> | ChatMessageChunk<MessageStructure> | FunctionMessageChunk<MessageStructure> | HumanMessageChunk<MessageStructure> | SystemMessageChunk<MessageStructure>;\n//#endregion\nexport { $Expand, $MergeDiscriminatedUnion, $MergeObjects, Constructor, coerceMessageLikeToMessage, convertToChunk, getBufferString, iife, mapChatMessagesToStoredMessages, mapStoredMessageToChatMessage, mapStoredMessagesToChatMessages };\n//# sourceMappingURL=utils.d.ts.map"],"mappings":";;;;;;AAwBmH;AAAA;KAP9GmB,UAcoB,CAAA,CAAA,CAAA,GAAA,QAAA,MAdUH,CAcV,GAAA,MAAA,SAd6BE,CAc7B,GAAA,KAAA,GAAA,MAAA,SAdwDA,CAcxD,GAAA,KAAA,GAAA,MAAA,SAdmFA,CAcnF,GAAA,KAAA,GAd+FA,CAc/F,EAAA,CAAA,MAdyGF,CAczG,CAAA;;;;;AAAsD;AAAA;KAP1EI,kBAyCa,CAAA,CAAA,CAAA,GAAA,MAAA,SAAA,MAzCgCJ,CAyChC,GAAA,IAAA,GAAA,MAAA,SAAA,MAzCgEA,CAyChE,GAAA,IAAA,GAAA,MAAA,SAAA,MAzCgGA,CAyChG,GAAA,IAAA,GAAA,KAAA;;;;;;;KAlCbK,oBAoC+FL,CAAAA,CAAAA,CAAAA,GApCrEI,kBAoCqEJ,CApClDA,CAoCkDA,CAAAA,SAAAA,IAAAA,GAAAA,CApC/BG,UAoC+BH,CApCpBA,CAoCoBA,CAAAA,CAAAA,SAAAA,CAAAA,KAAAA,CAAAA,GAAAA,IAAAA,GAAAA,KAAAA,GAAAA,KAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4M;AAAA;;;;;;KAF3SM,aAcmFI,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA;;AAZxFL,oBAYkHK,CAZ7FT,CAY6FS,CAAAA,SAAAA,IAAAA,GAZ3ET,CAY2ES,GAZvEL,oBAYuEK,CAZlDV,CAYkDU,CAAAA,SAAAA,IAAAA,GAZhCT,CAYgCS,GAAAA,QAAAA,MAZdV,CAYcU,GAAAA,MAZJT,CAYIS,GAZAR,CAYAQ,SAAAA,MAZgBV,CAYhBU,GAZoBR,CAYpBQ,SAAAA,MAZoCT,CAYpCS,GAZwCV,CAYxCU,CAZ0CR,CAY1CQ,CAAAA,SAZqDH,MAYrDG,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,GAZ+ET,CAY/ES,CAZiFR,CAYjFQ,CAAAA,SAZ4FH,MAY5FG,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,GAZsHJ,aAYtHI,CAZoIV,CAYpIU,CAZsIR,CAYtIQ,CAAAA,EAZ0IT,CAY1IS,CAZ4IR,CAY5IQ,CAAAA,CAAAA,GAZkJT,CAYlJS,CAZoJR,CAYpJQ,CAAAA,GAZyJT,CAYzJS,CAZ2JR,CAY3JQ,CAAAA,GAZgKV,CAYhKU,CAZkKR,CAYlKQ,CAAAA,GAZuKR,CAYvKQ,SAAAA,MAZuLT,CAYvLS,GAZ2LT,CAY3LS,CAZ6LR,CAY7LQ,CAAAA,GAAAA,KAAAA,EAAAA;;;;;;;;;;;;KAA7GF,wBACoBR,CAAAA,UADeO,MACfP,CADsBS,GACtBT,EAD2BU,WAC3BV,CAAAA,EAAAA,UADmDO,MACnDP,CAD0DS,GAC1DT,EAD+DU,WAC/DV,CAAAA,EAAAA,YADyFU,WACzFV,GAAAA,MAAAA,CAAAA,GAAAA,QADyHW,CACzHX,CAD2HS,GAC3HT,CAAAA,GADkIY,CAClIZ,CADoIS,GACpIT,CAAAA,GAAAA,CAD4Ia,OAC5Ib,CADoJY,CACpJZ,EADuJO,MACvJP,CAD8JS,GAC9JT,EADmKA,CACnKA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,KAAAA,CAAAA,CAAAA;AAAAA,EAAvBa,OAAWN,CAAHI,CAAGJ,EAAAA,MAAAA,CAAOE,GAAPF,EAAYP,CAAZO,CAAAA,CAAAA,GAAAA,CAAmBM,OAAnBN,CAA2BI,CAA3BJ,EAA8BA,MAA9BA,CAAqCE,GAArCF,EAA0CP,CAA1CO,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,KAAAA,CAAAA,GAAiEM,OAAjEN,CAAyEK,CAAzEL,EAA4EA,MAA5EA,CAAmFE,GAAnFF,EAAwFP,CAAxFO,CAAAA,CAAAA,GAA8FD,aAA9FC,CAA4GM,OAA5GN,CAAoHI,CAApHJ,EAAuHA,MAAvHA,CAA8HE,GAA9HF,EAAmIP,CAAnIO,CAAAA,CAAAA,EAAwIM,OAAxIN,CAAgJK,CAAhJL,EAAmJA,MAAnJA,CAA0JE,GAA1JF,EAA+JP,CAA/JO,CAAAA,CAAAA,CAAAA,EAAAA,CAAsKI,CAAtKJ,CAAwKE,GAAxKF,CAAAA,GAA+KK,CAA/KL,CAAiLE,GAAjLF,CAAAA,CAAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt_values.d.cts","names":["Serializable","BaseMessage","HumanMessage","MessageStructure","MessageType","BasePromptValueInterface","StringPromptValueInterface","ChatPromptValueInterface","BasePromptValue","StringPromptValue","ChatPromptValueFields","ChatPromptValue","ImageContent","ImagePromptValueFields","ImagePromptValue"],"sources":["../../../../langchain-core/dist/prompt_values.d.ts"],"sourcesContent":["import { Serializable } from \"./load/serializable.js\";\nimport { BaseMessage } from \"./messages/base.js\";\nimport { HumanMessage } from \"./messages/human.js\";\nimport { MessageStructure, MessageType } from \"./messages/message.js\";\n\n//#region src/prompt_values.d.ts\ninterface BasePromptValueInterface extends Serializable {\n toString(): string;\n toChatMessages(): BaseMessage[];\n}\ninterface StringPromptValueInterface extends BasePromptValueInterface {\n value: string;\n}\ninterface ChatPromptValueInterface extends BasePromptValueInterface {\n messages: BaseMessage[];\n}\n/**\n * Base PromptValue class. All prompt values should extend this class.\n */\ndeclare abstract class BasePromptValue extends Serializable implements BasePromptValueInterface {\n abstract toString(): string;\n abstract toChatMessages(): BaseMessage[];\n}\n/**\n * Represents a prompt value as a string. It extends the BasePromptValue\n * class and overrides the toString and toChatMessages methods.\n */\ndeclare class StringPromptValue extends BasePromptValue implements StringPromptValueInterface {\n static lc_name(): string;\n lc_namespace: string[];\n lc_serializable: boolean;\n value: string;\n constructor(value: string);\n toString(): string;\n toChatMessages(): HumanMessage<MessageStructure>[];\n}\n/**\n * Interface for the fields of a ChatPromptValue.\n */\ninterface ChatPromptValueFields {\n messages: BaseMessage[];\n}\n/**\n * Class that represents a chat prompt value. It extends the\n * BasePromptValue and includes an array of BaseMessage instances.\n */\ndeclare class ChatPromptValue extends BasePromptValue implements ChatPromptValueInterface {\n lc_namespace: string[];\n lc_serializable: boolean;\n static lc_name(): string;\n messages: BaseMessage[];\n constructor(messages: BaseMessage[]);\n constructor(fields: ChatPromptValueFields);\n toString(): string;\n toChatMessages(): BaseMessage<MessageStructure, MessageType>[];\n}\ntype ImageContent = {\n /** Specifies the detail level of the image. */\n detail?: \"auto\" | \"low\" | \"high\";\n /** Either a URL of the image or the base64 encoded image data. */\n url: string;\n};\ninterface ImagePromptValueFields {\n imageUrl: ImageContent;\n}\n/**\n * Class that represents an image prompt value. It extends the\n * BasePromptValue and includes an ImageURL instance.\n */\ndeclare class ImagePromptValue extends BasePromptValue {\n lc_namespace: string[];\n lc_serializable: boolean;\n static lc_name(): string;\n imageUrl: ImageContent;\n /** @ignore */\n value: string;\n constructor(fields: ImagePromptValueFields);\n constructor(fields: ImageContent);\n toString(): string;\n toChatMessages(): HumanMessage<MessageStructure>[];\n}\n//#endregion\nexport { BasePromptValue, BasePromptValueInterface, ChatPromptValue, ChatPromptValueFields, ChatPromptValueInterface, ImageContent, ImagePromptValue, ImagePromptValueFields, StringPromptValue, StringPromptValueInterface };\n//# sourceMappingURL=prompt_values.d.ts.map"],"mappings":";;;;;;UAMUK,wBAAAA,SAAiCL,YAEvBC,CAAAA;EAAW,QAFYD,EAAAA,EAAAA,MAAAA;EAAY,cAAA,EAAA,EAEnCC,WAFmC,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":["MessageContent","DirectToolOutput","ToolCall","ToolMessage","InferInteropZodInput","InferInteropZodOutput","InteropZodObject","InteropZodType","CallbackManagerForToolRun","RunnableConfig","RunnableInterface","RunnableToolLike","JsonSchema7Type","BaseLangChainParams","ToolDefinition","BaseStore","z","ResponseFormat","ToolOutputType","ContentAndArtifact","ToolReturnType","TOutput","TConfig","TInput","ToolInputSchemaBase","ZodTypeAny","ToolParams","ToolRunnableConfig","Record","ConfigurableFieldType","ContextSchema","StructuredToolParams","StructuredToolInterface","Pick","ToolInputSchemaOutputType","T","ToolInputSchemaInputType","StructuredToolCallInput","SchemaT","SchemaInputT","StringInputToolSchema","ZodTypeDef","ZodType","ToolOutputT","TArg","Promise","ToolInterface","NonNullable","BaseDynamicToolInput","DynamicToolInput","DynamicStructuredToolInput","SchemaOutputT","isStructuredTool","isRunnableToolLike","isStructuredToolParams","isLangChainTool","ToolRuntime","TState","TContext"],"sources":["../../../../../langchain-core/dist/tools/types.d.ts"],"sourcesContent":["import { MessageContent } from \"../messages/base.js\";\nimport { DirectToolOutput, ToolCall, ToolMessage } from \"../messages/tool.js\";\nimport { InferInteropZodInput, InferInteropZodOutput, InteropZodObject, InteropZodType } from \"../utils/types/zod.js\";\nimport { CallbackManagerForToolRun } from \"../callbacks/manager.js\";\nimport { RunnableConfig, RunnableInterface } from \"../runnables/types.js\";\nimport { RunnableToolLike } from \"../runnables/base.js\";\nimport { JsonSchema7Type } from \"../utils/zod-to-json-schema/parseTypes.js\";\nimport { BaseLangChainParams, ToolDefinition } from \"../language_models/base.js\";\nimport { BaseStore } from \"../stores.js\";\nimport { z } from \"zod/v3\";\n\n//#region src/tools/types.d.ts\ntype ResponseFormat = \"content\" | \"content_and_artifact\" | string;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ToolOutputType = any;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ContentAndArtifact = [MessageContent, any];\n/**\n * Conditional type that determines the return type of the {@link StructuredTool.invoke} method.\n * - If the input is a ToolCall, it returns a ToolMessage\n * - If the config is a runnable config and contains a toolCall property, it returns a ToolMessage\n * - Otherwise, it returns the original output type\n */\ntype ToolReturnType<TInput, TConfig, TOutput> = TOutput extends DirectToolOutput ? TOutput : TConfig extends {\n toolCall: {\n id: string;\n };\n} ? ToolMessage : TConfig extends {\n toolCall: {\n id: undefined;\n };\n} ? TOutput : TConfig extends {\n toolCall: {\n id?: string;\n };\n} ? TOutput | ToolMessage : TInput extends ToolCall ? ToolMessage : TOutput;\n/**\n * Base type that establishes the types of input schemas that can be used for LangChain tool\n * definitions.\n */\ntype ToolInputSchemaBase = z.ZodTypeAny | JsonSchema7Type;\n/**\n * Parameters for the Tool classes.\n */\ninterface ToolParams extends BaseLangChainParams {\n /**\n * The tool response format.\n *\n * If \"content\" then the output of the tool is interpreted as the contents of a\n * ToolMessage. If \"content_and_artifact\" then the output is expected to be a\n * two-tuple corresponding to the (content, artifact) of a ToolMessage.\n *\n * @default \"content\"\n */\n responseFormat?: ResponseFormat;\n /**\n * Default config object for the tool runnable.\n */\n defaultConfig?: ToolRunnableConfig;\n /**\n * Whether to show full details in the thrown parsing errors.\n *\n * @default false\n */\n verboseParsingErrors?: boolean;\n /**\n * Metadata for the tool.\n */\n metadata?: Record<string, unknown>;\n}\ntype ToolRunnableConfig<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nConfigurableFieldType extends Record<string, any> = Record<string, any>,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nContextSchema = any> = RunnableConfig<ConfigurableFieldType> & {\n toolCall?: ToolCall;\n context?: ContextSchema;\n};\n/**\n * Schema for defining tools.\n *\n * @version 0.2.19\n */\ninterface StructuredToolParams extends Pick<StructuredToolInterface, \"name\" | \"schema\"> {\n /**\n * An optional description of the tool to pass to the model.\n */\n description?: string;\n}\n/**\n * Utility type that resolves the output type of a tool input schema.\n *\n * Input & Output types are a concept used with Zod schema, as Zod allows for transforms to occur\n * during parsing. When using JSONSchema, input and output types are the same.\n *\n * The input type for a given schema should match the structure of the arguments that the LLM\n * generates as part of its {@link ToolCall}. The output type will be the type that results from\n * applying any transforms defined in your schema. If there are no transforms, the input and output\n * types will be the same.\n */\ntype ToolInputSchemaOutputType<T> = T extends InteropZodType ? InferInteropZodOutput<T> : T extends JsonSchema7Type ? unknown : never;\n/**\n * Utility type that resolves the input type of a tool input schema.\n *\n * Input & Output types are a concept used with Zod schema, as Zod allows for transforms to occur\n * during parsing. When using JSONSchema, input and output types are the same.\n *\n * The input type for a given schema should match the structure of the arguments that the LLM\n * generates as part of its {@link ToolCall}. The output type will be the type that results from\n * applying any transforms defined in your schema. If there are no transforms, the input and output\n * types will be the same.\n */\ntype ToolInputSchemaInputType<T> = T extends InteropZodType ? InferInteropZodInput<T> : T extends JsonSchema7Type ? unknown : never;\n/**\n * Defines the type that will be passed into a tool handler function as a result of a tool call.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\ntype StructuredToolCallInput<SchemaT = ToolInputSchemaBase, SchemaInputT = ToolInputSchemaInputType<SchemaT>> = (ToolInputSchemaOutputType<SchemaT> extends string ? string : never) | SchemaInputT | ToolCall;\n/**\n * An input schema type for tools that accept a single string input.\n *\n * This schema defines a tool that takes an optional string parameter named \"input\".\n * It uses Zod's effects to transform the input and strip any extra properties.\n *\n * This is primarily used for creating simple string-based tools where the LLM\n * only needs to provide a single text value as input to the tool.\n */\ntype StringInputToolSchema = z.ZodType<string | undefined, z.ZodTypeDef,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nany>;\n/**\n * Defines the type for input to a tool's call method.\n *\n * This type is a convenience alias for StructuredToolCallInput with the input type\n * derived from the schema. It represents the possible inputs that can be passed to a tool,\n * which can be either:\n * - A string (if the tool accepts string input)\n * - A structured input matching the tool's schema\n * - A ToolCall object (typically from an LLM)\n *\n * @param SchemaT - The schema type for the tool input, defaults to StringInputToolSchema\n */\n\n/**\n * Interface that defines the shape of a LangChain structured tool.\n *\n * A structured tool is a tool that uses a schema to define the structure of the arguments that the\n * LLM generates as part of its {@link ToolCall}.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\ninterface StructuredToolInterface<SchemaT = ToolInputSchemaBase, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends RunnableInterface<StructuredToolCallInput<SchemaT, SchemaInputT>, ToolOutputT | ToolMessage> {\n lc_namespace: string[];\n /**\n * A Zod schema representing the parameters of the tool.\n */\n schema: SchemaT;\n /**\n * Invokes the tool with the provided argument and configuration.\n * @param arg The input argument for the tool.\n * @param configArg Optional configuration for the tool call.\n * @returns A Promise that resolves with the tool's output.\n */\n invoke<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig): Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>;\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument, configuration, and tags. It\n * parses the input according to the schema, handles any errors, and\n * manages callbacks.\n * @param arg The input argument for the tool.\n * @param configArg Optional configuration or callbacks for the tool.\n * @param tags Optional tags for the tool.\n * @returns A Promise that resolves with a string.\n */\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig, /** @deprecated */\n tags?: string[]): Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>;\n /**\n * The name of the tool.\n */\n name: string;\n /**\n * A description of the tool.\n */\n description: string;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect: boolean;\n}\n/**\n * A special interface for tools that accept a string input, usually defined with the {@link Tool} class.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\ninterface ToolInterface<SchemaT = StringInputToolSchema, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends StructuredToolInterface<SchemaT, SchemaInputT, ToolOutputT> {\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument and callbacks. It handles\n * string inputs specifically.\n * @param arg The input argument for the tool, which can be a string, undefined, or an input of the tool's schema.\n * @param callbacks Optional callbacks for the tool.\n * @returns A Promise that resolves with a string.\n */\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(\n // TODO: shouldn't this be narrowed based on SchemaT?\n arg: TArg, callbacks?: TConfig): Promise<ToolReturnType<NonNullable<TArg>, TConfig, ToolOutputT>>;\n}\n/**\n * Base interface for the input parameters of the {@link DynamicTool} and\n * {@link DynamicStructuredTool} classes.\n */\ninterface BaseDynamicToolInput extends ToolParams {\n name: string;\n description: string;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect?: boolean;\n}\n/**\n * Interface for the input parameters of the DynamicTool class.\n */\ninterface DynamicToolInput<ToolOutputT = ToolOutputType> extends BaseDynamicToolInput {\n func: (input: string, runManager?: CallbackManagerForToolRun, config?: ToolRunnableConfig) => Promise<ToolOutputT>;\n}\n/**\n * Interface for the input parameters of the DynamicStructuredTool class.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaOutputT - The TypeScript type representing the result of applying the schema to the tool arguments. Useful for type checking tool handler functions when using JSONSchema.\n */\ninterface DynamicStructuredToolInput<SchemaT = ToolInputSchemaBase, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, ToolOutputT = ToolOutputType> extends BaseDynamicToolInput {\n /**\n * Tool handler function - the function that will be called when the tool is invoked.\n *\n * @param input - The input to the tool.\n * @param runManager - The run manager for the tool.\n * @param config - The configuration for the tool.\n * @returns The result of the tool.\n */\n func: (input: SchemaOutputT, runManager?: CallbackManagerForToolRun, config?: RunnableConfig) => Promise<ToolOutputT>;\n schema: SchemaT;\n}\n/**\n * Confirm whether the inputted tool is an instance of `StructuredToolInterface`.\n *\n * @param {StructuredToolInterface | JSONSchema | undefined} tool The tool to check if it is an instance of `StructuredToolInterface`.\n * @returns {tool is StructuredToolInterface} Whether the inputted tool is an instance of `StructuredToolInterface`.\n */\ndeclare function isStructuredTool(tool?: StructuredToolInterface | ToolDefinition | JsonSchema7Type): tool is StructuredToolInterface;\n/**\n * Confirm whether the inputted tool is an instance of `RunnableToolLike`.\n *\n * @param {unknown | undefined} tool The tool to check if it is an instance of `RunnableToolLike`.\n * @returns {tool is RunnableToolLike} Whether the inputted tool is an instance of `RunnableToolLike`.\n */\ndeclare function isRunnableToolLike(tool?: unknown): tool is RunnableToolLike;\n/**\n * Confirm whether or not the tool contains the necessary properties to be considered a `StructuredToolParams`.\n *\n * @param {unknown | undefined} tool The object to check if it is a `StructuredToolParams`.\n * @returns {tool is StructuredToolParams} Whether the inputted object is a `StructuredToolParams`.\n */\ndeclare function isStructuredToolParams(tool?: unknown): tool is StructuredToolParams;\n/**\n * Whether or not the tool is one of StructuredTool, RunnableTool or StructuredToolParams.\n * It returns `is StructuredToolParams` since that is the most minimal interface of the three,\n * while still containing the necessary properties to be passed to a LLM for tool calling.\n *\n * @param {unknown | undefined} tool The tool to check if it is a LangChain tool.\n * @returns {tool is StructuredToolParams} Whether the inputted tool is a LangChain tool.\n */\ndeclare function isLangChainTool(tool?: unknown): tool is StructuredToolParams;\n/**\n * Runtime context automatically injected into tools.\n *\n * When a tool function has a parameter named `tool_runtime` with type hint\n * `ToolRuntime`, the tool execution system will automatically inject an instance\n * containing:\n *\n * - `state`: The current graph state\n * - `toolCallId`: The ID of the current tool call\n * - `config`: `RunnableConfig` for the current execution\n * - `context`: Runtime context\n * - `store`: `BaseStore` instance for persistent storage\n * - `writer`: Stream writer for streaming output\n *\n * No `Annotated` wrapper is needed - just use `runtime: ToolRuntime`\n * as a parameter.\n *\n * @example\n * ```typescript\n * import { tool, ToolRuntime } from \"@langchain/core/tools\";\n * import { z } from \"zod\";\n *\n * const stateSchema = z.object({\n * messages: z.array(z.any()),\n * userId: z.string().optional(),\n * });\n *\n * const greet = tool(\n * async ({ name }, runtime) => {\n * // Access state\n * const messages = runtime.state.messages;\n *\n * // Access tool_call_id\n * console.log(`Tool call ID: ${runtime.toolCallId}`);\n *\n * // Access config\n * console.log(`Run ID: ${runtime.config.runId}`);\n *\n * // Access runtime context\n * const userId = runtime.context?.userId;\n *\n * // Access store\n * await runtime.store?.mset([[\"key\", \"value\"]]);\n *\n * // Stream output\n * runtime.writer?.(\"Processing...\");\n *\n * return `Hello! User ID: ${runtime.state.userId || \"unknown\"} ${name}`;\n * },\n * {\n * name: \"greet\",\n * description: \"Use this to greet the user once you found their info.\",\n * schema: z.object({ name: z.string() }),\n * stateSchema,\n * }\n * );\n * ```\n *\n * @template StateT - The type of the state schema (inferred from stateSchema)\n * @template ContextT - The type of the context schema (inferred from contextSchema)\n */\ntype ToolRuntime<TState = unknown, TContext = unknown> = RunnableConfig & {\n /**\n * The current graph state.\n */\n state: TState extends InteropZodObject ? InferInteropZodOutput<TState> : TState extends Record<string, unknown> ? TState : unknown;\n /**\n * The ID of the current tool call.\n */\n toolCallId: string;\n /**\n * The current tool call.\n */\n toolCall?: ToolCall;\n /**\n * RunnableConfig for the current execution.\n */\n config: ToolRunnableConfig;\n /**\n * Runtime context (from langgraph `Runtime`).\n */\n context: TContext extends InteropZodObject ? InferInteropZodOutput<TContext> : TContext extends Record<string, unknown> ? TContext : unknown;\n /**\n * BaseStore instance for persistent storage (from langgraph `Runtime`).\n */\n store: BaseStore<string, unknown> | null;\n /**\n * Stream writer for streaming output (from langgraph `Runtime`).\n */\n writer: ((chunk: unknown) => void) | null;\n};\n//#endregion\nexport { BaseDynamicToolInput, ContentAndArtifact, DynamicStructuredToolInput, DynamicToolInput, ResponseFormat, StringInputToolSchema, StructuredToolCallInput, StructuredToolInterface, StructuredToolParams, ToolInputSchemaBase, ToolInputSchemaInputType, ToolInputSchemaOutputType, ToolInterface, ToolOutputType, ToolParams, ToolReturnType, ToolRunnableConfig, ToolRuntime, isLangChainTool, isRunnableToolLike, isStructuredTool, isStructuredToolParams };\n//# sourceMappingURL=types.d.ts.map"],"mappings":";;;;;;;;;;;;;KAiIKwC,qBAAAA,GAAwBxB,CAAAA,CAAE0B,4BAA4B1B,CAAAA,CAAEyB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":["InferInteropZodInput","InferInteropZodOutput","InteropZodDefault","InteropZodIssue","InteropZodLiteral","InteropZodObject","InteropZodObjectShape","InteropZodOptional","InteropZodType","Mutable","ZodDefaultV3","ZodDefaultV4","ZodObjectV3","ZodObjectV4","ZodOptionalV3","ZodOptionalV4","ZodStringV3","ZodStringV4","extendInteropZodObject","getInteropZodDefaultGetter","getInteropZodObjectShape","getSchemaDescription","interopParse","interopParseAsync","interopSafeParse","interopSafeParseAsync","interopZodObjectMakeFieldsOptional","interopZodObjectPartial","interopZodObjectPassthrough","interopZodObjectStrict","interopZodTransformInputSchema","isInteropZodLiteral","isInteropZodObject","isInteropZodSchema","isShapelessZodSchema","isSimpleStringZodSchema","isZodArrayV4","isZodLiteralV3","isZodLiteralV4","isZodObjectV3","isZodObjectV4","isZodSchema","isZodSchemaV3","isZodSchemaV4","StringWithAutocomplete","T","Record","InputValues","K","PartialValues","Promise","ChainValues"],"sources":["../../../../../../langchain-core/dist/utils/types/index.d.ts"],"sourcesContent":["import { InferInteropZodInput, InferInteropZodOutput, InteropZodDefault, InteropZodIssue, InteropZodLiteral, InteropZodObject, InteropZodObjectShape, InteropZodOptional, InteropZodType, Mutable, ZodDefaultV3, ZodDefaultV4, ZodObjectV3, ZodObjectV4, ZodOptionalV3, ZodOptionalV4, ZodStringV3, ZodStringV4, extendInteropZodObject, getInteropZodDefaultGetter, getInteropZodObjectShape, getSchemaDescription, interopParse, interopParseAsync, interopSafeParse, interopSafeParseAsync, interopZodObjectMakeFieldsOptional, interopZodObjectPartial, interopZodObjectPassthrough, interopZodObjectStrict, interopZodTransformInputSchema, isInteropZodLiteral, isInteropZodObject, isInteropZodSchema, isShapelessZodSchema, isSimpleStringZodSchema, isZodArrayV4, isZodLiteralV3, isZodLiteralV4, isZodObjectV3, isZodObjectV4, isZodSchema, isZodSchemaV3, isZodSchemaV4 } from \"./zod.js\";\n\n//#region src/utils/types/index.d.ts\n\n/**\n * Represents a string value with autocompleted, but not required, suggestions.\n */\ntype StringWithAutocomplete<T> = T | (string & Record<never, never>);\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype InputValues<K extends string = string> = Record<K, any>;\ntype PartialValues<K extends string = string> = Record<K, string | (() => Promise<string>) | (() => string)>;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ChainValues = Record<string, any>;\n//#endregion\nexport { ChainValues, InferInteropZodInput, InferInteropZodOutput, InputValues, InteropZodDefault, InteropZodIssue, InteropZodLiteral, InteropZodObject, InteropZodObjectShape, InteropZodOptional, InteropZodType, Mutable, PartialValues, StringWithAutocomplete, ZodDefaultV3, ZodDefaultV4, ZodObjectV3, ZodObjectV4, ZodOptionalV3, ZodOptionalV4, ZodStringV3, ZodStringV4, extendInteropZodObject, getInteropZodDefaultGetter, getInteropZodObjectShape, getSchemaDescription, interopParse, interopParseAsync, interopSafeParse, interopSafeParseAsync, interopZodObjectMakeFieldsOptional, interopZodObjectPartial, interopZodObjectPassthrough, interopZodObjectStrict, interopZodTransformInputSchema, isInteropZodLiteral, isInteropZodObject, isInteropZodSchema, isShapelessZodSchema, isSimpleStringZodSchema, isZodArrayV4, isZodLiteralV3, isZodLiteralV4, isZodObjectV3, isZodObjectV4, isZodSchema, isZodSchemaV3, isZodSchemaV4 };\n//# sourceMappingURL=index.d.ts.map"],"mappings":";;;KAYKmD,WAAAA,GAAcL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map_keys.d.ts","names":["SerializedFields"],"sources":["../../../../../../langchain-core/dist/load/map_keys.d.ts"],"sourcesContent":["//#region src/load/map_keys.d.ts\ninterface SerializedFields {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n//#endregion\nexport { SerializedFields };\n//# sourceMappingURL=map_keys.d.ts.map"],"mappings":";;UACUA,gBAAAA,CAAgB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serializable.d.ts","names":["SerializedFields","BaseSerialized","T","Record","SerializedConstructor","SerializedSecret","SerializedNotImplemented","Serialized","get_lc_unique_name","Serializable","SerializableInterface"],"sources":["../../../../../../langchain-core/dist/load/serializable.d.ts"],"sourcesContent":["import { SerializedFields } from \"./map_keys.js\";\n\n//#region src/load/serializable.d.ts\ninterface BaseSerialized<T extends string> {\n lc: number;\n type: T;\n id: string[];\n name?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n graph?: Record<string, any>;\n}\ninterface SerializedConstructor extends BaseSerialized<\"constructor\"> {\n kwargs: SerializedFields;\n}\ninterface SerializedSecret extends BaseSerialized<\"secret\"> {}\ninterface SerializedNotImplemented extends BaseSerialized<\"not_implemented\"> {}\ntype Serialized = SerializedConstructor | SerializedSecret | SerializedNotImplemented;\n/**\n * Get a unique name for the module, rather than parent class implementations.\n * Should not be subclassed, subclass lc_name above instead.\n */\ndeclare function get_lc_unique_name(serializableClass: typeof Serializable): string;\ninterface SerializableInterface {\n get lc_id(): string[];\n}\ndeclare abstract class Serializable implements SerializableInterface {\n lc_serializable: boolean;\n lc_kwargs: SerializedFields;\n /**\n * A path to the module that contains the class, eg. [\"langchain\", \"llms\"]\n * Usually should be the same as the entrypoint the class is exported from.\n */\n abstract lc_namespace: string[];\n /**\n * The name of the serializable. Override to provide an alias or\n * to preserve the serialized module name in minified environments.\n *\n * Implemented as a static method to support loading logic.\n */\n static lc_name(): string;\n /**\n * The final serialized identifier for the module.\n */\n get lc_id(): string[];\n /**\n * A map of secrets, which will be omitted from serialization.\n * Keys are paths to the secret in constructor args, e.g. \"foo.bar.baz\".\n * Values are the secret ids, which will be used when deserializing.\n */\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n /**\n * A map of additional attributes to merge with constructor args.\n * Keys are the attribute names, e.g. \"foo\".\n * Values are the attribute values, which will be serialized.\n * These attributes need to be accepted by the constructor as arguments.\n */\n get lc_attributes(): SerializedFields | undefined;\n /**\n * A map of aliases for constructor args.\n * Keys are the attribute names, e.g. \"foo\".\n * Values are the alias that will replace the key in serialization.\n * This is used to eg. make argument names match Python.\n */\n get lc_aliases(): {\n [key: string]: string;\n } | undefined;\n /**\n * A manual list of keys that should be serialized.\n * If not overridden, all fields passed into the constructor will be serialized.\n */\n get lc_serializable_keys(): string[] | undefined;\n constructor(kwargs?: SerializedFields, ..._args: never[]);\n toJSON(): Serialized;\n toJSONNotImplemented(): SerializedNotImplemented;\n}\n//#endregion\nexport { BaseSerialized, Serializable, SerializableInterface, Serialized, SerializedConstructor, SerializedNotImplemented, SerializedSecret, get_lc_unique_name };\n//# sourceMappingURL=serializable.d.ts.map"],"mappings":";;;;AAAiD,UAGvCC,cAAc,CAAA,UAAA,MAAA,CAAA,CAAA;EAAA,EAAA,EAAA,MAAA;EAAA,IAAA,EAEhBC,CAAAA;EAAC,EAAA,EAAA,MAICC,EAAAA;EAAM,IAAA,CAAA,EAAA,MAAA;EAAA;EAEe,KAAA,CAAA,EAFrBA,MAEqB,CAAA,MAAA,EAAA,GAAA,CAAA;;UAArBC,qBAAAA,SAA8BH,cAAAA,CAAAA,aAAAA,CAAAA,CAAAA;EAAc,MAAA,EAC5CD,gBAD4C;AAAA;AAGL,UAAvCK,gBAAAA,SAAyBJ,cACQA,CAAAA,QAAc,CAAA,CAAA,CAAA;AAAA,UAA/CK,wBAAAA,SAAiCL,cAC5B,CAAA,iBAAA,CAAA,CAAA,CAAA;KAAVM,UAAAA,GAAaH,qBAAH,GAA2BC,gBAA3B,GAA8CC,wBAA9C;;;;AAAsE;;AAMtD,UAArBI,qBAAAA,CAGyB;EAAA,IAAA,KAAA,EAAA,EAAA,MAAA,EAAA;;uBAAZD,YAAAA,YAAwBC,qBAiCxBV,CAAAA;EAAgB,eAehBA,EAAAA,OAAAA;EAAgB,SAC3BO,EA/CCP,gBA+CDO;EAAU;;AAjD8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAiC7CP;;;;;;;;;;;;;;;uBAeAA;YACXO;0BACcD"}
|