@langchain/classic 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +24 -13
- package/dist/_virtual/_rolldown/runtime.js +36 -0
- package/dist/agents/agent.cjs +9 -11
- package/dist/agents/agent.cjs.map +1 -1
- package/dist/agents/agent.d.cts +0 -1
- package/dist/agents/agent.d.cts.map +1 -1
- package/dist/agents/agent.d.ts +2 -3
- package/dist/agents/agent.d.ts.map +1 -1
- package/dist/agents/agent.js +1 -3
- package/dist/agents/agent.js.map +1 -1
- package/dist/agents/chat/index.cjs +11 -15
- package/dist/agents/chat/index.cjs.map +1 -1
- package/dist/agents/chat/index.d.cts +0 -1
- package/dist/agents/chat/index.d.cts.map +1 -1
- package/dist/agents/chat/index.d.ts +0 -1
- package/dist/agents/chat/index.d.ts.map +1 -1
- package/dist/agents/chat/index.js +7 -11
- package/dist/agents/chat/index.js.map +1 -1
- package/dist/agents/chat/outputParser.cjs +4 -5
- package/dist/agents/chat/outputParser.cjs.map +1 -1
- package/dist/agents/chat/outputParser.d.cts +2 -3
- package/dist/agents/chat/outputParser.d.cts.map +1 -1
- package/dist/agents/chat/outputParser.d.ts +0 -1
- package/dist/agents/chat/outputParser.d.ts.map +1 -1
- package/dist/agents/chat/outputParser.js +1 -2
- package/dist/agents/chat/outputParser.js.map +1 -1
- package/dist/agents/chat/prompt.cjs.map +1 -1
- package/dist/agents/chat/prompt.js.map +1 -1
- package/dist/agents/chat_convo/index.cjs +21 -25
- package/dist/agents/chat_convo/index.cjs.map +1 -1
- package/dist/agents/chat_convo/index.d.cts +0 -1
- package/dist/agents/chat_convo/index.d.cts.map +1 -1
- package/dist/agents/chat_convo/index.d.ts +1 -2
- package/dist/agents/chat_convo/index.d.ts.map +1 -1
- package/dist/agents/chat_convo/index.js +11 -15
- package/dist/agents/chat_convo/index.js.map +1 -1
- package/dist/agents/chat_convo/outputParser.cjs +10 -13
- package/dist/agents/chat_convo/outputParser.cjs.map +1 -1
- package/dist/agents/chat_convo/outputParser.d.cts.map +1 -1
- package/dist/agents/chat_convo/outputParser.d.ts.map +1 -1
- package/dist/agents/chat_convo/outputParser.js +4 -7
- package/dist/agents/chat_convo/outputParser.js.map +1 -1
- package/dist/agents/chat_convo/prompt.cjs.map +1 -1
- package/dist/agents/chat_convo/prompt.js.map +1 -1
- package/dist/agents/executor.cjs +25 -33
- package/dist/agents/executor.cjs.map +1 -1
- package/dist/agents/executor.d.cts +0 -1
- package/dist/agents/executor.d.cts.map +1 -1
- package/dist/agents/executor.d.ts +0 -1
- package/dist/agents/executor.d.ts.map +1 -1
- package/dist/agents/executor.js +11 -19
- package/dist/agents/executor.js.map +1 -1
- package/dist/agents/format_scratchpad/log.cjs +4 -5
- package/dist/agents/format_scratchpad/log.cjs.map +1 -1
- package/dist/agents/format_scratchpad/log.d.cts +0 -1
- package/dist/agents/format_scratchpad/log.d.cts.map +1 -1
- package/dist/agents/format_scratchpad/log.d.ts +0 -1
- package/dist/agents/format_scratchpad/log.d.ts.map +1 -1
- package/dist/agents/format_scratchpad/log.js +3 -5
- package/dist/agents/format_scratchpad/log.js.map +1 -1
- package/dist/agents/format_scratchpad/log_to_message.cjs +8 -9
- package/dist/agents/format_scratchpad/log_to_message.cjs.map +1 -1
- package/dist/agents/format_scratchpad/log_to_message.d.cts.map +1 -1
- package/dist/agents/format_scratchpad/log_to_message.d.ts.map +1 -1
- package/dist/agents/format_scratchpad/log_to_message.js +4 -6
- package/dist/agents/format_scratchpad/log_to_message.js.map +1 -1
- package/dist/agents/format_scratchpad/openai_functions.cjs +9 -11
- package/dist/agents/format_scratchpad/openai_functions.cjs.map +1 -1
- package/dist/agents/format_scratchpad/openai_functions.d.cts +0 -1
- package/dist/agents/format_scratchpad/openai_functions.d.cts.map +1 -1
- package/dist/agents/format_scratchpad/openai_functions.d.ts +0 -1
- package/dist/agents/format_scratchpad/openai_functions.d.ts.map +1 -1
- package/dist/agents/format_scratchpad/openai_functions.js +5 -8
- package/dist/agents/format_scratchpad/openai_functions.js.map +1 -1
- package/dist/agents/format_scratchpad/openai_tools.cjs +3 -3
- package/dist/agents/format_scratchpad/openai_tools.js +2 -3
- package/dist/agents/format_scratchpad/tool_calling.cjs +8 -10
- package/dist/agents/format_scratchpad/tool_calling.cjs.map +1 -1
- package/dist/agents/format_scratchpad/tool_calling.d.cts +0 -1
- package/dist/agents/format_scratchpad/tool_calling.d.cts.map +1 -1
- package/dist/agents/format_scratchpad/tool_calling.d.ts +0 -1
- package/dist/agents/format_scratchpad/tool_calling.d.ts.map +1 -1
- package/dist/agents/format_scratchpad/tool_calling.js +5 -7
- package/dist/agents/format_scratchpad/tool_calling.js.map +1 -1
- package/dist/agents/format_scratchpad/xml.cjs +3 -3
- package/dist/agents/format_scratchpad/xml.cjs.map +1 -1
- package/dist/agents/format_scratchpad/xml.d.cts.map +1 -1
- package/dist/agents/format_scratchpad/xml.d.ts.map +1 -1
- package/dist/agents/format_scratchpad/xml.js +2 -3
- package/dist/agents/format_scratchpad/xml.js.map +1 -1
- package/dist/agents/helpers.cjs +2 -2
- package/dist/agents/helpers.cjs.map +1 -1
- package/dist/agents/helpers.js +2 -2
- package/dist/agents/helpers.js.map +1 -1
- package/dist/agents/index.cjs +6 -6
- package/dist/agents/index.js +2 -3
- package/dist/agents/initialize.cjs +12 -16
- package/dist/agents/initialize.cjs.map +1 -1
- package/dist/agents/initialize.d.cts +8 -2
- package/dist/agents/initialize.d.cts.map +1 -1
- package/dist/agents/initialize.d.ts +8 -2
- package/dist/agents/initialize.d.ts.map +1 -1
- package/dist/agents/initialize.js +12 -16
- package/dist/agents/initialize.js.map +1 -1
- package/dist/agents/load.cjs +5 -5
- package/dist/agents/load.cjs.map +1 -1
- package/dist/agents/load.d.cts +8 -2
- package/dist/agents/load.d.cts.map +1 -1
- package/dist/agents/load.d.ts +8 -2
- package/dist/agents/load.d.ts.map +1 -1
- package/dist/agents/load.js +4 -5
- package/dist/agents/load.js.map +1 -1
- package/dist/agents/mrkl/index.cjs +16 -21
- package/dist/agents/mrkl/index.cjs.map +1 -1
- package/dist/agents/mrkl/index.d.cts +0 -1
- package/dist/agents/mrkl/index.d.cts.map +1 -1
- package/dist/agents/mrkl/index.d.ts +0 -1
- package/dist/agents/mrkl/index.d.ts.map +1 -1
- package/dist/agents/mrkl/index.js +13 -18
- package/dist/agents/mrkl/index.js.map +1 -1
- package/dist/agents/mrkl/outputParser.cjs +4 -5
- package/dist/agents/mrkl/outputParser.cjs.map +1 -1
- package/dist/agents/mrkl/outputParser.d.cts +1 -2
- package/dist/agents/mrkl/outputParser.d.cts.map +1 -1
- package/dist/agents/mrkl/outputParser.d.ts +0 -1
- package/dist/agents/mrkl/outputParser.d.ts.map +1 -1
- package/dist/agents/mrkl/outputParser.js +1 -2
- package/dist/agents/mrkl/outputParser.js.map +1 -1
- package/dist/agents/mrkl/prompt.cjs.map +1 -1
- package/dist/agents/mrkl/prompt.js.map +1 -1
- package/dist/agents/openai/output_parser.cjs +3 -3
- package/dist/agents/openai/output_parser.js +2 -3
- package/dist/agents/openai_functions/index.cjs +22 -25
- package/dist/agents/openai_functions/index.cjs.map +1 -1
- package/dist/agents/openai_functions/index.d.cts +2 -5
- package/dist/agents/openai_functions/index.d.cts.map +1 -1
- package/dist/agents/openai_functions/index.d.ts +3 -6
- package/dist/agents/openai_functions/index.d.ts.map +1 -1
- package/dist/agents/openai_functions/index.js +8 -11
- package/dist/agents/openai_functions/index.js.map +1 -1
- package/dist/agents/openai_functions/output_parser.cjs +5 -5
- package/dist/agents/openai_functions/output_parser.cjs.map +1 -1
- package/dist/agents/openai_functions/output_parser.d.cts +0 -1
- package/dist/agents/openai_functions/output_parser.d.cts.map +1 -1
- package/dist/agents/openai_functions/output_parser.d.ts +1 -2
- package/dist/agents/openai_functions/output_parser.d.ts.map +1 -1
- package/dist/agents/openai_functions/output_parser.js +1 -1
- package/dist/agents/openai_functions/output_parser.js.map +1 -1
- package/dist/agents/openai_functions/prompt.cjs.map +1 -1
- package/dist/agents/openai_functions/prompt.js.map +1 -1
- package/dist/agents/openai_tools/index.cjs +8 -9
- package/dist/agents/openai_tools/index.cjs.map +1 -1
- package/dist/agents/openai_tools/index.d.cts +4 -6
- package/dist/agents/openai_tools/index.d.cts.map +1 -1
- package/dist/agents/openai_tools/index.d.ts +4 -6
- package/dist/agents/openai_tools/index.d.ts.map +1 -1
- package/dist/agents/openai_tools/index.js +3 -4
- package/dist/agents/openai_tools/index.js.map +1 -1
- package/dist/agents/openai_tools/output_parser.cjs +5 -6
- package/dist/agents/openai_tools/output_parser.cjs.map +1 -1
- package/dist/agents/openai_tools/output_parser.d.cts +0 -1
- package/dist/agents/openai_tools/output_parser.d.cts.map +1 -1
- package/dist/agents/openai_tools/output_parser.d.ts +1 -2
- package/dist/agents/openai_tools/output_parser.d.ts.map +1 -1
- package/dist/agents/openai_tools/output_parser.js +1 -2
- package/dist/agents/openai_tools/output_parser.js.map +1 -1
- package/dist/agents/react/index.cjs +5 -6
- package/dist/agents/react/index.cjs.map +1 -1
- package/dist/agents/react/index.d.cts +3 -5
- package/dist/agents/react/index.d.cts.map +1 -1
- package/dist/agents/react/index.d.ts +3 -5
- package/dist/agents/react/index.d.ts.map +1 -1
- package/dist/agents/react/index.js +2 -3
- package/dist/agents/react/index.js.map +1 -1
- package/dist/agents/react/output_parser.cjs +15 -22
- package/dist/agents/react/output_parser.cjs.map +1 -1
- package/dist/agents/react/output_parser.d.cts +0 -1
- package/dist/agents/react/output_parser.d.cts.map +1 -1
- package/dist/agents/react/output_parser.d.ts +0 -1
- package/dist/agents/react/output_parser.d.ts.map +1 -1
- package/dist/agents/react/output_parser.js +9 -17
- package/dist/agents/react/output_parser.js.map +1 -1
- package/dist/agents/react/prompt.cjs.map +1 -1
- package/dist/agents/react/prompt.js.map +1 -1
- package/dist/agents/structured_chat/index.cjs +26 -29
- package/dist/agents/structured_chat/index.cjs.map +1 -1
- package/dist/agents/structured_chat/index.d.cts +1 -4
- package/dist/agents/structured_chat/index.d.cts.map +1 -1
- package/dist/agents/structured_chat/index.d.ts +3 -6
- package/dist/agents/structured_chat/index.d.ts.map +1 -1
- package/dist/agents/structured_chat/index.js +12 -15
- package/dist/agents/structured_chat/index.js.map +1 -1
- package/dist/agents/structured_chat/outputParser.cjs +10 -13
- package/dist/agents/structured_chat/outputParser.cjs.map +1 -1
- package/dist/agents/structured_chat/outputParser.d.cts +0 -1
- package/dist/agents/structured_chat/outputParser.d.cts.map +1 -1
- package/dist/agents/structured_chat/outputParser.d.ts +0 -1
- package/dist/agents/structured_chat/outputParser.d.ts.map +1 -1
- package/dist/agents/structured_chat/outputParser.js +3 -6
- package/dist/agents/structured_chat/outputParser.js.map +1 -1
- package/dist/agents/structured_chat/prompt.cjs.map +1 -1
- package/dist/agents/structured_chat/prompt.js.map +1 -1
- package/dist/agents/tool_calling/index.cjs +5 -6
- package/dist/agents/tool_calling/index.cjs.map +1 -1
- package/dist/agents/tool_calling/index.d.cts +4 -6
- package/dist/agents/tool_calling/index.d.cts.map +1 -1
- package/dist/agents/tool_calling/index.d.ts +2 -4
- package/dist/agents/tool_calling/index.d.ts.map +1 -1
- package/dist/agents/tool_calling/index.js +2 -3
- package/dist/agents/tool_calling/index.js.map +1 -1
- package/dist/agents/tool_calling/output_parser.cjs +5 -5
- package/dist/agents/tool_calling/output_parser.cjs.map +1 -1
- package/dist/agents/tool_calling/output_parser.d.cts +0 -1
- package/dist/agents/tool_calling/output_parser.d.cts.map +1 -1
- package/dist/agents/tool_calling/output_parser.d.ts +1 -2
- package/dist/agents/tool_calling/output_parser.d.ts.map +1 -1
- package/dist/agents/tool_calling/output_parser.js +1 -1
- package/dist/agents/tool_calling/output_parser.js.map +1 -1
- package/dist/agents/toolkits/base.cjs +2 -2
- package/dist/agents/toolkits/conversational_retrieval/openai_functions.cjs +1 -2
- package/dist/agents/toolkits/conversational_retrieval/openai_functions.cjs.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.cts.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.ts.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/openai_functions.js +1 -2
- package/dist/agents/toolkits/conversational_retrieval/openai_functions.js.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.cjs +6 -6
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.cjs.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts +0 -1
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts +0 -1
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.js.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/tool.cjs +6 -7
- package/dist/agents/toolkits/conversational_retrieval/tool.cjs.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/tool.d.cts.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/tool.d.ts.map +1 -1
- package/dist/agents/toolkits/conversational_retrieval/tool.js +2 -3
- package/dist/agents/toolkits/conversational_retrieval/tool.js.map +1 -1
- package/dist/agents/toolkits/index.cjs +3 -3
- package/dist/agents/toolkits/index.js +2 -3
- package/dist/agents/toolkits/json/json.cjs +11 -13
- package/dist/agents/toolkits/json/json.cjs.map +1 -1
- package/dist/agents/toolkits/json/json.d.cts +0 -1
- package/dist/agents/toolkits/json/json.d.cts.map +1 -1
- package/dist/agents/toolkits/json/json.d.ts +0 -1
- package/dist/agents/toolkits/json/json.d.ts.map +1 -1
- package/dist/agents/toolkits/json/json.js +8 -10
- package/dist/agents/toolkits/json/json.js.map +1 -1
- package/dist/agents/toolkits/json/prompt.cjs.map +1 -1
- package/dist/agents/toolkits/json/prompt.js.map +1 -1
- package/dist/agents/toolkits/openapi/openapi.cjs +14 -18
- package/dist/agents/toolkits/openapi/openapi.cjs.map +1 -1
- package/dist/agents/toolkits/openapi/openapi.d.cts +0 -1
- package/dist/agents/toolkits/openapi/openapi.d.cts.map +1 -1
- package/dist/agents/toolkits/openapi/openapi.d.ts +0 -1
- package/dist/agents/toolkits/openapi/openapi.d.ts.map +1 -1
- package/dist/agents/toolkits/openapi/openapi.js +10 -14
- package/dist/agents/toolkits/openapi/openapi.js.map +1 -1
- package/dist/agents/toolkits/openapi/prompt.cjs.map +1 -1
- package/dist/agents/toolkits/openapi/prompt.js.map +1 -1
- package/dist/agents/toolkits/sql/index.cjs +3 -3
- package/dist/agents/toolkits/sql/index.js +2 -3
- package/dist/agents/toolkits/sql/prompt.cjs.map +1 -1
- package/dist/agents/toolkits/sql/prompt.d.cts.map +1 -1
- package/dist/agents/toolkits/sql/prompt.d.ts.map +1 -1
- package/dist/agents/toolkits/sql/prompt.js.map +1 -1
- package/dist/agents/toolkits/sql/sql.cjs +13 -15
- package/dist/agents/toolkits/sql/sql.cjs.map +1 -1
- package/dist/agents/toolkits/sql/sql.d.cts +0 -1
- package/dist/agents/toolkits/sql/sql.d.cts.map +1 -1
- package/dist/agents/toolkits/sql/sql.d.ts +0 -1
- package/dist/agents/toolkits/sql/sql.d.ts.map +1 -1
- package/dist/agents/toolkits/sql/sql.js +8 -10
- package/dist/agents/toolkits/sql/sql.js.map +1 -1
- package/dist/agents/toolkits/vectorstore/prompt.cjs.map +1 -1
- package/dist/agents/toolkits/vectorstore/prompt.js.map +1 -1
- package/dist/agents/toolkits/vectorstore/vectorstore.cjs +20 -24
- package/dist/agents/toolkits/vectorstore/vectorstore.cjs.map +1 -1
- package/dist/agents/toolkits/vectorstore/vectorstore.d.cts +0 -1
- package/dist/agents/toolkits/vectorstore/vectorstore.d.cts.map +1 -1
- package/dist/agents/toolkits/vectorstore/vectorstore.d.ts +0 -1
- package/dist/agents/toolkits/vectorstore/vectorstore.d.ts.map +1 -1
- package/dist/agents/toolkits/vectorstore/vectorstore.js +16 -20
- package/dist/agents/toolkits/vectorstore/vectorstore.js.map +1 -1
- package/dist/agents/types.cjs +4 -4
- package/dist/agents/types.cjs.map +1 -1
- package/dist/agents/types.d.cts +0 -1
- package/dist/agents/types.d.cts.map +1 -1
- package/dist/agents/types.d.ts +1 -2
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/types.js.map +1 -1
- package/dist/agents/xml/index.cjs +12 -15
- package/dist/agents/xml/index.cjs.map +1 -1
- package/dist/agents/xml/index.d.cts +1 -4
- package/dist/agents/xml/index.d.cts.map +1 -1
- package/dist/agents/xml/index.d.ts +1 -4
- package/dist/agents/xml/index.d.ts.map +1 -1
- package/dist/agents/xml/index.js +7 -10
- package/dist/agents/xml/index.js.map +1 -1
- package/dist/agents/xml/output_parser.cjs +7 -9
- package/dist/agents/xml/output_parser.cjs.map +1 -1
- package/dist/agents/xml/output_parser.d.cts +0 -1
- package/dist/agents/xml/output_parser.d.cts.map +1 -1
- package/dist/agents/xml/output_parser.d.ts +0 -1
- package/dist/agents/xml/output_parser.d.ts.map +1 -1
- package/dist/agents/xml/output_parser.js +4 -7
- package/dist/agents/xml/output_parser.js.map +1 -1
- package/dist/agents/xml/prompt.cjs.map +1 -1
- package/dist/agents/xml/prompt.js.map +1 -1
- package/dist/cache/file_system.cjs +11 -9
- package/dist/cache/file_system.cjs.map +1 -1
- package/dist/cache/file_system.d.cts +0 -1
- package/dist/cache/file_system.d.cts.map +1 -1
- package/dist/cache/file_system.d.ts +0 -1
- package/dist/cache/file_system.d.ts.map +1 -1
- package/dist/cache/file_system.js +2 -3
- package/dist/cache/file_system.js.map +1 -1
- package/dist/callbacks/handlers/console.cjs +6 -6
- package/dist/callbacks/handlers/console.d.cts +3 -2
- package/dist/callbacks/handlers/console.d.cts.map +1 -1
- package/dist/callbacks/handlers/console.d.ts +3 -2
- package/dist/callbacks/handlers/console.d.ts.map +1 -1
- package/dist/callbacks/handlers/console.js +4 -4
- package/dist/callbacks/handlers/run_collector.cjs +6 -6
- package/dist/callbacks/handlers/run_collector.d.cts +3 -2
- package/dist/callbacks/handlers/run_collector.d.cts.map +1 -1
- package/dist/callbacks/handlers/run_collector.d.ts +3 -2
- package/dist/callbacks/handlers/run_collector.d.ts.map +1 -1
- package/dist/callbacks/handlers/run_collector.js +4 -4
- package/dist/callbacks/handlers/tracer.cjs +6 -6
- package/dist/callbacks/handlers/tracer.d.cts +3 -2
- package/dist/callbacks/handlers/tracer.d.cts.map +1 -1
- package/dist/callbacks/handlers/tracer.d.ts +3 -2
- package/dist/callbacks/handlers/tracer.d.ts.map +1 -1
- package/dist/callbacks/handlers/tracer.js +4 -4
- package/dist/callbacks/handlers/tracer_langchain.cjs +6 -6
- package/dist/callbacks/handlers/tracer_langchain.d.cts +3 -2
- package/dist/callbacks/handlers/tracer_langchain.d.cts.map +1 -1
- package/dist/callbacks/handlers/tracer_langchain.d.ts +3 -2
- package/dist/callbacks/handlers/tracer_langchain.d.ts.map +1 -1
- package/dist/callbacks/handlers/tracer_langchain.js +4 -4
- package/dist/callbacks/index.cjs +3 -3
- package/dist/callbacks/index.js +2 -3
- package/dist/callbacks/promises.cjs +6 -6
- package/dist/callbacks/promises.d.cts +3 -2
- package/dist/callbacks/promises.d.cts.map +1 -1
- package/dist/callbacks/promises.d.ts +3 -2
- package/dist/callbacks/promises.d.ts.map +1 -1
- package/dist/callbacks/promises.js +4 -4
- package/dist/chains/analyze_documents_chain.cjs +6 -8
- package/dist/chains/analyze_documents_chain.cjs.map +1 -1
- package/dist/chains/analyze_documents_chain.d.cts.map +1 -1
- package/dist/chains/analyze_documents_chain.d.ts +1 -1
- package/dist/chains/analyze_documents_chain.d.ts.map +1 -1
- package/dist/chains/analyze_documents_chain.js +3 -5
- package/dist/chains/analyze_documents_chain.js.map +1 -1
- package/dist/chains/api/api_chain.cjs +1 -2
- package/dist/chains/api/api_chain.cjs.map +1 -1
- package/dist/chains/api/api_chain.d.cts +0 -1
- package/dist/chains/api/api_chain.d.cts.map +1 -1
- package/dist/chains/api/api_chain.d.ts +0 -1
- package/dist/chains/api/api_chain.d.ts.map +1 -1
- package/dist/chains/api/api_chain.js +1 -2
- package/dist/chains/api/api_chain.js.map +1 -1
- package/dist/chains/api/prompts.cjs +4 -4
- package/dist/chains/api/prompts.cjs.map +1 -1
- package/dist/chains/api/prompts.js.map +1 -1
- package/dist/chains/base.cjs +12 -14
- package/dist/chains/base.cjs.map +1 -1
- package/dist/chains/base.d.cts +3 -0
- package/dist/chains/base.d.cts.map +1 -1
- package/dist/chains/base.d.ts +3 -0
- package/dist/chains/base.d.ts.map +1 -1
- package/dist/chains/base.js +3 -5
- package/dist/chains/base.js.map +1 -1
- package/dist/chains/chat_vector_db_chain.cjs +9 -11
- package/dist/chains/chat_vector_db_chain.cjs.map +1 -1
- package/dist/chains/chat_vector_db_chain.d.cts.map +1 -1
- package/dist/chains/chat_vector_db_chain.d.ts.map +1 -1
- package/dist/chains/chat_vector_db_chain.js +6 -8
- package/dist/chains/chat_vector_db_chain.js.map +1 -1
- package/dist/chains/combine_docs_chain.cjs +15 -24
- package/dist/chains/combine_docs_chain.cjs.map +1 -1
- package/dist/chains/combine_docs_chain.d.cts.map +1 -1
- package/dist/chains/combine_docs_chain.d.ts +1 -1
- package/dist/chains/combine_docs_chain.d.ts.map +1 -1
- package/dist/chains/combine_docs_chain.js +12 -21
- package/dist/chains/combine_docs_chain.js.map +1 -1
- package/dist/chains/combine_documents/base.cjs +5 -6
- package/dist/chains/combine_documents/base.cjs.map +1 -1
- package/dist/chains/combine_documents/base.js +2 -3
- package/dist/chains/combine_documents/base.js.map +1 -1
- package/dist/chains/combine_documents/index.cjs +3 -3
- package/dist/chains/combine_documents/index.js +2 -3
- package/dist/chains/combine_documents/reduce.cjs +5 -7
- package/dist/chains/combine_documents/reduce.cjs.map +1 -1
- package/dist/chains/combine_documents/reduce.d.cts +0 -1
- package/dist/chains/combine_documents/reduce.d.cts.map +1 -1
- package/dist/chains/combine_documents/reduce.d.ts +0 -1
- package/dist/chains/combine_documents/reduce.d.ts.map +1 -1
- package/dist/chains/combine_documents/reduce.js +4 -7
- package/dist/chains/combine_documents/reduce.js.map +1 -1
- package/dist/chains/combine_documents/stuff.cjs +6 -6
- package/dist/chains/combine_documents/stuff.cjs.map +1 -1
- package/dist/chains/combine_documents/stuff.d.cts +0 -1
- package/dist/chains/combine_documents/stuff.d.cts.map +1 -1
- package/dist/chains/combine_documents/stuff.d.ts +0 -1
- package/dist/chains/combine_documents/stuff.d.ts.map +1 -1
- package/dist/chains/combine_documents/stuff.js.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_chain.cjs.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.cts +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.cts.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.ts +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.ts.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_chain.js.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_principle.cjs.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.cts +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.cts.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.ts +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.ts.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_principle.js.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_prompts.cjs +5 -5
- package/dist/chains/constitutional_ai/constitutional_prompts.cjs.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_prompts.js.map +1 -1
- package/dist/chains/conversation.cjs +4 -4
- package/dist/chains/conversation.cjs.map +1 -1
- package/dist/chains/conversation.d.cts +0 -1
- package/dist/chains/conversation.d.cts.map +1 -1
- package/dist/chains/conversation.d.ts +0 -1
- package/dist/chains/conversation.d.ts.map +1 -1
- package/dist/chains/conversation.js +1 -1
- package/dist/chains/conversation.js.map +1 -1
- package/dist/chains/conversational_retrieval_chain.cjs +12 -14
- package/dist/chains/conversational_retrieval_chain.cjs.map +1 -1
- package/dist/chains/conversational_retrieval_chain.d.cts +2 -4
- package/dist/chains/conversational_retrieval_chain.d.cts.map +1 -1
- package/dist/chains/conversational_retrieval_chain.d.ts +3 -5
- package/dist/chains/conversational_retrieval_chain.d.ts.map +1 -1
- package/dist/chains/conversational_retrieval_chain.js +7 -9
- package/dist/chains/conversational_retrieval_chain.js.map +1 -1
- package/dist/chains/graph_qa/cypher.cjs +8 -10
- package/dist/chains/graph_qa/cypher.cjs.map +1 -1
- package/dist/chains/graph_qa/cypher.d.cts.map +1 -1
- package/dist/chains/graph_qa/cypher.d.ts.map +1 -1
- package/dist/chains/graph_qa/cypher.js +7 -10
- package/dist/chains/graph_qa/cypher.js.map +1 -1
- package/dist/chains/graph_qa/prompts.cjs +4 -4
- package/dist/chains/graph_qa/prompts.cjs.map +1 -1
- package/dist/chains/graph_qa/prompts.js.map +1 -1
- package/dist/chains/history_aware_retriever.cjs +7 -8
- package/dist/chains/history_aware_retriever.cjs.map +1 -1
- package/dist/chains/history_aware_retriever.d.cts +0 -1
- package/dist/chains/history_aware_retriever.d.cts.map +1 -1
- package/dist/chains/history_aware_retriever.d.ts +2 -3
- package/dist/chains/history_aware_retriever.d.ts.map +1 -1
- package/dist/chains/history_aware_retriever.js +3 -5
- package/dist/chains/history_aware_retriever.js.map +1 -1
- package/dist/chains/index.cjs +3 -3
- package/dist/chains/index.js +2 -3
- package/dist/chains/llm_chain.cjs +12 -15
- package/dist/chains/llm_chain.cjs.map +1 -1
- package/dist/chains/llm_chain.d.cts.map +1 -1
- package/dist/chains/llm_chain.d.ts +1 -1
- package/dist/chains/llm_chain.d.ts.map +1 -1
- package/dist/chains/llm_chain.js +3 -6
- package/dist/chains/llm_chain.js.map +1 -1
- package/dist/chains/load.cjs +3 -3
- package/dist/chains/load.cjs.map +1 -1
- package/dist/chains/load.d.cts +0 -1
- package/dist/chains/load.d.cts.map +1 -1
- package/dist/chains/load.d.ts +0 -1
- package/dist/chains/load.d.ts.map +1 -1
- package/dist/chains/load.js +2 -3
- package/dist/chains/load.js.map +1 -1
- package/dist/chains/openai_functions/base.cjs +8 -10
- package/dist/chains/openai_functions/base.cjs.map +1 -1
- package/dist/chains/openai_functions/base.d.cts +3 -7
- package/dist/chains/openai_functions/base.d.cts.map +1 -1
- package/dist/chains/openai_functions/base.d.ts +4 -8
- package/dist/chains/openai_functions/base.d.ts.map +1 -1
- package/dist/chains/openai_functions/base.js +5 -7
- package/dist/chains/openai_functions/base.js.map +1 -1
- package/dist/chains/openai_functions/extraction.cjs +5 -5
- package/dist/chains/openai_functions/extraction.cjs.map +1 -1
- package/dist/chains/openai_functions/extraction.d.cts +0 -1
- package/dist/chains/openai_functions/extraction.d.cts.map +1 -1
- package/dist/chains/openai_functions/extraction.d.ts +1 -2
- 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 +3 -3
- package/dist/chains/openai_functions/index.js +2 -3
- package/dist/chains/openai_functions/openapi.cjs +12 -19
- package/dist/chains/openai_functions/openapi.cjs.map +1 -1
- package/dist/chains/openai_functions/openapi.d.cts +0 -2
- package/dist/chains/openai_functions/openapi.d.cts.map +1 -1
- package/dist/chains/openai_functions/openapi.d.ts +0 -2
- package/dist/chains/openai_functions/openapi.d.ts.map +1 -1
- package/dist/chains/openai_functions/openapi.js +9 -16
- package/dist/chains/openai_functions/openapi.js.map +1 -1
- package/dist/chains/openai_functions/tagging.cjs +5 -5
- package/dist/chains/openai_functions/tagging.cjs.map +1 -1
- package/dist/chains/openai_functions/tagging.d.cts +0 -1
- package/dist/chains/openai_functions/tagging.d.cts.map +1 -1
- package/dist/chains/openai_functions/tagging.d.ts +1 -2
- package/dist/chains/openai_functions/tagging.d.ts.map +1 -1
- package/dist/chains/openai_functions/tagging.js +1 -1
- package/dist/chains/openai_functions/tagging.js.map +1 -1
- package/dist/chains/openai_moderation.cjs +7 -7
- package/dist/chains/openai_moderation.cjs.map +1 -1
- package/dist/chains/openai_moderation.d.cts +0 -1
- package/dist/chains/openai_moderation.d.cts.map +1 -1
- package/dist/chains/openai_moderation.d.ts +0 -1
- package/dist/chains/openai_moderation.d.ts.map +1 -1
- package/dist/chains/openai_moderation.js.map +1 -1
- package/dist/chains/query_constructor/index.cjs +19 -25
- package/dist/chains/query_constructor/index.cjs.map +1 -1
- package/dist/chains/query_constructor/index.d.cts +0 -1
- package/dist/chains/query_constructor/index.d.cts.map +1 -1
- package/dist/chains/query_constructor/index.d.ts +0 -1
- package/dist/chains/query_constructor/index.d.ts.map +1 -1
- package/dist/chains/query_constructor/index.js +11 -18
- package/dist/chains/query_constructor/index.js.map +1 -1
- package/dist/chains/query_constructor/ir.cjs +7 -6
- package/dist/chains/query_constructor/ir.js +4 -4
- package/dist/chains/query_constructor/parser.cjs +8 -9
- package/dist/chains/query_constructor/parser.cjs.map +1 -1
- package/dist/chains/query_constructor/parser.d.cts +0 -1
- package/dist/chains/query_constructor/parser.d.cts.map +1 -1
- package/dist/chains/query_constructor/parser.d.ts +0 -1
- package/dist/chains/query_constructor/parser.d.ts.map +1 -1
- package/dist/chains/query_constructor/parser.js +1 -2
- package/dist/chains/query_constructor/parser.js.map +1 -1
- package/dist/chains/query_constructor/prompt.cjs +3 -3
- package/dist/chains/query_constructor/prompt.cjs.map +1 -1
- package/dist/chains/query_constructor/prompt.d.cts +0 -1
- package/dist/chains/query_constructor/prompt.d.cts.map +1 -1
- package/dist/chains/query_constructor/prompt.d.ts +0 -1
- package/dist/chains/query_constructor/prompt.d.ts.map +1 -1
- package/dist/chains/query_constructor/prompt.js.map +1 -1
- package/dist/chains/question_answering/load.cjs +32 -41
- package/dist/chains/question_answering/load.cjs.map +1 -1
- package/dist/chains/question_answering/load.d.cts +0 -1
- package/dist/chains/question_answering/load.d.cts.map +1 -1
- package/dist/chains/question_answering/load.d.ts +0 -1
- package/dist/chains/question_answering/load.d.ts.map +1 -1
- package/dist/chains/question_answering/load.js +32 -41
- package/dist/chains/question_answering/load.js.map +1 -1
- package/dist/chains/question_answering/map_reduce_prompts.cjs +13 -15
- package/dist/chains/question_answering/map_reduce_prompts.cjs.map +1 -1
- package/dist/chains/question_answering/map_reduce_prompts.js +4 -6
- package/dist/chains/question_answering/map_reduce_prompts.js.map +1 -1
- package/dist/chains/question_answering/refine_prompts.cjs +16 -18
- package/dist/chains/question_answering/refine_prompts.cjs.map +1 -1
- package/dist/chains/question_answering/refine_prompts.js +7 -9
- package/dist/chains/question_answering/refine_prompts.js.map +1 -1
- package/dist/chains/question_answering/stuff_prompts.cjs +8 -9
- package/dist/chains/question_answering/stuff_prompts.cjs.map +1 -1
- package/dist/chains/question_answering/stuff_prompts.js +2 -3
- package/dist/chains/question_answering/stuff_prompts.js.map +1 -1
- package/dist/chains/retrieval.cjs +7 -8
- package/dist/chains/retrieval.cjs.map +1 -1
- package/dist/chains/retrieval.d.cts +0 -1
- package/dist/chains/retrieval.d.cts.map +1 -1
- package/dist/chains/retrieval.d.ts +2 -3
- package/dist/chains/retrieval.d.ts.map +1 -1
- package/dist/chains/retrieval.js +3 -5
- package/dist/chains/retrieval.js.map +1 -1
- package/dist/chains/retrieval_qa.cjs.map +1 -1
- package/dist/chains/retrieval_qa.d.cts.map +1 -1
- package/dist/chains/retrieval_qa.d.ts.map +1 -1
- package/dist/chains/retrieval_qa.js.map +1 -1
- package/dist/chains/router/llm_router.cjs.map +1 -1
- package/dist/chains/router/llm_router.d.cts +0 -1
- package/dist/chains/router/llm_router.d.cts.map +1 -1
- package/dist/chains/router/llm_router.d.ts +0 -1
- package/dist/chains/router/llm_router.d.ts.map +1 -1
- package/dist/chains/router/llm_router.js.map +1 -1
- package/dist/chains/router/multi_prompt.cjs +8 -10
- package/dist/chains/router/multi_prompt.cjs.map +1 -1
- package/dist/chains/router/multi_prompt.d.cts +0 -1
- package/dist/chains/router/multi_prompt.d.cts.map +1 -1
- package/dist/chains/router/multi_prompt.d.ts +0 -1
- package/dist/chains/router/multi_prompt.d.ts.map +1 -1
- package/dist/chains/router/multi_prompt.js +3 -5
- package/dist/chains/router/multi_prompt.js.map +1 -1
- package/dist/chains/router/multi_prompt_prompt.cjs.map +1 -1
- package/dist/chains/router/multi_prompt_prompt.js.map +1 -1
- package/dist/chains/router/multi_retrieval_prompt.cjs.map +1 -1
- package/dist/chains/router/multi_retrieval_prompt.js.map +1 -1
- package/dist/chains/router/multi_retrieval_qa.cjs +15 -22
- package/dist/chains/router/multi_retrieval_qa.cjs.map +1 -1
- package/dist/chains/router/multi_retrieval_qa.d.cts +0 -1
- package/dist/chains/router/multi_retrieval_qa.d.cts.map +1 -1
- package/dist/chains/router/multi_retrieval_qa.d.ts +0 -1
- package/dist/chains/router/multi_retrieval_qa.d.ts.map +1 -1
- package/dist/chains/router/multi_retrieval_qa.js +11 -18
- package/dist/chains/router/multi_retrieval_qa.js.map +1 -1
- package/dist/chains/router/multi_route.cjs.map +1 -1
- package/dist/chains/router/multi_route.d.cts +0 -1
- package/dist/chains/router/multi_route.d.cts.map +1 -1
- package/dist/chains/router/multi_route.d.ts +0 -1
- package/dist/chains/router/multi_route.d.ts.map +1 -1
- package/dist/chains/router/multi_route.js.map +1 -1
- package/dist/chains/router/utils.cjs.map +1 -1
- package/dist/chains/router/utils.js.map +1 -1
- package/dist/chains/sequential_chain.cjs.map +1 -1
- package/dist/chains/sequential_chain.d.cts +0 -1
- package/dist/chains/sequential_chain.d.cts.map +1 -1
- package/dist/chains/sequential_chain.d.ts +0 -1
- package/dist/chains/sequential_chain.d.ts.map +1 -1
- package/dist/chains/sequential_chain.js.map +1 -1
- package/dist/chains/serde.d.cts +0 -1
- package/dist/chains/serde.d.cts.map +1 -1
- package/dist/chains/serde.d.ts +0 -1
- package/dist/chains/serde.d.ts.map +1 -1
- package/dist/chains/sql_db/index.cjs +3 -3
- package/dist/chains/sql_db/index.js +2 -3
- package/dist/chains/sql_db/sql_db_chain.cjs +19 -24
- package/dist/chains/sql_db/sql_db_chain.cjs.map +1 -1
- package/dist/chains/sql_db/sql_db_chain.d.cts +0 -1
- package/dist/chains/sql_db/sql_db_chain.d.cts.map +1 -1
- package/dist/chains/sql_db/sql_db_chain.d.ts +0 -1
- package/dist/chains/sql_db/sql_db_chain.d.ts.map +1 -1
- package/dist/chains/sql_db/sql_db_chain.js +13 -18
- package/dist/chains/sql_db/sql_db_chain.js.map +1 -1
- package/dist/chains/sql_db/sql_db_prompt.cjs +9 -9
- 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/load.cjs +32 -41
- package/dist/chains/summarization/load.cjs.map +1 -1
- package/dist/chains/summarization/load.d.cts +0 -1
- package/dist/chains/summarization/load.d.cts.map +1 -1
- package/dist/chains/summarization/load.d.ts +0 -1
- package/dist/chains/summarization/load.d.ts.map +1 -1
- package/dist/chains/summarization/load.js +32 -41
- package/dist/chains/summarization/load.js.map +1 -1
- package/dist/chains/summarization/refine_prompts.cjs +3 -3
- package/dist/chains/summarization/refine_prompts.cjs.map +1 -1
- package/dist/chains/summarization/refine_prompts.js.map +1 -1
- package/dist/chains/summarization/stuff_prompts.cjs +3 -3
- package/dist/chains/summarization/stuff_prompts.cjs.map +1 -1
- package/dist/chains/summarization/stuff_prompts.js.map +1 -1
- package/dist/chains/transform.cjs.map +1 -1
- package/dist/chains/transform.d.cts +0 -1
- package/dist/chains/transform.d.cts.map +1 -1
- package/dist/chains/transform.d.ts +0 -1
- package/dist/chains/transform.d.ts.map +1 -1
- package/dist/chains/transform.js.map +1 -1
- package/dist/chains/vector_db_qa.cjs.map +1 -1
- package/dist/chains/vector_db_qa.d.cts.map +1 -1
- package/dist/chains/vector_db_qa.d.ts.map +1 -1
- package/dist/chains/vector_db_qa.js.map +1 -1
- package/dist/chat_models/universal.cjs +33 -39
- package/dist/chat_models/universal.cjs.map +1 -1
- package/dist/chat_models/universal.d.cts.map +1 -1
- package/dist/chat_models/universal.d.ts +1 -1
- package/dist/chat_models/universal.d.ts.map +1 -1
- package/dist/chat_models/universal.js +20 -27
- package/dist/chat_models/universal.js.map +1 -1
- package/dist/document.cjs +5 -5
- package/dist/document.js +2 -3
- package/dist/document_loaders/base.cjs +7 -6
- package/dist/document_loaders/base.js +4 -4
- package/dist/document_loaders/fs/buffer.cjs +7 -7
- package/dist/document_loaders/fs/buffer.cjs.map +1 -1
- package/dist/document_loaders/fs/buffer.d.cts +0 -1
- package/dist/document_loaders/fs/buffer.d.cts.map +1 -1
- package/dist/document_loaders/fs/buffer.d.ts +1 -2
- package/dist/document_loaders/fs/buffer.d.ts.map +1 -1
- package/dist/document_loaders/fs/buffer.js +2 -3
- package/dist/document_loaders/fs/buffer.js.map +1 -1
- package/dist/document_loaders/fs/directory.cjs +7 -7
- package/dist/document_loaders/fs/directory.cjs.map +1 -1
- package/dist/document_loaders/fs/directory.d.cts.map +1 -1
- package/dist/document_loaders/fs/directory.d.ts +1 -1
- package/dist/document_loaders/fs/directory.d.ts.map +1 -1
- package/dist/document_loaders/fs/directory.js +2 -3
- package/dist/document_loaders/fs/directory.js.map +1 -1
- package/dist/document_loaders/fs/json.cjs +7 -8
- package/dist/document_loaders/fs/json.cjs.map +1 -1
- package/dist/document_loaders/fs/json.d.cts +0 -1
- package/dist/document_loaders/fs/json.d.cts.map +1 -1
- package/dist/document_loaders/fs/json.d.ts +0 -1
- package/dist/document_loaders/fs/json.d.ts.map +1 -1
- package/dist/document_loaders/fs/json.js +4 -7
- package/dist/document_loaders/fs/json.js.map +1 -1
- package/dist/document_loaders/fs/multi_file.cjs +8 -9
- package/dist/document_loaders/fs/multi_file.cjs.map +1 -1
- package/dist/document_loaders/fs/multi_file.d.cts +0 -1
- package/dist/document_loaders/fs/multi_file.d.cts.map +1 -1
- package/dist/document_loaders/fs/multi_file.d.ts +0 -1
- package/dist/document_loaders/fs/multi_file.d.ts.map +1 -1
- package/dist/document_loaders/fs/multi_file.js +3 -5
- package/dist/document_loaders/fs/multi_file.js.map +1 -1
- package/dist/document_loaders/fs/text.cjs +9 -9
- package/dist/document_loaders/fs/text.cjs.map +1 -1
- package/dist/document_loaders/fs/text.d.cts +0 -1
- package/dist/document_loaders/fs/text.d.cts.map +1 -1
- package/dist/document_loaders/fs/text.d.ts +1 -2
- package/dist/document_loaders/fs/text.d.ts.map +1 -1
- package/dist/document_loaders/fs/text.js +3 -4
- package/dist/document_loaders/fs/text.js.map +1 -1
- package/dist/document_transformers/openai_functions.cjs +12 -14
- package/dist/document_transformers/openai_functions.cjs.map +1 -1
- package/dist/document_transformers/openai_functions.d.cts +0 -1
- package/dist/document_transformers/openai_functions.d.cts.map +1 -1
- package/dist/document_transformers/openai_functions.d.ts +1 -1
- package/dist/document_transformers/openai_functions.d.ts.map +1 -1
- package/dist/document_transformers/openai_functions.js +6 -9
- package/dist/document_transformers/openai_functions.js.map +1 -1
- package/dist/embeddings/cache_backed.cjs +7 -7
- package/dist/embeddings/cache_backed.cjs.map +1 -1
- package/dist/embeddings/cache_backed.d.cts +0 -1
- package/dist/embeddings/cache_backed.d.cts.map +1 -1
- package/dist/embeddings/cache_backed.d.ts +0 -1
- package/dist/embeddings/cache_backed.d.ts.map +1 -1
- package/dist/embeddings/cache_backed.js +2 -3
- package/dist/embeddings/cache_backed.js.map +1 -1
- package/dist/embeddings/fake.cjs +7 -6
- package/dist/embeddings/fake.js +4 -4
- package/dist/evaluation/agents/index.js +2 -0
- package/dist/evaluation/agents/prompt.cjs +15 -12
- package/dist/evaluation/agents/prompt.cjs.map +1 -1
- package/dist/evaluation/agents/prompt.js +3 -0
- package/dist/evaluation/agents/prompt.js.map +1 -1
- package/dist/evaluation/agents/trajectory.cjs +5 -5
- package/dist/evaluation/agents/trajectory.cjs.map +1 -1
- package/dist/evaluation/agents/trajectory.d.cts +2 -2
- package/dist/evaluation/agents/trajectory.d.cts.map +1 -1
- package/dist/evaluation/agents/trajectory.d.ts +2 -2
- package/dist/evaluation/agents/trajectory.d.ts.map +1 -1
- package/dist/evaluation/agents/trajectory.js.map +1 -1
- package/dist/evaluation/base.cjs.map +1 -1
- package/dist/evaluation/base.d.cts.map +1 -1
- package/dist/evaluation/base.d.ts.map +1 -1
- package/dist/evaluation/base.js.map +1 -1
- package/dist/evaluation/comparison/index.js +2 -0
- package/dist/evaluation/comparison/pairwise.cjs +16 -21
- package/dist/evaluation/comparison/pairwise.cjs.map +1 -1
- package/dist/evaluation/comparison/pairwise.d.cts +3 -3
- package/dist/evaluation/comparison/pairwise.d.cts.map +1 -1
- package/dist/evaluation/comparison/pairwise.d.ts +3 -3
- package/dist/evaluation/comparison/pairwise.d.ts.map +1 -1
- package/dist/evaluation/comparison/pairwise.js +11 -16
- package/dist/evaluation/comparison/pairwise.js.map +1 -1
- package/dist/evaluation/comparison/prompt.cjs +11 -4
- package/dist/evaluation/comparison/prompt.cjs.map +1 -1
- package/dist/evaluation/comparison/prompt.js +7 -0
- package/dist/evaluation/comparison/prompt.js.map +1 -1
- package/dist/evaluation/criteria/criteria.cjs +7 -9
- package/dist/evaluation/criteria/criteria.cjs.map +1 -1
- package/dist/evaluation/criteria/criteria.d.cts +3 -3
- package/dist/evaluation/criteria/criteria.d.cts.map +1 -1
- package/dist/evaluation/criteria/criteria.d.ts +3 -3
- package/dist/evaluation/criteria/criteria.d.ts.map +1 -1
- package/dist/evaluation/criteria/criteria.js +2 -4
- package/dist/evaluation/criteria/criteria.js.map +1 -1
- package/dist/evaluation/criteria/index.js +2 -0
- package/dist/evaluation/criteria/prompt.cjs +4 -4
- package/dist/evaluation/criteria/prompt.cjs.map +1 -1
- package/dist/evaluation/criteria/prompt.js.map +1 -1
- package/dist/evaluation/embedding_distance/base.cjs +5 -9
- package/dist/evaluation/embedding_distance/base.cjs.map +1 -1
- package/dist/evaluation/embedding_distance/base.d.cts +0 -1
- package/dist/evaluation/embedding_distance/base.d.cts.map +1 -1
- package/dist/evaluation/embedding_distance/base.d.ts +0 -1
- package/dist/evaluation/embedding_distance/base.d.ts.map +1 -1
- package/dist/evaluation/embedding_distance/base.js +5 -9
- package/dist/evaluation/embedding_distance/base.js.map +1 -1
- package/dist/evaluation/embedding_distance/index.js +2 -0
- package/dist/evaluation/index.cjs +3 -3
- package/dist/evaluation/index.js +2 -3
- package/dist/evaluation/loader.cjs +3 -3
- package/dist/evaluation/loader.cjs.map +1 -1
- package/dist/evaluation/loader.d.cts.map +1 -1
- package/dist/evaluation/loader.d.ts.map +1 -1
- package/dist/evaluation/loader.js.map +1 -1
- package/dist/evaluation/qa/eval_chain.cjs +1 -2
- package/dist/evaluation/qa/eval_chain.cjs.map +1 -1
- package/dist/evaluation/qa/eval_chain.d.cts.map +1 -1
- package/dist/evaluation/qa/eval_chain.d.ts.map +1 -1
- package/dist/evaluation/qa/eval_chain.js +1 -2
- package/dist/evaluation/qa/eval_chain.js.map +1 -1
- package/dist/evaluation/qa/index.js +2 -0
- package/dist/evaluation/qa/prompt.cjs +3 -3
- package/dist/evaluation/qa/prompt.cjs.map +1 -1
- package/dist/evaluation/qa/prompt.js.map +1 -1
- package/dist/evaluation/types.d.cts.map +1 -1
- package/dist/evaluation/types.d.ts.map +1 -1
- package/dist/experimental/autogpt/agent.cjs +18 -21
- package/dist/experimental/autogpt/agent.cjs.map +1 -1
- package/dist/experimental/autogpt/agent.d.cts +0 -1
- package/dist/experimental/autogpt/agent.d.cts.map +1 -1
- package/dist/experimental/autogpt/agent.d.ts +1 -2
- package/dist/experimental/autogpt/agent.d.ts.map +1 -1
- package/dist/experimental/autogpt/agent.js +12 -15
- package/dist/experimental/autogpt/agent.js.map +1 -1
- package/dist/experimental/autogpt/index.cjs +3 -3
- package/dist/experimental/autogpt/index.js +2 -3
- package/dist/experimental/autogpt/output_parser.cjs +3 -3
- package/dist/experimental/autogpt/output_parser.cjs.map +1 -1
- package/dist/experimental/autogpt/output_parser.d.cts +0 -1
- package/dist/experimental/autogpt/output_parser.d.cts.map +1 -1
- package/dist/experimental/autogpt/output_parser.d.ts +0 -1
- package/dist/experimental/autogpt/output_parser.d.ts.map +1 -1
- package/dist/experimental/autogpt/output_parser.js.map +1 -1
- package/dist/experimental/autogpt/prompt.cjs +13 -18
- package/dist/experimental/autogpt/prompt.cjs.map +1 -1
- package/dist/experimental/autogpt/prompt.d.cts +2 -2
- package/dist/experimental/autogpt/prompt.d.cts.map +1 -1
- package/dist/experimental/autogpt/prompt.d.ts +3 -3
- package/dist/experimental/autogpt/prompt.d.ts.map +1 -1
- package/dist/experimental/autogpt/prompt.js +7 -12
- package/dist/experimental/autogpt/prompt.js.map +1 -1
- package/dist/experimental/autogpt/prompt_generator.cjs +7 -11
- package/dist/experimental/autogpt/prompt_generator.cjs.map +1 -1
- package/dist/experimental/autogpt/prompt_generator.js +3 -7
- package/dist/experimental/autogpt/prompt_generator.js.map +1 -1
- package/dist/experimental/autogpt/schema.d.cts +0 -1
- package/dist/experimental/autogpt/schema.d.cts.map +1 -1
- package/dist/experimental/autogpt/schema.d.ts +0 -1
- package/dist/experimental/autogpt/schema.d.ts.map +1 -1
- package/dist/experimental/babyagi/agent.cjs +16 -20
- package/dist/experimental/babyagi/agent.cjs.map +1 -1
- package/dist/experimental/babyagi/agent.d.cts +0 -1
- package/dist/experimental/babyagi/agent.d.cts.map +1 -1
- package/dist/experimental/babyagi/agent.d.ts +0 -1
- package/dist/experimental/babyagi/agent.d.ts.map +1 -1
- package/dist/experimental/babyagi/agent.js +13 -17
- package/dist/experimental/babyagi/agent.js.map +1 -1
- package/dist/experimental/babyagi/index.cjs +3 -3
- package/dist/experimental/babyagi/index.js +2 -3
- package/dist/experimental/babyagi/task_creation.cjs +11 -13
- package/dist/experimental/babyagi/task_creation.cjs.map +1 -1
- package/dist/experimental/babyagi/task_creation.d.cts.map +1 -1
- package/dist/experimental/babyagi/task_creation.d.ts.map +1 -1
- package/dist/experimental/babyagi/task_creation.js +9 -11
- package/dist/experimental/babyagi/task_creation.js.map +1 -1
- package/dist/experimental/babyagi/task_execution.cjs +10 -12
- package/dist/experimental/babyagi/task_execution.cjs.map +1 -1
- package/dist/experimental/babyagi/task_execution.d.cts.map +1 -1
- package/dist/experimental/babyagi/task_execution.d.ts.map +1 -1
- package/dist/experimental/babyagi/task_execution.js +8 -10
- package/dist/experimental/babyagi/task_execution.js.map +1 -1
- package/dist/experimental/babyagi/task_prioritization.cjs +10 -12
- package/dist/experimental/babyagi/task_prioritization.cjs.map +1 -1
- package/dist/experimental/babyagi/task_prioritization.d.cts.map +1 -1
- package/dist/experimental/babyagi/task_prioritization.d.ts.map +1 -1
- package/dist/experimental/babyagi/task_prioritization.js +8 -10
- package/dist/experimental/babyagi/task_prioritization.js.map +1 -1
- package/dist/experimental/chains/violation_of_expectations/index.cjs +3 -3
- package/dist/experimental/chains/violation_of_expectations/index.js +2 -3
- package/dist/experimental/chains/violation_of_expectations/types.cjs.map +1 -1
- package/dist/experimental/chains/violation_of_expectations/types.d.cts +0 -1
- package/dist/experimental/chains/violation_of_expectations/types.d.cts.map +1 -1
- package/dist/experimental/chains/violation_of_expectations/types.d.ts +0 -1
- package/dist/experimental/chains/violation_of_expectations/types.d.ts.map +1 -1
- package/dist/experimental/chains/violation_of_expectations/types.js.map +1 -1
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.cjs +20 -30
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.cjs.map +1 -1
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.cts +0 -1
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.cts.map +1 -1
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts +1 -2
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts.map +1 -1
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.js +16 -26
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.js.map +1 -1
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.cjs +6 -6
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.cjs.map +1 -1
- package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.js.map +1 -1
- package/dist/experimental/generative_agents/generative_agent.cjs +30 -43
- package/dist/experimental/generative_agents/generative_agent.cjs.map +1 -1
- package/dist/experimental/generative_agents/generative_agent.d.cts +0 -1
- package/dist/experimental/generative_agents/generative_agent.d.cts.map +1 -1
- package/dist/experimental/generative_agents/generative_agent.d.ts +0 -1
- package/dist/experimental/generative_agents/generative_agent.d.ts.map +1 -1
- package/dist/experimental/generative_agents/generative_agent.js +23 -36
- package/dist/experimental/generative_agents/generative_agent.js.map +1 -1
- package/dist/experimental/generative_agents/generative_agent_memory.cjs +17 -26
- package/dist/experimental/generative_agents/generative_agent_memory.cjs.map +1 -1
- package/dist/experimental/generative_agents/generative_agent_memory.d.cts.map +1 -1
- package/dist/experimental/generative_agents/generative_agent_memory.d.ts +1 -1
- package/dist/experimental/generative_agents/generative_agent_memory.d.ts.map +1 -1
- package/dist/experimental/generative_agents/generative_agent_memory.js +9 -18
- package/dist/experimental/generative_agents/generative_agent_memory.js.map +1 -1
- package/dist/experimental/generative_agents/index.cjs +3 -3
- package/dist/experimental/generative_agents/index.js +2 -3
- package/dist/experimental/masking/index.cjs +3 -3
- package/dist/experimental/masking/index.js +2 -3
- package/dist/experimental/masking/parser.cjs.map +1 -1
- package/dist/experimental/masking/parser.d.cts +0 -1
- package/dist/experimental/masking/parser.d.cts.map +1 -1
- package/dist/experimental/masking/parser.d.ts +0 -1
- package/dist/experimental/masking/parser.d.ts.map +1 -1
- package/dist/experimental/masking/parser.js.map +1 -1
- package/dist/experimental/masking/regex_masking_transformer.cjs +1 -2
- package/dist/experimental/masking/regex_masking_transformer.cjs.map +1 -1
- package/dist/experimental/masking/regex_masking_transformer.d.cts +0 -1
- package/dist/experimental/masking/regex_masking_transformer.d.cts.map +1 -1
- package/dist/experimental/masking/regex_masking_transformer.d.ts +0 -1
- package/dist/experimental/masking/regex_masking_transformer.d.ts.map +1 -1
- package/dist/experimental/masking/regex_masking_transformer.js +1 -2
- package/dist/experimental/masking/regex_masking_transformer.js.map +1 -1
- package/dist/experimental/masking/transformer.cjs.map +1 -1
- package/dist/experimental/masking/transformer.d.cts.map +1 -1
- package/dist/experimental/masking/transformer.d.ts.map +1 -1
- package/dist/experimental/masking/transformer.js.map +1 -1
- package/dist/experimental/masking/types.d.cts +0 -1
- package/dist/experimental/masking/types.d.cts.map +1 -1
- package/dist/experimental/masking/types.d.ts +0 -1
- package/dist/experimental/masking/types.d.ts.map +1 -1
- package/dist/experimental/openai_assistant/index.cjs +32 -40
- package/dist/experimental/openai_assistant/index.cjs.map +1 -1
- package/dist/experimental/openai_assistant/index.d.cts.map +1 -1
- package/dist/experimental/openai_assistant/index.d.ts.map +1 -1
- package/dist/experimental/openai_assistant/index.js +21 -30
- package/dist/experimental/openai_assistant/index.js.map +1 -1
- package/dist/experimental/openai_assistant/schema.d.cts.map +1 -1
- package/dist/experimental/openai_assistant/schema.d.ts.map +1 -1
- package/dist/experimental/openai_files/index.cjs +7 -7
- package/dist/experimental/openai_files/index.cjs.map +1 -1
- package/dist/experimental/openai_files/index.d.cts.map +1 -1
- package/dist/experimental/openai_files/index.d.ts.map +1 -1
- package/dist/experimental/openai_files/index.js +2 -3
- package/dist/experimental/openai_files/index.js.map +1 -1
- package/dist/experimental/plan_and_execute/agent_executor.cjs +3 -5
- package/dist/experimental/plan_and_execute/agent_executor.cjs.map +1 -1
- package/dist/experimental/plan_and_execute/agent_executor.d.cts +0 -1
- package/dist/experimental/plan_and_execute/agent_executor.d.cts.map +1 -1
- package/dist/experimental/plan_and_execute/agent_executor.d.ts +0 -1
- package/dist/experimental/plan_and_execute/agent_executor.d.ts.map +1 -1
- package/dist/experimental/plan_and_execute/agent_executor.js +3 -5
- package/dist/experimental/plan_and_execute/agent_executor.js.map +1 -1
- package/dist/experimental/plan_and_execute/base.cjs +1 -2
- package/dist/experimental/plan_and_execute/base.cjs.map +1 -1
- package/dist/experimental/plan_and_execute/base.d.cts +0 -1
- package/dist/experimental/plan_and_execute/base.d.cts.map +1 -1
- package/dist/experimental/plan_and_execute/base.d.ts +0 -1
- package/dist/experimental/plan_and_execute/base.d.ts.map +1 -1
- package/dist/experimental/plan_and_execute/base.js +1 -2
- package/dist/experimental/plan_and_execute/base.js.map +1 -1
- package/dist/experimental/plan_and_execute/index.cjs +3 -3
- package/dist/experimental/plan_and_execute/index.js +2 -3
- package/dist/experimental/plan_and_execute/outputParser.cjs +3 -3
- package/dist/experimental/plan_and_execute/outputParser.cjs.map +1 -1
- package/dist/experimental/plan_and_execute/outputParser.d.cts +0 -1
- package/dist/experimental/plan_and_execute/outputParser.d.cts.map +1 -1
- package/dist/experimental/plan_and_execute/outputParser.d.ts +0 -1
- package/dist/experimental/plan_and_execute/outputParser.d.ts.map +1 -1
- package/dist/experimental/plan_and_execute/outputParser.js.map +1 -1
- package/dist/experimental/plan_and_execute/prompt.cjs +3 -3
- package/dist/experimental/plan_and_execute/prompt.cjs.map +1 -1
- package/dist/experimental/plan_and_execute/prompt.js.map +1 -1
- package/dist/experimental/prompts/custom_format.cjs +6 -6
- package/dist/experimental/prompts/custom_format.cjs.map +1 -1
- package/dist/experimental/prompts/custom_format.d.cts.map +1 -1
- package/dist/experimental/prompts/custom_format.d.ts.map +1 -1
- package/dist/experimental/prompts/custom_format.js +3 -4
- package/dist/experimental/prompts/custom_format.js.map +1 -1
- package/dist/experimental/prompts/handlebars.cjs +6 -6
- package/dist/experimental/prompts/handlebars.cjs.map +1 -1
- package/dist/experimental/prompts/handlebars.d.cts.map +1 -1
- package/dist/experimental/prompts/handlebars.d.ts.map +1 -1
- package/dist/experimental/prompts/handlebars.js +3 -5
- package/dist/experimental/prompts/handlebars.js.map +1 -1
- package/dist/hub/base.cjs +2 -5
- package/dist/hub/base.cjs.map +1 -1
- package/dist/hub/base.d.cts +2 -5
- package/dist/hub/base.d.cts.map +1 -1
- package/dist/hub/base.d.ts +2 -5
- package/dist/hub/base.d.ts.map +1 -1
- package/dist/hub/base.js +2 -5
- package/dist/hub/base.js.map +1 -1
- package/dist/hub/index.cjs +2 -2
- package/dist/hub/index.cjs.map +1 -1
- package/dist/hub/index.d.cts +0 -1
- package/dist/hub/index.d.cts.map +1 -1
- package/dist/hub/index.d.ts +0 -1
- package/dist/hub/index.d.ts.map +1 -1
- package/dist/hub/index.js +1 -2
- package/dist/hub/index.js.map +1 -1
- package/dist/hub/node.cjs +7 -13
- package/dist/hub/node.cjs.map +1 -1
- package/dist/hub/node.d.cts +0 -1
- package/dist/hub/node.d.cts.map +1 -1
- package/dist/hub/node.d.ts +0 -1
- package/dist/hub/node.d.ts.map +1 -1
- package/dist/hub/node.js +6 -13
- package/dist/hub/node.js.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +16 -16
- package/dist/indexes/index.js +2 -3
- package/dist/load/import_constants.cjs.map +1 -1
- package/dist/load/import_constants.js.map +1 -1
- package/dist/load/import_map.cjs +25 -26
- package/dist/load/import_map.cjs.map +1 -1
- package/dist/load/import_map.js +29 -30
- package/dist/load/import_map.js.map +1 -1
- package/dist/load/import_type.d.cts.map +1 -1
- package/dist/load/import_type.d.ts.map +1 -1
- package/dist/load/index.cjs +13 -3
- package/dist/load/index.cjs.map +1 -1
- package/dist/load/index.d.cts +9 -1
- package/dist/load/index.d.cts.map +1 -1
- package/dist/load/index.d.ts +9 -1
- package/dist/load/index.d.ts.map +1 -1
- package/dist/load/index.js +9 -0
- package/dist/load/index.js.map +1 -1
- package/dist/load/map_keys.d.cts.map +1 -1
- package/dist/load/map_keys.d.ts.map +1 -1
- package/dist/load/serializable.cjs +7 -6
- package/dist/load/serializable.js +4 -4
- package/dist/memory/buffer_memory.cjs +4 -8
- package/dist/memory/buffer_memory.cjs.map +1 -1
- package/dist/memory/buffer_memory.d.cts +0 -1
- package/dist/memory/buffer_memory.d.cts.map +1 -1
- package/dist/memory/buffer_memory.d.ts +0 -1
- package/dist/memory/buffer_memory.d.ts.map +1 -1
- package/dist/memory/buffer_memory.js +2 -6
- package/dist/memory/buffer_memory.js.map +1 -1
- package/dist/memory/buffer_token_memory.cjs +6 -10
- package/dist/memory/buffer_token_memory.cjs.map +1 -1
- package/dist/memory/buffer_token_memory.d.cts +0 -1
- package/dist/memory/buffer_token_memory.d.cts.map +1 -1
- package/dist/memory/buffer_token_memory.d.ts +0 -1
- package/dist/memory/buffer_token_memory.d.ts.map +1 -1
- package/dist/memory/buffer_token_memory.js +2 -6
- package/dist/memory/buffer_token_memory.js.map +1 -1
- package/dist/memory/buffer_window_memory.cjs +4 -8
- package/dist/memory/buffer_window_memory.cjs.map +1 -1
- package/dist/memory/buffer_window_memory.d.cts +0 -1
- package/dist/memory/buffer_window_memory.d.cts.map +1 -1
- package/dist/memory/buffer_window_memory.d.ts +0 -1
- package/dist/memory/buffer_window_memory.d.ts.map +1 -1
- package/dist/memory/buffer_window_memory.js +2 -6
- package/dist/memory/buffer_window_memory.js.map +1 -1
- package/dist/memory/chat_memory.cjs +9 -9
- package/dist/memory/chat_memory.cjs.map +1 -1
- package/dist/memory/chat_memory.d.cts +0 -1
- package/dist/memory/chat_memory.d.cts.map +1 -1
- package/dist/memory/chat_memory.d.ts +0 -1
- package/dist/memory/chat_memory.d.ts.map +1 -1
- package/dist/memory/chat_memory.js +2 -3
- package/dist/memory/chat_memory.js.map +1 -1
- package/dist/memory/combined_memory.cjs.map +1 -1
- package/dist/memory/combined_memory.d.cts +0 -1
- package/dist/memory/combined_memory.d.cts.map +1 -1
- package/dist/memory/combined_memory.d.ts +0 -1
- package/dist/memory/combined_memory.d.ts.map +1 -1
- package/dist/memory/combined_memory.js.map +1 -1
- package/dist/memory/entity_memory.cjs +7 -8
- package/dist/memory/entity_memory.cjs.map +1 -1
- package/dist/memory/entity_memory.d.cts +0 -1
- package/dist/memory/entity_memory.d.cts.map +1 -1
- package/dist/memory/entity_memory.d.ts +0 -1
- package/dist/memory/entity_memory.d.ts.map +1 -1
- package/dist/memory/entity_memory.js +1 -2
- package/dist/memory/entity_memory.js.map +1 -1
- package/dist/memory/index.cjs +16 -16
- package/dist/memory/index.js +2 -3
- package/dist/memory/prompt.cjs +6 -6
- package/dist/memory/prompt.cjs.map +1 -1
- package/dist/memory/prompt.d.cts +0 -1
- package/dist/memory/prompt.d.cts.map +1 -1
- package/dist/memory/prompt.d.ts +0 -1
- package/dist/memory/prompt.d.ts.map +1 -1
- package/dist/memory/prompt.js.map +1 -1
- package/dist/memory/stores/entity/base.cjs +3 -3
- package/dist/memory/stores/entity/base.cjs.map +1 -1
- package/dist/memory/stores/entity/base.d.cts +0 -1
- package/dist/memory/stores/entity/base.d.cts.map +1 -1
- package/dist/memory/stores/entity/base.d.ts +0 -1
- package/dist/memory/stores/entity/base.d.ts.map +1 -1
- package/dist/memory/stores/entity/base.js.map +1 -1
- package/dist/memory/stores/entity/in_memory.cjs.map +1 -1
- package/dist/memory/stores/entity/in_memory.js.map +1 -1
- package/dist/memory/summary.cjs +8 -13
- package/dist/memory/summary.cjs.map +1 -1
- package/dist/memory/summary.d.cts +0 -1
- package/dist/memory/summary.d.cts.map +1 -1
- package/dist/memory/summary.d.ts +1 -2
- package/dist/memory/summary.d.ts.map +1 -1
- package/dist/memory/summary.js +4 -9
- package/dist/memory/summary.js.map +1 -1
- package/dist/memory/summary_buffer.cjs +5 -5
- package/dist/memory/summary_buffer.cjs.map +1 -1
- package/dist/memory/summary_buffer.d.cts +0 -1
- package/dist/memory/summary_buffer.d.cts.map +1 -1
- package/dist/memory/summary_buffer.d.ts +0 -1
- package/dist/memory/summary_buffer.d.ts.map +1 -1
- package/dist/memory/summary_buffer.js.map +1 -1
- package/dist/memory/vector_store.cjs +6 -6
- package/dist/memory/vector_store.cjs.map +1 -1
- package/dist/memory/vector_store.d.cts.map +1 -1
- package/dist/memory/vector_store.d.ts.map +1 -1
- package/dist/memory/vector_store.js +1 -1
- package/dist/memory/vector_store.js.map +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/client.d.cts +1242 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/client.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/client.d.ts +1242 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/client.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/_runner.d.cts +4 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/_runner.d.ts +4 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluate_comparative.d.cts +2 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluate_comparative.d.ts +2 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluator.d.cts +66 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluator.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluator.d.ts +66 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluator.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/index.d.cts +4 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/index.d.ts +4 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/string_evaluator.d.cts +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/string_evaluator.d.ts +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/index.d.cts +4 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/index.d.ts +4 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/run_trees.d.cts +145 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/run_trees.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/run_trees.d.ts +145 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/run_trees.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/schemas.d.cts +411 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/schemas.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/schemas.d.ts +411 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/schemas.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.cts +8 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.ts +8 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/types.d.cts +38 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/types.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/types.d.ts +38 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/types.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.cts +27 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.ts +27 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/p-queue.d.cts +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/p-queue.d.ts +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/prompt_cache/index.d.cts +129 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/prompt_cache/index.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/prompt_cache/index.d.ts +129 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/prompt_cache/index.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/evaluation.d.cts +2 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/evaluation.d.ts +2 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/singletons/traceable.d.cts +2 -0
- package/dist/node_modules/.pnpm/langsmith@0.5.3_@opentelemetry_api@1.9.0_openai@5.23.2_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/singletons/traceable.d.ts +2 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.d.cts +1 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.d.ts +1 -0
- package/dist/output_parsers/combining.cjs +4 -4
- package/dist/output_parsers/combining.cjs.map +1 -1
- package/dist/output_parsers/combining.d.cts +0 -1
- package/dist/output_parsers/combining.d.cts.map +1 -1
- package/dist/output_parsers/combining.d.ts +0 -1
- package/dist/output_parsers/combining.d.ts.map +1 -1
- package/dist/output_parsers/combining.js +1 -1
- package/dist/output_parsers/combining.js.map +1 -1
- package/dist/output_parsers/datetime.cjs +4 -4
- package/dist/output_parsers/datetime.cjs.map +1 -1
- package/dist/output_parsers/datetime.d.cts +0 -1
- package/dist/output_parsers/datetime.d.cts.map +1 -1
- package/dist/output_parsers/datetime.d.ts +0 -1
- package/dist/output_parsers/datetime.d.ts.map +1 -1
- package/dist/output_parsers/datetime.js.map +1 -1
- package/dist/output_parsers/expression.cjs +7 -9
- package/dist/output_parsers/expression.cjs.map +1 -1
- package/dist/output_parsers/expression.d.cts.map +1 -1
- package/dist/output_parsers/expression.d.ts.map +1 -1
- package/dist/output_parsers/expression.js +4 -7
- package/dist/output_parsers/expression.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 -2
- package/dist/output_parsers/expression_type_handlers/base.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/base.d.cts +0 -1
- package/dist/output_parsers/expression_type_handlers/base.d.cts.map +1 -1
- package/dist/output_parsers/expression_type_handlers/base.d.ts +0 -1
- package/dist/output_parsers/expression_type_handlers/base.d.ts.map +1 -1
- package/dist/output_parsers/expression_type_handlers/base.js +1 -2
- package/dist/output_parsers/expression_type_handlers/base.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/factory.cjs +1 -4
- package/dist/output_parsers/expression_type_handlers/factory.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.cts +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.cts.map +1 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.ts +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.ts.map +1 -1
- package/dist/output_parsers/expression_type_handlers/factory.js +1 -4
- package/dist/output_parsers/expression_type_handlers/factory.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs +1 -2
- package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/identifier_handler.js +1 -2
- package/dist/output_parsers/expression_type_handlers/identifier_handler.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs +2 -4
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js +2 -4
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs +1 -2
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.js +1 -2
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/types.d.cts.map +1 -1
- package/dist/output_parsers/expression_type_handlers/types.d.ts.map +1 -1
- package/dist/output_parsers/fix.cjs +10 -16
- package/dist/output_parsers/fix.cjs.map +1 -1
- package/dist/output_parsers/fix.d.cts.map +1 -1
- package/dist/output_parsers/fix.d.ts.map +1 -1
- package/dist/output_parsers/fix.js +6 -12
- package/dist/output_parsers/fix.js.map +1 -1
- package/dist/output_parsers/http_response.cjs +5 -8
- package/dist/output_parsers/http_response.cjs.map +1 -1
- package/dist/output_parsers/http_response.d.cts.map +1 -1
- package/dist/output_parsers/http_response.d.ts +1 -1
- package/dist/output_parsers/http_response.d.ts.map +1 -1
- package/dist/output_parsers/http_response.js +1 -4
- package/dist/output_parsers/http_response.js.map +1 -1
- package/dist/output_parsers/index.cjs +10 -10
- package/dist/output_parsers/index.js +2 -3
- package/dist/output_parsers/noop.cjs +3 -3
- package/dist/output_parsers/noop.cjs.map +1 -1
- package/dist/output_parsers/noop.js.map +1 -1
- package/dist/output_parsers/openai_functions.cjs +15 -18
- package/dist/output_parsers/openai_functions.cjs.map +1 -1
- package/dist/output_parsers/openai_functions.d.cts +0 -1
- package/dist/output_parsers/openai_functions.d.cts.map +1 -1
- package/dist/output_parsers/openai_functions.d.ts +0 -1
- package/dist/output_parsers/openai_functions.d.ts.map +1 -1
- package/dist/output_parsers/openai_functions.js +6 -9
- package/dist/output_parsers/openai_functions.js.map +1 -1
- package/dist/output_parsers/openai_tools.cjs +5 -6
- package/dist/output_parsers/openai_tools.cjs.map +1 -1
- package/dist/output_parsers/openai_tools.d.cts +4 -9
- package/dist/output_parsers/openai_tools.d.cts.map +1 -1
- package/dist/output_parsers/openai_tools.d.ts +4 -9
- package/dist/output_parsers/openai_tools.d.ts.map +1 -1
- package/dist/output_parsers/openai_tools.js +1 -2
- package/dist/output_parsers/openai_tools.js.map +1 -1
- package/dist/output_parsers/prompts.cjs +3 -3
- package/dist/output_parsers/prompts.cjs.map +1 -1
- package/dist/output_parsers/prompts.js.map +1 -1
- package/dist/output_parsers/regex.cjs +4 -4
- package/dist/output_parsers/regex.cjs.map +1 -1
- package/dist/output_parsers/regex.d.cts.map +1 -1
- package/dist/output_parsers/regex.d.ts.map +1 -1
- package/dist/output_parsers/regex.js.map +1 -1
- package/dist/output_parsers/router.cjs +3 -3
- package/dist/output_parsers/router.cjs.map +1 -1
- package/dist/output_parsers/router.d.cts +0 -1
- package/dist/output_parsers/router.d.cts.map +1 -1
- package/dist/output_parsers/router.d.ts +0 -1
- package/dist/output_parsers/router.d.ts.map +1 -1
- package/dist/output_parsers/router.js.map +1 -1
- package/dist/output_parsers/structured.cjs +19 -20
- package/dist/output_parsers/structured.cjs.map +1 -1
- package/dist/output_parsers/structured.d.cts.map +1 -1
- package/dist/output_parsers/structured.d.ts.map +1 -1
- package/dist/output_parsers/structured.js +6 -7
- package/dist/output_parsers/structured.js.map +1 -1
- package/dist/retrievers/contextual_compression.cjs +6 -7
- package/dist/retrievers/contextual_compression.cjs.map +1 -1
- package/dist/retrievers/contextual_compression.d.cts +0 -1
- package/dist/retrievers/contextual_compression.d.cts.map +1 -1
- package/dist/retrievers/contextual_compression.d.ts +1 -2
- package/dist/retrievers/contextual_compression.d.ts.map +1 -1
- package/dist/retrievers/contextual_compression.js +3 -5
- package/dist/retrievers/contextual_compression.js.map +1 -1
- package/dist/retrievers/document_compressors/chain_extract.cjs +16 -19
- package/dist/retrievers/document_compressors/chain_extract.cjs.map +1 -1
- package/dist/retrievers/document_compressors/chain_extract.d.cts +0 -1
- package/dist/retrievers/document_compressors/chain_extract.d.cts.map +1 -1
- package/dist/retrievers/document_compressors/chain_extract.d.ts +1 -2
- package/dist/retrievers/document_compressors/chain_extract.d.ts.map +1 -1
- package/dist/retrievers/document_compressors/chain_extract.js +10 -14
- package/dist/retrievers/document_compressors/chain_extract.js.map +1 -1
- package/dist/retrievers/document_compressors/chain_extract_prompt.cjs.map +1 -1
- package/dist/retrievers/document_compressors/chain_extract_prompt.js.map +1 -1
- package/dist/retrievers/document_compressors/embeddings_filter.cjs +5 -5
- package/dist/retrievers/document_compressors/embeddings_filter.cjs.map +1 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.cts +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.cts.map +1 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.ts +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.ts.map +1 -1
- package/dist/retrievers/document_compressors/embeddings_filter.js +2 -3
- package/dist/retrievers/document_compressors/embeddings_filter.js.map +1 -1
- package/dist/retrievers/document_compressors/index.cjs +3 -3
- package/dist/retrievers/document_compressors/index.cjs.map +1 -1
- package/dist/retrievers/document_compressors/index.d.cts +0 -1
- package/dist/retrievers/document_compressors/index.d.cts.map +1 -1
- package/dist/retrievers/document_compressors/index.d.ts +1 -2
- package/dist/retrievers/document_compressors/index.d.ts.map +1 -1
- package/dist/retrievers/document_compressors/index.js +2 -3
- package/dist/retrievers/document_compressors/index.js.map +1 -1
- package/dist/retrievers/ensemble.cjs +7 -9
- package/dist/retrievers/ensemble.cjs.map +1 -1
- package/dist/retrievers/ensemble.d.cts.map +1 -1
- package/dist/retrievers/ensemble.d.ts +1 -1
- package/dist/retrievers/ensemble.d.ts.map +1 -1
- package/dist/retrievers/ensemble.js +4 -7
- package/dist/retrievers/ensemble.js.map +1 -1
- package/dist/retrievers/hyde.cjs +11 -13
- package/dist/retrievers/hyde.cjs.map +1 -1
- package/dist/retrievers/hyde.d.cts +0 -1
- package/dist/retrievers/hyde.d.cts.map +1 -1
- package/dist/retrievers/hyde.d.ts +1 -2
- package/dist/retrievers/hyde.d.ts.map +1 -1
- package/dist/retrievers/hyde.js +4 -7
- package/dist/retrievers/hyde.js.map +1 -1
- package/dist/retrievers/matryoshka_retriever.cjs +9 -9
- package/dist/retrievers/matryoshka_retriever.cjs.map +1 -1
- package/dist/retrievers/matryoshka_retriever.d.cts +0 -1
- package/dist/retrievers/matryoshka_retriever.d.cts.map +1 -1
- package/dist/retrievers/matryoshka_retriever.d.ts +0 -1
- package/dist/retrievers/matryoshka_retriever.d.ts.map +1 -1
- package/dist/retrievers/matryoshka_retriever.js +2 -3
- package/dist/retrievers/matryoshka_retriever.js.map +1 -1
- package/dist/retrievers/multi_query.cjs +15 -19
- package/dist/retrievers/multi_query.cjs.map +1 -1
- package/dist/retrievers/multi_query.d.cts.map +1 -1
- package/dist/retrievers/multi_query.d.ts +1 -1
- package/dist/retrievers/multi_query.d.ts.map +1 -1
- package/dist/retrievers/multi_query.js +8 -13
- package/dist/retrievers/multi_query.js.map +1 -1
- package/dist/retrievers/multi_vector.cjs +6 -7
- package/dist/retrievers/multi_vector.cjs.map +1 -1
- package/dist/retrievers/multi_vector.d.cts +0 -1
- package/dist/retrievers/multi_vector.d.cts.map +1 -1
- package/dist/retrievers/multi_vector.d.ts +0 -1
- package/dist/retrievers/multi_vector.d.ts.map +1 -1
- package/dist/retrievers/multi_vector.js +3 -5
- package/dist/retrievers/multi_vector.js.map +1 -1
- package/dist/retrievers/parent_document.cjs +8 -9
- package/dist/retrievers/parent_document.cjs.map +1 -1
- package/dist/retrievers/parent_document.d.cts.map +1 -1
- package/dist/retrievers/parent_document.d.ts +1 -1
- package/dist/retrievers/parent_document.d.ts.map +1 -1
- package/dist/retrievers/parent_document.js +4 -7
- package/dist/retrievers/parent_document.js.map +1 -1
- package/dist/retrievers/score_threshold.cjs +6 -7
- package/dist/retrievers/score_threshold.cjs.map +1 -1
- package/dist/retrievers/score_threshold.d.cts.map +1 -1
- package/dist/retrievers/score_threshold.d.ts.map +1 -1
- package/dist/retrievers/score_threshold.js +3 -5
- package/dist/retrievers/score_threshold.js.map +1 -1
- package/dist/retrievers/self_query/functional.cjs +5 -5
- package/dist/retrievers/self_query/functional.js +2 -3
- package/dist/retrievers/self_query/index.cjs +13 -13
- package/dist/retrievers/self_query/index.cjs.map +1 -1
- package/dist/retrievers/self_query/index.d.cts +0 -1
- package/dist/retrievers/self_query/index.d.cts.map +1 -1
- package/dist/retrievers/self_query/index.d.ts +1 -2
- package/dist/retrievers/self_query/index.d.ts.map +1 -1
- package/dist/retrievers/self_query/index.js +3 -4
- package/dist/retrievers/self_query/index.js.map +1 -1
- package/dist/retrievers/time_weighted.cjs +6 -7
- package/dist/retrievers/time_weighted.cjs.map +1 -1
- package/dist/retrievers/time_weighted.d.cts +0 -1
- package/dist/retrievers/time_weighted.d.cts.map +1 -1
- package/dist/retrievers/time_weighted.d.ts +1 -2
- package/dist/retrievers/time_weighted.d.ts.map +1 -1
- package/dist/retrievers/time_weighted.js +3 -5
- package/dist/retrievers/time_weighted.js.map +1 -1
- package/dist/schema/prompt_template.cjs +3 -3
- package/dist/schema/prompt_template.cjs.map +1 -1
- package/dist/schema/prompt_template.d.cts +0 -1
- package/dist/schema/prompt_template.d.cts.map +1 -1
- package/dist/schema/prompt_template.d.ts +1 -2
- package/dist/schema/prompt_template.d.ts.map +1 -1
- package/dist/schema/prompt_template.js +2 -3
- package/dist/schema/prompt_template.js.map +1 -1
- package/dist/schema/query_constructor.cjs +3 -3
- package/dist/schema/query_constructor.cjs.map +1 -1
- package/dist/schema/query_constructor.d.cts.map +1 -1
- package/dist/schema/query_constructor.d.ts.map +1 -1
- package/dist/schema/query_constructor.js +2 -3
- package/dist/schema/query_constructor.js.map +1 -1
- package/dist/smith/config.cjs.map +1 -1
- package/dist/smith/config.d.cts +10 -9
- package/dist/smith/config.d.cts.map +1 -1
- package/dist/smith/config.d.ts +10 -9
- package/dist/smith/config.d.ts.map +1 -1
- package/dist/smith/config.js.map +1 -1
- package/dist/smith/index.cjs +3 -3
- package/dist/smith/index.js +2 -3
- package/dist/smith/name_generation.cjs +1 -4
- package/dist/smith/name_generation.cjs.map +1 -1
- package/dist/smith/name_generation.js +1 -4
- package/dist/smith/name_generation.js.map +1 -1
- package/dist/smith/progress.cjs.map +1 -1
- package/dist/smith/progress.js.map +1 -1
- package/dist/smith/runner_utils.cjs +30 -37
- package/dist/smith/runner_utils.cjs.map +1 -1
- package/dist/smith/runner_utils.d.cts +2 -1
- package/dist/smith/runner_utils.d.cts.map +1 -1
- package/dist/smith/runner_utils.d.ts +2 -1
- package/dist/smith/runner_utils.d.ts.map +1 -1
- package/dist/smith/runner_utils.js +12 -19
- package/dist/smith/runner_utils.js.map +1 -1
- package/dist/sql_db.cjs +5 -5
- package/dist/sql_db.cjs.map +1 -1
- package/dist/sql_db.d.cts +0 -1
- package/dist/sql_db.d.cts.map +1 -1
- package/dist/sql_db.d.ts +0 -1
- package/dist/sql_db.d.ts.map +1 -1
- package/dist/sql_db.js +2 -3
- package/dist/sql_db.js.map +1 -1
- package/dist/storage/encoder_backed.cjs +9 -10
- package/dist/storage/encoder_backed.cjs.map +1 -1
- package/dist/storage/encoder_backed.d.cts +0 -1
- package/dist/storage/encoder_backed.d.cts.map +1 -1
- package/dist/storage/encoder_backed.d.ts +0 -1
- package/dist/storage/encoder_backed.d.ts.map +1 -1
- package/dist/storage/encoder_backed.js +4 -6
- package/dist/storage/encoder_backed.js.map +1 -1
- package/dist/storage/file_system.cjs +12 -11
- package/dist/storage/file_system.cjs.map +1 -1
- package/dist/storage/file_system.d.cts +0 -1
- package/dist/storage/file_system.d.cts.map +1 -1
- package/dist/storage/file_system.d.ts +0 -1
- package/dist/storage/file_system.d.ts.map +1 -1
- package/dist/storage/file_system.js +5 -7
- package/dist/storage/file_system.js.map +1 -1
- package/dist/storage/in_memory.cjs +5 -5
- package/dist/storage/in_memory.js +2 -3
- package/dist/stores/doc/base.cjs +3 -3
- package/dist/stores/doc/base.cjs.map +1 -1
- package/dist/stores/doc/base.d.cts +0 -1
- package/dist/stores/doc/base.d.cts.map +1 -1
- package/dist/stores/doc/base.d.ts +0 -1
- package/dist/stores/doc/base.d.ts.map +1 -1
- package/dist/stores/doc/base.js +2 -3
- package/dist/stores/doc/base.js.map +1 -1
- package/dist/stores/doc/in_memory.cjs +3 -3
- package/dist/stores/doc/in_memory.cjs.map +1 -1
- package/dist/stores/doc/in_memory.d.cts +0 -1
- package/dist/stores/doc/in_memory.d.cts.map +1 -1
- package/dist/stores/doc/in_memory.d.ts +0 -1
- package/dist/stores/doc/in_memory.d.ts.map +1 -1
- package/dist/stores/doc/in_memory.js +2 -3
- package/dist/stores/doc/in_memory.js.map +1 -1
- package/dist/stores/file/base.cjs +3 -3
- package/dist/stores/file/base.cjs.map +1 -1
- package/dist/stores/file/base.d.cts +0 -1
- package/dist/stores/file/base.d.cts.map +1 -1
- package/dist/stores/file/base.d.ts +0 -1
- package/dist/stores/file/base.d.ts.map +1 -1
- package/dist/stores/file/base.js.map +1 -1
- package/dist/stores/file/in_memory.cjs +3 -3
- package/dist/stores/file/in_memory.cjs.map +1 -1
- package/dist/stores/file/in_memory.d.cts +0 -1
- package/dist/stores/file/in_memory.d.cts.map +1 -1
- package/dist/stores/file/in_memory.d.ts +0 -1
- package/dist/stores/file/in_memory.d.ts.map +1 -1
- package/dist/stores/file/in_memory.js +2 -3
- package/dist/stores/file/in_memory.js.map +1 -1
- package/dist/stores/file/node.cjs +7 -6
- package/dist/stores/file/node.cjs.map +1 -1
- package/dist/stores/file/node.d.cts +0 -1
- package/dist/stores/file/node.d.cts.map +1 -1
- package/dist/stores/file/node.d.ts +0 -1
- package/dist/stores/file/node.d.ts.map +1 -1
- package/dist/stores/file/node.js +6 -7
- package/dist/stores/file/node.js.map +1 -1
- package/dist/stores/message/in_memory.cjs +5 -5
- package/dist/stores/message/in_memory.js +2 -3
- package/dist/text_splitter.cjs +7 -6
- package/dist/text_splitter.d.cts +3 -2
- package/dist/text_splitter.d.cts.map +1 -1
- package/dist/text_splitter.d.ts +3 -2
- package/dist/text_splitter.d.ts.map +1 -1
- package/dist/text_splitter.js +4 -4
- package/dist/tools/chain.cjs +6 -6
- package/dist/tools/chain.cjs.map +1 -1
- package/dist/tools/chain.d.cts +0 -1
- package/dist/tools/chain.d.cts.map +1 -1
- package/dist/tools/chain.d.ts +0 -1
- package/dist/tools/chain.d.ts.map +1 -1
- package/dist/tools/chain.js +3 -4
- package/dist/tools/chain.js.map +1 -1
- package/dist/tools/fs.cjs +6 -6
- package/dist/tools/fs.cjs.map +1 -1
- package/dist/tools/fs.d.cts +0 -1
- package/dist/tools/fs.d.cts.map +1 -1
- package/dist/tools/fs.d.ts +0 -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/index.cjs +13 -13
- package/dist/tools/index.js +2 -3
- package/dist/tools/json.cjs +10 -11
- package/dist/tools/json.cjs.map +1 -1
- package/dist/tools/json.d.cts.map +1 -1
- package/dist/tools/json.d.ts.map +1 -1
- package/dist/tools/json.js +2 -4
- package/dist/tools/json.js.map +1 -1
- package/dist/tools/render.cjs +9 -9
- package/dist/tools/render.cjs.map +1 -1
- package/dist/tools/render.d.cts +0 -1
- package/dist/tools/render.d.cts.map +1 -1
- package/dist/tools/render.d.ts +0 -1
- package/dist/tools/render.d.ts.map +1 -1
- package/dist/tools/render.js +2 -3
- package/dist/tools/render.js.map +1 -1
- package/dist/tools/requests.cjs +7 -11
- package/dist/tools/requests.cjs.map +1 -1
- package/dist/tools/requests.d.cts.map +1 -1
- package/dist/tools/requests.d.ts.map +1 -1
- package/dist/tools/requests.js +3 -7
- package/dist/tools/requests.js.map +1 -1
- package/dist/tools/retriever.cjs +7 -8
- package/dist/tools/retriever.cjs.map +1 -1
- package/dist/tools/retriever.d.cts.map +1 -1
- package/dist/tools/retriever.d.ts.map +1 -1
- package/dist/tools/retriever.js +3 -5
- package/dist/tools/retriever.js.map +1 -1
- package/dist/tools/sql.cjs +11 -12
- package/dist/tools/sql.cjs.map +1 -1
- package/dist/tools/sql.d.cts +0 -1
- package/dist/tools/sql.d.cts.map +1 -1
- package/dist/tools/sql.d.ts +0 -1
- package/dist/tools/sql.d.ts.map +1 -1
- package/dist/tools/sql.js +3 -5
- package/dist/tools/sql.js.map +1 -1
- package/dist/tools/vectorstore.cjs +3 -3
- package/dist/tools/vectorstore.cjs.map +1 -1
- package/dist/tools/vectorstore.d.cts +0 -1
- package/dist/tools/vectorstore.d.cts.map +1 -1
- package/dist/tools/vectorstore.d.ts +0 -1
- package/dist/tools/vectorstore.d.ts.map +1 -1
- package/dist/tools/vectorstore.js.map +1 -1
- package/dist/tools/webbrowser.cjs +18 -23
- package/dist/tools/webbrowser.cjs.map +1 -1
- package/dist/tools/webbrowser.d.cts.map +1 -1
- package/dist/tools/webbrowser.d.ts +1 -1
- package/dist/tools/webbrowser.d.ts.map +1 -1
- package/dist/tools/webbrowser.js +9 -16
- package/dist/tools/webbrowser.js.map +1 -1
- package/dist/types/expression-parser.d.cts.map +1 -1
- package/dist/types/expression-parser.d.ts.map +1 -1
- package/dist/types/type-utils.d.cts.map +1 -1
- package/dist/types/type-utils.d.ts.map +1 -1
- package/dist/util/document.cjs +3 -3
- package/dist/util/document.cjs.map +1 -1
- package/dist/util/document.d.cts +0 -1
- package/dist/util/document.d.cts.map +1 -1
- package/dist/util/document.d.ts +0 -1
- package/dist/util/document.d.ts.map +1 -1
- package/dist/util/document.js +2 -3
- package/dist/util/document.js.map +1 -1
- package/dist/util/entrypoint_deprecation.js +2 -0
- package/dist/util/env.cjs +2 -2
- package/dist/util/env.js +2 -0
- package/dist/util/extname.cjs.map +1 -1
- package/dist/util/extname.js.map +1 -1
- package/dist/util/hub.cjs +9 -11
- package/dist/util/hub.cjs.map +1 -1
- package/dist/util/hub.js +5 -7
- package/dist/util/hub.js.map +1 -1
- package/dist/util/is-network-error/index.cjs +2 -3
- package/dist/util/is-network-error/index.cjs.map +1 -1
- package/dist/util/is-network-error/index.js +2 -3
- package/dist/util/is-network-error/index.js.map +1 -1
- package/dist/util/load.cjs +1 -2
- package/dist/util/load.cjs.map +1 -1
- package/dist/util/load.d.cts.map +1 -1
- package/dist/util/load.d.ts.map +1 -1
- package/dist/util/load.js +1 -2
- package/dist/util/load.js.map +1 -1
- package/dist/util/math.cjs +7 -6
- package/dist/util/math.js +4 -4
- package/dist/util/ml-distance/distances.cjs.map +1 -1
- package/dist/util/ml-distance/distances.js.map +1 -1
- package/dist/util/ml-distance/similarities.cjs.map +1 -1
- package/dist/util/ml-distance/similarities.d.cts.map +1 -1
- package/dist/util/ml-distance/similarities.d.ts.map +1 -1
- package/dist/util/ml-distance/similarities.js.map +1 -1
- package/dist/util/ml-distance-euclidean/euclidean.cjs.map +1 -1
- package/dist/util/ml-distance-euclidean/euclidean.js.map +1 -1
- package/dist/util/openapi.cjs +6 -7
- package/dist/util/openapi.cjs.map +1 -1
- package/dist/util/openapi.d.cts.map +1 -1
- package/dist/util/openapi.d.ts.map +1 -1
- package/dist/util/openapi.js +3 -5
- package/dist/util/openapi.js.map +1 -1
- package/dist/util/p-retry/index.cjs +2 -2
- package/dist/util/p-retry/index.cjs.map +1 -1
- package/dist/util/p-retry/index.js +2 -2
- package/dist/util/p-retry/index.js.map +1 -1
- package/dist/util/parse.cjs +3 -2
- package/dist/util/parse.cjs.map +1 -1
- package/dist/util/parse.js.map +1 -1
- package/dist/util/set.cjs.map +1 -1
- package/dist/util/set.js.map +1 -1
- package/dist/util/sql_utils.cjs +16 -28
- package/dist/util/sql_utils.cjs.map +1 -1
- package/dist/util/sql_utils.d.cts.map +1 -1
- package/dist/util/sql_utils.d.ts.map +1 -1
- package/dist/util/sql_utils.js +16 -28
- package/dist/util/sql_utils.js.map +1 -1
- package/dist/util/time.cjs +3 -3
- package/dist/util/time.cjs.map +1 -1
- package/dist/util/time.d.cts.map +1 -1
- package/dist/util/time.d.ts.map +1 -1
- package/dist/util/time.js +2 -3
- package/dist/util/time.js.map +1 -1
- package/dist/vectorstores/memory.cjs +15 -22
- package/dist/vectorstores/memory.cjs.map +1 -1
- package/dist/vectorstores/memory.d.cts +0 -1
- package/dist/vectorstores/memory.d.cts.map +1 -1
- package/dist/vectorstores/memory.d.ts +0 -1
- package/dist/vectorstores/memory.d.ts.map +1 -1
- package/dist/vectorstores/memory.js +9 -17
- package/dist/vectorstores/memory.js.map +1 -1
- package/package.json +18 -18
- package/dist/_virtual/rolldown_runtime.js +0 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai_functions.cjs","names":["MappingDocumentTransformer","
|
|
1
|
+
{"version":3,"file":"openai_functions.cjs","names":["MappingDocumentTransformer","Document","ChatOpenAI","createTaggingChain"],"sources":["../../src/document_transformers/openai_functions.ts"],"sourcesContent":["import {\n Document,\n MappingDocumentTransformer,\n} from \"@langchain/core/documents\";\nimport { ChatOpenAI } from \"@langchain/openai\";\nimport { InteropZodObject } from \"@langchain/core/utils/types\";\nimport {\n type JsonSchema7ObjectType,\n toJsonSchema,\n} from \"@langchain/core/utils/json_schema\";\nimport { BaseChain } from \"../chains/base.js\";\nimport {\n TaggingChainOptions,\n createTaggingChain,\n} from \"../chains/openai_functions/index.js\";\n\n/**\n * A transformer that tags metadata to a document using a tagging chain.\n */\nexport class MetadataTagger extends MappingDocumentTransformer {\n static lc_name() {\n return \"MetadataTagger\";\n }\n\n protected taggingChain: BaseChain;\n\n constructor(fields: { taggingChain: BaseChain }) {\n super();\n this.taggingChain = fields.taggingChain;\n if (this.taggingChain.inputKeys.length !== 1) {\n throw new Error(\n \"Invalid input chain. The input chain must have exactly one input.\"\n );\n }\n if (this.taggingChain.outputKeys.length !== 1) {\n throw new Error(\n \"Invalid input chain. The input chain must have exactly one output.\"\n );\n }\n }\n\n async _transformDocument(document: Document): Promise<Document> {\n const taggingChainResponse = await this.taggingChain.call({\n [this.taggingChain.inputKeys[0]]: document.pageContent,\n });\n const extractedMetadata =\n taggingChainResponse[this.taggingChain.outputKeys[0]];\n return new Document({\n pageContent: document.pageContent,\n metadata: { ...extractedMetadata, ...document.metadata },\n });\n }\n}\n\nexport function createMetadataTagger(\n schema: JsonSchema7ObjectType,\n options: TaggingChainOptions & { llm?: ChatOpenAI }\n) {\n const { llm = new ChatOpenAI({ model: \"gpt-3.5-turbo-0613\" }), ...rest } =\n options;\n const taggingChain = createTaggingChain(schema, llm, rest);\n return new MetadataTagger({ taggingChain });\n}\n\nexport function createMetadataTaggerFromZod(\n schema: InteropZodObject,\n options: TaggingChainOptions & { llm?: ChatOpenAI }\n) {\n return createMetadataTagger(\n toJsonSchema(schema) as JsonSchema7ObjectType,\n options\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,IAAa,iBAAb,cAAoCA,qDAA2B;CAC7D,OAAO,UAAU;AACf,SAAO;;CAGT,AAAU;CAEV,YAAY,QAAqC;AAC/C,SAAO;AACP,OAAK,eAAe,OAAO;AAC3B,MAAI,KAAK,aAAa,UAAU,WAAW,EACzC,OAAM,IAAI,MACR,oEACD;AAEH,MAAI,KAAK,aAAa,WAAW,WAAW,EAC1C,OAAM,IAAI,MACR,qEACD;;CAIL,MAAM,mBAAmB,UAAuC;EAI9D,MAAM,qBAHuB,MAAM,KAAK,aAAa,KAAK,GACvD,KAAK,aAAa,UAAU,KAAK,SAAS,aAC5C,CAAC,EAEqB,KAAK,aAAa,WAAW;AACpD,SAAO,IAAIC,mCAAS;GAClB,aAAa,SAAS;GACtB,UAAU;IAAE,GAAG;IAAmB,GAAG,SAAS;IAAU;GACzD,CAAC;;;AAIN,SAAgB,qBACd,QACA,SACA;CACA,MAAM,EAAE,MAAM,IAAIC,6BAAW,EAAE,OAAO,sBAAsB,CAAC,EAAE,GAAG,SAChE;AAEF,QAAO,IAAI,eAAe,EAAE,cADPC,mCAAmB,QAAQ,KAAK,KAAK,EAChB,CAAC;;AAG7C,SAAgB,4BACd,QACA,SACA;AACA,QAAO,yEACQ,OAAO,EACpB,QACD"}
|
|
@@ -6,7 +6,6 @@ import { Document, MappingDocumentTransformer } from "@langchain/core/documents"
|
|
|
6
6
|
import { JsonSchema7ObjectType } from "@langchain/core/utils/json_schema";
|
|
7
7
|
|
|
8
8
|
//#region src/document_transformers/openai_functions.d.ts
|
|
9
|
-
|
|
10
9
|
/**
|
|
11
10
|
* A transformer that tags metadata to a document using a tagging chain.
|
|
12
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai_functions.d.cts","names":[
|
|
1
|
+
{"version":3,"file":"openai_functions.d.cts","names":[],"sources":["../../src/document_transformers/openai_functions.ts"],"mappings":";;;;;;;;;;AAmBA;cAAa,cAAA,SAAuB,0BAAA;EAAA,OAC3B,OAAA,CAAA;EAAA,UAIG,YAAA,EAAc,SAAA;EAExB,WAAA,CAAY,MAAA;IAAU,YAAA,EAAc,SAAA;EAAA;EAe9B,kBAAA,CAAmB,QAAA,EAAU,QAAA,GAAW,OAAA,CAAQ,QAAA;AAAA;AAAA,iBAaxC,oBAAA,CACd,MAAA,EAAQ,qBAAA,EACR,OAAA,EAAS,mBAAA;EAAwB,GAAA,GAAM,UAAA;AAAA,IAAY,cAAA;AAAA,iBAQrC,2BAAA,CACd,MAAA,EAAQ,gBAAA,EACR,OAAA,EAAS,mBAAA;EAAwB,GAAA,GAAM,UAAA;AAAA,IAAY,cAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BaseChain } from "../chains/base.js";
|
|
2
2
|
import { TaggingChainOptions } from "../chains/openai_functions/tagging.js";
|
|
3
3
|
import "../chains/openai_functions/index.js";
|
|
4
|
-
import { Document, MappingDocumentTransformer } from "@langchain/core/documents";
|
|
5
4
|
import { InteropZodObject } from "@langchain/core/utils/types";
|
|
6
5
|
import { JsonSchema7ObjectType } from "@langchain/core/utils/json_schema";
|
|
7
6
|
import { ChatOpenAI } from "@langchain/openai";
|
|
7
|
+
import { Document, MappingDocumentTransformer } from "@langchain/core/documents";
|
|
8
8
|
|
|
9
9
|
//#region src/document_transformers/openai_functions.d.ts
|
|
10
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai_functions.d.ts","names":[
|
|
1
|
+
{"version":3,"file":"openai_functions.d.ts","names":[],"sources":["../../src/document_transformers/openai_functions.ts"],"mappings":";;;;;;;;;;;;cAmBa,cAAA,SAAuB,0BAAA;EAAA,OAC3B,OAAA,CAAA;EAAA,UAIG,YAAA,EAAc,SAAA;EAExB,WAAA,CAAY,MAAA;IAAU,YAAA,EAAc,SAAA;EAAA;EAe9B,kBAAA,CAAmB,QAAA,EAAU,QAAA,GAAW,OAAA,CAAQ,QAAA;AAAA;AAAA,iBAaxC,oBAAA,CACd,MAAA,EAAQ,qBAAA,EACR,OAAA,EAAS,mBAAA;EAAwB,GAAA,GAAM,UAAA;AAAA,IAAY,cAAA;AAAA,iBAQrC,2BAAA,CACd,MAAA,EAAQ,gBAAA,EACR,OAAA,EAAS,mBAAA;EAAwB,GAAA,GAAM,UAAA;AAAA,IAAY,cAAA"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { createTaggingChain } from "../chains/openai_functions/tagging.js";
|
|
3
3
|
import "../chains/openai_functions/index.js";
|
|
4
|
-
import { Document, MappingDocumentTransformer } from "@langchain/core/documents";
|
|
5
4
|
import { toJsonSchema } from "@langchain/core/utils/json_schema";
|
|
6
5
|
import { ChatOpenAI } from "@langchain/openai";
|
|
6
|
+
import { Document, MappingDocumentTransformer } from "@langchain/core/documents";
|
|
7
7
|
|
|
8
8
|
//#region src/document_transformers/openai_functions.ts
|
|
9
|
-
var openai_functions_exports = {
|
|
10
|
-
__export(openai_functions_exports, {
|
|
9
|
+
var openai_functions_exports = /* @__PURE__ */ __exportAll({
|
|
11
10
|
MetadataTagger: () => MetadataTagger,
|
|
12
11
|
createMetadataTagger: () => createMetadataTagger,
|
|
13
12
|
createMetadataTaggerFromZod: () => createMetadataTaggerFromZod
|
|
@@ -27,8 +26,7 @@ var MetadataTagger = class extends MappingDocumentTransformer {
|
|
|
27
26
|
if (this.taggingChain.outputKeys.length !== 1) throw new Error("Invalid input chain. The input chain must have exactly one output.");
|
|
28
27
|
}
|
|
29
28
|
async _transformDocument(document) {
|
|
30
|
-
const
|
|
31
|
-
const extractedMetadata = taggingChainResponse[this.taggingChain.outputKeys[0]];
|
|
29
|
+
const extractedMetadata = (await this.taggingChain.call({ [this.taggingChain.inputKeys[0]]: document.pageContent }))[this.taggingChain.outputKeys[0]];
|
|
32
30
|
return new Document({
|
|
33
31
|
pageContent: document.pageContent,
|
|
34
32
|
metadata: {
|
|
@@ -39,9 +37,8 @@ var MetadataTagger = class extends MappingDocumentTransformer {
|
|
|
39
37
|
}
|
|
40
38
|
};
|
|
41
39
|
function createMetadataTagger(schema, options) {
|
|
42
|
-
const { llm = new ChatOpenAI({ model: "gpt-3.5-turbo-0613" })
|
|
43
|
-
|
|
44
|
-
return new MetadataTagger({ taggingChain });
|
|
40
|
+
const { llm = new ChatOpenAI({ model: "gpt-3.5-turbo-0613" }), ...rest } = options;
|
|
41
|
+
return new MetadataTagger({ taggingChain: createTaggingChain(schema, llm, rest) });
|
|
45
42
|
}
|
|
46
43
|
function createMetadataTaggerFromZod(schema, options) {
|
|
47
44
|
return createMetadataTagger(toJsonSchema(schema), options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai_functions.js","names":[
|
|
1
|
+
{"version":3,"file":"openai_functions.js","names":[],"sources":["../../src/document_transformers/openai_functions.ts"],"sourcesContent":["import {\n Document,\n MappingDocumentTransformer,\n} from \"@langchain/core/documents\";\nimport { ChatOpenAI } from \"@langchain/openai\";\nimport { InteropZodObject } from \"@langchain/core/utils/types\";\nimport {\n type JsonSchema7ObjectType,\n toJsonSchema,\n} from \"@langchain/core/utils/json_schema\";\nimport { BaseChain } from \"../chains/base.js\";\nimport {\n TaggingChainOptions,\n createTaggingChain,\n} from \"../chains/openai_functions/index.js\";\n\n/**\n * A transformer that tags metadata to a document using a tagging chain.\n */\nexport class MetadataTagger extends MappingDocumentTransformer {\n static lc_name() {\n return \"MetadataTagger\";\n }\n\n protected taggingChain: BaseChain;\n\n constructor(fields: { taggingChain: BaseChain }) {\n super();\n this.taggingChain = fields.taggingChain;\n if (this.taggingChain.inputKeys.length !== 1) {\n throw new Error(\n \"Invalid input chain. The input chain must have exactly one input.\"\n );\n }\n if (this.taggingChain.outputKeys.length !== 1) {\n throw new Error(\n \"Invalid input chain. The input chain must have exactly one output.\"\n );\n }\n }\n\n async _transformDocument(document: Document): Promise<Document> {\n const taggingChainResponse = await this.taggingChain.call({\n [this.taggingChain.inputKeys[0]]: document.pageContent,\n });\n const extractedMetadata =\n taggingChainResponse[this.taggingChain.outputKeys[0]];\n return new Document({\n pageContent: document.pageContent,\n metadata: { ...extractedMetadata, ...document.metadata },\n });\n }\n}\n\nexport function createMetadataTagger(\n schema: JsonSchema7ObjectType,\n options: TaggingChainOptions & { llm?: ChatOpenAI }\n) {\n const { llm = new ChatOpenAI({ model: \"gpt-3.5-turbo-0613\" }), ...rest } =\n options;\n const taggingChain = createTaggingChain(schema, llm, rest);\n return new MetadataTagger({ taggingChain });\n}\n\nexport function createMetadataTaggerFromZod(\n schema: InteropZodObject,\n options: TaggingChainOptions & { llm?: ChatOpenAI }\n) {\n return createMetadataTagger(\n toJsonSchema(schema) as JsonSchema7ObjectType,\n options\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,IAAa,iBAAb,cAAoC,2BAA2B;CAC7D,OAAO,UAAU;AACf,SAAO;;CAGT,AAAU;CAEV,YAAY,QAAqC;AAC/C,SAAO;AACP,OAAK,eAAe,OAAO;AAC3B,MAAI,KAAK,aAAa,UAAU,WAAW,EACzC,OAAM,IAAI,MACR,oEACD;AAEH,MAAI,KAAK,aAAa,WAAW,WAAW,EAC1C,OAAM,IAAI,MACR,qEACD;;CAIL,MAAM,mBAAmB,UAAuC;EAI9D,MAAM,qBAHuB,MAAM,KAAK,aAAa,KAAK,GACvD,KAAK,aAAa,UAAU,KAAK,SAAS,aAC5C,CAAC,EAEqB,KAAK,aAAa,WAAW;AACpD,SAAO,IAAI,SAAS;GAClB,aAAa,SAAS;GACtB,UAAU;IAAE,GAAG;IAAmB,GAAG,SAAS;IAAU;GACzD,CAAC;;;AAIN,SAAgB,qBACd,QACA,SACA;CACA,MAAM,EAAE,MAAM,IAAI,WAAW,EAAE,OAAO,sBAAsB,CAAC,EAAE,GAAG,SAChE;AAEF,QAAO,IAAI,eAAe,EAAE,cADP,mBAAmB,QAAQ,KAAK,KAAK,EAChB,CAAC;;AAG7C,SAAgB,4BACd,QACA,SACA;AACA,QAAO,qBACL,aAAa,OAAO,EACpB,QACD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
const require_storage_encoder_backed = require('../storage/encoder_backed.cjs');
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
let _langchain_core_utils_hash = require("@langchain/core/utils/hash");
|
|
5
|
+
let _langchain_core_embeddings = require("@langchain/core/embeddings");
|
|
5
6
|
|
|
6
7
|
//#region src/embeddings/cache_backed.ts
|
|
7
|
-
var cache_backed_exports = {};
|
|
8
|
-
require_rolldown_runtime.__export(cache_backed_exports, { CacheBackedEmbeddings: () => CacheBackedEmbeddings });
|
|
8
|
+
var cache_backed_exports = /* @__PURE__ */ require_runtime.__exportAll({ CacheBackedEmbeddings: () => CacheBackedEmbeddings });
|
|
9
9
|
/**
|
|
10
10
|
* Interface for caching results from embedding models.
|
|
11
11
|
*
|
|
@@ -53,7 +53,7 @@ require_rolldown_runtime.__export(cache_backed_exports, { CacheBackedEmbeddings:
|
|
|
53
53
|
*
|
|
54
54
|
* ```
|
|
55
55
|
*/
|
|
56
|
-
var CacheBackedEmbeddings = class extends
|
|
56
|
+
var CacheBackedEmbeddings = class extends _langchain_core_embeddings.Embeddings {
|
|
57
57
|
underlyingEmbeddings;
|
|
58
58
|
documentEmbeddingStore;
|
|
59
59
|
constructor(fields) {
|
|
@@ -118,7 +118,7 @@ var CacheBackedEmbeddings = class extends __langchain_core_embeddings.Embeddings
|
|
|
118
118
|
const decoder = new TextDecoder();
|
|
119
119
|
const encoderBackedStore = new require_storage_encoder_backed.EncoderBackedStore({
|
|
120
120
|
store: documentEmbeddingStore,
|
|
121
|
-
keyEncoder: (key) => (options?.namespace ?? "") + (0,
|
|
121
|
+
keyEncoder: (key) => (options?.namespace ?? "") + (0, _langchain_core_utils_hash.sha256)(key),
|
|
122
122
|
valueSerializer: (value) => encoder.encode(JSON.stringify(value)),
|
|
123
123
|
valueDeserializer: (serializedValue) => JSON.parse(decoder.decode(serializedValue))
|
|
124
124
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache_backed.cjs","names":["Embeddings","
|
|
1
|
+
{"version":3,"file":"cache_backed.cjs","names":["Embeddings","EncoderBackedStore"],"sources":["../../src/embeddings/cache_backed.ts"],"sourcesContent":["import { sha256 } from \"@langchain/core/utils/hash\";\nimport {\n type EmbeddingsInterface,\n Embeddings,\n} from \"@langchain/core/embeddings\";\nimport { BaseStore } from \"@langchain/core/stores\";\n\nimport { AsyncCallerParams } from \"@langchain/core/utils/async_caller\";\nimport { EncoderBackedStore } from \"../storage/encoder_backed.js\";\n\n/**\n * Interface for the fields required to initialize an instance of the\n * CacheBackedEmbeddings class.\n */\nexport interface CacheBackedEmbeddingsFields extends AsyncCallerParams {\n underlyingEmbeddings: EmbeddingsInterface;\n documentEmbeddingStore: BaseStore<string, number[]>;\n}\n\n/**\n * Interface for caching results from embedding models.\n *\n * The interface allows works with any store that implements\n * the abstract store interface accepting keys of type str and values of list of\n * floats.\n *\n * If need be, the interface can be extended to accept other implementations\n * of the value serializer and deserializer, as well as the key encoder.\n * @example\n * ```typescript\n * const underlyingEmbeddings = new OpenAIEmbeddings();\n *\n * const cacheBackedEmbeddings = CacheBackedEmbeddings.fromBytesStore(\n * underlyingEmbeddings,\n * new ConvexKVStore({ ctx }),\n * {\n * namespace: underlyingEmbeddings.modelName,\n * },\n * );\n *\n * const loader = new TextLoader(\"./state_of_the_union.txt\");\n * const rawDocuments = await loader.load();\n * const splitter = new RecursiveCharacterTextSplitter({\n * chunkSize: 1000,\n * chunkOverlap: 0,\n * });\n * const documents = await splitter.splitDocuments(rawDocuments);\n *\n * let time = Date.now();\n * const vectorstore = await ConvexVectorStore.fromDocuments(\n * documents,\n * cacheBackedEmbeddings,\n * { ctx },\n * );\n * console.log(`Initial creation time: ${Date.now() - time}ms`);\n *\n * time = Date.now();\n * const vectorstore2 = await ConvexVectorStore.fromDocuments(\n * documents,\n * cacheBackedEmbeddings,\n * { ctx },\n * );\n * console.log(`Cached creation time: ${Date.now() - time}ms`);\n *\n * ```\n */\nexport class CacheBackedEmbeddings extends Embeddings {\n protected underlyingEmbeddings: EmbeddingsInterface;\n\n protected documentEmbeddingStore: BaseStore<string, number[]>;\n\n constructor(fields: CacheBackedEmbeddingsFields) {\n super(fields);\n this.underlyingEmbeddings = fields.underlyingEmbeddings;\n this.documentEmbeddingStore = fields.documentEmbeddingStore;\n }\n\n /**\n * Embed query text.\n *\n * This method does not support caching at the moment.\n *\n * Support for caching queries is easy to implement, but might make\n * sense to hold off to see the most common patterns.\n *\n * If the cache has an eviction policy, we may need to be a bit more careful\n * about sharing the cache between documents and queries. Generally,\n * one is OK evicting query caches, but document caches should be kept.\n *\n * @param document The text to embed.\n * @returns The embedding for the given text.\n */\n async embedQuery(document: string): Promise<number[]> {\n return this.underlyingEmbeddings.embedQuery(document);\n }\n\n /**\n * Embed a list of texts.\n *\n * The method first checks the cache for the embeddings.\n * If the embeddings are not found, the method uses the underlying embedder\n * to embed the documents and stores the results in the cache.\n *\n * @param documents\n * @returns A list of embeddings for the given texts.\n */\n async embedDocuments(documents: string[]): Promise<number[][]> {\n const vectors = await this.documentEmbeddingStore.mget(documents);\n const missingIndicies = [];\n const missingDocuments = [];\n for (let i = 0; i < vectors.length; i += 1) {\n if (vectors[i] === undefined) {\n missingIndicies.push(i);\n missingDocuments.push(documents[i]);\n }\n }\n if (missingDocuments.length) {\n const missingVectors =\n await this.underlyingEmbeddings.embedDocuments(missingDocuments);\n const keyValuePairs: [string, number[]][] = missingDocuments.map(\n (document, i) => [document, missingVectors[i]]\n );\n await this.documentEmbeddingStore.mset(keyValuePairs);\n for (let i = 0; i < missingIndicies.length; i += 1) {\n vectors[missingIndicies[i]] = missingVectors[i];\n }\n }\n return vectors as number[][];\n }\n\n /**\n * Create a new CacheBackedEmbeddings instance from another embeddings instance\n * and a storage instance.\n * @param underlyingEmbeddings Embeddings used to populate the cache for new documents.\n * @param documentEmbeddingStore Stores raw document embedding values. Keys are hashes of the document content.\n * @param options.namespace Optional namespace for store keys.\n * @returns A new CacheBackedEmbeddings instance.\n */\n static fromBytesStore(\n underlyingEmbeddings: EmbeddingsInterface,\n documentEmbeddingStore: BaseStore<string, Uint8Array>,\n options?: {\n namespace?: string;\n }\n ) {\n const encoder = new TextEncoder();\n const decoder = new TextDecoder();\n const encoderBackedStore = new EncoderBackedStore<\n string,\n number[],\n Uint8Array\n >({\n store: documentEmbeddingStore,\n keyEncoder: (key) => (options?.namespace ?? \"\") + sha256(key),\n valueSerializer: (value) => encoder.encode(JSON.stringify(value)),\n valueDeserializer: (serializedValue) =>\n JSON.parse(decoder.decode(serializedValue)),\n });\n return new this({\n underlyingEmbeddings,\n documentEmbeddingStore: encoderBackedStore,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,IAAa,wBAAb,cAA2CA,sCAAW;CACpD,AAAU;CAEV,AAAU;CAEV,YAAY,QAAqC;AAC/C,QAAM,OAAO;AACb,OAAK,uBAAuB,OAAO;AACnC,OAAK,yBAAyB,OAAO;;;;;;;;;;;;;;;;;CAkBvC,MAAM,WAAW,UAAqC;AACpD,SAAO,KAAK,qBAAqB,WAAW,SAAS;;;;;;;;;;;;CAavD,MAAM,eAAe,WAA0C;EAC7D,MAAM,UAAU,MAAM,KAAK,uBAAuB,KAAK,UAAU;EACjE,MAAM,kBAAkB,EAAE;EAC1B,MAAM,mBAAmB,EAAE;AAC3B,OAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK,EACvC,KAAI,QAAQ,OAAO,QAAW;AAC5B,mBAAgB,KAAK,EAAE;AACvB,oBAAiB,KAAK,UAAU,GAAG;;AAGvC,MAAI,iBAAiB,QAAQ;GAC3B,MAAM,iBACJ,MAAM,KAAK,qBAAqB,eAAe,iBAAiB;GAClE,MAAM,gBAAsC,iBAAiB,KAC1D,UAAU,MAAM,CAAC,UAAU,eAAe,GAAG,CAC/C;AACD,SAAM,KAAK,uBAAuB,KAAK,cAAc;AACrD,QAAK,IAAI,IAAI,GAAG,IAAI,gBAAgB,QAAQ,KAAK,EAC/C,SAAQ,gBAAgB,MAAM,eAAe;;AAGjD,SAAO;;;;;;;;;;CAWT,OAAO,eACL,sBACA,wBACA,SAGA;EACA,MAAM,UAAU,IAAI,aAAa;EACjC,MAAM,UAAU,IAAI,aAAa;EACjC,MAAM,qBAAqB,IAAIC,kDAI7B;GACA,OAAO;GACP,aAAa,SAAS,SAAS,aAAa,6CAAa,IAAI;GAC7D,kBAAkB,UAAU,QAAQ,OAAO,KAAK,UAAU,MAAM,CAAC;GACjE,oBAAoB,oBAClB,KAAK,MAAM,QAAQ,OAAO,gBAAgB,CAAC;GAC9C,CAAC;AACF,SAAO,IAAI,KAAK;GACd;GACA,wBAAwB;GACzB,CAAC"}
|
|
@@ -3,7 +3,6 @@ import { Embeddings, EmbeddingsInterface } from "@langchain/core/embeddings";
|
|
|
3
3
|
import { BaseStore } from "@langchain/core/stores";
|
|
4
4
|
|
|
5
5
|
//#region src/embeddings/cache_backed.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Interface for the fields required to initialize an instance of the
|
|
9
8
|
* CacheBackedEmbeddings class.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache_backed.d.cts","names":[
|
|
1
|
+
{"version":3,"file":"cache_backed.d.cts","names":[],"sources":["../../src/embeddings/cache_backed.ts"],"mappings":";;;;;;;AAcA;;UAAiB,2BAAA,SAAoC,iBAAA;EACnD,oBAAA,EAAsB,mBAAA;EACtB,sBAAA,EAAwB,SAAA;AAAA;;;;;;;;;;AAkD1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,qBAAA,SAA8B,UAAA;EAAA,UAC/B,oBAAA,EAAsB,mBAAA;EAAA,UAEtB,sBAAA,EAAwB,SAAA;EAElC,WAAA,CAAY,MAAA,EAAQ,2BAAA;;;;;;;;;;;;;;;;EAqBd,UAAA,CAAW,QAAA,WAAmB,OAAA;;;;;;;;;;;EAc9B,cAAA,CAAe,SAAA,aAAsB,OAAA;;;;;;;;;SAgCpC,cAAA,CACL,oBAAA,EAAsB,mBAAA,EACtB,sBAAA,EAAwB,SAAA,SAAkB,UAAA,GAC1C,OAAA;IACE,SAAA;EAAA,IACD,qBAAA;AAAA"}
|
|
@@ -3,7 +3,6 @@ import { Embeddings, EmbeddingsInterface } from "@langchain/core/embeddings";
|
|
|
3
3
|
import { BaseStore } from "@langchain/core/stores";
|
|
4
4
|
|
|
5
5
|
//#region src/embeddings/cache_backed.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Interface for the fields required to initialize an instance of the
|
|
9
8
|
* CacheBackedEmbeddings class.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache_backed.d.ts","names":[
|
|
1
|
+
{"version":3,"file":"cache_backed.d.ts","names":[],"sources":["../../src/embeddings/cache_backed.ts"],"mappings":";;;;;;;AAcA;;UAAiB,2BAAA,SAAoC,iBAAA;EACnD,oBAAA,EAAsB,mBAAA;EACtB,sBAAA,EAAwB,SAAA;AAAA;;;;;;;;;;AAkD1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,qBAAA,SAA8B,UAAA;EAAA,UAC/B,oBAAA,EAAsB,mBAAA;EAAA,UAEtB,sBAAA,EAAwB,SAAA;EAElC,WAAA,CAAY,MAAA,EAAQ,2BAAA;;;;;;;;;;;;;;;;EAqBd,UAAA,CAAW,QAAA,WAAmB,OAAA;;;;;;;;;;;EAc9B,cAAA,CAAe,SAAA,aAAsB,OAAA;;;;;;;;;SAgCpC,cAAA,CACL,oBAAA,EAAsB,mBAAA,EACtB,sBAAA,EAAwB,SAAA,SAAkB,UAAA,GAC1C,OAAA;IACE,SAAA;EAAA,IACD,qBAAA;AAAA"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { EncoderBackedStore } from "../storage/encoder_backed.js";
|
|
3
3
|
import { sha256 } from "@langchain/core/utils/hash";
|
|
4
4
|
import { Embeddings } from "@langchain/core/embeddings";
|
|
5
5
|
|
|
6
6
|
//#region src/embeddings/cache_backed.ts
|
|
7
|
-
var cache_backed_exports = {};
|
|
8
|
-
__export(cache_backed_exports, { CacheBackedEmbeddings: () => CacheBackedEmbeddings });
|
|
7
|
+
var cache_backed_exports = /* @__PURE__ */ __exportAll({ CacheBackedEmbeddings: () => CacheBackedEmbeddings });
|
|
9
8
|
/**
|
|
10
9
|
* Interface for caching results from embedding models.
|
|
11
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache_backed.js","names":[
|
|
1
|
+
{"version":3,"file":"cache_backed.js","names":[],"sources":["../../src/embeddings/cache_backed.ts"],"sourcesContent":["import { sha256 } from \"@langchain/core/utils/hash\";\nimport {\n type EmbeddingsInterface,\n Embeddings,\n} from \"@langchain/core/embeddings\";\nimport { BaseStore } from \"@langchain/core/stores\";\n\nimport { AsyncCallerParams } from \"@langchain/core/utils/async_caller\";\nimport { EncoderBackedStore } from \"../storage/encoder_backed.js\";\n\n/**\n * Interface for the fields required to initialize an instance of the\n * CacheBackedEmbeddings class.\n */\nexport interface CacheBackedEmbeddingsFields extends AsyncCallerParams {\n underlyingEmbeddings: EmbeddingsInterface;\n documentEmbeddingStore: BaseStore<string, number[]>;\n}\n\n/**\n * Interface for caching results from embedding models.\n *\n * The interface allows works with any store that implements\n * the abstract store interface accepting keys of type str and values of list of\n * floats.\n *\n * If need be, the interface can be extended to accept other implementations\n * of the value serializer and deserializer, as well as the key encoder.\n * @example\n * ```typescript\n * const underlyingEmbeddings = new OpenAIEmbeddings();\n *\n * const cacheBackedEmbeddings = CacheBackedEmbeddings.fromBytesStore(\n * underlyingEmbeddings,\n * new ConvexKVStore({ ctx }),\n * {\n * namespace: underlyingEmbeddings.modelName,\n * },\n * );\n *\n * const loader = new TextLoader(\"./state_of_the_union.txt\");\n * const rawDocuments = await loader.load();\n * const splitter = new RecursiveCharacterTextSplitter({\n * chunkSize: 1000,\n * chunkOverlap: 0,\n * });\n * const documents = await splitter.splitDocuments(rawDocuments);\n *\n * let time = Date.now();\n * const vectorstore = await ConvexVectorStore.fromDocuments(\n * documents,\n * cacheBackedEmbeddings,\n * { ctx },\n * );\n * console.log(`Initial creation time: ${Date.now() - time}ms`);\n *\n * time = Date.now();\n * const vectorstore2 = await ConvexVectorStore.fromDocuments(\n * documents,\n * cacheBackedEmbeddings,\n * { ctx },\n * );\n * console.log(`Cached creation time: ${Date.now() - time}ms`);\n *\n * ```\n */\nexport class CacheBackedEmbeddings extends Embeddings {\n protected underlyingEmbeddings: EmbeddingsInterface;\n\n protected documentEmbeddingStore: BaseStore<string, number[]>;\n\n constructor(fields: CacheBackedEmbeddingsFields) {\n super(fields);\n this.underlyingEmbeddings = fields.underlyingEmbeddings;\n this.documentEmbeddingStore = fields.documentEmbeddingStore;\n }\n\n /**\n * Embed query text.\n *\n * This method does not support caching at the moment.\n *\n * Support for caching queries is easy to implement, but might make\n * sense to hold off to see the most common patterns.\n *\n * If the cache has an eviction policy, we may need to be a bit more careful\n * about sharing the cache between documents and queries. Generally,\n * one is OK evicting query caches, but document caches should be kept.\n *\n * @param document The text to embed.\n * @returns The embedding for the given text.\n */\n async embedQuery(document: string): Promise<number[]> {\n return this.underlyingEmbeddings.embedQuery(document);\n }\n\n /**\n * Embed a list of texts.\n *\n * The method first checks the cache for the embeddings.\n * If the embeddings are not found, the method uses the underlying embedder\n * to embed the documents and stores the results in the cache.\n *\n * @param documents\n * @returns A list of embeddings for the given texts.\n */\n async embedDocuments(documents: string[]): Promise<number[][]> {\n const vectors = await this.documentEmbeddingStore.mget(documents);\n const missingIndicies = [];\n const missingDocuments = [];\n for (let i = 0; i < vectors.length; i += 1) {\n if (vectors[i] === undefined) {\n missingIndicies.push(i);\n missingDocuments.push(documents[i]);\n }\n }\n if (missingDocuments.length) {\n const missingVectors =\n await this.underlyingEmbeddings.embedDocuments(missingDocuments);\n const keyValuePairs: [string, number[]][] = missingDocuments.map(\n (document, i) => [document, missingVectors[i]]\n );\n await this.documentEmbeddingStore.mset(keyValuePairs);\n for (let i = 0; i < missingIndicies.length; i += 1) {\n vectors[missingIndicies[i]] = missingVectors[i];\n }\n }\n return vectors as number[][];\n }\n\n /**\n * Create a new CacheBackedEmbeddings instance from another embeddings instance\n * and a storage instance.\n * @param underlyingEmbeddings Embeddings used to populate the cache for new documents.\n * @param documentEmbeddingStore Stores raw document embedding values. Keys are hashes of the document content.\n * @param options.namespace Optional namespace for store keys.\n * @returns A new CacheBackedEmbeddings instance.\n */\n static fromBytesStore(\n underlyingEmbeddings: EmbeddingsInterface,\n documentEmbeddingStore: BaseStore<string, Uint8Array>,\n options?: {\n namespace?: string;\n }\n ) {\n const encoder = new TextEncoder();\n const decoder = new TextDecoder();\n const encoderBackedStore = new EncoderBackedStore<\n string,\n number[],\n Uint8Array\n >({\n store: documentEmbeddingStore,\n keyEncoder: (key) => (options?.namespace ?? \"\") + sha256(key),\n valueSerializer: (value) => encoder.encode(JSON.stringify(value)),\n valueDeserializer: (serializedValue) =>\n JSON.parse(decoder.decode(serializedValue)),\n });\n return new this({\n underlyingEmbeddings,\n documentEmbeddingStore: encoderBackedStore,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,IAAa,wBAAb,cAA2C,WAAW;CACpD,AAAU;CAEV,AAAU;CAEV,YAAY,QAAqC;AAC/C,QAAM,OAAO;AACb,OAAK,uBAAuB,OAAO;AACnC,OAAK,yBAAyB,OAAO;;;;;;;;;;;;;;;;;CAkBvC,MAAM,WAAW,UAAqC;AACpD,SAAO,KAAK,qBAAqB,WAAW,SAAS;;;;;;;;;;;;CAavD,MAAM,eAAe,WAA0C;EAC7D,MAAM,UAAU,MAAM,KAAK,uBAAuB,KAAK,UAAU;EACjE,MAAM,kBAAkB,EAAE;EAC1B,MAAM,mBAAmB,EAAE;AAC3B,OAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK,EACvC,KAAI,QAAQ,OAAO,QAAW;AAC5B,mBAAgB,KAAK,EAAE;AACvB,oBAAiB,KAAK,UAAU,GAAG;;AAGvC,MAAI,iBAAiB,QAAQ;GAC3B,MAAM,iBACJ,MAAM,KAAK,qBAAqB,eAAe,iBAAiB;GAClE,MAAM,gBAAsC,iBAAiB,KAC1D,UAAU,MAAM,CAAC,UAAU,eAAe,GAAG,CAC/C;AACD,SAAM,KAAK,uBAAuB,KAAK,cAAc;AACrD,QAAK,IAAI,IAAI,GAAG,IAAI,gBAAgB,QAAQ,KAAK,EAC/C,SAAQ,gBAAgB,MAAM,eAAe;;AAGjD,SAAO;;;;;;;;;;CAWT,OAAO,eACL,sBACA,wBACA,SAGA;EACA,MAAM,UAAU,IAAI,aAAa;EACjC,MAAM,UAAU,IAAI,aAAa;EACjC,MAAM,qBAAqB,IAAI,mBAI7B;GACA,OAAO;GACP,aAAa,SAAS,SAAS,aAAa,MAAM,OAAO,IAAI;GAC7D,kBAAkB,UAAU,QAAQ,OAAO,KAAK,UAAU,MAAM,CAAC;GACjE,oBAAoB,oBAClB,KAAK,MAAM,QAAQ,OAAO,gBAAgB,CAAC;GAC9C,CAAC;AACF,SAAO,IAAI,KAAK;GACd;GACA,wBAAwB;GACzB,CAAC"}
|
package/dist/embeddings/fake.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
|
|
3
4
|
//#region src/embeddings/fake.ts
|
|
4
|
-
var fake_exports = {};
|
|
5
|
-
|
|
5
|
+
var fake_exports = /* @__PURE__ */ require_runtime.__exportAll({});
|
|
6
|
+
require_runtime.__reExport(fake_exports, require("@langchain/core/utils/testing"));
|
|
6
7
|
|
|
7
8
|
//#endregion
|
|
8
9
|
Object.defineProperty(exports, 'fake_exports', {
|
|
@@ -11,11 +12,11 @@ Object.defineProperty(exports, 'fake_exports', {
|
|
|
11
12
|
return fake_exports;
|
|
12
13
|
}
|
|
13
14
|
});
|
|
14
|
-
var
|
|
15
|
-
Object.keys(
|
|
15
|
+
var _langchain_core_utils_testing = require("@langchain/core/utils/testing");
|
|
16
|
+
Object.keys(_langchain_core_utils_testing).forEach(function (k) {
|
|
16
17
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
17
18
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
19
|
+
get: function () { return _langchain_core_utils_testing[k]; }
|
|
19
20
|
});
|
|
20
21
|
});
|
|
21
22
|
|
package/dist/embeddings/fake.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { __reExport } from "../_virtual/
|
|
1
|
+
import { __exportAll, __reExport } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
|
|
3
3
|
export * from "@langchain/core/utils/testing"
|
|
4
4
|
|
|
5
5
|
//#region src/embeddings/fake.ts
|
|
6
|
-
var fake_exports = {};
|
|
7
|
-
import * as
|
|
8
|
-
__reExport(fake_exports,
|
|
6
|
+
var fake_exports = /* @__PURE__ */ __exportAll({});
|
|
7
|
+
import * as import__langchain_core_utils_testing from "@langchain/core/utils/testing";
|
|
8
|
+
__reExport(fake_exports, import__langchain_core_utils_testing);
|
|
9
9
|
|
|
10
10
|
//#endregion
|
|
11
11
|
export { fake_exports };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
let _langchain_core_prompts = require("@langchain/core/prompts");
|
|
3
3
|
|
|
4
4
|
//#region src/evaluation/agents/prompt.ts
|
|
5
|
+
/**
|
|
6
|
+
* Prompt for trajectory evaluation chain.
|
|
7
|
+
*/
|
|
5
8
|
const EVAL_TEMPLATE = `An AI language model has been given access to the following set of tools to help answer a user's question.
|
|
6
9
|
|
|
7
10
|
The tools given to the AI model are:
|
|
@@ -87,11 +90,11 @@ The model did not use the appropriate tools to answer the question.\
|
|
|
87
90
|
Judgment: Given the good reasoning in the final answer but otherwise poor performance, we give the model a score of 2.
|
|
88
91
|
|
|
89
92
|
Score: 2`;
|
|
90
|
-
const EVAL_CHAT_PROMPT = /* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
93
|
+
const EVAL_CHAT_PROMPT = /* @__PURE__ */ _langchain_core_prompts.ChatPromptTemplate.fromMessages([
|
|
94
|
+
/* @__PURE__ */ _langchain_core_prompts.SystemMessagePromptTemplate.fromTemplate("You are a helpful assistant that evaluates language models."),
|
|
95
|
+
/* @__PURE__ */ _langchain_core_prompts.HumanMessagePromptTemplate.fromTemplate(EXAMPLE_INPUT),
|
|
96
|
+
/* @__PURE__ */ _langchain_core_prompts.AIMessagePromptTemplate.fromTemplate(EXAMPLE_OUTPUT),
|
|
97
|
+
/* @__PURE__ */ _langchain_core_prompts.HumanMessagePromptTemplate.fromTemplate(EVAL_TEMPLATE)
|
|
95
98
|
]);
|
|
96
99
|
const TOOL_FREE_EVAL_TEMPLATE = `An AI language model has been given access to a set of tools to help answer a user's question.
|
|
97
100
|
|
|
@@ -119,11 +122,11 @@ i. Is the final answer helpful?
|
|
|
119
122
|
iii. Does the AI language model use the tools in a helpful way?
|
|
120
123
|
iv. Does the AI language model use too many steps to answer the question?
|
|
121
124
|
v. Are the appropriate tools used to answer the question?`;
|
|
122
|
-
const TOOL_FREE_EVAL_CHAT_PROMPT = /* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
125
|
+
const TOOL_FREE_EVAL_CHAT_PROMPT = /* @__PURE__ */ _langchain_core_prompts.ChatPromptTemplate.fromMessages([
|
|
126
|
+
/* @__PURE__ */ _langchain_core_prompts.SystemMessagePromptTemplate.fromTemplate("You are a helpful assistant that evaluates language models."),
|
|
127
|
+
/* @__PURE__ */ _langchain_core_prompts.HumanMessagePromptTemplate.fromTemplate(EXAMPLE_INPUT),
|
|
128
|
+
/* @__PURE__ */ _langchain_core_prompts.AIMessagePromptTemplate.fromTemplate(EXAMPLE_OUTPUT),
|
|
129
|
+
/* @__PURE__ */ _langchain_core_prompts.HumanMessagePromptTemplate.fromTemplate(TOOL_FREE_EVAL_TEMPLATE)
|
|
127
130
|
]);
|
|
128
131
|
|
|
129
132
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.cjs","names":[
|
|
1
|
+
{"version":3,"file":"prompt.cjs","names":[],"sources":["../../../src/evaluation/agents/prompt.ts"],"sourcesContent":["/**\n * Prompt for trajectory evaluation chain.\n */\n\nimport {\n AIMessagePromptTemplate,\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n SystemMessagePromptTemplate,\n} from \"@langchain/core/prompts\";\n\nconst EVAL_TEMPLATE = `An AI language model has been given access to the following set of tools to help answer a user's question.\n\nThe tools given to the AI model are:\n[TOOL_DESCRIPTIONS]\n{toolDescriptions}\n[END_TOOL_DESCRIPTIONS]\n\nThe question the human asked the AI model was:\n[QUESTION]\n{question}\n[END_QUESTION]{reference}\n\nThe AI language model decided to use the following set of tools to answer the question:\n[AGENT_TRAJECTORY]\n{agentTrajectory}\n[END_AGENT_TRAJECTORY]\n\nThe AI language model's final answer to the question was:\n[RESPONSE]\n{answer}\n[END_RESPONSE]\n\nLet's do a detailed evaluation of the AI language model's answer step by step.\n\nWe consider the following criteria before giving a score from 1 to 5:\n\ni. Is the final answer helpful?\nii. Does the AI language use a logical sequence of tools to answer the question?\niii. Does the AI language model use the tools in a helpful way?\niv. Does the AI language model use too many steps to answer the question?\nv. Are the appropriate tools used to answer the question?`;\n\nconst EXAMPLE_INPUT = `An AI language model has been given access to the following set of tools to help answer a user's question.\n\nThe tools given to the AI model are:\n[TOOL_DESCRIPTIONS]\nTool 1:\nName: Search\nDescription: useful for when you need to ask with search\n\nTool 2:\nName: Lookup\nDescription: useful for when you need to ask with lookup\n\nTool 3:\nName: Calculator\nDescription: useful for doing calculations\n\nTool 4:\nName: Search the Web (SerpAPI)\nDescription: useful for when you need to answer questions about current events\n[END_TOOL_DESCRIPTIONS]\n\nThe question the human asked the AI model was: If laid the Statue of Liberty end to end, how many times would it stretch across the United States?\n\n The AI language model decided to use the following set of tools to answer the question:\n[AGENT_TRAJECTORY]\nStep 1:\nTool used: Search the Web (SerpAPI)\nTool input: If laid the Statue of Liberty end to end, how many times would it stretch across the United States?\nTool output: The Statue of Liberty was given to the United States by France, as a symbol of the two countries' friendship. It was erected atop an American-designed ...\n[END_AGENT_TRAJECTORY]\n\n[RESPONSE]\nThe AI language model's final answer to the question was: There are different ways to measure the length of the United States, but if we use the distance between the Statue of Liberty and the westernmost point of the contiguous United States (Cape Alava, Washington), which is approximately 2,857 miles (4,596 km), and assume that the Statue of Liberty is 305 feet (93 meters) tall, then the statue would stretch across the United States approximately 17.5 times if laid end to end.\n[END_RESPONSE]\n\nLet's do a detailed evaluation of the AI language model's answer step by step.\n\nWe consider the following criteria before giving a score from 1 to 5:\n\ni. Is the final answer helpful?\nii. Does the AI language use a logical sequence of tools to answer the question?\niii. Does the AI language model use the tools in a helpful way?\niv. Does the AI language model use too many steps to answer the question?\nv. Are the appropriate tools used to answer the question?`;\n\nconst EXAMPLE_OUTPUT = `First, let's evaluate the final answer. The final uses good reasoning but is wrong. 2,857 divided by 305 is not 17.5.\\\nThe model should have used the calculator to figure this out. Second does the model use a logical sequence of tools to answer the question?\\\nThe way model uses the search is not helpful. The model should have used the search tool to figure the width of the US or the height of the statue.\\\nThe model didn't use the calculator tool and gave an incorrect answer. The search API should be used for current events or specific questions.\\\nThe tools were not used in a helpful way. The model did not use too many steps to answer the question.\\\nThe model did not use the appropriate tools to answer the question.\\\n\nJudgment: Given the good reasoning in the final answer but otherwise poor performance, we give the model a score of 2.\n\nScore: 2`;\n\nexport const EVAL_CHAT_PROMPT = /* #__PURE__ */ ChatPromptTemplate.fromMessages(\n [\n /* #__PURE__ */ SystemMessagePromptTemplate.fromTemplate(\n \"You are a helpful assistant that evaluates language models.\"\n ),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(EXAMPLE_INPUT),\n /* #__PURE__ */ AIMessagePromptTemplate.fromTemplate(EXAMPLE_OUTPUT),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(EVAL_TEMPLATE),\n ]\n);\n\nconst TOOL_FREE_EVAL_TEMPLATE = `An AI language model has been given access to a set of tools to help answer a user's question.\n\nThe question the human asked the AI model was:\n[QUESTION]\n{question}\n[END_QUESTION]{reference}\n\nThe AI language model decided to use the following set of tools to answer the question:\n[AGENT_TRAJECTORY]\n{agentTrajectory}\n[END_AGENT_TRAJECTORY]\n\nThe AI language model's final answer to the question was:\n[RESPONSE]\n{answer}\n[END_RESPONSE]\n\nLet's do a detailed evaluation of the AI language model's answer step by step.\n\nWe consider the following criteria before giving a score from 1 to 5:\n\ni. Is the final answer helpful?\n ii. Does the AI language use a logical sequence of tools to answer the question?\n iii. Does the AI language model use the tools in a helpful way?\n iv. Does the AI language model use too many steps to answer the question?\n v. Are the appropriate tools used to answer the question?`;\n\nexport const TOOL_FREE_EVAL_CHAT_PROMPT =\n /* #__PURE__ */ ChatPromptTemplate.fromMessages([\n /* #__PURE__ */ SystemMessagePromptTemplate.fromTemplate(\n \"You are a helpful assistant that evaluates language models.\"\n ),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(EXAMPLE_INPUT),\n /* #__PURE__ */ AIMessagePromptTemplate.fromTemplate(EXAMPLE_OUTPUT),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(\n TOOL_FREE_EVAL_TEMPLATE\n ),\n ]);\n"],"mappings":";;;;;;;AAWA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCtB,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CtB,MAAM,iBAAiB;;;;;;;;;;AAWvB,MAAa,mBAAmC,2DAAmB,aACjE;CACkB,oEAA4B,aAC1C,8DACD;CACe,mEAA2B,aAAa,cAAc;CACtD,gEAAwB,aAAa,eAAe;CACpD,mEAA2B,aAAa,cAAc;CACvE,CACF;AAED,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BhC,MAAa,6BACK,2DAAmB,aAAa;CAC9B,oEAA4B,aAC1C,8DACD;CACe,mEAA2B,aAAa,cAAc;CACtD,gEAAwB,aAAa,eAAe;CACpD,mEAA2B,aACzC,wBACD;CACF,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { AIMessagePromptTemplate, ChatPromptTemplate, HumanMessagePromptTemplate, SystemMessagePromptTemplate } from "@langchain/core/prompts";
|
|
2
2
|
|
|
3
3
|
//#region src/evaluation/agents/prompt.ts
|
|
4
|
+
/**
|
|
5
|
+
* Prompt for trajectory evaluation chain.
|
|
6
|
+
*/
|
|
4
7
|
const EVAL_TEMPLATE = `An AI language model has been given access to the following set of tools to help answer a user's question.
|
|
5
8
|
|
|
6
9
|
The tools given to the AI model are:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","names":[],"sources":["../../../src/evaluation/agents/prompt.ts"],"sourcesContent":["/**\n * Prompt for trajectory evaluation chain.\n */\n\nimport {\n AIMessagePromptTemplate,\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n SystemMessagePromptTemplate,\n} from \"@langchain/core/prompts\";\n\nconst EVAL_TEMPLATE = `An AI language model has been given access to the following set of tools to help answer a user's question.\n\nThe tools given to the AI model are:\n[TOOL_DESCRIPTIONS]\n{toolDescriptions}\n[END_TOOL_DESCRIPTIONS]\n\nThe question the human asked the AI model was:\n[QUESTION]\n{question}\n[END_QUESTION]{reference}\n\nThe AI language model decided to use the following set of tools to answer the question:\n[AGENT_TRAJECTORY]\n{agentTrajectory}\n[END_AGENT_TRAJECTORY]\n\nThe AI language model's final answer to the question was:\n[RESPONSE]\n{answer}\n[END_RESPONSE]\n\nLet's do a detailed evaluation of the AI language model's answer step by step.\n\nWe consider the following criteria before giving a score from 1 to 5:\n\ni. Is the final answer helpful?\nii. Does the AI language use a logical sequence of tools to answer the question?\niii. Does the AI language model use the tools in a helpful way?\niv. Does the AI language model use too many steps to answer the question?\nv. Are the appropriate tools used to answer the question?`;\n\nconst EXAMPLE_INPUT = `An AI language model has been given access to the following set of tools to help answer a user's question.\n\nThe tools given to the AI model are:\n[TOOL_DESCRIPTIONS]\nTool 1:\nName: Search\nDescription: useful for when you need to ask with search\n\nTool 2:\nName: Lookup\nDescription: useful for when you need to ask with lookup\n\nTool 3:\nName: Calculator\nDescription: useful for doing calculations\n\nTool 4:\nName: Search the Web (SerpAPI)\nDescription: useful for when you need to answer questions about current events\n[END_TOOL_DESCRIPTIONS]\n\nThe question the human asked the AI model was: If laid the Statue of Liberty end to end, how many times would it stretch across the United States?\n\n The AI language model decided to use the following set of tools to answer the question:\n[AGENT_TRAJECTORY]\nStep 1:\nTool used: Search the Web (SerpAPI)\nTool input: If laid the Statue of Liberty end to end, how many times would it stretch across the United States?\nTool output: The Statue of Liberty was given to the United States by France, as a symbol of the two countries' friendship. It was erected atop an American-designed ...\n[END_AGENT_TRAJECTORY]\n\n[RESPONSE]\nThe AI language model's final answer to the question was: There are different ways to measure the length of the United States, but if we use the distance between the Statue of Liberty and the westernmost point of the contiguous United States (Cape Alava, Washington), which is approximately 2,857 miles (4,596 km), and assume that the Statue of Liberty is 305 feet (93 meters) tall, then the statue would stretch across the United States approximately 17.5 times if laid end to end.\n[END_RESPONSE]\n\nLet's do a detailed evaluation of the AI language model's answer step by step.\n\nWe consider the following criteria before giving a score from 1 to 5:\n\ni. Is the final answer helpful?\nii. Does the AI language use a logical sequence of tools to answer the question?\niii. Does the AI language model use the tools in a helpful way?\niv. Does the AI language model use too many steps to answer the question?\nv. Are the appropriate tools used to answer the question?`;\n\nconst EXAMPLE_OUTPUT = `First, let's evaluate the final answer. The final uses good reasoning but is wrong. 2,857 divided by 305 is not 17.5.\\\nThe model should have used the calculator to figure this out. Second does the model use a logical sequence of tools to answer the question?\\\nThe way model uses the search is not helpful. The model should have used the search tool to figure the width of the US or the height of the statue.\\\nThe model didn't use the calculator tool and gave an incorrect answer. The search API should be used for current events or specific questions.\\\nThe tools were not used in a helpful way. The model did not use too many steps to answer the question.\\\nThe model did not use the appropriate tools to answer the question.\\\n\nJudgment: Given the good reasoning in the final answer but otherwise poor performance, we give the model a score of 2.\n\nScore: 2`;\n\nexport const EVAL_CHAT_PROMPT = /* #__PURE__ */ ChatPromptTemplate.fromMessages(\n [\n /* #__PURE__ */ SystemMessagePromptTemplate.fromTemplate(\n \"You are a helpful assistant that evaluates language models.\"\n ),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(EXAMPLE_INPUT),\n /* #__PURE__ */ AIMessagePromptTemplate.fromTemplate(EXAMPLE_OUTPUT),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(EVAL_TEMPLATE),\n ]\n);\n\nconst TOOL_FREE_EVAL_TEMPLATE = `An AI language model has been given access to a set of tools to help answer a user's question.\n\nThe question the human asked the AI model was:\n[QUESTION]\n{question}\n[END_QUESTION]{reference}\n\nThe AI language model decided to use the following set of tools to answer the question:\n[AGENT_TRAJECTORY]\n{agentTrajectory}\n[END_AGENT_TRAJECTORY]\n\nThe AI language model's final answer to the question was:\n[RESPONSE]\n{answer}\n[END_RESPONSE]\n\nLet's do a detailed evaluation of the AI language model's answer step by step.\n\nWe consider the following criteria before giving a score from 1 to 5:\n\ni. Is the final answer helpful?\n ii. Does the AI language use a logical sequence of tools to answer the question?\n iii. Does the AI language model use the tools in a helpful way?\n iv. Does the AI language model use too many steps to answer the question?\n v. Are the appropriate tools used to answer the question?`;\n\nexport const TOOL_FREE_EVAL_CHAT_PROMPT =\n /* #__PURE__ */ ChatPromptTemplate.fromMessages([\n /* #__PURE__ */ SystemMessagePromptTemplate.fromTemplate(\n \"You are a helpful assistant that evaluates language models.\"\n ),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(EXAMPLE_INPUT),\n /* #__PURE__ */ AIMessagePromptTemplate.fromTemplate(EXAMPLE_OUTPUT),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(\n TOOL_FREE_EVAL_TEMPLATE\n ),\n ]);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompt.js","names":[],"sources":["../../../src/evaluation/agents/prompt.ts"],"sourcesContent":["/**\n * Prompt for trajectory evaluation chain.\n */\n\nimport {\n AIMessagePromptTemplate,\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n SystemMessagePromptTemplate,\n} from \"@langchain/core/prompts\";\n\nconst EVAL_TEMPLATE = `An AI language model has been given access to the following set of tools to help answer a user's question.\n\nThe tools given to the AI model are:\n[TOOL_DESCRIPTIONS]\n{toolDescriptions}\n[END_TOOL_DESCRIPTIONS]\n\nThe question the human asked the AI model was:\n[QUESTION]\n{question}\n[END_QUESTION]{reference}\n\nThe AI language model decided to use the following set of tools to answer the question:\n[AGENT_TRAJECTORY]\n{agentTrajectory}\n[END_AGENT_TRAJECTORY]\n\nThe AI language model's final answer to the question was:\n[RESPONSE]\n{answer}\n[END_RESPONSE]\n\nLet's do a detailed evaluation of the AI language model's answer step by step.\n\nWe consider the following criteria before giving a score from 1 to 5:\n\ni. Is the final answer helpful?\nii. Does the AI language use a logical sequence of tools to answer the question?\niii. Does the AI language model use the tools in a helpful way?\niv. Does the AI language model use too many steps to answer the question?\nv. Are the appropriate tools used to answer the question?`;\n\nconst EXAMPLE_INPUT = `An AI language model has been given access to the following set of tools to help answer a user's question.\n\nThe tools given to the AI model are:\n[TOOL_DESCRIPTIONS]\nTool 1:\nName: Search\nDescription: useful for when you need to ask with search\n\nTool 2:\nName: Lookup\nDescription: useful for when you need to ask with lookup\n\nTool 3:\nName: Calculator\nDescription: useful for doing calculations\n\nTool 4:\nName: Search the Web (SerpAPI)\nDescription: useful for when you need to answer questions about current events\n[END_TOOL_DESCRIPTIONS]\n\nThe question the human asked the AI model was: If laid the Statue of Liberty end to end, how many times would it stretch across the United States?\n\n The AI language model decided to use the following set of tools to answer the question:\n[AGENT_TRAJECTORY]\nStep 1:\nTool used: Search the Web (SerpAPI)\nTool input: If laid the Statue of Liberty end to end, how many times would it stretch across the United States?\nTool output: The Statue of Liberty was given to the United States by France, as a symbol of the two countries' friendship. It was erected atop an American-designed ...\n[END_AGENT_TRAJECTORY]\n\n[RESPONSE]\nThe AI language model's final answer to the question was: There are different ways to measure the length of the United States, but if we use the distance between the Statue of Liberty and the westernmost point of the contiguous United States (Cape Alava, Washington), which is approximately 2,857 miles (4,596 km), and assume that the Statue of Liberty is 305 feet (93 meters) tall, then the statue would stretch across the United States approximately 17.5 times if laid end to end.\n[END_RESPONSE]\n\nLet's do a detailed evaluation of the AI language model's answer step by step.\n\nWe consider the following criteria before giving a score from 1 to 5:\n\ni. Is the final answer helpful?\nii. Does the AI language use a logical sequence of tools to answer the question?\niii. Does the AI language model use the tools in a helpful way?\niv. Does the AI language model use too many steps to answer the question?\nv. Are the appropriate tools used to answer the question?`;\n\nconst EXAMPLE_OUTPUT = `First, let's evaluate the final answer. The final uses good reasoning but is wrong. 2,857 divided by 305 is not 17.5.\\\nThe model should have used the calculator to figure this out. Second does the model use a logical sequence of tools to answer the question?\\\nThe way model uses the search is not helpful. The model should have used the search tool to figure the width of the US or the height of the statue.\\\nThe model didn't use the calculator tool and gave an incorrect answer. The search API should be used for current events or specific questions.\\\nThe tools were not used in a helpful way. The model did not use too many steps to answer the question.\\\nThe model did not use the appropriate tools to answer the question.\\\n\nJudgment: Given the good reasoning in the final answer but otherwise poor performance, we give the model a score of 2.\n\nScore: 2`;\n\nexport const EVAL_CHAT_PROMPT = /* #__PURE__ */ ChatPromptTemplate.fromMessages(\n [\n /* #__PURE__ */ SystemMessagePromptTemplate.fromTemplate(\n \"You are a helpful assistant that evaluates language models.\"\n ),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(EXAMPLE_INPUT),\n /* #__PURE__ */ AIMessagePromptTemplate.fromTemplate(EXAMPLE_OUTPUT),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(EVAL_TEMPLATE),\n ]\n);\n\nconst TOOL_FREE_EVAL_TEMPLATE = `An AI language model has been given access to a set of tools to help answer a user's question.\n\nThe question the human asked the AI model was:\n[QUESTION]\n{question}\n[END_QUESTION]{reference}\n\nThe AI language model decided to use the following set of tools to answer the question:\n[AGENT_TRAJECTORY]\n{agentTrajectory}\n[END_AGENT_TRAJECTORY]\n\nThe AI language model's final answer to the question was:\n[RESPONSE]\n{answer}\n[END_RESPONSE]\n\nLet's do a detailed evaluation of the AI language model's answer step by step.\n\nWe consider the following criteria before giving a score from 1 to 5:\n\ni. Is the final answer helpful?\n ii. Does the AI language use a logical sequence of tools to answer the question?\n iii. Does the AI language model use the tools in a helpful way?\n iv. Does the AI language model use too many steps to answer the question?\n v. Are the appropriate tools used to answer the question?`;\n\nexport const TOOL_FREE_EVAL_CHAT_PROMPT =\n /* #__PURE__ */ ChatPromptTemplate.fromMessages([\n /* #__PURE__ */ SystemMessagePromptTemplate.fromTemplate(\n \"You are a helpful assistant that evaluates language models.\"\n ),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(EXAMPLE_INPUT),\n /* #__PURE__ */ AIMessagePromptTemplate.fromTemplate(EXAMPLE_OUTPUT),\n /* #__PURE__ */ HumanMessagePromptTemplate.fromTemplate(\n TOOL_FREE_EVAL_TEMPLATE\n ),\n ]);\n"],"mappings":";;;;;;AAWA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCtB,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CtB,MAAM,iBAAiB;;;;;;;;;;AAWvB,MAAa,mBAAmC,mCAAmB,aACjE;CACkB,4CAA4B,aAC1C,8DACD;CACe,2CAA2B,aAAa,cAAc;CACtD,wCAAwB,aAAa,eAAe;CACpD,2CAA2B,aAAa,cAAc;CACvE,CACF;AAED,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BhC,MAAa,6BACK,mCAAmB,aAAa;CAC9B,4CAA4B,aAC1C,8DACD;CACe,2CAA2B,aAAa,cAAc;CACtD,wCAAwB,aAAa,eAAe;CACpD,2CAA2B,aACzC,wBACD;CACF,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
2
|
const require_base = require('../base.cjs');
|
|
3
3
|
const require_prompt = require('./prompt.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
let _langchain_core_outputs = require("@langchain/core/outputs");
|
|
5
|
+
let _langchain_core_output_parsers = require("@langchain/core/output_parsers");
|
|
6
6
|
|
|
7
7
|
//#region src/evaluation/agents/trajectory.ts
|
|
8
8
|
/**
|
|
9
9
|
* A parser for the output of the TrajectoryEvalChain.
|
|
10
10
|
*/
|
|
11
|
-
var TrajectoryOutputParser = class extends
|
|
11
|
+
var TrajectoryOutputParser = class extends _langchain_core_output_parsers.BaseLLMOutputParser {
|
|
12
12
|
static lc_name() {
|
|
13
13
|
return "TrajectoryOutputParser";
|
|
14
14
|
}
|
|
@@ -86,7 +86,7 @@ var TrajectoryEvalChain = class extends require_base.AgentTrajectoryEvaluator {
|
|
|
86
86
|
}
|
|
87
87
|
_prepareOutput(result) {
|
|
88
88
|
const parsed = result[this.outputKey];
|
|
89
|
-
if (
|
|
89
|
+
if (_langchain_core_outputs.RUN_KEY in result && result[_langchain_core_outputs.RUN_KEY]) parsed[_langchain_core_outputs.RUN_KEY] = result[_langchain_core_outputs.RUN_KEY];
|
|
90
90
|
return parsed;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trajectory.cjs","names":["BaseLLMOutputParser","
|
|
1
|
+
{"version":3,"file":"trajectory.cjs","names":["BaseLLMOutputParser","AgentTrajectoryEvaluator","EVAL_CHAT_PROMPT","TOOL_FREE_EVAL_CHAT_PROMPT","RUN_KEY"],"sources":["../../../src/evaluation/agents/trajectory.ts"],"sourcesContent":["import type { StructuredToolInterface } from \"@langchain/core/tools\";\nimport { BaseLLMOutputParser } from \"@langchain/core/output_parsers\";\n\nimport { AgentStep } from \"@langchain/core/agents\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { ChatGeneration, Generation, RUN_KEY } from \"@langchain/core/outputs\";\nimport { BasePromptTemplate } from \"@langchain/core/prompts\";\nimport {\n Callbacks,\n BaseCallbackConfig,\n} from \"@langchain/core/callbacks/manager\";\nimport { BaseChatModel } from \"@langchain/core/language_models/chat_models\";\nimport {\n AgentTrajectoryEvaluator,\n EvalOutputType,\n LLMEvalChainInput,\n LLMTrajectoryEvaluatorArgs,\n type ExtractLLMCallOptions,\n} from \"../base.js\";\nimport { EVAL_CHAT_PROMPT, TOOL_FREE_EVAL_CHAT_PROMPT } from \"./prompt.js\";\n\n/**\n * A parser for the output of the TrajectoryEvalChain.\n */\nexport class TrajectoryOutputParser extends BaseLLMOutputParser<EvalOutputType> {\n static lc_name(): string {\n return \"TrajectoryOutputParser\";\n }\n\n lc_namespace = [\"langchain\", \"evaluation\", \"agents\"];\n\n parseResult(\n generations: Generation[] | ChatGeneration[],\n _callbacks: Callbacks | undefined\n ): Promise<EvalOutputType> {\n const { text } = generations[0];\n\n if (!text.includes(\"Score:\")) {\n throw new Error(`Could not find score in model eval output: ${text}`);\n }\n\n let [reasoning, scoreStr] = text.split(\"Score:\", 2);\n reasoning = reasoning.trim();\n scoreStr = scoreStr.trim();\n\n // Use regex to extract the score.\n // This will get the number in the string, even if it is a float or more than 10.\n // E.g. \"Score: 1\" will return 1, \"Score: 3.5\" will return 3.5, and\n // \"Score: 10\" will return 10.\n // The score should be an integer digit in the range 1-5.\n\n const scoreMatch = scoreStr.match(/(\\d+(\\.\\d+)?)/);\n if (scoreMatch === null || scoreMatch[1].includes(\".\")) {\n throw new Error(\n `Score is not an integer digit in the range 1-5: ${text}`\n );\n }\n\n const score = +scoreMatch[1];\n if (score < 1 || score > 5) {\n throw new Error(`Score is not a digit in the range 1-5: ${text}`);\n }\n\n const normalizedScore = (score - 1) / 4;\n\n return Promise.resolve({\n reasoning,\n score: normalizedScore,\n });\n }\n}\n\n/**\n * A chain for evaluating ReAct style agents.\n *\n * This chain is used to evaluate ReAct style agents by reasoning about\n * the sequence of actions taken and their outcomes.\n */\nexport class TrajectoryEvalChain extends AgentTrajectoryEvaluator {\n static lc_name(): string {\n return \"TrajectoryEvalChain\";\n }\n\n criterionName?: string;\n\n evaluationName?: string = this.criterionName;\n\n requiresInput = true;\n\n requiresReference = false;\n\n outputParser = new TrajectoryOutputParser();\n\n static resolveTrajectoryPrompt(\n prompt?: BasePromptTemplate | undefined,\n agentTools?: StructuredToolInterface[]\n ) {\n let _prompt;\n if (prompt) {\n _prompt = prompt;\n } else if (agentTools) {\n _prompt = EVAL_CHAT_PROMPT;\n } else {\n _prompt = TOOL_FREE_EVAL_CHAT_PROMPT;\n }\n\n return _prompt;\n }\n\n /**\n * Get the description of the agent tools.\n *\n * @returns The description of the agent tools.\n */\n static toolsDescription(agentTools: StructuredToolInterface[]): string {\n return agentTools\n .map(\n (tool, i) =>\n `Tool ${i + 1}: ${tool.name}\\n Description: ${tool.description}`\n )\n .join(\"\\n\\n\");\n }\n\n /**\n * Create a new TrajectoryEvalChain.\n * @param llm\n * @param agentTools - The tools used by the agent.\n * @param chainOptions - The options for the chain.\n */\n static async fromLLM(\n llm: BaseChatModel,\n agentTools?: StructuredToolInterface[],\n chainOptions?: Partial<Omit<LLMEvalChainInput, \"llm\">>\n ) {\n let prompt = this.resolveTrajectoryPrompt(chainOptions?.prompt, agentTools);\n if (agentTools) {\n const toolDescriptions = this.toolsDescription(agentTools);\n prompt = await prompt.partial({ toolDescriptions });\n }\n\n const options = chainOptions;\n if (options) {\n // remove prompt from chainOptions\n delete options.prompt;\n }\n\n return new this({\n llm,\n prompt,\n ...options,\n });\n }\n\n _prepareOutput(result: ChainValues) {\n const parsed = result[this.outputKey];\n if (RUN_KEY in result && result[RUN_KEY]) {\n parsed[RUN_KEY] = result[RUN_KEY];\n }\n return parsed;\n }\n\n /**\n * Get the agent trajectory as a formatted string.\n *\n * @param steps - The agent trajectory.\n * @returns The formatted agent trajectory.\n */\n getAgentTrajectory(steps: AgentStep[]): string {\n return steps\n .map((step, i) => {\n const { action, observation } = step;\n\n return (\n `Step ${i + 1}:\\n` +\n `Tool used: ${action.tool}\\n` +\n `Tool input: ${action.toolInput}\\n` +\n `Tool output: ${observation}`\n );\n })\n .join(\"\\n\\n\");\n }\n\n formatReference(reference?: string): string {\n if (!reference) {\n return \"\";\n }\n return `\nThe following is the expected answer. Use this to measure correctness:\n[GROUND_TRUTH]\n${reference}\n[END_GROUND_TRUTH]\n `;\n }\n\n async _evaluateAgentTrajectory(\n args: LLMTrajectoryEvaluatorArgs,\n callOptions: ExtractLLMCallOptions<this[\"llm\"]>,\n config?: Callbacks | BaseCallbackConfig\n ): Promise<ChainValues> {\n const { input, prediction, reference, agentTrajectory } = args;\n\n const inputs = {\n question: input,\n agentTrajectory: this.getAgentTrajectory(agentTrajectory),\n answer: prediction,\n reference: this.formatReference(reference),\n };\n\n const result = await this.call({ ...inputs, ...callOptions }, config);\n\n return this._prepareOutput(result);\n }\n}\n"],"mappings":";;;;;;;;;;AAwBA,IAAa,yBAAb,cAA4CA,mDAAoC;CAC9E,OAAO,UAAkB;AACvB,SAAO;;CAGT,eAAe;EAAC;EAAa;EAAc;EAAS;CAEpD,YACE,aACA,YACyB;EACzB,MAAM,EAAE,SAAS,YAAY;AAE7B,MAAI,CAAC,KAAK,SAAS,SAAS,CAC1B,OAAM,IAAI,MAAM,8CAA8C,OAAO;EAGvE,IAAI,CAAC,WAAW,YAAY,KAAK,MAAM,UAAU,EAAE;AACnD,cAAY,UAAU,MAAM;AAC5B,aAAW,SAAS,MAAM;EAQ1B,MAAM,aAAa,SAAS,MAAM,gBAAgB;AAClD,MAAI,eAAe,QAAQ,WAAW,GAAG,SAAS,IAAI,CACpD,OAAM,IAAI,MACR,mDAAmD,OACpD;EAGH,MAAM,QAAQ,CAAC,WAAW;AAC1B,MAAI,QAAQ,KAAK,QAAQ,EACvB,OAAM,IAAI,MAAM,0CAA0C,OAAO;EAGnE,MAAM,mBAAmB,QAAQ,KAAK;AAEtC,SAAO,QAAQ,QAAQ;GACrB;GACA,OAAO;GACR,CAAC;;;;;;;;;AAUN,IAAa,sBAAb,cAAyCC,sCAAyB;CAChE,OAAO,UAAkB;AACvB,SAAO;;CAGT;CAEA,iBAA0B,KAAK;CAE/B,gBAAgB;CAEhB,oBAAoB;CAEpB,eAAe,IAAI,wBAAwB;CAE3C,OAAO,wBACL,QACA,YACA;EACA,IAAI;AACJ,MAAI,OACF,WAAU;WACD,WACT,WAAUC;MAEV,WAAUC;AAGZ,SAAO;;;;;;;CAQT,OAAO,iBAAiB,YAA+C;AACrE,SAAO,WACJ,KACE,MAAM,MACL,QAAQ,IAAI,EAAE,IAAI,KAAK,KAAK,kBAAkB,KAAK,cACtD,CACA,KAAK,OAAO;;;;;;;;CASjB,aAAa,QACX,KACA,YACA,cACA;EACA,IAAI,SAAS,KAAK,wBAAwB,cAAc,QAAQ,WAAW;AAC3E,MAAI,YAAY;GACd,MAAM,mBAAmB,KAAK,iBAAiB,WAAW;AAC1D,YAAS,MAAM,OAAO,QAAQ,EAAE,kBAAkB,CAAC;;EAGrD,MAAM,UAAU;AAChB,MAAI,QAEF,QAAO,QAAQ;AAGjB,SAAO,IAAI,KAAK;GACd;GACA;GACA,GAAG;GACJ,CAAC;;CAGJ,eAAe,QAAqB;EAClC,MAAM,SAAS,OAAO,KAAK;AAC3B,MAAIC,mCAAW,UAAU,OAAOA,iCAC9B,QAAOA,mCAAW,OAAOA;AAE3B,SAAO;;;;;;;;CAST,mBAAmB,OAA4B;AAC7C,SAAO,MACJ,KAAK,MAAM,MAAM;GAChB,MAAM,EAAE,QAAQ,gBAAgB;AAEhC,UACE,QAAQ,IAAI,EAAE,gBACA,OAAO,KAAK,gBACX,OAAO,UAAU,iBAChB;IAElB,CACD,KAAK,OAAO;;CAGjB,gBAAgB,WAA4B;AAC1C,MAAI,CAAC,UACH,QAAO;AAET,SAAO;;;EAGT,UAAU;;;;CAKV,MAAM,yBACJ,MACA,aACA,QACsB;EACtB,MAAM,EAAE,OAAO,YAAY,WAAW,oBAAoB;EAE1D,MAAM,SAAS;GACb,UAAU;GACV,iBAAiB,KAAK,mBAAmB,gBAAgB;GACzD,QAAQ;GACR,WAAW,KAAK,gBAAgB,UAAU;GAC3C;EAED,MAAM,SAAS,MAAM,KAAK,KAAK;GAAE,GAAG;GAAQ,GAAG;GAAa,EAAE,OAAO;AAErE,SAAO,KAAK,eAAe,OAAO"}
|