langchain 1.0.0-alpha.4 → 1.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/ReactAgent.cjs +5 -5
- package/dist/agents/ReactAgent.cjs.map +1 -1
- package/dist/agents/ReactAgent.d.cts +1 -3
- package/dist/agents/ReactAgent.d.cts.map +1 -1
- package/dist/agents/ReactAgent.d.ts +1 -3
- package/dist/agents/ReactAgent.d.ts.map +1 -1
- package/dist/agents/ReactAgent.js +6 -6
- package/dist/agents/ReactAgent.js.map +1 -1
- package/dist/agents/RunnableCallable.cjs +5 -0
- package/dist/agents/RunnableCallable.cjs.map +1 -1
- package/dist/agents/RunnableCallable.d.cts +2 -0
- package/dist/agents/RunnableCallable.d.cts.map +1 -1
- package/dist/agents/RunnableCallable.d.ts +2 -0
- package/dist/agents/RunnableCallable.d.ts.map +1 -1
- package/dist/agents/RunnableCallable.js +5 -0
- package/dist/agents/RunnableCallable.js.map +1 -1
- package/dist/agents/annotation.cjs.map +1 -1
- package/dist/agents/annotation.d.cts +5 -7
- package/dist/agents/annotation.d.cts.map +1 -1
- package/dist/agents/annotation.d.ts +4 -6
- package/dist/agents/annotation.d.ts.map +1 -1
- package/dist/agents/annotation.js.map +1 -1
- package/dist/agents/createAgent.cjs +10 -0
- package/dist/agents/createAgent.cjs.map +1 -0
- package/dist/agents/createAgent.js +10 -0
- package/dist/agents/createAgent.js.map +1 -0
- package/dist/agents/index.cjs +23 -4
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/index.d.cts +84 -21
- package/dist/agents/index.d.cts.map +1 -1
- package/dist/agents/index.d.ts +84 -21
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +23 -4
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/middlewareAgent/ReactAgent.cjs +255 -0
- package/dist/agents/middlewareAgent/ReactAgent.cjs.map +1 -0
- package/dist/agents/middlewareAgent/ReactAgent.d.cts +67 -0
- package/dist/agents/middlewareAgent/ReactAgent.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/ReactAgent.d.ts +67 -0
- package/dist/agents/middlewareAgent/ReactAgent.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/ReactAgent.js +254 -0
- package/dist/agents/middlewareAgent/ReactAgent.js.map +1 -0
- package/dist/agents/middlewareAgent/annotation.cjs +39 -0
- package/dist/agents/middlewareAgent/annotation.cjs.map +1 -0
- package/dist/agents/middlewareAgent/annotation.js +38 -0
- package/dist/agents/middlewareAgent/annotation.js.map +1 -0
- package/dist/agents/middlewareAgent/index.cjs +11 -0
- package/dist/agents/middlewareAgent/index.cjs.map +1 -0
- package/dist/agents/middlewareAgent/index.js +11 -0
- package/dist/agents/middlewareAgent/index.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/hitl.cjs +235 -0
- package/dist/agents/middlewareAgent/middleware/hitl.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/hitl.d.cts +199 -0
- package/dist/agents/middlewareAgent/middleware/hitl.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/hitl.d.ts +199 -0
- package/dist/agents/middlewareAgent/middleware/hitl.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/hitl.js +234 -0
- package/dist/agents/middlewareAgent/middleware/hitl.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/index.cjs +26 -0
- package/dist/agents/middlewareAgent/middleware/index.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/index.d.cts +4 -0
- package/dist/agents/middlewareAgent/middleware/index.d.ts +4 -0
- package/dist/agents/middlewareAgent/middleware/index.js +17 -0
- package/dist/agents/middlewareAgent/middleware/index.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/promptCaching.cjs +182 -0
- package/dist/agents/middlewareAgent/middleware/promptCaching.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.cts +152 -0
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.ts +152 -0
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/promptCaching.js +181 -0
- package/dist/agents/middlewareAgent/middleware/promptCaching.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/summarization.cjs +262 -0
- package/dist/agents/middlewareAgent/middleware/summarization.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/summarization.d.cts +89 -0
- package/dist/agents/middlewareAgent/middleware/summarization.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/summarization.d.ts +89 -0
- package/dist/agents/middlewareAgent/middleware/summarization.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/summarization.js +260 -0
- package/dist/agents/middlewareAgent/middleware/summarization.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware.cjs +47 -0
- package/dist/agents/middlewareAgent/middleware.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware.d.cts +46 -0
- package/dist/agents/middlewareAgent/middleware.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware.d.ts +46 -0
- package/dist/agents/middlewareAgent/middleware.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware.js +46 -0
- package/dist/agents/middlewareAgent/middleware.js.map +1 -0
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs +29 -0
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs.map +1 -0
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.js +29 -0
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.js.map +1 -0
- package/dist/agents/middlewareAgent/nodes/AgentNode.cjs +325 -0
- package/dist/agents/middlewareAgent/nodes/AgentNode.cjs.map +1 -0
- package/dist/agents/middlewareAgent/nodes/AgentNode.js +324 -0
- package/dist/agents/middlewareAgent/nodes/AgentNode.js.map +1 -0
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs +27 -0
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs.map +1 -0
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js +27 -0
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js.map +1 -0
- package/dist/agents/middlewareAgent/nodes/middleware.cjs +73 -0
- package/dist/agents/middlewareAgent/nodes/middleware.cjs.map +1 -0
- package/dist/agents/middlewareAgent/nodes/middleware.js +73 -0
- package/dist/agents/middlewareAgent/nodes/middleware.js.map +1 -0
- package/dist/agents/middlewareAgent/nodes/utils.cjs +74 -0
- package/dist/agents/middlewareAgent/nodes/utils.cjs.map +1 -0
- package/dist/agents/middlewareAgent/nodes/utils.js +70 -0
- package/dist/agents/middlewareAgent/nodes/utils.js.map +1 -0
- package/dist/agents/middlewareAgent/types.d.cts +380 -0
- package/dist/agents/middlewareAgent/types.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/types.d.ts +380 -0
- package/dist/agents/middlewareAgent/types.d.ts.map +1 -0
- package/dist/agents/nodes/AgentNode.cjs +4 -4
- package/dist/agents/nodes/AgentNode.cjs.map +1 -1
- package/dist/agents/nodes/AgentNode.js +4 -4
- package/dist/agents/nodes/AgentNode.js.map +1 -1
- package/dist/agents/nodes/ToolNode.cjs +3 -3
- package/dist/agents/nodes/ToolNode.cjs.map +1 -1
- package/dist/agents/nodes/ToolNode.d.cts +4 -5
- package/dist/agents/nodes/ToolNode.d.cts.map +1 -1
- package/dist/agents/nodes/ToolNode.d.ts +1 -2
- package/dist/agents/nodes/ToolNode.d.ts.map +1 -1
- package/dist/agents/nodes/ToolNode.js +4 -4
- package/dist/agents/nodes/ToolNode.js.map +1 -1
- package/dist/agents/responses.cjs +1 -1
- package/dist/agents/responses.cjs.map +1 -1
- package/dist/agents/responses.d.cts.map +1 -1
- package/dist/agents/responses.d.ts.map +1 -1
- package/dist/agents/responses.js +1 -1
- package/dist/agents/responses.js.map +1 -1
- package/dist/agents/types.d.cts +5 -7
- package/dist/agents/types.d.cts.map +1 -1
- package/dist/agents/types.d.ts +1 -3
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/utils.cjs +6 -6
- package/dist/agents/utils.cjs.map +1 -1
- package/dist/agents/utils.js +7 -7
- package/dist/agents/utils.js.map +1 -1
- package/dist/agents/withAgentName.cjs.map +1 -1
- package/dist/agents/withAgentName.js.map +1 -1
- package/dist/chains/api/api_chain.d.cts +1 -1
- package/dist/chains/api/prompts.cjs.map +1 -1
- package/dist/chains/api/prompts.js.map +1 -1
- package/dist/chains/base.d.cts +1 -1
- package/dist/chains/combine_docs_chain.d.cts +1 -1
- package/dist/chains/combine_documents/stuff.d.cts +1 -1
- package/dist/chains/constitutional_ai/constitutional_chain.cjs.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_chain.js.map +1 -1
- package/dist/chains/conversational_retrieval_chain.d.cts +1 -1
- package/dist/chains/graph_qa/cypher.d.cts +1 -1
- package/dist/chains/history_aware_retriever.d.cts +2 -2
- package/dist/chains/index.cjs +0 -3
- package/dist/chains/index.cjs.map +1 -1
- package/dist/chains/index.d.cts +1 -2
- package/dist/chains/index.d.ts +1 -2
- package/dist/chains/index.js +1 -3
- package/dist/chains/index.js.map +1 -1
- package/dist/chains/llm_chain.d.cts +3 -3
- package/dist/chains/openai_functions/base.d.cts +3 -3
- package/dist/chains/openai_functions/extraction.cjs.map +1 -1
- package/dist/chains/openai_functions/extraction.d.cts +1 -3
- package/dist/chains/openai_functions/extraction.d.cts.map +1 -1
- package/dist/chains/openai_functions/extraction.d.ts +1 -3
- package/dist/chains/openai_functions/extraction.d.ts.map +1 -1
- package/dist/chains/openai_functions/extraction.js.map +1 -1
- package/dist/chains/openai_functions/index.cjs +0 -5
- package/dist/chains/openai_functions/index.cjs.map +1 -1
- package/dist/chains/openai_functions/index.d.cts +1 -2
- package/dist/chains/openai_functions/index.d.ts +1 -2
- package/dist/chains/openai_functions/index.js +1 -4
- package/dist/chains/openai_functions/index.js.map +1 -1
- package/dist/chains/openai_functions/openapi.cjs +4 -4
- package/dist/chains/openai_functions/openapi.cjs.map +1 -1
- package/dist/chains/openai_functions/openapi.d.cts +2 -2
- package/dist/chains/openai_functions/openapi.js +4 -4
- package/dist/chains/openai_functions/openapi.js.map +1 -1
- package/dist/chains/openai_functions/tagging.cjs.map +1 -1
- package/dist/chains/openai_functions/tagging.d.cts +2 -4
- package/dist/chains/openai_functions/tagging.d.cts.map +1 -1
- package/dist/chains/openai_functions/tagging.d.ts +1 -3
- package/dist/chains/openai_functions/tagging.d.ts.map +1 -1
- package/dist/chains/openai_functions/tagging.js.map +1 -1
- package/dist/chains/query_constructor/index.cjs +4 -4
- package/dist/chains/query_constructor/index.cjs.map +1 -1
- package/dist/chains/query_constructor/index.d.cts +5 -3
- package/dist/chains/query_constructor/index.d.cts.map +1 -1
- package/dist/chains/query_constructor/index.d.ts +4 -2
- package/dist/chains/query_constructor/index.d.ts.map +1 -1
- package/dist/chains/query_constructor/index.js +1 -1
- package/dist/chains/query_constructor/index.js.map +1 -1
- package/dist/chains/question_answering/map_reduce_prompts.cjs.map +1 -1
- package/dist/chains/question_answering/map_reduce_prompts.js.map +1 -1
- package/dist/chains/question_answering/refine_prompts.cjs.map +1 -1
- package/dist/chains/question_answering/refine_prompts.js.map +1 -1
- package/dist/chains/question_answering/stuff_prompts.cjs.map +1 -1
- package/dist/chains/question_answering/stuff_prompts.js.map +1 -1
- package/dist/chains/retrieval.d.cts +1 -1
- package/dist/chains/router/llm_router.d.cts +1 -1
- package/dist/chains/router/multi_prompt.cjs +4 -4
- package/dist/chains/router/multi_prompt.cjs.map +1 -1
- package/dist/chains/router/multi_prompt.js +1 -1
- package/dist/chains/router/multi_prompt.js.map +1 -1
- package/dist/chains/router/multi_retrieval_qa.cjs +4 -4
- package/dist/chains/router/multi_retrieval_qa.cjs.map +1 -1
- package/dist/chains/router/multi_retrieval_qa.js +1 -1
- package/dist/chains/router/multi_retrieval_qa.js.map +1 -1
- package/dist/chains/sql_db/sql_db_chain.d.cts +2 -2
- package/dist/chains/sql_db/sql_db_prompt.cjs.map +1 -1
- package/dist/chains/sql_db/sql_db_prompt.d.cts.map +1 -1
- package/dist/chains/sql_db/sql_db_prompt.d.ts.map +1 -1
- package/dist/chains/sql_db/sql_db_prompt.js.map +1 -1
- package/dist/chains/summarization/stuff_prompts.cjs.map +1 -1
- package/dist/chains/summarization/stuff_prompts.js.map +1 -1
- package/dist/chat_models/universal.cjs +8 -5
- package/dist/chat_models/universal.cjs.map +1 -1
- package/dist/chat_models/universal.d.cts +4 -4
- package/dist/chat_models/universal.d.cts.map +1 -1
- package/dist/chat_models/universal.d.ts +2 -2
- package/dist/chat_models/universal.d.ts.map +1 -1
- package/dist/chat_models/universal.js +8 -5
- package/dist/chat_models/universal.js.map +1 -1
- package/dist/document_loaders/fs/directory.cjs.map +1 -1
- package/dist/document_loaders/fs/directory.d.cts +0 -1
- package/dist/document_loaders/fs/directory.d.cts.map +1 -1
- package/dist/document_loaders/fs/directory.d.ts +0 -1
- package/dist/document_loaders/fs/directory.d.ts.map +1 -1
- package/dist/document_loaders/fs/directory.js.map +1 -1
- package/dist/document_loaders/fs/json.cjs +7 -1
- package/dist/document_loaders/fs/json.cjs.map +1 -1
- package/dist/document_loaders/fs/json.js +7 -1
- package/dist/document_loaders/fs/json.js.map +1 -1
- package/dist/embeddings/cache_backed.cjs +1 -1
- package/dist/embeddings/cache_backed.cjs.map +1 -1
- package/dist/embeddings/cache_backed.d.cts +1 -1
- package/dist/embeddings/cache_backed.d.ts +1 -1
- package/dist/embeddings/cache_backed.js +2 -2
- package/dist/embeddings/cache_backed.js.map +1 -1
- package/dist/evaluation/agents/trajectory.d.cts +3 -3
- package/dist/evaluation/agents/trajectory.d.cts.map +1 -1
- package/dist/evaluation/agents/trajectory.d.ts.map +1 -1
- package/dist/evaluation/comparison/pairwise.d.cts +1 -1
- package/dist/evaluation/comparison/pairwise.d.cts.map +1 -1
- package/dist/evaluation/criteria/criteria.d.cts +1 -1
- package/dist/evaluation/criteria/criteria.d.cts.map +1 -1
- package/dist/evaluation/criteria/criteria.d.ts.map +1 -1
- package/dist/evaluation/embedding_distance/base.cjs +2 -4
- package/dist/evaluation/embedding_distance/base.cjs.map +1 -1
- package/dist/evaluation/embedding_distance/base.js +2 -3
- package/dist/evaluation/embedding_distance/base.js.map +1 -1
- package/dist/evaluation/loader.cjs +7 -12
- package/dist/evaluation/loader.cjs.map +1 -1
- package/dist/evaluation/loader.d.cts +8 -2
- package/dist/evaluation/loader.d.cts.map +1 -1
- package/dist/evaluation/loader.d.ts +8 -2
- package/dist/evaluation/loader.d.ts.map +1 -1
- package/dist/evaluation/loader.js +7 -12
- package/dist/evaluation/loader.js.map +1 -1
- package/dist/evaluation/qa/eval_chain.d.cts +1 -1
- package/dist/hub/base.cjs.map +1 -1
- package/dist/hub/base.js.map +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/langchain-core/dist/load/serializable.d.cts.map +1 -1
- package/dist/langchain-core/dist/messages/base.d.cts +24 -33
- package/dist/langchain-core/dist/messages/base.d.cts.map +1 -1
- package/dist/langchain-core/dist/messages/content/index.d.cts +1 -1
- package/dist/langchain-core/dist/messages/content/index.d.cts.map +1 -1
- package/dist/langchain-core/dist/messages/message.d.cts +598 -0
- package/dist/langchain-core/dist/messages/message.d.cts.map +1 -0
- package/dist/langchain-core/dist/messages/metadata.d.cts +97 -0
- package/dist/langchain-core/dist/messages/metadata.d.cts.map +1 -0
- package/dist/langchain-core/dist/messages/utils.d.cts +75 -0
- package/dist/langchain-core/dist/messages/utils.d.cts.map +1 -0
- package/dist/langchain-core/dist/prompt_values.d.cts.map +1 -1
- package/dist/libs/langchain-core/dist/load/serializable.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/messages/base.d.ts +24 -33
- package/dist/libs/langchain-core/dist/messages/base.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/messages/content/index.d.ts +1 -1
- package/dist/libs/langchain-core/dist/messages/content/index.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/messages/message.d.ts +598 -0
- package/dist/libs/langchain-core/dist/messages/message.d.ts.map +1 -0
- package/dist/libs/langchain-core/dist/messages/metadata.d.ts +97 -0
- package/dist/libs/langchain-core/dist/messages/metadata.d.ts.map +1 -0
- package/dist/libs/langchain-core/dist/messages/utils.d.ts +75 -0
- package/dist/libs/langchain-core/dist/messages/utils.d.ts.map +1 -0
- package/dist/libs/langchain-core/dist/prompt_values.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/utils/types/index.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/types/index.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/utils/types/zod.d.ts +1 -0
- package/dist/load/import_map.cjs +2 -13
- package/dist/load/import_map.cjs.map +1 -1
- package/dist/load/import_map.js +2 -13
- package/dist/load/import_map.js.map +1 -1
- package/dist/memory/prompt.cjs.map +1 -1
- package/dist/memory/prompt.d.cts.map +1 -1
- package/dist/memory/prompt.d.ts.map +1 -1
- package/dist/memory/prompt.js.map +1 -1
- package/dist/memory/summary.d.cts +1 -1
- package/dist/output_parsers/combining.cjs +1 -1
- package/dist/output_parsers/combining.cjs.map +1 -1
- package/dist/output_parsers/combining.js +1 -1
- package/dist/output_parsers/combining.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/base.cjs +1 -1
- package/dist/output_parsers/expression_type_handlers/base.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/base.js +1 -1
- package/dist/output_parsers/expression_type_handlers/base.js.map +1 -1
- package/dist/output_parsers/fix.d.cts +1 -1
- package/dist/output_parsers/http_response.d.cts +1 -1
- package/dist/output_parsers/regex.cjs.map +1 -1
- package/dist/output_parsers/regex.js.map +1 -1
- package/dist/output_parsers/structured.cjs +4 -4
- package/dist/output_parsers/structured.cjs.map +1 -1
- package/dist/output_parsers/structured.d.cts +2 -2
- package/dist/output_parsers/structured.d.cts.map +1 -1
- package/dist/output_parsers/structured.d.ts +1 -1
- package/dist/output_parsers/structured.d.ts.map +1 -1
- package/dist/output_parsers/structured.js +2 -2
- package/dist/output_parsers/structured.js.map +1 -1
- package/dist/retrievers/ensemble.cjs.map +1 -1
- package/dist/retrievers/ensemble.js.map +1 -1
- package/dist/storage/file_system.cjs +1 -1
- package/dist/storage/file_system.cjs.map +1 -1
- package/dist/storage/file_system.js +1 -1
- package/dist/storage/file_system.js.map +1 -1
- package/dist/tools/fs.cjs +5 -5
- package/dist/tools/fs.cjs.map +1 -1
- package/dist/tools/fs.d.cts +1 -1
- package/dist/tools/fs.d.cts.map +1 -1
- package/dist/tools/fs.d.ts +1 -1
- package/dist/tools/fs.d.ts.map +1 -1
- package/dist/tools/fs.js +1 -1
- package/dist/tools/fs.js.map +1 -1
- package/dist/tools/json.d.cts +1 -1
- package/dist/tools/retriever.cjs +2 -2
- package/dist/tools/retriever.cjs.map +1 -1
- package/dist/tools/retriever.d.cts +2 -2
- package/dist/tools/retriever.d.cts.map +1 -1
- package/dist/tools/retriever.d.ts +1 -1
- package/dist/tools/retriever.d.ts.map +1 -1
- package/dist/tools/retriever.js +1 -1
- package/dist/tools/retriever.js.map +1 -1
- package/dist/tools/sql.cjs +1 -2
- package/dist/tools/sql.cjs.map +1 -1
- package/dist/tools/sql.d.cts +1 -1
- package/dist/tools/sql.d.cts.map +1 -1
- package/dist/tools/sql.d.ts +1 -1
- package/dist/tools/sql.d.ts.map +1 -1
- package/dist/tools/sql.js +1 -2
- package/dist/tools/sql.js.map +1 -1
- package/dist/tools/vectorstore.d.cts +1 -1
- package/dist/tools/webbrowser.d.cts +1 -1
- package/dist/types/expression-parser.d.cts +2 -0
- package/dist/types/expression-parser.d.cts.map +1 -1
- package/dist/types/expression-parser.d.ts +2 -0
- package/dist/types/expression-parser.d.ts.map +1 -1
- package/dist/util/hub.cjs +1 -1
- package/dist/util/hub.js +1 -1
- package/dist/util/openapi.cjs +1 -1
- package/dist/util/openapi.cjs.map +1 -1
- package/dist/util/openapi.js +1 -1
- package/dist/util/openapi.js.map +1 -1
- package/package.json +21 -16
- package/dist/chains/openai_functions/structured_output.cjs +0 -107
- package/dist/chains/openai_functions/structured_output.cjs.map +0 -1
- package/dist/chains/openai_functions/structured_output.d.cts +0 -38
- package/dist/chains/openai_functions/structured_output.d.cts.map +0 -1
- package/dist/chains/openai_functions/structured_output.d.ts +0 -38
- package/dist/chains/openai_functions/structured_output.d.ts.map +0 -1
- package/dist/chains/openai_functions/structured_output.js +0 -105
- package/dist/chains/openai_functions/structured_output.js.map +0 -1
- package/dist/chains/openai_moderation.cjs +0 -107
- package/dist/chains/openai_moderation.cjs.map +0 -1
- package/dist/chains/openai_moderation.d.cts +0 -74
- package/dist/chains/openai_moderation.d.cts.map +0 -1
- package/dist/chains/openai_moderation.d.ts +0 -74
- package/dist/chains/openai_moderation.d.ts.map +0 -1
- package/dist/chains/openai_moderation.js +0 -106
- package/dist/chains/openai_moderation.js.map +0 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
//#region ../langchain-core/dist/messages/metadata.d.ts
|
|
2
|
+
//#region src/messages/metadata.d.ts
|
|
3
|
+
type ResponseMetadata = {
|
|
4
|
+
model_provider?: string;
|
|
5
|
+
model_name?: string;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
type ModalitiesTokenDetails = {
|
|
9
|
+
/**
|
|
10
|
+
* Text tokens.
|
|
11
|
+
* Does not need to be reported, but some models will do so.
|
|
12
|
+
*/
|
|
13
|
+
text?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Image (non-video) tokens.
|
|
16
|
+
*/
|
|
17
|
+
image?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Audio tokens.
|
|
20
|
+
*/
|
|
21
|
+
audio?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Video tokens.
|
|
24
|
+
*/
|
|
25
|
+
video?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Document tokens.
|
|
28
|
+
* e.g. PDF
|
|
29
|
+
*/
|
|
30
|
+
document?: number;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Breakdown of input token counts.
|
|
34
|
+
*
|
|
35
|
+
* Does not *need* to sum to full input token count. Does *not* need to have all keys.
|
|
36
|
+
*/
|
|
37
|
+
type InputTokenDetails = ModalitiesTokenDetails & {
|
|
38
|
+
/**
|
|
39
|
+
* Input tokens that were cached and there was a cache hit.
|
|
40
|
+
*
|
|
41
|
+
* Since there was a cache hit, the tokens were read from the cache.
|
|
42
|
+
* More precisely, the model state given these tokens was read from the cache.
|
|
43
|
+
*/
|
|
44
|
+
cache_read?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Input tokens that were cached and there was a cache miss.
|
|
47
|
+
*
|
|
48
|
+
* Since there was a cache miss, the cache was created from these tokens.
|
|
49
|
+
*/
|
|
50
|
+
cache_creation?: number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Breakdown of output token counts.
|
|
54
|
+
*
|
|
55
|
+
* Does *not* need to sum to full output token count. Does *not* need to have all keys.
|
|
56
|
+
*/
|
|
57
|
+
type OutputTokenDetails = ModalitiesTokenDetails & {
|
|
58
|
+
/**
|
|
59
|
+
* Reasoning output tokens.
|
|
60
|
+
*
|
|
61
|
+
* Tokens generated by the model in a chain of thought process (i.e. by
|
|
62
|
+
* OpenAI's o1 models) that are not returned as part of model output.
|
|
63
|
+
*/
|
|
64
|
+
reasoning?: number;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Usage metadata for a message, such as token counts.
|
|
68
|
+
*/
|
|
69
|
+
type UsageMetadata = {
|
|
70
|
+
/**
|
|
71
|
+
* Count of input (or prompt) tokens. Sum of all input token types.
|
|
72
|
+
*/
|
|
73
|
+
input_tokens: number;
|
|
74
|
+
/**
|
|
75
|
+
* Count of output (or completion) tokens. Sum of all output token types.
|
|
76
|
+
*/
|
|
77
|
+
output_tokens: number;
|
|
78
|
+
/**
|
|
79
|
+
* Total token count. Sum of input_tokens + output_tokens.
|
|
80
|
+
*/
|
|
81
|
+
total_tokens: number;
|
|
82
|
+
/**
|
|
83
|
+
* Breakdown of input token counts.
|
|
84
|
+
*
|
|
85
|
+
* Does *not* need to sum to full input token count. Does *not* need to have all keys.
|
|
86
|
+
*/
|
|
87
|
+
input_token_details?: InputTokenDetails;
|
|
88
|
+
/**
|
|
89
|
+
* Breakdown of output token counts.
|
|
90
|
+
*
|
|
91
|
+
* Does *not* need to sum to full output token count. Does *not* need to have all keys.
|
|
92
|
+
*/
|
|
93
|
+
output_token_details?: OutputTokenDetails;
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
export { ResponseMetadata, UsageMetadata };
|
|
97
|
+
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","names":["ResponseMetadata","mergeResponseMetadata","ModalitiesTokenDetails","InputTokenDetails","OutputTokenDetails","UsageMetadata","mergeUsageMetadata"],"sources":["../../../../../../langchain-core/dist/messages/metadata.d.ts"],"sourcesContent":["//#region src/messages/metadata.d.ts\ntype ResponseMetadata = {\n model_provider?: string;\n model_name?: string;\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":";;KACKA,gBAAAA,GAAgB;EAK+E,cAC/FE,CAAAA,EAAAA,MAAAA;EAAsB,UA6BtBC,CAAAA,EAAAA,MAAAA;EAA0C,CAAA,GAoB1CC,EAAAA,MAAAA,CAAAA,EAAAA,OAAAA;AAA2C,CAAA;KAjD3CF,sBAAAA,GA+EmBC;EAAiB;AAME;;;;;;;;;;;;;;;;;;;;;;;;;;;KAxDtCA,iBAAAA,GAAoBD;;;;;;;;;;;;;;;;;;;;KAoBpBE,kBAAAA,GAAqBF;;;;;;;;;;;;KAYrBG,aAAAA;;;;;;;;;;;;;;;;;;wBAkBmBF;;;;;;yBAMCC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
//#region ../langchain-core/dist/messages/utils.d.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Extracts the explicitly declared keys from a type T.
|
|
5
|
+
*
|
|
6
|
+
* @template T - The type to extract keys from
|
|
7
|
+
* @returns A union of keys that are not string, number, or symbol
|
|
8
|
+
*/
|
|
9
|
+
type $KnownKeys<T> = { [K in keyof T]: string extends K ? never : number extends K ? never : symbol extends K ? never : K }[keyof T];
|
|
10
|
+
/**
|
|
11
|
+
* Detects if T has an index signature.
|
|
12
|
+
*
|
|
13
|
+
* @template T - The type to check for index signatures
|
|
14
|
+
* @returns True if T has an index signature, false otherwise
|
|
15
|
+
*/
|
|
16
|
+
type $HasIndexSignature<T> = string extends keyof T ? true : number extends keyof T ? true : symbol extends keyof T ? true : false;
|
|
17
|
+
/**
|
|
18
|
+
* Detects if T has an index signature and no known keys.
|
|
19
|
+
*
|
|
20
|
+
* @template T - The type to check for index signatures and no known keys
|
|
21
|
+
* @returns True if T has an index signature and no known keys, false otherwise
|
|
22
|
+
*/
|
|
23
|
+
type $OnlyIndexSignatures<T> = $HasIndexSignature<T> extends true ? [$KnownKeys<T>] extends [never] ? true : false : false;
|
|
24
|
+
/**
|
|
25
|
+
* Recursively merges two object types T and U, with U taking precedence over T.
|
|
26
|
+
*
|
|
27
|
+
* This utility type performs a deep merge of two object types:
|
|
28
|
+
* - For keys that exist in both T and U:
|
|
29
|
+
* - If both values are objects (Record<string, unknown>), recursively merge them
|
|
30
|
+
* - Otherwise, U's value takes precedence
|
|
31
|
+
* - For keys that exist only in T, use T's value
|
|
32
|
+
* - For keys that exist only in U, use U's value
|
|
33
|
+
*
|
|
34
|
+
* @template T - The first object type to merge
|
|
35
|
+
* @template U - The second object type to merge (takes precedence over T)
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* type ObjectA = {
|
|
40
|
+
* shared: { a: string; b: number };
|
|
41
|
+
* onlyInA: boolean;
|
|
42
|
+
* };
|
|
43
|
+
*
|
|
44
|
+
* type ObjectB = {
|
|
45
|
+
* shared: { b: string; c: Date };
|
|
46
|
+
* onlyInB: symbol;
|
|
47
|
+
* };
|
|
48
|
+
*
|
|
49
|
+
* type Merged = $MergeObjects<ObjectA, ObjectB>;
|
|
50
|
+
* // Result: {
|
|
51
|
+
* // shared: { a: string; b: string; c: Date };
|
|
52
|
+
* // onlyInA: boolean;
|
|
53
|
+
* // onlyInB: symbol;
|
|
54
|
+
* // }
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
type $MergeObjects<T, U> =
|
|
58
|
+
// If U is purely index-signature based, prefer U as a whole
|
|
59
|
+
$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 };
|
|
60
|
+
/**
|
|
61
|
+
* Merges two discriminated unions A and B based on a discriminator key (defaults to "type").
|
|
62
|
+
* For each possible value of the discriminator across both unions:
|
|
63
|
+
* - If B has a member with that discriminator value, use B's member
|
|
64
|
+
* - Otherwise use A's member with that discriminator value
|
|
65
|
+
* This effectively merges the unions while giving B's members precedence over A's members.
|
|
66
|
+
*
|
|
67
|
+
* @template A - First discriminated union type that extends Record<Key, PropertyKey>
|
|
68
|
+
* @template B - Second discriminated union type that extends Record<Key, PropertyKey>
|
|
69
|
+
* @template Key - The discriminator key property, defaults to "type"
|
|
70
|
+
*/
|
|
71
|
+
type $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
|
|
72
|
+
? 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]];
|
|
73
|
+
//#endregion
|
|
74
|
+
export { $MergeDiscriminatedUnion, $MergeObjects };
|
|
75
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt_values.d.ts","names":["Serializable","BaseMessage","HumanMessage","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\";\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[];\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[];\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[];\n}\n//#endregion\nexport { BasePromptValue, BasePromptValueInterface, ChatPromptValue, ChatPromptValueFields, ChatPromptValueInterface, ImageContent, ImagePromptValue, ImagePromptValueFields, StringPromptValue, StringPromptValueInterface };\n//# sourceMappingURL=prompt_values.d.ts.map"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompt_values.d.ts","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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["InferInteropZodInput","InferInteropZodOutput","InteropZodIssue","InteropZodObject","InteropZodObjectShape","InteropZodType","Mutable","ZodObjectV3","ZodObjectV4","ZodStringV3","ZodStringV4","extendInteropZodObject","getInteropZodDefaultGetter","getInteropZodObjectShape","getSchemaDescription","interopParse","interopParseAsync","interopSafeParse","interopSafeParseAsync","interopZodObjectPartial","interopZodObjectPassthrough","interopZodObjectStrict","interopZodTransformInputSchema","isInteropZodObject","isInteropZodSchema","isShapelessZodSchema","isSimpleStringZodSchema","isZodArrayV4","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, InteropZodIssue, InteropZodObject, InteropZodObjectShape, InteropZodType, Mutable, ZodObjectV3, ZodObjectV4, ZodStringV3, ZodStringV4, extendInteropZodObject, getInteropZodDefaultGetter, getInteropZodObjectShape, getSchemaDescription, interopParse, interopParseAsync, interopSafeParse, interopSafeParseAsync, interopZodObjectPartial, interopZodObjectPassthrough, interopZodObjectStrict, interopZodTransformInputSchema, isInteropZodObject, isInteropZodSchema, isShapelessZodSchema, isSimpleStringZodSchema, isZodArrayV4, 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, InteropZodIssue, InteropZodObject, InteropZodObjectShape, InteropZodType, Mutable, PartialValues, StringWithAutocomplete, ZodObjectV3, ZodObjectV4, ZodStringV3, ZodStringV4, extendInteropZodObject, getInteropZodDefaultGetter, getInteropZodObjectShape, getSchemaDescription, interopParse, interopParseAsync, interopSafeParse, interopSafeParseAsync, interopZodObjectPartial, interopZodObjectPassthrough, interopZodObjectStrict, interopZodTransformInputSchema, isInteropZodObject, isInteropZodSchema, isShapelessZodSchema, isSimpleStringZodSchema, isZodArrayV4, isZodObjectV3, isZodObjectV4, isZodSchema, isZodSchemaV3, isZodSchemaV4 };\n//# sourceMappingURL=index.d.ts.map"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["InferInteropZodInput","InferInteropZodOutput","InteropZodIssue","InteropZodObject","InteropZodObjectShape","InteropZodType","Mutable","ZodObjectV3","ZodObjectV4","ZodStringV3","ZodStringV4","extendInteropZodObject","getInteropZodDefaultGetter","getInteropZodObjectShape","getSchemaDescription","interopParse","interopParseAsync","interopSafeParse","interopSafeParseAsync","interopZodObjectPartial","interopZodObjectPassthrough","interopZodObjectStrict","interopZodTransformInputSchema","isInteropZodObject","isInteropZodSchema","isShapelessZodSchema","isSimpleStringZodSchema","isZodArrayV4","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, InteropZodIssue, InteropZodObject, InteropZodObjectShape, InteropZodType, Mutable, ZodObjectV3, ZodObjectV4, ZodStringV3, ZodStringV4, extendInteropZodObject, getInteropZodDefaultGetter, getInteropZodObjectShape, getSchemaDescription, interopParse, interopParseAsync, interopSafeParse, interopSafeParseAsync, interopZodObjectPartial, interopZodObjectPassthrough, interopZodObjectStrict, interopZodTransformInputSchema, isInteropZodObject, isInteropZodSchema, isShapelessZodSchema, isSimpleStringZodSchema, isZodArrayV4, 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, InteropZodIssue, InteropZodObject, InteropZodObjectShape, InteropZodType, Mutable, PartialValues, StringWithAutocomplete, ZodObjectV3, ZodObjectV4, ZodStringV3, ZodStringV4, extendInteropZodObject, getInteropZodDefaultGetter, getInteropZodObjectShape, getSchemaDescription, interopParse, interopParseAsync, interopSafeParse, interopSafeParseAsync, interopZodObjectPartial, interopZodObjectPassthrough, interopZodObjectStrict, interopZodTransformInputSchema, isInteropZodObject, isInteropZodSchema, isShapelessZodSchema, isSimpleStringZodSchema, isZodArrayV4, isZodObjectV3, isZodObjectV4, isZodSchema, isZodSchemaV3, isZodSchemaV4 };\n//# sourceMappingURL=index.d.ts.map"],"mappings":";;;;;KAYKwC,WAAAA,GAAcL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "zod/v3";
|
package/dist/load/import_map.cjs
CHANGED
|
@@ -32,6 +32,7 @@ const require_chains_query_constructor_ir = require('../chains/query_constructor
|
|
|
32
32
|
const require_chains_sql_db_index = require('../chains/sql_db/index.cjs');
|
|
33
33
|
const require_chains_graph_qa_cypher = require('../chains/graph_qa/cypher.cjs');
|
|
34
34
|
const require_memory_index = require('../memory/index.cjs');
|
|
35
|
+
const require_agents_middlewareAgent_middleware_index = require('../agents/middlewareAgent/middleware/index.cjs');
|
|
35
36
|
const require_document_loaders_fs_buffer = require('../document_loaders/fs/buffer.cjs');
|
|
36
37
|
const require_document_loaders_fs_directory = require('../document_loaders/fs/directory.cjs');
|
|
37
38
|
const require_document_loaders_fs_text = require('../document_loaders/fs/text.cjs');
|
|
@@ -66,7 +67,6 @@ const __langchain_core_runnables = require_rolldown_runtime.__toESM(require("@la
|
|
|
66
67
|
const __langchain_core_prompts = require_rolldown_runtime.__toESM(require("@langchain/core/prompts"));
|
|
67
68
|
const __langchain_core_output_parsers = require_rolldown_runtime.__toESM(require("@langchain/core/output_parsers"));
|
|
68
69
|
const __langchain_core_outputs = require_rolldown_runtime.__toESM(require("@langchain/core/outputs"));
|
|
69
|
-
const __langchain_openai = require_rolldown_runtime.__toESM(require("@langchain/openai"));
|
|
70
70
|
const __langchain_core_prompt_values = require_rolldown_runtime.__toESM(require("@langchain/core/prompt_values"));
|
|
71
71
|
|
|
72
72
|
//#region src/load/import_map.ts
|
|
@@ -83,8 +83,6 @@ require_rolldown_runtime.__export(import_map_exports, {
|
|
|
83
83
|
chains__query_constructor__ir: () => require_chains_query_constructor_ir.ir_exports,
|
|
84
84
|
chains__retrieval: () => require_chains_retrieval.retrieval_exports,
|
|
85
85
|
chains__sql_db: () => require_chains_sql_db_index.sql_db_exports,
|
|
86
|
-
chat_models__azure_openai: () => chat_models__azure_openai,
|
|
87
|
-
chat_models__openai: () => chat_models__openai,
|
|
88
86
|
chat_models__universal: () => require_chat_models_universal.universal_exports,
|
|
89
87
|
document: () => require_document.document_exports,
|
|
90
88
|
document_loaders__base: () => require_document_loaders_base.base_exports,
|
|
@@ -93,17 +91,14 @@ require_rolldown_runtime.__export(import_map_exports, {
|
|
|
93
91
|
document_loaders__fs__json: () => require_document_loaders_fs_json.json_exports,
|
|
94
92
|
document_loaders__fs__multi_file: () => require_document_loaders_fs_multi_file.multi_file_exports,
|
|
95
93
|
document_loaders__fs__text: () => require_document_loaders_fs_text.text_exports,
|
|
96
|
-
embeddings__azure_openai: () => embeddings__azure_openai,
|
|
97
94
|
embeddings__cache_backed: () => require_embeddings_cache_backed.cache_backed_exports,
|
|
98
95
|
embeddings__fake: () => require_embeddings_fake.fake_exports,
|
|
99
|
-
embeddings__openai: () => embeddings__openai,
|
|
100
96
|
evaluation: () => require_evaluation_index.evaluation_exports,
|
|
101
97
|
index: () => require_index.src_exports,
|
|
102
|
-
llms__azure_openai: () => llms__azure_openai,
|
|
103
|
-
llms__openai: () => llms__openai,
|
|
104
98
|
load__serializable: () => require_load_serializable.serializable_exports,
|
|
105
99
|
memory: () => require_memory_index.memory_exports,
|
|
106
100
|
memory__chat_memory: () => require_memory_chat_memory.chat_memory_exports,
|
|
101
|
+
middleware: () => require_agents_middlewareAgent_middleware_index.middleware_exports,
|
|
107
102
|
output_parsers: () => require_output_parsers_index.output_parsers_exports,
|
|
108
103
|
output_parsers__expression: () => require_output_parsers_expression.expression_exports,
|
|
109
104
|
prompts__base: () => prompts__base,
|
|
@@ -151,12 +146,6 @@ require_rolldown_runtime.__export(import_map_exports, {
|
|
|
151
146
|
util__time: () => require_util_time.time_exports,
|
|
152
147
|
vectorstores__memory: () => require_vectorstores_memory.memory_exports
|
|
153
148
|
});
|
|
154
|
-
const chat_models__openai = { ChatOpenAI: __langchain_openai.ChatOpenAI };
|
|
155
|
-
const chat_models__azure_openai = { AzureChatOpenAI: __langchain_openai.AzureChatOpenAI };
|
|
156
|
-
const llms__openai = { OpenAI: __langchain_openai.OpenAI };
|
|
157
|
-
const llms__azure_openai = { AzureOpenAI: __langchain_openai.AzureOpenAI };
|
|
158
|
-
const embeddings__openai = { OpenAIEmbeddings: __langchain_openai.OpenAIEmbeddings };
|
|
159
|
-
const embeddings__azure_openai = { AzureOpenAIEmbeddings: __langchain_openai.AzureOpenAIEmbeddings };
|
|
160
149
|
const prompts__prompt = { PromptTemplate: __langchain_core_prompts.PromptTemplate };
|
|
161
150
|
const schema__messages = {
|
|
162
151
|
AIMessage: __langchain_core_messages.AIMessage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import_map.cjs","names":[],"sources":["../../src/load/import_map.ts"],"sourcesContent":["// Auto-generated by import-map plugin. Do not edit manually.\n\nexport * as index from \"../index.js\";\nexport * as load__serializable from \"../load/serializable.js\";\nexport * as tools from \"../tools/index.js\";\nexport * as tools__chain from \"../tools/chain.js\";\nexport * as tools__render from \"../tools/render.js\";\nexport * as tools__retriever from \"../tools/retriever.js\";\nexport * as tools__sql from \"../tools/sql.js\";\nexport * as tools__webbrowser from \"../tools/webbrowser.js\";\nexport * as chains from \"../chains/index.js\";\nexport * as chains__combine_documents from \"../chains/combine_documents/index.js\";\nexport * as chains__combine_documents__reduce from \"../chains/combine_documents/reduce.js\";\nexport * as chains__history_aware_retriever from \"../chains/history_aware_retriever.js\";\nexport * as chains__load from \"../chains/load.js\";\nexport * as chains__openai_functions from \"../chains/openai_functions/index.js\";\nexport * as chains__query_constructor from \"../chains/query_constructor/index.js\";\nexport * as chains__query_constructor__ir from \"../chains/query_constructor/ir.js\";\nexport * as chains__retrieval from \"../chains/retrieval.js\";\nexport * as chains__sql_db from \"../chains/sql_db/index.js\";\nexport * as chains__graph_qa__cypher from \"../chains/graph_qa/cypher.js\";\nexport * as chat_models__universal from \"../chat_models/universal.js\";\nexport * as embeddings__cache_backed from \"../embeddings/cache_backed.js\";\nexport * as embeddings__fake from \"../embeddings/fake.js\";\nexport * as vectorstores__memory from \"../vectorstores/memory.js\";\nexport * as text_splitter from \"../text_splitter.js\";\nexport * as memory from \"../memory/index.js\";\nexport * as memory__chat_memory from \"../memory/chat_memory.js\";\nexport * as document from \"../document.js\";\nexport * as document_loaders__base from \"../document_loaders/base.js\";\nexport * as document_loaders__fs__buffer from \"../document_loaders/fs/buffer.js\";\nexport * as document_loaders__fs__directory from \"../document_loaders/fs/directory.js\";\nexport * as document_loaders__fs__json from \"../document_loaders/fs/json.js\";\nexport * as document_loaders__fs__multi_file from \"../document_loaders/fs/multi_file.js\";\nexport * as document_loaders__fs__text from \"../document_loaders/fs/text.js\";\nexport * as sql_db from \"../sql_db.js\";\nexport * as output_parsers from \"../output_parsers/index.js\";\nexport * as output_parsers__expression from \"../output_parsers/expression.js\";\nexport * as retrievers__contextual_compression from \"../retrievers/contextual_compression.js\";\nexport * as retrievers__document_compressors from \"../retrievers/document_compressors/index.js\";\nexport * as retrievers__ensemble from \"../retrievers/ensemble.js\";\nexport * as retrievers__multi_query from \"../retrievers/multi_query.js\";\nexport * as retrievers__multi_vector from \"../retrievers/multi_vector.js\";\nexport * as retrievers__parent_document from \"../retrievers/parent_document.js\";\nexport * as retrievers__time_weighted from \"../retrievers/time_weighted.js\";\nexport * as retrievers__document_compressors__chain_extract from \"../retrievers/document_compressors/chain_extract.js\";\nexport * as retrievers__document_compressors__embeddings_filter from \"../retrievers/document_compressors/embeddings_filter.js\";\nexport * as retrievers__hyde from \"../retrievers/hyde.js\";\nexport * as retrievers__score_threshold from \"../retrievers/score_threshold.js\";\nexport * as retrievers__self_query from \"../retrievers/self_query/index.js\";\nexport * as retrievers__self_query__functional from \"../retrievers/self_query/functional.js\";\nexport * as retrievers__matryoshka_retriever from \"../retrievers/matryoshka_retriever.js\";\nexport * as stores__doc__base from \"../stores/doc/base.js\";\nexport * as stores__doc__in_memory from \"../stores/doc/in_memory.js\";\nexport * as stores__file__in_memory from \"../stores/file/in_memory.js\";\nexport * as stores__file__node from \"../stores/file/node.js\";\nexport * as stores__message__in_memory from \"../stores/message/in_memory.js\";\nexport * as storage__encoder_backed from \"../storage/encoder_backed.js\";\nexport * as storage__in_memory from \"../storage/in_memory.js\";\nexport * as storage__file_system from \"../storage/file_system.js\";\nexport * as util__document from \"../util/document.js\";\nexport * as util__math from \"../util/math.js\";\nexport * as util__time from \"../util/time.js\";\nexport * as evaluation from \"../evaluation/index.js\";\nimport {\n
|
|
1
|
+
{"version":3,"file":"import_map.cjs","names":[],"sources":["../../src/load/import_map.ts"],"sourcesContent":["// Auto-generated by import-map plugin. Do not edit manually.\n\nexport * as index from \"../index.js\";\nexport * as load__serializable from \"../load/serializable.js\";\nexport * as tools from \"../tools/index.js\";\nexport * as tools__chain from \"../tools/chain.js\";\nexport * as tools__render from \"../tools/render.js\";\nexport * as tools__retriever from \"../tools/retriever.js\";\nexport * as tools__sql from \"../tools/sql.js\";\nexport * as tools__webbrowser from \"../tools/webbrowser.js\";\nexport * as chains from \"../chains/index.js\";\nexport * as chains__combine_documents from \"../chains/combine_documents/index.js\";\nexport * as chains__combine_documents__reduce from \"../chains/combine_documents/reduce.js\";\nexport * as chains__history_aware_retriever from \"../chains/history_aware_retriever.js\";\nexport * as chains__load from \"../chains/load.js\";\nexport * as chains__openai_functions from \"../chains/openai_functions/index.js\";\nexport * as chains__query_constructor from \"../chains/query_constructor/index.js\";\nexport * as chains__query_constructor__ir from \"../chains/query_constructor/ir.js\";\nexport * as chains__retrieval from \"../chains/retrieval.js\";\nexport * as chains__sql_db from \"../chains/sql_db/index.js\";\nexport * as chains__graph_qa__cypher from \"../chains/graph_qa/cypher.js\";\nexport * as chat_models__universal from \"../chat_models/universal.js\";\nexport * as embeddings__cache_backed from \"../embeddings/cache_backed.js\";\nexport * as embeddings__fake from \"../embeddings/fake.js\";\nexport * as vectorstores__memory from \"../vectorstores/memory.js\";\nexport * as text_splitter from \"../text_splitter.js\";\nexport * as memory from \"../memory/index.js\";\nexport * as memory__chat_memory from \"../memory/chat_memory.js\";\nexport * as middleware from \"../agents/middlewareAgent/middleware/index.js\";\nexport * as document from \"../document.js\";\nexport * as document_loaders__base from \"../document_loaders/base.js\";\nexport * as document_loaders__fs__buffer from \"../document_loaders/fs/buffer.js\";\nexport * as document_loaders__fs__directory from \"../document_loaders/fs/directory.js\";\nexport * as document_loaders__fs__json from \"../document_loaders/fs/json.js\";\nexport * as document_loaders__fs__multi_file from \"../document_loaders/fs/multi_file.js\";\nexport * as document_loaders__fs__text from \"../document_loaders/fs/text.js\";\nexport * as sql_db from \"../sql_db.js\";\nexport * as output_parsers from \"../output_parsers/index.js\";\nexport * as output_parsers__expression from \"../output_parsers/expression.js\";\nexport * as retrievers__contextual_compression from \"../retrievers/contextual_compression.js\";\nexport * as retrievers__document_compressors from \"../retrievers/document_compressors/index.js\";\nexport * as retrievers__ensemble from \"../retrievers/ensemble.js\";\nexport * as retrievers__multi_query from \"../retrievers/multi_query.js\";\nexport * as retrievers__multi_vector from \"../retrievers/multi_vector.js\";\nexport * as retrievers__parent_document from \"../retrievers/parent_document.js\";\nexport * as retrievers__time_weighted from \"../retrievers/time_weighted.js\";\nexport * as retrievers__document_compressors__chain_extract from \"../retrievers/document_compressors/chain_extract.js\";\nexport * as retrievers__document_compressors__embeddings_filter from \"../retrievers/document_compressors/embeddings_filter.js\";\nexport * as retrievers__hyde from \"../retrievers/hyde.js\";\nexport * as retrievers__score_threshold from \"../retrievers/score_threshold.js\";\nexport * as retrievers__self_query from \"../retrievers/self_query/index.js\";\nexport * as retrievers__self_query__functional from \"../retrievers/self_query/functional.js\";\nexport * as retrievers__matryoshka_retriever from \"../retrievers/matryoshka_retriever.js\";\nexport * as stores__doc__base from \"../stores/doc/base.js\";\nexport * as stores__doc__in_memory from \"../stores/doc/in_memory.js\";\nexport * as stores__file__in_memory from \"../stores/file/in_memory.js\";\nexport * as stores__file__node from \"../stores/file/node.js\";\nexport * as stores__message__in_memory from \"../stores/message/in_memory.js\";\nexport * as storage__encoder_backed from \"../storage/encoder_backed.js\";\nexport * as storage__in_memory from \"../storage/in_memory.js\";\nexport * as storage__file_system from \"../storage/file_system.js\";\nexport * as util__document from \"../util/document.js\";\nexport * as util__math from \"../util/math.js\";\nexport * as util__time from \"../util/time.js\";\nexport * as evaluation from \"../evaluation/index.js\";\nimport {\n PromptTemplate,\n AIMessagePromptTemplate,\n ChatMessagePromptTemplate,\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n MessagesPlaceholder,\n SystemMessagePromptTemplate,\n ImagePromptTemplate,\n PipelinePromptTemplate,\n} from \"@langchain/core/prompts\";\nimport {\n AIMessage,\n AIMessageChunk,\n BaseMessage,\n BaseMessageChunk,\n ChatMessage,\n ChatMessageChunk,\n FunctionMessage,\n FunctionMessageChunk,\n HumanMessage,\n HumanMessageChunk,\n SystemMessage,\n SystemMessageChunk,\n ToolMessage,\n ToolMessageChunk,\n} from \"@langchain/core/messages\";\nimport { StringPromptValue } from \"@langchain/core/prompt_values\";\nimport {\n RouterRunnable,\n RunnableAssign,\n RunnableBinding,\n RunnableBranch,\n RunnableEach,\n RunnableMap,\n RunnableParallel,\n RunnablePassthrough,\n RunnablePick,\n RunnableRetry,\n RunnableSequence,\n RunnableWithFallbacks,\n RunnableWithMessageHistory,\n} from \"@langchain/core/runnables\";\nimport { StringOutputParser } from \"@langchain/core/output_parsers\";\nimport { ChatGenerationChunk, GenerationChunk } from \"@langchain/core/outputs\";\nconst prompts__prompt = {\n PromptTemplate,\n};\nexport { prompts__prompt };\nconst schema__messages = {\n AIMessage,\n AIMessageChunk,\n BaseMessage,\n BaseMessageChunk,\n ChatMessage,\n ChatMessageChunk,\n FunctionMessage,\n FunctionMessageChunk,\n HumanMessage,\n HumanMessageChunk,\n SystemMessage,\n SystemMessageChunk,\n ToolMessage,\n ToolMessageChunk,\n};\nexport { schema__messages };\nconst schema = {\n AIMessage,\n AIMessageChunk,\n BaseMessage,\n BaseMessageChunk,\n ChatMessage,\n ChatMessageChunk,\n FunctionMessage,\n FunctionMessageChunk,\n HumanMessage,\n HumanMessageChunk,\n SystemMessage,\n SystemMessageChunk,\n ToolMessage,\n ToolMessageChunk,\n};\nexport { schema };\nconst prompts__chat = {\n AIMessagePromptTemplate,\n ChatMessagePromptTemplate,\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n MessagesPlaceholder,\n SystemMessagePromptTemplate,\n};\nexport { prompts__chat };\nconst prompts__image = {\n ImagePromptTemplate,\n};\nexport { prompts__image };\nconst prompts__pipeline = {\n PipelinePromptTemplate,\n};\nexport { prompts__pipeline };\nconst prompts__base = {\n StringPromptValue,\n};\nexport { prompts__base };\nconst schema__runnable = {\n RouterRunnable,\n RunnableAssign,\n RunnableBinding,\n RunnableBranch,\n RunnableEach,\n RunnableMap,\n RunnableParallel,\n RunnablePassthrough,\n RunnablePick,\n RunnableRetry,\n RunnableSequence,\n RunnableWithFallbacks,\n RunnableWithMessageHistory,\n};\nexport { schema__runnable };\nconst schema__output_parser = {\n StringOutputParser,\n};\nexport { schema__output_parser };\nconst schema__output = {\n ChatGenerationChunk,\n GenerationChunk,\n};\nexport { schema__output };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GA,MAAM,kBAAkB,EACtB,wDACD;AAED,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AAED,MAAM,SAAS;CACb;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AAED,MAAM,gBAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;AACD;AAED,MAAM,iBAAiB,EACrB,kEACD;AAED,MAAM,oBAAoB,EACxB,wEACD;AAED,MAAM,gBAAgB,EACpB,oEACD;AAED,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AAED,MAAM,wBAAwB,EAC5B,uEACD;AAED,MAAM,iBAAiB;CACrB;CACA;AACD"}
|
package/dist/load/import_map.js
CHANGED
|
@@ -32,6 +32,7 @@ import { ir_exports } from "../chains/query_constructor/ir.js";
|
|
|
32
32
|
import { sql_db_exports as sql_db_exports$1 } from "../chains/sql_db/index.js";
|
|
33
33
|
import { cypher_exports } from "../chains/graph_qa/cypher.js";
|
|
34
34
|
import { memory_exports as memory_exports$1 } from "../memory/index.js";
|
|
35
|
+
import { middleware_exports } from "../agents/middlewareAgent/middleware/index.js";
|
|
35
36
|
import { buffer_exports } from "../document_loaders/fs/buffer.js";
|
|
36
37
|
import { directory_exports } from "../document_loaders/fs/directory.js";
|
|
37
38
|
import { text_exports } from "../document_loaders/fs/text.js";
|
|
@@ -66,7 +67,6 @@ import { RouterRunnable, RunnableAssign, RunnableBinding, RunnableBranch, Runnab
|
|
|
66
67
|
import { AIMessagePromptTemplate, ChatMessagePromptTemplate, ChatPromptTemplate, HumanMessagePromptTemplate, ImagePromptTemplate, MessagesPlaceholder, PipelinePromptTemplate, PromptTemplate, SystemMessagePromptTemplate } from "@langchain/core/prompts";
|
|
67
68
|
import { StringOutputParser } from "@langchain/core/output_parsers";
|
|
68
69
|
import { ChatGenerationChunk, GenerationChunk } from "@langchain/core/outputs";
|
|
69
|
-
import { AzureChatOpenAI, AzureOpenAI, AzureOpenAIEmbeddings, ChatOpenAI, OpenAI, OpenAIEmbeddings } from "@langchain/openai";
|
|
70
70
|
import { StringPromptValue } from "@langchain/core/prompt_values";
|
|
71
71
|
|
|
72
72
|
//#region src/load/import_map.ts
|
|
@@ -83,8 +83,6 @@ __export(import_map_exports, {
|
|
|
83
83
|
chains__query_constructor__ir: () => ir_exports,
|
|
84
84
|
chains__retrieval: () => retrieval_exports,
|
|
85
85
|
chains__sql_db: () => sql_db_exports$1,
|
|
86
|
-
chat_models__azure_openai: () => chat_models__azure_openai,
|
|
87
|
-
chat_models__openai: () => chat_models__openai,
|
|
88
86
|
chat_models__universal: () => universal_exports,
|
|
89
87
|
document: () => document_exports,
|
|
90
88
|
document_loaders__base: () => base_exports,
|
|
@@ -93,17 +91,14 @@ __export(import_map_exports, {
|
|
|
93
91
|
document_loaders__fs__json: () => json_exports,
|
|
94
92
|
document_loaders__fs__multi_file: () => multi_file_exports,
|
|
95
93
|
document_loaders__fs__text: () => text_exports,
|
|
96
|
-
embeddings__azure_openai: () => embeddings__azure_openai,
|
|
97
94
|
embeddings__cache_backed: () => cache_backed_exports,
|
|
98
95
|
embeddings__fake: () => fake_exports,
|
|
99
|
-
embeddings__openai: () => embeddings__openai,
|
|
100
96
|
evaluation: () => evaluation_exports,
|
|
101
97
|
index: () => src_exports,
|
|
102
|
-
llms__azure_openai: () => llms__azure_openai,
|
|
103
|
-
llms__openai: () => llms__openai,
|
|
104
98
|
load__serializable: () => serializable_exports,
|
|
105
99
|
memory: () => memory_exports$1,
|
|
106
100
|
memory__chat_memory: () => chat_memory_exports,
|
|
101
|
+
middleware: () => middleware_exports,
|
|
107
102
|
output_parsers: () => output_parsers_exports,
|
|
108
103
|
output_parsers__expression: () => expression_exports,
|
|
109
104
|
prompts__base: () => prompts__base,
|
|
@@ -151,12 +146,6 @@ __export(import_map_exports, {
|
|
|
151
146
|
util__time: () => time_exports,
|
|
152
147
|
vectorstores__memory: () => memory_exports
|
|
153
148
|
});
|
|
154
|
-
const chat_models__openai = { ChatOpenAI };
|
|
155
|
-
const chat_models__azure_openai = { AzureChatOpenAI };
|
|
156
|
-
const llms__openai = { OpenAI };
|
|
157
|
-
const llms__azure_openai = { AzureOpenAI };
|
|
158
|
-
const embeddings__openai = { OpenAIEmbeddings };
|
|
159
|
-
const embeddings__azure_openai = { AzureOpenAIEmbeddings };
|
|
160
149
|
const prompts__prompt = { PromptTemplate };
|
|
161
150
|
const schema__messages = {
|
|
162
151
|
AIMessage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import_map.js","names":[],"sources":["../../src/load/import_map.ts"],"sourcesContent":["// Auto-generated by import-map plugin. Do not edit manually.\n\nexport * as index from \"../index.js\";\nexport * as load__serializable from \"../load/serializable.js\";\nexport * as tools from \"../tools/index.js\";\nexport * as tools__chain from \"../tools/chain.js\";\nexport * as tools__render from \"../tools/render.js\";\nexport * as tools__retriever from \"../tools/retriever.js\";\nexport * as tools__sql from \"../tools/sql.js\";\nexport * as tools__webbrowser from \"../tools/webbrowser.js\";\nexport * as chains from \"../chains/index.js\";\nexport * as chains__combine_documents from \"../chains/combine_documents/index.js\";\nexport * as chains__combine_documents__reduce from \"../chains/combine_documents/reduce.js\";\nexport * as chains__history_aware_retriever from \"../chains/history_aware_retriever.js\";\nexport * as chains__load from \"../chains/load.js\";\nexport * as chains__openai_functions from \"../chains/openai_functions/index.js\";\nexport * as chains__query_constructor from \"../chains/query_constructor/index.js\";\nexport * as chains__query_constructor__ir from \"../chains/query_constructor/ir.js\";\nexport * as chains__retrieval from \"../chains/retrieval.js\";\nexport * as chains__sql_db from \"../chains/sql_db/index.js\";\nexport * as chains__graph_qa__cypher from \"../chains/graph_qa/cypher.js\";\nexport * as chat_models__universal from \"../chat_models/universal.js\";\nexport * as embeddings__cache_backed from \"../embeddings/cache_backed.js\";\nexport * as embeddings__fake from \"../embeddings/fake.js\";\nexport * as vectorstores__memory from \"../vectorstores/memory.js\";\nexport * as text_splitter from \"../text_splitter.js\";\nexport * as memory from \"../memory/index.js\";\nexport * as memory__chat_memory from \"../memory/chat_memory.js\";\nexport * as document from \"../document.js\";\nexport * as document_loaders__base from \"../document_loaders/base.js\";\nexport * as document_loaders__fs__buffer from \"../document_loaders/fs/buffer.js\";\nexport * as document_loaders__fs__directory from \"../document_loaders/fs/directory.js\";\nexport * as document_loaders__fs__json from \"../document_loaders/fs/json.js\";\nexport * as document_loaders__fs__multi_file from \"../document_loaders/fs/multi_file.js\";\nexport * as document_loaders__fs__text from \"../document_loaders/fs/text.js\";\nexport * as sql_db from \"../sql_db.js\";\nexport * as output_parsers from \"../output_parsers/index.js\";\nexport * as output_parsers__expression from \"../output_parsers/expression.js\";\nexport * as retrievers__contextual_compression from \"../retrievers/contextual_compression.js\";\nexport * as retrievers__document_compressors from \"../retrievers/document_compressors/index.js\";\nexport * as retrievers__ensemble from \"../retrievers/ensemble.js\";\nexport * as retrievers__multi_query from \"../retrievers/multi_query.js\";\nexport * as retrievers__multi_vector from \"../retrievers/multi_vector.js\";\nexport * as retrievers__parent_document from \"../retrievers/parent_document.js\";\nexport * as retrievers__time_weighted from \"../retrievers/time_weighted.js\";\nexport * as retrievers__document_compressors__chain_extract from \"../retrievers/document_compressors/chain_extract.js\";\nexport * as retrievers__document_compressors__embeddings_filter from \"../retrievers/document_compressors/embeddings_filter.js\";\nexport * as retrievers__hyde from \"../retrievers/hyde.js\";\nexport * as retrievers__score_threshold from \"../retrievers/score_threshold.js\";\nexport * as retrievers__self_query from \"../retrievers/self_query/index.js\";\nexport * as retrievers__self_query__functional from \"../retrievers/self_query/functional.js\";\nexport * as retrievers__matryoshka_retriever from \"../retrievers/matryoshka_retriever.js\";\nexport * as stores__doc__base from \"../stores/doc/base.js\";\nexport * as stores__doc__in_memory from \"../stores/doc/in_memory.js\";\nexport * as stores__file__in_memory from \"../stores/file/in_memory.js\";\nexport * as stores__file__node from \"../stores/file/node.js\";\nexport * as stores__message__in_memory from \"../stores/message/in_memory.js\";\nexport * as storage__encoder_backed from \"../storage/encoder_backed.js\";\nexport * as storage__in_memory from \"../storage/in_memory.js\";\nexport * as storage__file_system from \"../storage/file_system.js\";\nexport * as util__document from \"../util/document.js\";\nexport * as util__math from \"../util/math.js\";\nexport * as util__time from \"../util/time.js\";\nexport * as evaluation from \"../evaluation/index.js\";\nimport {\n
|
|
1
|
+
{"version":3,"file":"import_map.js","names":[],"sources":["../../src/load/import_map.ts"],"sourcesContent":["// Auto-generated by import-map plugin. Do not edit manually.\n\nexport * as index from \"../index.js\";\nexport * as load__serializable from \"../load/serializable.js\";\nexport * as tools from \"../tools/index.js\";\nexport * as tools__chain from \"../tools/chain.js\";\nexport * as tools__render from \"../tools/render.js\";\nexport * as tools__retriever from \"../tools/retriever.js\";\nexport * as tools__sql from \"../tools/sql.js\";\nexport * as tools__webbrowser from \"../tools/webbrowser.js\";\nexport * as chains from \"../chains/index.js\";\nexport * as chains__combine_documents from \"../chains/combine_documents/index.js\";\nexport * as chains__combine_documents__reduce from \"../chains/combine_documents/reduce.js\";\nexport * as chains__history_aware_retriever from \"../chains/history_aware_retriever.js\";\nexport * as chains__load from \"../chains/load.js\";\nexport * as chains__openai_functions from \"../chains/openai_functions/index.js\";\nexport * as chains__query_constructor from \"../chains/query_constructor/index.js\";\nexport * as chains__query_constructor__ir from \"../chains/query_constructor/ir.js\";\nexport * as chains__retrieval from \"../chains/retrieval.js\";\nexport * as chains__sql_db from \"../chains/sql_db/index.js\";\nexport * as chains__graph_qa__cypher from \"../chains/graph_qa/cypher.js\";\nexport * as chat_models__universal from \"../chat_models/universal.js\";\nexport * as embeddings__cache_backed from \"../embeddings/cache_backed.js\";\nexport * as embeddings__fake from \"../embeddings/fake.js\";\nexport * as vectorstores__memory from \"../vectorstores/memory.js\";\nexport * as text_splitter from \"../text_splitter.js\";\nexport * as memory from \"../memory/index.js\";\nexport * as memory__chat_memory from \"../memory/chat_memory.js\";\nexport * as middleware from \"../agents/middlewareAgent/middleware/index.js\";\nexport * as document from \"../document.js\";\nexport * as document_loaders__base from \"../document_loaders/base.js\";\nexport * as document_loaders__fs__buffer from \"../document_loaders/fs/buffer.js\";\nexport * as document_loaders__fs__directory from \"../document_loaders/fs/directory.js\";\nexport * as document_loaders__fs__json from \"../document_loaders/fs/json.js\";\nexport * as document_loaders__fs__multi_file from \"../document_loaders/fs/multi_file.js\";\nexport * as document_loaders__fs__text from \"../document_loaders/fs/text.js\";\nexport * as sql_db from \"../sql_db.js\";\nexport * as output_parsers from \"../output_parsers/index.js\";\nexport * as output_parsers__expression from \"../output_parsers/expression.js\";\nexport * as retrievers__contextual_compression from \"../retrievers/contextual_compression.js\";\nexport * as retrievers__document_compressors from \"../retrievers/document_compressors/index.js\";\nexport * as retrievers__ensemble from \"../retrievers/ensemble.js\";\nexport * as retrievers__multi_query from \"../retrievers/multi_query.js\";\nexport * as retrievers__multi_vector from \"../retrievers/multi_vector.js\";\nexport * as retrievers__parent_document from \"../retrievers/parent_document.js\";\nexport * as retrievers__time_weighted from \"../retrievers/time_weighted.js\";\nexport * as retrievers__document_compressors__chain_extract from \"../retrievers/document_compressors/chain_extract.js\";\nexport * as retrievers__document_compressors__embeddings_filter from \"../retrievers/document_compressors/embeddings_filter.js\";\nexport * as retrievers__hyde from \"../retrievers/hyde.js\";\nexport * as retrievers__score_threshold from \"../retrievers/score_threshold.js\";\nexport * as retrievers__self_query from \"../retrievers/self_query/index.js\";\nexport * as retrievers__self_query__functional from \"../retrievers/self_query/functional.js\";\nexport * as retrievers__matryoshka_retriever from \"../retrievers/matryoshka_retriever.js\";\nexport * as stores__doc__base from \"../stores/doc/base.js\";\nexport * as stores__doc__in_memory from \"../stores/doc/in_memory.js\";\nexport * as stores__file__in_memory from \"../stores/file/in_memory.js\";\nexport * as stores__file__node from \"../stores/file/node.js\";\nexport * as stores__message__in_memory from \"../stores/message/in_memory.js\";\nexport * as storage__encoder_backed from \"../storage/encoder_backed.js\";\nexport * as storage__in_memory from \"../storage/in_memory.js\";\nexport * as storage__file_system from \"../storage/file_system.js\";\nexport * as util__document from \"../util/document.js\";\nexport * as util__math from \"../util/math.js\";\nexport * as util__time from \"../util/time.js\";\nexport * as evaluation from \"../evaluation/index.js\";\nimport {\n PromptTemplate,\n AIMessagePromptTemplate,\n ChatMessagePromptTemplate,\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n MessagesPlaceholder,\n SystemMessagePromptTemplate,\n ImagePromptTemplate,\n PipelinePromptTemplate,\n} from \"@langchain/core/prompts\";\nimport {\n AIMessage,\n AIMessageChunk,\n BaseMessage,\n BaseMessageChunk,\n ChatMessage,\n ChatMessageChunk,\n FunctionMessage,\n FunctionMessageChunk,\n HumanMessage,\n HumanMessageChunk,\n SystemMessage,\n SystemMessageChunk,\n ToolMessage,\n ToolMessageChunk,\n} from \"@langchain/core/messages\";\nimport { StringPromptValue } from \"@langchain/core/prompt_values\";\nimport {\n RouterRunnable,\n RunnableAssign,\n RunnableBinding,\n RunnableBranch,\n RunnableEach,\n RunnableMap,\n RunnableParallel,\n RunnablePassthrough,\n RunnablePick,\n RunnableRetry,\n RunnableSequence,\n RunnableWithFallbacks,\n RunnableWithMessageHistory,\n} from \"@langchain/core/runnables\";\nimport { StringOutputParser } from \"@langchain/core/output_parsers\";\nimport { ChatGenerationChunk, GenerationChunk } from \"@langchain/core/outputs\";\nconst prompts__prompt = {\n PromptTemplate,\n};\nexport { prompts__prompt };\nconst schema__messages = {\n AIMessage,\n AIMessageChunk,\n BaseMessage,\n BaseMessageChunk,\n ChatMessage,\n ChatMessageChunk,\n FunctionMessage,\n FunctionMessageChunk,\n HumanMessage,\n HumanMessageChunk,\n SystemMessage,\n SystemMessageChunk,\n ToolMessage,\n ToolMessageChunk,\n};\nexport { schema__messages };\nconst schema = {\n AIMessage,\n AIMessageChunk,\n BaseMessage,\n BaseMessageChunk,\n ChatMessage,\n ChatMessageChunk,\n FunctionMessage,\n FunctionMessageChunk,\n HumanMessage,\n HumanMessageChunk,\n SystemMessage,\n SystemMessageChunk,\n ToolMessage,\n ToolMessageChunk,\n};\nexport { schema };\nconst prompts__chat = {\n AIMessagePromptTemplate,\n ChatMessagePromptTemplate,\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n MessagesPlaceholder,\n SystemMessagePromptTemplate,\n};\nexport { prompts__chat };\nconst prompts__image = {\n ImagePromptTemplate,\n};\nexport { prompts__image };\nconst prompts__pipeline = {\n PipelinePromptTemplate,\n};\nexport { prompts__pipeline };\nconst prompts__base = {\n StringPromptValue,\n};\nexport { prompts__base };\nconst schema__runnable = {\n RouterRunnable,\n RunnableAssign,\n RunnableBinding,\n RunnableBranch,\n RunnableEach,\n RunnableMap,\n RunnableParallel,\n RunnablePassthrough,\n RunnablePick,\n RunnableRetry,\n RunnableSequence,\n RunnableWithFallbacks,\n RunnableWithMessageHistory,\n};\nexport { schema__runnable };\nconst schema__output_parser = {\n StringOutputParser,\n};\nexport { schema__output_parser };\nconst schema__output = {\n ChatGenerationChunk,\n GenerationChunk,\n};\nexport { schema__output };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GA,MAAM,kBAAkB,EACtB,eACD;AAED,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AAED,MAAM,SAAS;CACb;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AAED,MAAM,gBAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;AACD;AAED,MAAM,iBAAiB,EACrB,oBACD;AAED,MAAM,oBAAoB,EACxB,uBACD;AAED,MAAM,gBAAgB,EACpB,kBACD;AAED,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AAED,MAAM,wBAAwB,EAC5B,mBACD;AAED,MAAM,iBAAiB;CACrB;CACA;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.cjs","names":["PromptTemplate"],"sources":["../../src/memory/prompt.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst _DEFAULT_SUMMARIZER_TEMPLATE = `Progressively summarize the lines of conversation provided, adding onto the previous summary returning a new summary.\n\nEXAMPLE\nCurrent summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good.\n\nNew lines of conversation:\nHuman: Why do you think artificial intelligence is a force for good?\nAI: Because artificial intelligence will help humans reach their full potential.\n\nNew summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good because it will help humans reach their full potential.\nEND OF EXAMPLE\n\nCurrent summary:\n{summary}\n\nNew lines of conversation:\n{new_lines}\n\nNew summary:`;\n\
|
|
1
|
+
{"version":3,"file":"prompt.cjs","names":["PromptTemplate"],"sources":["../../src/memory/prompt.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst _DEFAULT_SUMMARIZER_TEMPLATE = `Progressively summarize the lines of conversation provided, adding onto the previous summary returning a new summary.\n\nEXAMPLE\nCurrent summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good.\n\nNew lines of conversation:\nHuman: Why do you think artificial intelligence is a force for good?\nAI: Because artificial intelligence will help humans reach their full potential.\n\nNew summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good because it will help humans reach their full potential.\nEND OF EXAMPLE\n\nCurrent summary:\n{summary}\n\nNew lines of conversation:\n{new_lines}\n\nNew summary:`;\n\nexport const SUMMARY_PROMPT = /*#__PURE__*/ new PromptTemplate({\n inputVariables: [\"summary\", \"new_lines\"],\n template: _DEFAULT_SUMMARIZER_TEMPLATE,\n});\n\nexport const _DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE = `You are an assistant to a human, powered by a large language model trained by OpenAI.\n\nYou are designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, you are able to generate human-like text based on the input you receive, allowing you to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nYou are constantly learning and improving, and your capabilities are constantly evolving. You are able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. You have access to some personalized information provided by the human in the Context section below. Additionally, you are able to generate your own text based on the input you receive, allowing you to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, you are a powerful tool that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether the human needs help with a specific question or just wants to have a conversation about a particular topic, you are here to assist.\n\nContext:\n{entities}\n\nCurrent conversation:\n{history}\nLast line:\nHuman: {input}\nYou:`;\n\nexport const ENTITY_MEMORY_CONVERSATION_TEMPLATE =\n /*#__PURE__*/ new PromptTemplate({\n inputVariables: [\"entities\", \"history\", \"input\"],\n template: _DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE,\n });\n\nexport const _DEFAULT_ENTITY_EXTRACTION_TEMPLATE = `You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last line of conversation. As a guideline, a proper noun is generally capitalized. You should definitely extract all names and places.\n\nThe conversation history is provided just in case of a coreference (e.g. \"What do you know about him\" where \"him\" is defined in a previous line) -- ignore items mentioned there that are not in the last line.\n\nReturn the output as a single comma-separated list, or NONE if there is nothing of note to return (e.g. the user is just issuing a greeting or having a simple conversation).\n\nEXAMPLE\nConversation history:\nPerson #1: my name is Jacob. how's it going today?\nAI: \"It's going great! How about you?\"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: \"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\"\nLast line:\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\nOutput: Jacob,Langchain\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: how's it going today?\nAI: \"It's going great! How about you?\"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: \"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\"\nLast line:\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff. I'm working with Person #2.\nOutput: Langchain, Person #2\nEND OF EXAMPLE\n\nConversation history (for reference only):\n{history}\nLast line of conversation (for extraction):\nHuman: {input}\n\nOutput:`;\n\nexport const ENTITY_EXTRACTION_PROMPT = /*#__PURE__*/ new PromptTemplate({\n inputVariables: [\"history\", \"input\"],\n template: _DEFAULT_ENTITY_EXTRACTION_TEMPLATE,\n});\n\nexport const _DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE = `You are an AI assistant helping a human keep track of facts about relevant people, places, and concepts in their life. Update and add to the summary of the provided entity in the \"Entity\" section based on the last line of your conversation with the human. If you are writing the summary for the first time, return a single sentence.\nThe update should only include facts that are relayed in the last line of conversation about the provided entity, and should only contain facts about the provided entity.\n\nIf there is no new information about the provided entity or the information is not worth noting (not an important or relevant fact to remember long-term), output the exact string \"UNCHANGED\" below.\n\nFull conversation history (for context):\n{history}\n\nEntity to summarize:\n{entity}\n\nExisting summary of {entity}:\n{summary}\n\nLast line of conversation:\nHuman: {input}\nUpdated summary (or the exact string \"UNCHANGED\" if there is no new information about {entity} above):`;\n\nexport const ENTITY_SUMMARIZATION_PROMPT = /*#__PURE__*/ new PromptTemplate({\n inputVariables: [\"entity\", \"summary\", \"history\", \"input\"],\n template: _DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE,\n});\n"],"mappings":";;;;AAEA,MAAM,+BAA+B,CAAC;;;;;;;;;;;;;;;;;;;;YAoB1B,CAAC;AAEb,MAAa,iCAA+B,IAAIA,wCAAe;CAC7D,gBAAgB,CAAC,WAAW,WAAY;CACxC,UAAU;AACX;AAED,MAAa,+CAA+C,CAAC;;;;;;;;;;;;;;;IAezD,CAAC;AAEL,MAAa,sDACG,IAAIA,wCAAe;CAC/B,gBAAgB;EAAC;EAAY;EAAW;CAAQ;CAChD,UAAU;AACX;AAEH,MAAa,sCAAsC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiC7C,CAAC;AAER,MAAa,2CAAyC,IAAIA,wCAAe;CACvE,gBAAgB,CAAC,WAAW,OAAQ;CACpC,UAAU;AACX;AAED,MAAa,yCAAyC,CAAC;;;;;;;;;;;;;;;;sGAgB+C,CAAC;AAEvG,MAAa,8CAA4C,IAAIA,wCAAe;CAC1E,gBAAgB;EAAC;EAAU;EAAW;EAAW;CAAQ;CACzD,UAAU;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.d.cts","names":["PromptTemplate","SUMMARY_PROMPT","_DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE","ENTITY_MEMORY_CONVERSATION_TEMPLATE","_DEFAULT_ENTITY_EXTRACTION_TEMPLATE","ENTITY_EXTRACTION_PROMPT","_DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE","ENTITY_SUMMARIZATION_PROMPT"],"sources":["../../src/memory/prompt.d.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\
|
|
1
|
+
{"version":3,"file":"prompt.d.cts","names":["PromptTemplate","SUMMARY_PROMPT","_DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE","ENTITY_MEMORY_CONVERSATION_TEMPLATE","_DEFAULT_ENTITY_EXTRACTION_TEMPLATE","ENTITY_EXTRACTION_PROMPT","_DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE","ENTITY_SUMMARIZATION_PROMPT"],"sources":["../../src/memory/prompt.d.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\nexport declare const SUMMARY_PROMPT: PromptTemplate<{\n new_lines: any;\n summary: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE = \"You are an assistant to a human, powered by a large language model trained by OpenAI.\\n\\nYou are designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, you are able to generate human-like text based on the input you receive, allowing you to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\\n\\nYou are constantly learning and improving, and your capabilities are constantly evolving. You are able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. You have access to some personalized information provided by the human in the Context section below. Additionally, you are able to generate your own text based on the input you receive, allowing you to engage in discussions and provide explanations and descriptions on a wide range of topics.\\n\\nOverall, you are a powerful tool that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether the human needs help with a specific question or just wants to have a conversation about a particular topic, you are here to assist.\\n\\nContext:\\n{entities}\\n\\nCurrent conversation:\\n{history}\\nLast line:\\nHuman: {input}\\nYou:\";\nexport declare const ENTITY_MEMORY_CONVERSATION_TEMPLATE: PromptTemplate<{\n entities: any;\n history: any;\n input: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_EXTRACTION_TEMPLATE = \"You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last line of conversation. As a guideline, a proper noun is generally capitalized. You should definitely extract all names and places.\\n\\nThe conversation history is provided just in case of a coreference (e.g. \\\"What do you know about him\\\" where \\\"him\\\" is defined in a previous line) -- ignore items mentioned there that are not in the last line.\\n\\nReturn the output as a single comma-separated list, or NONE if there is nothing of note to return (e.g. the user is just issuing a greeting or having a simple conversation).\\n\\nEXAMPLE\\nConversation history:\\nPerson #1: my name is Jacob. how's it going today?\\nAI: \\\"It's going great! How about you?\\\"\\nPerson #1: good! busy working on Langchain. lots to do.\\nAI: \\\"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\\\"\\nLast line:\\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\\nOutput: Jacob,Langchain\\nEND OF EXAMPLE\\n\\nEXAMPLE\\nConversation history:\\nPerson #1: how's it going today?\\nAI: \\\"It's going great! How about you?\\\"\\nPerson #1: good! busy working on Langchain. lots to do.\\nAI: \\\"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\\\"\\nLast line:\\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff. I'm working with Person #2.\\nOutput: Langchain, Person #2\\nEND OF EXAMPLE\\n\\nConversation history (for reference only):\\n{history}\\nLast line of conversation (for extraction):\\nHuman: {input}\\n\\nOutput:\";\nexport declare const ENTITY_EXTRACTION_PROMPT: PromptTemplate<{\n history: any;\n input: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE = \"You are an AI assistant helping a human keep track of facts about relevant people, places, and concepts in their life. Update and add to the summary of the provided entity in the \\\"Entity\\\" section based on the last line of your conversation with the human. If you are writing the summary for the first time, return a single sentence.\\nThe update should only include facts that are relayed in the last line of conversation about the provided entity, and should only contain facts about the provided entity.\\n\\nIf there is no new information about the provided entity or the information is not worth noting (not an important or relevant fact to remember long-term), output the exact string \\\"UNCHANGED\\\" below.\\n\\nFull conversation history (for context):\\n{history}\\n\\nEntity to summarize:\\n{entity}\\n\\nExisting summary of {entity}:\\n{summary}\\n\\nLast line of conversation:\\nHuman: {input}\\nUpdated summary (or the exact string \\\"UNCHANGED\\\" if there is no new information about {entity} above):\";\nexport declare const ENTITY_SUMMARIZATION_PROMPT: PromptTemplate<{\n entity: any;\n history: any;\n input: any;\n summary: any;\n}, any>;\n"],"mappings":";;;;cAMqBG,qCAAqCH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.d.ts","names":["PromptTemplate","SUMMARY_PROMPT","_DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE","ENTITY_MEMORY_CONVERSATION_TEMPLATE","_DEFAULT_ENTITY_EXTRACTION_TEMPLATE","ENTITY_EXTRACTION_PROMPT","_DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE","ENTITY_SUMMARIZATION_PROMPT"],"sources":["../../src/memory/prompt.d.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","names":["PromptTemplate","SUMMARY_PROMPT","_DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE","ENTITY_MEMORY_CONVERSATION_TEMPLATE","_DEFAULT_ENTITY_EXTRACTION_TEMPLATE","ENTITY_EXTRACTION_PROMPT","_DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE","ENTITY_SUMMARIZATION_PROMPT"],"sources":["../../src/memory/prompt.d.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\nexport declare const SUMMARY_PROMPT: PromptTemplate<{\n new_lines: any;\n summary: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE = \"You are an assistant to a human, powered by a large language model trained by OpenAI.\\n\\nYou are designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, you are able to generate human-like text based on the input you receive, allowing you to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\\n\\nYou are constantly learning and improving, and your capabilities are constantly evolving. You are able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. You have access to some personalized information provided by the human in the Context section below. Additionally, you are able to generate your own text based on the input you receive, allowing you to engage in discussions and provide explanations and descriptions on a wide range of topics.\\n\\nOverall, you are a powerful tool that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether the human needs help with a specific question or just wants to have a conversation about a particular topic, you are here to assist.\\n\\nContext:\\n{entities}\\n\\nCurrent conversation:\\n{history}\\nLast line:\\nHuman: {input}\\nYou:\";\nexport declare const ENTITY_MEMORY_CONVERSATION_TEMPLATE: PromptTemplate<{\n entities: any;\n history: any;\n input: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_EXTRACTION_TEMPLATE = \"You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last line of conversation. As a guideline, a proper noun is generally capitalized. You should definitely extract all names and places.\\n\\nThe conversation history is provided just in case of a coreference (e.g. \\\"What do you know about him\\\" where \\\"him\\\" is defined in a previous line) -- ignore items mentioned there that are not in the last line.\\n\\nReturn the output as a single comma-separated list, or NONE if there is nothing of note to return (e.g. the user is just issuing a greeting or having a simple conversation).\\n\\nEXAMPLE\\nConversation history:\\nPerson #1: my name is Jacob. how's it going today?\\nAI: \\\"It's going great! How about you?\\\"\\nPerson #1: good! busy working on Langchain. lots to do.\\nAI: \\\"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\\\"\\nLast line:\\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\\nOutput: Jacob,Langchain\\nEND OF EXAMPLE\\n\\nEXAMPLE\\nConversation history:\\nPerson #1: how's it going today?\\nAI: \\\"It's going great! How about you?\\\"\\nPerson #1: good! busy working on Langchain. lots to do.\\nAI: \\\"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\\\"\\nLast line:\\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff. I'm working with Person #2.\\nOutput: Langchain, Person #2\\nEND OF EXAMPLE\\n\\nConversation history (for reference only):\\n{history}\\nLast line of conversation (for extraction):\\nHuman: {input}\\n\\nOutput:\";\nexport declare const ENTITY_EXTRACTION_PROMPT: PromptTemplate<{\n history: any;\n input: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE = \"You are an AI assistant helping a human keep track of facts about relevant people, places, and concepts in their life. Update and add to the summary of the provided entity in the \\\"Entity\\\" section based on the last line of your conversation with the human. If you are writing the summary for the first time, return a single sentence.\\nThe update should only include facts that are relayed in the last line of conversation about the provided entity, and should only contain facts about the provided entity.\\n\\nIf there is no new information about the provided entity or the information is not worth noting (not an important or relevant fact to remember long-term), output the exact string \\\"UNCHANGED\\\" below.\\n\\nFull conversation history (for context):\\n{history}\\n\\nEntity to summarize:\\n{entity}\\n\\nExisting summary of {entity}:\\n{summary}\\n\\nLast line of conversation:\\nHuman: {input}\\nUpdated summary (or the exact string \\\"UNCHANGED\\\" if there is no new information about {entity} above):\";\nexport declare const ENTITY_SUMMARIZATION_PROMPT: PromptTemplate<{\n entity: any;\n history: any;\n input: any;\n summary: any;\n}, any>;\n"],"mappings":";;;;cAMqBG,qCAAqCH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","names":[],"sources":["../../src/memory/prompt.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst _DEFAULT_SUMMARIZER_TEMPLATE = `Progressively summarize the lines of conversation provided, adding onto the previous summary returning a new summary.\n\nEXAMPLE\nCurrent summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good.\n\nNew lines of conversation:\nHuman: Why do you think artificial intelligence is a force for good?\nAI: Because artificial intelligence will help humans reach their full potential.\n\nNew summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good because it will help humans reach their full potential.\nEND OF EXAMPLE\n\nCurrent summary:\n{summary}\n\nNew lines of conversation:\n{new_lines}\n\nNew summary:`;\n\
|
|
1
|
+
{"version":3,"file":"prompt.js","names":[],"sources":["../../src/memory/prompt.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst _DEFAULT_SUMMARIZER_TEMPLATE = `Progressively summarize the lines of conversation provided, adding onto the previous summary returning a new summary.\n\nEXAMPLE\nCurrent summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good.\n\nNew lines of conversation:\nHuman: Why do you think artificial intelligence is a force for good?\nAI: Because artificial intelligence will help humans reach their full potential.\n\nNew summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good because it will help humans reach their full potential.\nEND OF EXAMPLE\n\nCurrent summary:\n{summary}\n\nNew lines of conversation:\n{new_lines}\n\nNew summary:`;\n\nexport const SUMMARY_PROMPT = /*#__PURE__*/ new PromptTemplate({\n inputVariables: [\"summary\", \"new_lines\"],\n template: _DEFAULT_SUMMARIZER_TEMPLATE,\n});\n\nexport const _DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE = `You are an assistant to a human, powered by a large language model trained by OpenAI.\n\nYou are designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, you are able to generate human-like text based on the input you receive, allowing you to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nYou are constantly learning and improving, and your capabilities are constantly evolving. You are able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. You have access to some personalized information provided by the human in the Context section below. Additionally, you are able to generate your own text based on the input you receive, allowing you to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, you are a powerful tool that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether the human needs help with a specific question or just wants to have a conversation about a particular topic, you are here to assist.\n\nContext:\n{entities}\n\nCurrent conversation:\n{history}\nLast line:\nHuman: {input}\nYou:`;\n\nexport const ENTITY_MEMORY_CONVERSATION_TEMPLATE =\n /*#__PURE__*/ new PromptTemplate({\n inputVariables: [\"entities\", \"history\", \"input\"],\n template: _DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE,\n });\n\nexport const _DEFAULT_ENTITY_EXTRACTION_TEMPLATE = `You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last line of conversation. As a guideline, a proper noun is generally capitalized. You should definitely extract all names and places.\n\nThe conversation history is provided just in case of a coreference (e.g. \"What do you know about him\" where \"him\" is defined in a previous line) -- ignore items mentioned there that are not in the last line.\n\nReturn the output as a single comma-separated list, or NONE if there is nothing of note to return (e.g. the user is just issuing a greeting or having a simple conversation).\n\nEXAMPLE\nConversation history:\nPerson #1: my name is Jacob. how's it going today?\nAI: \"It's going great! How about you?\"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: \"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\"\nLast line:\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\nOutput: Jacob,Langchain\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: how's it going today?\nAI: \"It's going great! How about you?\"\nPerson #1: good! busy working on Langchain. lots to do.\nAI: \"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\"\nLast line:\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff. I'm working with Person #2.\nOutput: Langchain, Person #2\nEND OF EXAMPLE\n\nConversation history (for reference only):\n{history}\nLast line of conversation (for extraction):\nHuman: {input}\n\nOutput:`;\n\nexport const ENTITY_EXTRACTION_PROMPT = /*#__PURE__*/ new PromptTemplate({\n inputVariables: [\"history\", \"input\"],\n template: _DEFAULT_ENTITY_EXTRACTION_TEMPLATE,\n});\n\nexport const _DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE = `You are an AI assistant helping a human keep track of facts about relevant people, places, and concepts in their life. Update and add to the summary of the provided entity in the \"Entity\" section based on the last line of your conversation with the human. If you are writing the summary for the first time, return a single sentence.\nThe update should only include facts that are relayed in the last line of conversation about the provided entity, and should only contain facts about the provided entity.\n\nIf there is no new information about the provided entity or the information is not worth noting (not an important or relevant fact to remember long-term), output the exact string \"UNCHANGED\" below.\n\nFull conversation history (for context):\n{history}\n\nEntity to summarize:\n{entity}\n\nExisting summary of {entity}:\n{summary}\n\nLast line of conversation:\nHuman: {input}\nUpdated summary (or the exact string \"UNCHANGED\" if there is no new information about {entity} above):`;\n\nexport const ENTITY_SUMMARIZATION_PROMPT = /*#__PURE__*/ new PromptTemplate({\n inputVariables: [\"entity\", \"summary\", \"history\", \"input\"],\n template: _DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE,\n});\n"],"mappings":";;;AAEA,MAAM,+BAA+B,CAAC;;;;;;;;;;;;;;;;;;;;YAoB1B,CAAC;AAEb,MAAa,iCAA+B,IAAI,eAAe;CAC7D,gBAAgB,CAAC,WAAW,WAAY;CACxC,UAAU;AACX;AAED,MAAa,+CAA+C,CAAC;;;;;;;;;;;;;;;IAezD,CAAC;AAEL,MAAa,sDACG,IAAI,eAAe;CAC/B,gBAAgB;EAAC;EAAY;EAAW;CAAQ;CAChD,UAAU;AACX;AAEH,MAAa,sCAAsC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiC7C,CAAC;AAER,MAAa,2CAAyC,IAAI,eAAe;CACvE,gBAAgB,CAAC,WAAW,OAAQ;CACpC,UAAU;AACX;AAED,MAAa,yCAAyC,CAAC;;;;;;;;;;;;;;;;sGAgB+C,CAAC;AAEvG,MAAa,8CAA4C,IAAI,eAAe;CAC1E,gBAAgB;EAAC;EAAU;EAAW;EAAW;CAAQ;CACzD,UAAU;AACX"}
|