@langchain/classic 1.0.23 → 1.0.24-dev-1773698445534

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.
Files changed (1431) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +12 -22
  2. package/dist/_virtual/_rolldown/runtime.js +12 -21
  3. package/dist/agents/agent.cjs +2 -3
  4. package/dist/agents/agent.cjs.map +1 -1
  5. package/dist/agents/agent.js +1 -2
  6. package/dist/agents/agent.js.map +1 -1
  7. package/dist/agents/chat/index.cjs +6 -7
  8. package/dist/agents/chat/index.cjs.map +1 -1
  9. package/dist/agents/chat/index.js +1 -2
  10. package/dist/agents/chat/index.js.map +1 -1
  11. package/dist/agents/chat/outputParser.cjs +5 -6
  12. package/dist/agents/chat/outputParser.cjs.map +1 -1
  13. package/dist/agents/chat/outputParser.js +2 -3
  14. package/dist/agents/chat/outputParser.js.map +1 -1
  15. package/dist/agents/chat/prompt.cjs +1 -2
  16. package/dist/agents/chat/prompt.cjs.map +1 -1
  17. package/dist/agents/chat/prompt.js +1 -1
  18. package/dist/agents/chat_convo/index.cjs +6 -7
  19. package/dist/agents/chat_convo/index.cjs.map +1 -1
  20. package/dist/agents/chat_convo/index.js +1 -2
  21. package/dist/agents/chat_convo/index.js.map +1 -1
  22. package/dist/agents/chat_convo/outputParser.cjs +5 -6
  23. package/dist/agents/chat_convo/outputParser.cjs.map +1 -1
  24. package/dist/agents/chat_convo/outputParser.js +1 -2
  25. package/dist/agents/chat_convo/outputParser.js.map +1 -1
  26. package/dist/agents/chat_convo/prompt.cjs +1 -2
  27. package/dist/agents/chat_convo/prompt.cjs.map +1 -1
  28. package/dist/agents/chat_convo/prompt.js +1 -1
  29. package/dist/agents/executor.cjs +4 -5
  30. package/dist/agents/executor.cjs.map +1 -1
  31. package/dist/agents/executor.js +1 -2
  32. package/dist/agents/executor.js.map +1 -1
  33. package/dist/agents/format_scratchpad/log.cjs +8 -10
  34. package/dist/agents/format_scratchpad/log.cjs.map +1 -1
  35. package/dist/agents/format_scratchpad/log.js +1 -2
  36. package/dist/agents/format_scratchpad/log.js.map +1 -1
  37. package/dist/agents/format_scratchpad/log_to_message.cjs +8 -9
  38. package/dist/agents/format_scratchpad/log_to_message.cjs.map +1 -1
  39. package/dist/agents/format_scratchpad/log_to_message.js +1 -2
  40. package/dist/agents/format_scratchpad/log_to_message.js.map +1 -1
  41. package/dist/agents/format_scratchpad/openai_functions.cjs +9 -10
  42. package/dist/agents/format_scratchpad/openai_functions.cjs.map +1 -1
  43. package/dist/agents/format_scratchpad/openai_functions.js +1 -2
  44. package/dist/agents/format_scratchpad/openai_functions.js.map +1 -1
  45. package/dist/agents/format_scratchpad/openai_tools.cjs +9 -10
  46. package/dist/agents/format_scratchpad/openai_tools.js +1 -2
  47. package/dist/agents/format_scratchpad/tool_calling.cjs +2 -3
  48. package/dist/agents/format_scratchpad/tool_calling.cjs.map +1 -1
  49. package/dist/agents/format_scratchpad/tool_calling.js +1 -2
  50. package/dist/agents/format_scratchpad/tool_calling.js.map +1 -1
  51. package/dist/agents/format_scratchpad/xml.cjs +8 -10
  52. package/dist/agents/format_scratchpad/xml.cjs.map +1 -1
  53. package/dist/agents/format_scratchpad/xml.js +1 -2
  54. package/dist/agents/format_scratchpad/xml.js.map +1 -1
  55. package/dist/agents/helpers.cjs +2 -3
  56. package/dist/agents/helpers.cjs.map +1 -1
  57. package/dist/agents/helpers.js +1 -2
  58. package/dist/agents/helpers.js.map +1 -1
  59. package/dist/agents/index.cjs +35 -36
  60. package/dist/agents/index.d.ts +0 -1
  61. package/dist/agents/index.js +1 -2
  62. package/dist/agents/initialize.cjs +9 -10
  63. package/dist/agents/initialize.cjs.map +1 -1
  64. package/dist/agents/initialize.js +1 -2
  65. package/dist/agents/initialize.js.map +1 -1
  66. package/dist/agents/load.cjs +12 -13
  67. package/dist/agents/load.cjs.map +1 -1
  68. package/dist/agents/load.js +1 -2
  69. package/dist/agents/load.js.map +1 -1
  70. package/dist/agents/mrkl/index.cjs +7 -8
  71. package/dist/agents/mrkl/index.cjs.map +1 -1
  72. package/dist/agents/mrkl/index.js +1 -2
  73. package/dist/agents/mrkl/index.js.map +1 -1
  74. package/dist/agents/mrkl/outputParser.cjs +5 -8
  75. package/dist/agents/mrkl/outputParser.cjs.map +1 -1
  76. package/dist/agents/mrkl/outputParser.d.cts +1 -1
  77. package/dist/agents/mrkl/outputParser.js +2 -5
  78. package/dist/agents/mrkl/outputParser.js.map +1 -1
  79. package/dist/agents/mrkl/prompt.cjs +1 -2
  80. package/dist/agents/mrkl/prompt.cjs.map +1 -1
  81. package/dist/agents/mrkl/prompt.js +1 -1
  82. package/dist/agents/openai/output_parser.cjs +10 -11
  83. package/dist/agents/openai/output_parser.js +1 -2
  84. package/dist/agents/openai_functions/index.cjs +8 -9
  85. package/dist/agents/openai_functions/index.cjs.map +1 -1
  86. package/dist/agents/openai_functions/index.d.ts +0 -1
  87. package/dist/agents/openai_functions/index.d.ts.map +1 -1
  88. package/dist/agents/openai_functions/index.js +1 -2
  89. package/dist/agents/openai_functions/index.js.map +1 -1
  90. package/dist/agents/openai_functions/output_parser.cjs +3 -4
  91. package/dist/agents/openai_functions/output_parser.cjs.map +1 -1
  92. package/dist/agents/openai_functions/output_parser.js +1 -2
  93. package/dist/agents/openai_functions/output_parser.js.map +1 -1
  94. package/dist/agents/openai_functions/prompt.cjs +1 -2
  95. package/dist/agents/openai_functions/prompt.cjs.map +1 -1
  96. package/dist/agents/openai_functions/prompt.js +1 -1
  97. package/dist/agents/openai_tools/index.cjs +6 -7
  98. package/dist/agents/openai_tools/index.cjs.map +1 -1
  99. package/dist/agents/openai_tools/index.js +1 -2
  100. package/dist/agents/openai_tools/index.js.map +1 -1
  101. package/dist/agents/openai_tools/output_parser.cjs +3 -4
  102. package/dist/agents/openai_tools/output_parser.cjs.map +1 -1
  103. package/dist/agents/openai_tools/output_parser.js +1 -2
  104. package/dist/agents/openai_tools/output_parser.js.map +1 -1
  105. package/dist/agents/react/index.cjs +6 -7
  106. package/dist/agents/react/index.cjs.map +1 -1
  107. package/dist/agents/react/index.js +1 -2
  108. package/dist/agents/react/index.js.map +1 -1
  109. package/dist/agents/react/output_parser.cjs +10 -11
  110. package/dist/agents/react/output_parser.cjs.map +1 -1
  111. package/dist/agents/react/output_parser.js +1 -2
  112. package/dist/agents/react/output_parser.js.map +1 -1
  113. package/dist/agents/react/prompt.cjs +1 -2
  114. package/dist/agents/react/prompt.cjs.map +1 -1
  115. package/dist/agents/react/prompt.js +1 -1
  116. package/dist/agents/structured_chat/index.cjs +8 -9
  117. package/dist/agents/structured_chat/index.cjs.map +1 -1
  118. package/dist/agents/structured_chat/index.js +1 -2
  119. package/dist/agents/structured_chat/index.js.map +1 -1
  120. package/dist/agents/structured_chat/outputParser.cjs +5 -6
  121. package/dist/agents/structured_chat/outputParser.cjs.map +1 -1
  122. package/dist/agents/structured_chat/outputParser.js +1 -2
  123. package/dist/agents/structured_chat/outputParser.js.map +1 -1
  124. package/dist/agents/structured_chat/prompt.cjs +1 -2
  125. package/dist/agents/structured_chat/prompt.cjs.map +1 -1
  126. package/dist/agents/structured_chat/prompt.js +1 -1
  127. package/dist/agents/tool_calling/index.cjs +5 -6
  128. package/dist/agents/tool_calling/index.cjs.map +1 -1
  129. package/dist/agents/tool_calling/index.js +1 -2
  130. package/dist/agents/tool_calling/index.js.map +1 -1
  131. package/dist/agents/tool_calling/output_parser.cjs +3 -4
  132. package/dist/agents/tool_calling/output_parser.cjs.map +1 -1
  133. package/dist/agents/tool_calling/output_parser.d.ts +0 -1
  134. package/dist/agents/tool_calling/output_parser.d.ts.map +1 -1
  135. package/dist/agents/tool_calling/output_parser.js +1 -2
  136. package/dist/agents/tool_calling/output_parser.js.map +1 -1
  137. package/dist/agents/toolkits/base.cjs +2 -2
  138. package/dist/agents/toolkits/base.js +1 -2
  139. package/dist/agents/toolkits/conversational_retrieval/openai_functions.cjs +4 -5
  140. package/dist/agents/toolkits/conversational_retrieval/openai_functions.cjs.map +1 -1
  141. package/dist/agents/toolkits/conversational_retrieval/openai_functions.js +1 -2
  142. package/dist/agents/toolkits/conversational_retrieval/openai_functions.js.map +1 -1
  143. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.cjs +4 -5
  144. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.cjs.map +1 -1
  145. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.js +1 -2
  146. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.js.map +1 -1
  147. package/dist/agents/toolkits/conversational_retrieval/tool.cjs +3 -4
  148. package/dist/agents/toolkits/conversational_retrieval/tool.cjs.map +1 -1
  149. package/dist/agents/toolkits/conversational_retrieval/tool.js +1 -2
  150. package/dist/agents/toolkits/conversational_retrieval/tool.js.map +1 -1
  151. package/dist/agents/toolkits/index.cjs +14 -15
  152. package/dist/agents/toolkits/index.js +1 -2
  153. package/dist/agents/toolkits/json/json.cjs +7 -8
  154. package/dist/agents/toolkits/json/json.cjs.map +1 -1
  155. package/dist/agents/toolkits/json/json.js +1 -2
  156. package/dist/agents/toolkits/json/json.js.map +1 -1
  157. package/dist/agents/toolkits/json/prompt.cjs +1 -2
  158. package/dist/agents/toolkits/json/prompt.cjs.map +1 -1
  159. package/dist/agents/toolkits/json/prompt.js +1 -1
  160. package/dist/agents/toolkits/openapi/openapi.cjs +8 -9
  161. package/dist/agents/toolkits/openapi/openapi.cjs.map +1 -1
  162. package/dist/agents/toolkits/openapi/openapi.js +1 -2
  163. package/dist/agents/toolkits/openapi/openapi.js.map +1 -1
  164. package/dist/agents/toolkits/openapi/prompt.cjs +1 -2
  165. package/dist/agents/toolkits/openapi/prompt.cjs.map +1 -1
  166. package/dist/agents/toolkits/openapi/prompt.js +1 -1
  167. package/dist/agents/toolkits/sql/index.cjs +10 -11
  168. package/dist/agents/toolkits/sql/index.js +1 -2
  169. package/dist/agents/toolkits/sql/prompt.cjs +1 -2
  170. package/dist/agents/toolkits/sql/prompt.cjs.map +1 -1
  171. package/dist/agents/toolkits/sql/prompt.js +1 -1
  172. package/dist/agents/toolkits/sql/sql.cjs +7 -8
  173. package/dist/agents/toolkits/sql/sql.cjs.map +1 -1
  174. package/dist/agents/toolkits/sql/sql.js +1 -2
  175. package/dist/agents/toolkits/sql/sql.js.map +1 -1
  176. package/dist/agents/toolkits/vectorstore/prompt.cjs +1 -2
  177. package/dist/agents/toolkits/vectorstore/prompt.cjs.map +1 -1
  178. package/dist/agents/toolkits/vectorstore/prompt.js +1 -1
  179. package/dist/agents/toolkits/vectorstore/vectorstore.cjs +8 -9
  180. package/dist/agents/toolkits/vectorstore/vectorstore.cjs.map +1 -1
  181. package/dist/agents/toolkits/vectorstore/vectorstore.js +1 -2
  182. package/dist/agents/toolkits/vectorstore/vectorstore.js.map +1 -1
  183. package/dist/agents/types.cjs +2 -3
  184. package/dist/agents/types.cjs.map +1 -1
  185. package/dist/agents/types.js +1 -2
  186. package/dist/agents/types.js.map +1 -1
  187. package/dist/agents/xml/index.cjs +8 -9
  188. package/dist/agents/xml/index.cjs.map +1 -1
  189. package/dist/agents/xml/index.js +1 -2
  190. package/dist/agents/xml/index.js.map +1 -1
  191. package/dist/agents/xml/output_parser.cjs +9 -10
  192. package/dist/agents/xml/output_parser.cjs.map +1 -1
  193. package/dist/agents/xml/output_parser.js +1 -2
  194. package/dist/agents/xml/output_parser.js.map +1 -1
  195. package/dist/agents/xml/prompt.cjs +1 -2
  196. package/dist/agents/xml/prompt.cjs.map +1 -1
  197. package/dist/agents/xml/prompt.js +1 -1
  198. package/dist/cache/file_system.cjs +8 -9
  199. package/dist/cache/file_system.cjs.map +1 -1
  200. package/dist/cache/file_system.js +1 -2
  201. package/dist/cache/file_system.js.map +1 -1
  202. package/dist/callbacks/handlers/console.cjs +13 -13
  203. package/dist/callbacks/handlers/console.d.cts +0 -1
  204. package/dist/callbacks/handlers/console.d.ts +0 -1
  205. package/dist/callbacks/handlers/console.js +2 -4
  206. package/dist/callbacks/handlers/run_collector.cjs +13 -13
  207. package/dist/callbacks/handlers/run_collector.d.cts +0 -1
  208. package/dist/callbacks/handlers/run_collector.d.ts +0 -1
  209. package/dist/callbacks/handlers/run_collector.js +2 -4
  210. package/dist/callbacks/handlers/tracer.cjs +13 -13
  211. package/dist/callbacks/handlers/tracer.d.cts +0 -1
  212. package/dist/callbacks/handlers/tracer.d.ts +0 -1
  213. package/dist/callbacks/handlers/tracer.js +2 -4
  214. package/dist/callbacks/handlers/tracer_langchain.cjs +13 -13
  215. package/dist/callbacks/handlers/tracer_langchain.d.cts +0 -1
  216. package/dist/callbacks/handlers/tracer_langchain.d.ts +0 -1
  217. package/dist/callbacks/handlers/tracer_langchain.js +2 -4
  218. package/dist/callbacks/index.cjs +49 -50
  219. package/dist/callbacks/index.js +1 -2
  220. package/dist/callbacks/promises.cjs +13 -13
  221. package/dist/callbacks/promises.d.cts +0 -1
  222. package/dist/callbacks/promises.d.ts +0 -1
  223. package/dist/callbacks/promises.js +2 -4
  224. package/dist/chains/analyze_documents_chain.cjs +3 -4
  225. package/dist/chains/analyze_documents_chain.cjs.map +1 -1
  226. package/dist/chains/analyze_documents_chain.js +1 -2
  227. package/dist/chains/analyze_documents_chain.js.map +1 -1
  228. package/dist/chains/api/api_chain.cjs +4 -5
  229. package/dist/chains/api/api_chain.cjs.map +1 -1
  230. package/dist/chains/api/api_chain.js +1 -2
  231. package/dist/chains/api/api_chain.js.map +1 -1
  232. package/dist/chains/api/prompts.cjs +2 -3
  233. package/dist/chains/api/prompts.cjs.map +1 -1
  234. package/dist/chains/api/prompts.js +10 -12
  235. package/dist/chains/api/prompts.js.map +1 -1
  236. package/dist/chains/base.cjs +2 -3
  237. package/dist/chains/base.cjs.map +1 -1
  238. package/dist/chains/base.js +1 -2
  239. package/dist/chains/base.js.map +1 -1
  240. package/dist/chains/chat_vector_db_chain.cjs +5 -6
  241. package/dist/chains/chat_vector_db_chain.cjs.map +1 -1
  242. package/dist/chains/chat_vector_db_chain.js +1 -2
  243. package/dist/chains/chat_vector_db_chain.js.map +1 -1
  244. package/dist/chains/combine_docs_chain.cjs +4 -5
  245. package/dist/chains/combine_docs_chain.cjs.map +1 -1
  246. package/dist/chains/combine_docs_chain.js +1 -2
  247. package/dist/chains/combine_docs_chain.js.map +1 -1
  248. package/dist/chains/combine_documents/base.cjs +2 -5
  249. package/dist/chains/combine_documents/base.cjs.map +1 -1
  250. package/dist/chains/combine_documents/base.js +2 -4
  251. package/dist/chains/combine_documents/base.js.map +1 -1
  252. package/dist/chains/combine_documents/index.cjs +9 -10
  253. package/dist/chains/combine_documents/index.js +1 -2
  254. package/dist/chains/combine_documents/reduce.cjs +8 -10
  255. package/dist/chains/combine_documents/reduce.cjs.map +1 -1
  256. package/dist/chains/combine_documents/reduce.js +1 -2
  257. package/dist/chains/combine_documents/reduce.js.map +1 -1
  258. package/dist/chains/combine_documents/stuff.cjs +5 -6
  259. package/dist/chains/combine_documents/stuff.cjs.map +1 -1
  260. package/dist/chains/combine_documents/stuff.js +4 -5
  261. package/dist/chains/combine_documents/stuff.js.map +1 -1
  262. package/dist/chains/constitutional_ai/constitutional_chain.cjs +5 -6
  263. package/dist/chains/constitutional_ai/constitutional_chain.cjs.map +1 -1
  264. package/dist/chains/constitutional_ai/constitutional_chain.js +1 -2
  265. package/dist/chains/constitutional_ai/constitutional_chain.js.map +1 -1
  266. package/dist/chains/constitutional_ai/constitutional_principle.cjs +1 -2
  267. package/dist/chains/constitutional_ai/constitutional_principle.cjs.map +1 -1
  268. package/dist/chains/constitutional_ai/constitutional_principle.js +1 -1
  269. package/dist/chains/constitutional_ai/constitutional_prompts.cjs +5 -8
  270. package/dist/chains/constitutional_ai/constitutional_prompts.cjs.map +1 -1
  271. package/dist/chains/constitutional_ai/constitutional_prompts.js +4 -7
  272. package/dist/chains/constitutional_ai/constitutional_prompts.js.map +1 -1
  273. package/dist/chains/conversation.cjs +4 -5
  274. package/dist/chains/conversation.cjs.map +1 -1
  275. package/dist/chains/conversation.js +1 -2
  276. package/dist/chains/conversation.js.map +1 -1
  277. package/dist/chains/conversational_retrieval_chain.cjs +5 -6
  278. package/dist/chains/conversational_retrieval_chain.cjs.map +1 -1
  279. package/dist/chains/conversational_retrieval_chain.js +1 -2
  280. package/dist/chains/conversational_retrieval_chain.js.map +1 -1
  281. package/dist/chains/graph_qa/cypher.cjs +12 -13
  282. package/dist/chains/graph_qa/cypher.cjs.map +1 -1
  283. package/dist/chains/graph_qa/cypher.js +1 -2
  284. package/dist/chains/graph_qa/cypher.js.map +1 -1
  285. package/dist/chains/graph_qa/prompts.cjs +8 -12
  286. package/dist/chains/graph_qa/prompts.cjs.map +1 -1
  287. package/dist/chains/graph_qa/prompts.js +7 -11
  288. package/dist/chains/graph_qa/prompts.js.map +1 -1
  289. package/dist/chains/history_aware_retriever.cjs +8 -9
  290. package/dist/chains/history_aware_retriever.cjs.map +1 -1
  291. package/dist/chains/history_aware_retriever.js +1 -2
  292. package/dist/chains/history_aware_retriever.js.map +1 -1
  293. package/dist/chains/index.cjs +32 -33
  294. package/dist/chains/index.js +1 -2
  295. package/dist/chains/llm_chain.cjs +4 -5
  296. package/dist/chains/llm_chain.cjs.map +1 -1
  297. package/dist/chains/llm_chain.js +1 -2
  298. package/dist/chains/llm_chain.js.map +1 -1
  299. package/dist/chains/load.cjs +12 -13
  300. package/dist/chains/load.cjs.map +1 -1
  301. package/dist/chains/load.js +1 -2
  302. package/dist/chains/load.js.map +1 -1
  303. package/dist/chains/openai_functions/base.cjs +3 -4
  304. package/dist/chains/openai_functions/base.cjs.map +1 -1
  305. package/dist/chains/openai_functions/base.js +1 -2
  306. package/dist/chains/openai_functions/base.js.map +1 -1
  307. package/dist/chains/openai_functions/extraction.cjs +4 -5
  308. package/dist/chains/openai_functions/extraction.cjs.map +1 -1
  309. package/dist/chains/openai_functions/extraction.js +1 -2
  310. package/dist/chains/openai_functions/extraction.js.map +1 -1
  311. package/dist/chains/openai_functions/index.cjs +12 -13
  312. package/dist/chains/openai_functions/index.js +1 -2
  313. package/dist/chains/openai_functions/openapi.cjs +7 -8
  314. package/dist/chains/openai_functions/openapi.cjs.map +1 -1
  315. package/dist/chains/openai_functions/openapi.js +1 -2
  316. package/dist/chains/openai_functions/openapi.js.map +1 -1
  317. package/dist/chains/openai_functions/tagging.cjs +4 -5
  318. package/dist/chains/openai_functions/tagging.cjs.map +1 -1
  319. package/dist/chains/openai_functions/tagging.js +1 -2
  320. package/dist/chains/openai_functions/tagging.js.map +1 -1
  321. package/dist/chains/openai_moderation.cjs +3 -4
  322. package/dist/chains/openai_moderation.cjs.map +1 -1
  323. package/dist/chains/openai_moderation.js +1 -2
  324. package/dist/chains/openai_moderation.js.map +1 -1
  325. package/dist/chains/query_constructor/index.cjs +11 -12
  326. package/dist/chains/query_constructor/index.cjs.map +1 -1
  327. package/dist/chains/query_constructor/index.js +1 -2
  328. package/dist/chains/query_constructor/index.js.map +1 -1
  329. package/dist/chains/query_constructor/ir.cjs +14 -14
  330. package/dist/chains/query_constructor/ir.js +2 -4
  331. package/dist/chains/query_constructor/parser.cjs +3 -4
  332. package/dist/chains/query_constructor/parser.cjs.map +1 -1
  333. package/dist/chains/query_constructor/parser.js +1 -2
  334. package/dist/chains/query_constructor/parser.js.map +1 -1
  335. package/dist/chains/query_constructor/prompt.cjs +23 -27
  336. package/dist/chains/query_constructor/prompt.cjs.map +1 -1
  337. package/dist/chains/query_constructor/prompt.js +22 -26
  338. package/dist/chains/query_constructor/prompt.js.map +1 -1
  339. package/dist/chains/question_answering/load.cjs +6 -7
  340. package/dist/chains/question_answering/load.cjs.map +1 -1
  341. package/dist/chains/question_answering/load.js +1 -2
  342. package/dist/chains/question_answering/load.js.map +1 -1
  343. package/dist/chains/question_answering/map_reduce_prompts.cjs +6 -10
  344. package/dist/chains/question_answering/map_reduce_prompts.cjs.map +1 -1
  345. package/dist/chains/question_answering/map_reduce_prompts.js +7 -13
  346. package/dist/chains/question_answering/map_reduce_prompts.js.map +1 -1
  347. package/dist/chains/question_answering/refine_prompts.cjs +14 -18
  348. package/dist/chains/question_answering/refine_prompts.cjs.map +1 -1
  349. package/dist/chains/question_answering/refine_prompts.js +15 -21
  350. package/dist/chains/question_answering/refine_prompts.js.map +1 -1
  351. package/dist/chains/question_answering/stuff_prompts.cjs +2 -3
  352. package/dist/chains/question_answering/stuff_prompts.cjs.map +1 -1
  353. package/dist/chains/question_answering/stuff_prompts.js +2 -4
  354. package/dist/chains/question_answering/stuff_prompts.js.map +1 -1
  355. package/dist/chains/retrieval.cjs +8 -9
  356. package/dist/chains/retrieval.cjs.map +1 -1
  357. package/dist/chains/retrieval.js +1 -2
  358. package/dist/chains/retrieval.js.map +1 -1
  359. package/dist/chains/retrieval_qa.cjs +3 -4
  360. package/dist/chains/retrieval_qa.cjs.map +1 -1
  361. package/dist/chains/retrieval_qa.js +1 -2
  362. package/dist/chains/retrieval_qa.js.map +1 -1
  363. package/dist/chains/router/llm_router.cjs +3 -4
  364. package/dist/chains/router/llm_router.cjs.map +1 -1
  365. package/dist/chains/router/llm_router.js +1 -2
  366. package/dist/chains/router/llm_router.js.map +1 -1
  367. package/dist/chains/router/multi_prompt.cjs +9 -10
  368. package/dist/chains/router/multi_prompt.cjs.map +1 -1
  369. package/dist/chains/router/multi_prompt.js +1 -2
  370. package/dist/chains/router/multi_prompt.js.map +1 -1
  371. package/dist/chains/router/multi_prompt_prompt.cjs +1 -2
  372. package/dist/chains/router/multi_prompt_prompt.cjs.map +1 -1
  373. package/dist/chains/router/multi_prompt_prompt.js +1 -1
  374. package/dist/chains/router/multi_retrieval_prompt.cjs +1 -2
  375. package/dist/chains/router/multi_retrieval_prompt.cjs.map +1 -1
  376. package/dist/chains/router/multi_retrieval_prompt.js +1 -1
  377. package/dist/chains/router/multi_retrieval_qa.cjs +9 -10
  378. package/dist/chains/router/multi_retrieval_qa.cjs.map +1 -1
  379. package/dist/chains/router/multi_retrieval_qa.js +1 -2
  380. package/dist/chains/router/multi_retrieval_qa.js.map +1 -1
  381. package/dist/chains/router/multi_route.cjs +2 -3
  382. package/dist/chains/router/multi_route.cjs.map +1 -1
  383. package/dist/chains/router/multi_route.js +1 -2
  384. package/dist/chains/router/multi_route.js.map +1 -1
  385. package/dist/chains/router/utils.cjs +1 -2
  386. package/dist/chains/router/utils.cjs.map +1 -1
  387. package/dist/chains/router/utils.js +1 -1
  388. package/dist/chains/sequential_chain.cjs +3 -4
  389. package/dist/chains/sequential_chain.cjs.map +1 -1
  390. package/dist/chains/sequential_chain.js +1 -2
  391. package/dist/chains/sequential_chain.js.map +1 -1
  392. package/dist/chains/sql_db/index.cjs +10 -11
  393. package/dist/chains/sql_db/index.js +1 -2
  394. package/dist/chains/sql_db/sql_db_chain.cjs +6 -7
  395. package/dist/chains/sql_db/sql_db_chain.cjs.map +1 -1
  396. package/dist/chains/sql_db/sql_db_chain.js +1 -2
  397. package/dist/chains/sql_db/sql_db_chain.js.map +1 -1
  398. package/dist/chains/sql_db/sql_db_prompt.cjs +2 -3
  399. package/dist/chains/sql_db/sql_db_prompt.cjs.map +1 -1
  400. package/dist/chains/sql_db/sql_db_prompt.js +1 -2
  401. package/dist/chains/sql_db/sql_db_prompt.js.map +1 -1
  402. package/dist/chains/summarization/load.cjs +5 -6
  403. package/dist/chains/summarization/load.cjs.map +1 -1
  404. package/dist/chains/summarization/load.js +1 -2
  405. package/dist/chains/summarization/load.js.map +1 -1
  406. package/dist/chains/summarization/refine_prompts.cjs +5 -9
  407. package/dist/chains/summarization/refine_prompts.cjs.map +1 -1
  408. package/dist/chains/summarization/refine_prompts.js +4 -7
  409. package/dist/chains/summarization/refine_prompts.js.map +1 -1
  410. package/dist/chains/summarization/stuff_prompts.cjs +5 -9
  411. package/dist/chains/summarization/stuff_prompts.cjs.map +1 -1
  412. package/dist/chains/summarization/stuff_prompts.js +4 -7
  413. package/dist/chains/summarization/stuff_prompts.js.map +1 -1
  414. package/dist/chains/transform.cjs +2 -3
  415. package/dist/chains/transform.cjs.map +1 -1
  416. package/dist/chains/transform.js +1 -2
  417. package/dist/chains/transform.js.map +1 -1
  418. package/dist/chains/vector_db_qa.cjs +3 -4
  419. package/dist/chains/vector_db_qa.cjs.map +1 -1
  420. package/dist/chains/vector_db_qa.js +1 -2
  421. package/dist/chains/vector_db_qa.js.map +1 -1
  422. package/dist/chat_models/universal.cjs +8 -9
  423. package/dist/chat_models/universal.cjs.map +1 -1
  424. package/dist/chat_models/universal.js +1 -2
  425. package/dist/chat_models/universal.js.map +1 -1
  426. package/dist/document.cjs +13 -14
  427. package/dist/document.js +1 -2
  428. package/dist/document_loaders/base.cjs +14 -14
  429. package/dist/document_loaders/base.js +2 -4
  430. package/dist/document_loaders/fs/buffer.cjs +8 -9
  431. package/dist/document_loaders/fs/buffer.cjs.map +1 -1
  432. package/dist/document_loaders/fs/buffer.js +1 -2
  433. package/dist/document_loaders/fs/buffer.js.map +1 -1
  434. package/dist/document_loaders/fs/directory.cjs +8 -9
  435. package/dist/document_loaders/fs/directory.cjs.map +1 -1
  436. package/dist/document_loaders/fs/directory.js +1 -2
  437. package/dist/document_loaders/fs/directory.js.map +1 -1
  438. package/dist/document_loaders/fs/json.cjs +9 -10
  439. package/dist/document_loaders/fs/json.cjs.map +1 -1
  440. package/dist/document_loaders/fs/json.js +1 -2
  441. package/dist/document_loaders/fs/json.js.map +1 -1
  442. package/dist/document_loaders/fs/multi_file.cjs +9 -10
  443. package/dist/document_loaders/fs/multi_file.cjs.map +1 -1
  444. package/dist/document_loaders/fs/multi_file.js +1 -2
  445. package/dist/document_loaders/fs/multi_file.js.map +1 -1
  446. package/dist/document_loaders/fs/text.cjs +8 -9
  447. package/dist/document_loaders/fs/text.cjs.map +1 -1
  448. package/dist/document_loaders/fs/text.js +1 -2
  449. package/dist/document_loaders/fs/text.js.map +1 -1
  450. package/dist/document_transformers/openai_functions.cjs +10 -11
  451. package/dist/document_transformers/openai_functions.cjs.map +1 -1
  452. package/dist/document_transformers/openai_functions.d.ts +0 -1
  453. package/dist/document_transformers/openai_functions.d.ts.map +1 -1
  454. package/dist/document_transformers/openai_functions.js +1 -2
  455. package/dist/document_transformers/openai_functions.js.map +1 -1
  456. package/dist/embeddings/cache_backed.cjs +9 -10
  457. package/dist/embeddings/cache_backed.cjs.map +1 -1
  458. package/dist/embeddings/cache_backed.js +1 -2
  459. package/dist/embeddings/cache_backed.js.map +1 -1
  460. package/dist/embeddings/fake.cjs +14 -14
  461. package/dist/embeddings/fake.js +2 -4
  462. package/dist/evaluation/agents/index.cjs +1 -1
  463. package/dist/evaluation/agents/index.js +2 -3
  464. package/dist/evaluation/agents/prompt.cjs +8 -10
  465. package/dist/evaluation/agents/prompt.cjs.map +1 -1
  466. package/dist/evaluation/agents/prompt.js +7 -9
  467. package/dist/evaluation/agents/prompt.js.map +1 -1
  468. package/dist/evaluation/agents/trajectory.cjs +4 -5
  469. package/dist/evaluation/agents/trajectory.cjs.map +1 -1
  470. package/dist/evaluation/agents/trajectory.js +1 -2
  471. package/dist/evaluation/agents/trajectory.js.map +1 -1
  472. package/dist/evaluation/base.cjs +4 -5
  473. package/dist/evaluation/base.cjs.map +1 -1
  474. package/dist/evaluation/base.d.ts +0 -1
  475. package/dist/evaluation/base.d.ts.map +1 -1
  476. package/dist/evaluation/base.js +1 -2
  477. package/dist/evaluation/base.js.map +1 -1
  478. package/dist/evaluation/comparison/index.cjs +1 -1
  479. package/dist/evaluation/comparison/index.js +2 -3
  480. package/dist/evaluation/comparison/pairwise.cjs +6 -7
  481. package/dist/evaluation/comparison/pairwise.cjs.map +1 -1
  482. package/dist/evaluation/comparison/pairwise.js +1 -2
  483. package/dist/evaluation/comparison/pairwise.js.map +1 -1
  484. package/dist/evaluation/comparison/prompt.cjs +16 -27
  485. package/dist/evaluation/comparison/prompt.cjs.map +1 -1
  486. package/dist/evaluation/comparison/prompt.js +15 -26
  487. package/dist/evaluation/comparison/prompt.js.map +1 -1
  488. package/dist/evaluation/criteria/criteria.cjs +5 -6
  489. package/dist/evaluation/criteria/criteria.cjs.map +1 -1
  490. package/dist/evaluation/criteria/criteria.js +1 -2
  491. package/dist/evaluation/criteria/criteria.js.map +1 -1
  492. package/dist/evaluation/criteria/index.cjs +1 -1
  493. package/dist/evaluation/criteria/index.js +2 -3
  494. package/dist/evaluation/criteria/prompt.cjs +16 -20
  495. package/dist/evaluation/criteria/prompt.cjs.map +1 -1
  496. package/dist/evaluation/criteria/prompt.js +15 -19
  497. package/dist/evaluation/criteria/prompt.js.map +1 -1
  498. package/dist/evaluation/embedding_distance/base.cjs +5 -6
  499. package/dist/evaluation/embedding_distance/base.cjs.map +1 -1
  500. package/dist/evaluation/embedding_distance/base.js +1 -2
  501. package/dist/evaluation/embedding_distance/base.js.map +1 -1
  502. package/dist/evaluation/embedding_distance/index.cjs +1 -1
  503. package/dist/evaluation/embedding_distance/index.js +2 -3
  504. package/dist/evaluation/index.cjs +19 -20
  505. package/dist/evaluation/index.d.ts +0 -5
  506. package/dist/evaluation/index.js +1 -2
  507. package/dist/evaluation/loader.cjs +10 -11
  508. package/dist/evaluation/loader.cjs.map +1 -1
  509. package/dist/evaluation/loader.d.ts +0 -2
  510. package/dist/evaluation/loader.d.ts.map +1 -1
  511. package/dist/evaluation/loader.js +1 -2
  512. package/dist/evaluation/loader.js.map +1 -1
  513. package/dist/evaluation/qa/eval_chain.cjs +3 -4
  514. package/dist/evaluation/qa/eval_chain.cjs.map +1 -1
  515. package/dist/evaluation/qa/eval_chain.js +1 -2
  516. package/dist/evaluation/qa/eval_chain.js.map +1 -1
  517. package/dist/evaluation/qa/index.cjs +1 -1
  518. package/dist/evaluation/qa/index.js +2 -3
  519. package/dist/evaluation/qa/prompt.cjs +10 -14
  520. package/dist/evaluation/qa/prompt.cjs.map +1 -1
  521. package/dist/evaluation/qa/prompt.js +9 -12
  522. package/dist/evaluation/qa/prompt.js.map +1 -1
  523. package/dist/experimental/autogpt/agent.cjs +8 -9
  524. package/dist/experimental/autogpt/agent.cjs.map +1 -1
  525. package/dist/experimental/autogpt/agent.js +3 -4
  526. package/dist/experimental/autogpt/agent.js.map +1 -1
  527. package/dist/experimental/autogpt/index.cjs +11 -12
  528. package/dist/experimental/autogpt/index.js +1 -2
  529. package/dist/experimental/autogpt/output_parser.cjs +2 -3
  530. package/dist/experimental/autogpt/output_parser.cjs.map +1 -1
  531. package/dist/experimental/autogpt/output_parser.js +1 -2
  532. package/dist/experimental/autogpt/output_parser.js.map +1 -1
  533. package/dist/experimental/autogpt/prompt.cjs +3 -4
  534. package/dist/experimental/autogpt/prompt.cjs.map +1 -1
  535. package/dist/experimental/autogpt/prompt.js +1 -2
  536. package/dist/experimental/autogpt/prompt.js.map +1 -1
  537. package/dist/experimental/autogpt/prompt_generator.cjs +3 -4
  538. package/dist/experimental/autogpt/prompt_generator.cjs.map +1 -1
  539. package/dist/experimental/autogpt/prompt_generator.js +1 -2
  540. package/dist/experimental/autogpt/prompt_generator.js.map +1 -1
  541. package/dist/experimental/autogpt/schema.cjs +1 -2
  542. package/dist/experimental/autogpt/schema.cjs.map +1 -1
  543. package/dist/experimental/autogpt/schema.js +1 -1
  544. package/dist/experimental/babyagi/agent.cjs +6 -7
  545. package/dist/experimental/babyagi/agent.cjs.map +1 -1
  546. package/dist/experimental/babyagi/agent.js +1 -2
  547. package/dist/experimental/babyagi/agent.js.map +1 -1
  548. package/dist/experimental/babyagi/index.cjs +12 -13
  549. package/dist/experimental/babyagi/index.js +1 -2
  550. package/dist/experimental/babyagi/task_creation.cjs +3 -4
  551. package/dist/experimental/babyagi/task_creation.cjs.map +1 -1
  552. package/dist/experimental/babyagi/task_creation.js +1 -2
  553. package/dist/experimental/babyagi/task_creation.js.map +1 -1
  554. package/dist/experimental/babyagi/task_execution.cjs +3 -4
  555. package/dist/experimental/babyagi/task_execution.cjs.map +1 -1
  556. package/dist/experimental/babyagi/task_execution.js +1 -2
  557. package/dist/experimental/babyagi/task_execution.js.map +1 -1
  558. package/dist/experimental/babyagi/task_prioritization.cjs +3 -4
  559. package/dist/experimental/babyagi/task_prioritization.cjs.map +1 -1
  560. package/dist/experimental/babyagi/task_prioritization.js +1 -2
  561. package/dist/experimental/babyagi/task_prioritization.js.map +1 -1
  562. package/dist/experimental/chains/violation_of_expectations/index.cjs +9 -10
  563. package/dist/experimental/chains/violation_of_expectations/index.js +1 -2
  564. package/dist/experimental/chains/violation_of_expectations/types.cjs +1 -2
  565. package/dist/experimental/chains/violation_of_expectations/types.cjs.map +1 -1
  566. package/dist/experimental/chains/violation_of_expectations/types.js +1 -1
  567. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.cjs +6 -7
  568. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.cjs.map +1 -1
  569. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.js +1 -2
  570. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.js.map +1 -1
  571. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.cjs +2 -3
  572. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.cjs.map +1 -1
  573. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.js +1 -2
  574. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.js.map +1 -1
  575. package/dist/experimental/generative_agents/generative_agent.cjs +4 -5
  576. package/dist/experimental/generative_agents/generative_agent.cjs.map +1 -1
  577. package/dist/experimental/generative_agents/generative_agent.js +1 -2
  578. package/dist/experimental/generative_agents/generative_agent.js.map +1 -1
  579. package/dist/experimental/generative_agents/generative_agent_memory.cjs +4 -5
  580. package/dist/experimental/generative_agents/generative_agent_memory.cjs.map +1 -1
  581. package/dist/experimental/generative_agents/generative_agent_memory.js +1 -2
  582. package/dist/experimental/generative_agents/generative_agent_memory.js.map +1 -1
  583. package/dist/experimental/generative_agents/index.cjs +10 -11
  584. package/dist/experimental/generative_agents/index.js +1 -2
  585. package/dist/experimental/masking/index.cjs +11 -12
  586. package/dist/experimental/masking/index.js +1 -2
  587. package/dist/experimental/masking/parser.cjs +1 -2
  588. package/dist/experimental/masking/parser.cjs.map +1 -1
  589. package/dist/experimental/masking/parser.js +1 -1
  590. package/dist/experimental/masking/parser.js.map +1 -1
  591. package/dist/experimental/masking/regex_masking_transformer.cjs +2 -3
  592. package/dist/experimental/masking/regex_masking_transformer.cjs.map +1 -1
  593. package/dist/experimental/masking/regex_masking_transformer.js +1 -2
  594. package/dist/experimental/masking/regex_masking_transformer.js.map +1 -1
  595. package/dist/experimental/masking/transformer.cjs +1 -2
  596. package/dist/experimental/masking/transformer.cjs.map +1 -1
  597. package/dist/experimental/masking/transformer.js +1 -1
  598. package/dist/experimental/openai_assistant/index.cjs +9 -10
  599. package/dist/experimental/openai_assistant/index.cjs.map +1 -1
  600. package/dist/experimental/openai_assistant/index.js +1 -2
  601. package/dist/experimental/openai_assistant/index.js.map +1 -1
  602. package/dist/experimental/openai_files/index.cjs +8 -9
  603. package/dist/experimental/openai_files/index.cjs.map +1 -1
  604. package/dist/experimental/openai_files/index.js +1 -2
  605. package/dist/experimental/openai_files/index.js.map +1 -1
  606. package/dist/experimental/plan_and_execute/agent_executor.cjs +10 -11
  607. package/dist/experimental/plan_and_execute/agent_executor.cjs.map +1 -1
  608. package/dist/experimental/plan_and_execute/agent_executor.js +1 -2
  609. package/dist/experimental/plan_and_execute/agent_executor.js.map +1 -1
  610. package/dist/experimental/plan_and_execute/base.cjs +1 -2
  611. package/dist/experimental/plan_and_execute/base.cjs.map +1 -1
  612. package/dist/experimental/plan_and_execute/base.js +1 -1
  613. package/dist/experimental/plan_and_execute/base.js.map +1 -1
  614. package/dist/experimental/plan_and_execute/index.cjs +11 -12
  615. package/dist/experimental/plan_and_execute/index.js +1 -2
  616. package/dist/experimental/plan_and_execute/outputParser.cjs +3 -4
  617. package/dist/experimental/plan_and_execute/outputParser.cjs.map +1 -1
  618. package/dist/experimental/plan_and_execute/outputParser.js +1 -2
  619. package/dist/experimental/plan_and_execute/outputParser.js.map +1 -1
  620. package/dist/experimental/plan_and_execute/prompt.cjs +2 -3
  621. package/dist/experimental/plan_and_execute/prompt.cjs.map +1 -1
  622. package/dist/experimental/plan_and_execute/prompt.js +1 -2
  623. package/dist/experimental/plan_and_execute/prompt.js.map +1 -1
  624. package/dist/experimental/prompts/custom_format.cjs +8 -9
  625. package/dist/experimental/prompts/custom_format.cjs.map +1 -1
  626. package/dist/experimental/prompts/custom_format.js +1 -2
  627. package/dist/experimental/prompts/custom_format.js.map +1 -1
  628. package/dist/experimental/prompts/handlebars.cjs +9 -10
  629. package/dist/experimental/prompts/handlebars.cjs.map +1 -1
  630. package/dist/experimental/prompts/handlebars.js +1 -2
  631. package/dist/experimental/prompts/handlebars.js.map +1 -1
  632. package/dist/hub/base.cjs +1 -2
  633. package/dist/hub/base.cjs.map +1 -1
  634. package/dist/hub/base.js +1 -1
  635. package/dist/hub/base.js.map +1 -1
  636. package/dist/hub/index.cjs +4 -5
  637. package/dist/hub/index.cjs.map +1 -1
  638. package/dist/hub/index.js +1 -2
  639. package/dist/hub/index.js.map +1 -1
  640. package/dist/hub/node.cjs +5 -6
  641. package/dist/hub/node.cjs.map +1 -1
  642. package/dist/hub/node.js +1 -2
  643. package/dist/hub/node.js.map +1 -1
  644. package/dist/index.cjs +8 -10
  645. package/dist/index.cjs.map +1 -1
  646. package/dist/index.js +1 -2
  647. package/dist/index.js.map +1 -1
  648. package/dist/indexes/index.cjs +8 -9
  649. package/dist/indexes/index.js +1 -2
  650. package/dist/load/import_constants.cjs +1 -2
  651. package/dist/load/import_constants.cjs.map +1 -1
  652. package/dist/load/import_constants.js +1 -1
  653. package/dist/load/import_map.cjs +98 -99
  654. package/dist/load/import_map.cjs.map +1 -1
  655. package/dist/load/import_map.js +1 -2
  656. package/dist/load/import_map.js.map +1 -1
  657. package/dist/load/index.cjs +5 -6
  658. package/dist/load/index.cjs.map +1 -1
  659. package/dist/load/index.js +1 -2
  660. package/dist/load/index.js.map +1 -1
  661. package/dist/load/serializable.cjs +14 -14
  662. package/dist/load/serializable.js +2 -4
  663. package/dist/memory/buffer_memory.cjs +3 -4
  664. package/dist/memory/buffer_memory.cjs.map +1 -1
  665. package/dist/memory/buffer_memory.js +1 -2
  666. package/dist/memory/buffer_memory.js.map +1 -1
  667. package/dist/memory/buffer_token_memory.cjs +3 -4
  668. package/dist/memory/buffer_token_memory.cjs.map +1 -1
  669. package/dist/memory/buffer_token_memory.js +1 -2
  670. package/dist/memory/buffer_token_memory.js.map +1 -1
  671. package/dist/memory/buffer_window_memory.cjs +3 -4
  672. package/dist/memory/buffer_window_memory.cjs.map +1 -1
  673. package/dist/memory/buffer_window_memory.js +1 -2
  674. package/dist/memory/buffer_window_memory.js.map +1 -1
  675. package/dist/memory/chat_memory.cjs +8 -9
  676. package/dist/memory/chat_memory.cjs.map +1 -1
  677. package/dist/memory/chat_memory.js +1 -2
  678. package/dist/memory/chat_memory.js.map +1 -1
  679. package/dist/memory/combined_memory.cjs +2 -3
  680. package/dist/memory/combined_memory.cjs.map +1 -1
  681. package/dist/memory/combined_memory.js +1 -2
  682. package/dist/memory/combined_memory.js.map +1 -1
  683. package/dist/memory/entity_memory.cjs +6 -7
  684. package/dist/memory/entity_memory.cjs.map +1 -1
  685. package/dist/memory/entity_memory.js +1 -2
  686. package/dist/memory/entity_memory.js.map +1 -1
  687. package/dist/memory/index.cjs +43 -44
  688. package/dist/memory/index.js +1 -2
  689. package/dist/memory/prompt.cjs +27 -33
  690. package/dist/memory/prompt.cjs.map +1 -1
  691. package/dist/memory/prompt.js +26 -32
  692. package/dist/memory/prompt.js.map +1 -1
  693. package/dist/memory/stores/entity/base.cjs +2 -3
  694. package/dist/memory/stores/entity/base.cjs.map +1 -1
  695. package/dist/memory/stores/entity/base.js +1 -2
  696. package/dist/memory/stores/entity/base.js.map +1 -1
  697. package/dist/memory/stores/entity/in_memory.cjs +2 -3
  698. package/dist/memory/stores/entity/in_memory.cjs.map +1 -1
  699. package/dist/memory/stores/entity/in_memory.js +1 -2
  700. package/dist/memory/stores/entity/in_memory.js.map +1 -1
  701. package/dist/memory/summary.cjs +5 -6
  702. package/dist/memory/summary.cjs.map +1 -1
  703. package/dist/memory/summary.js +1 -2
  704. package/dist/memory/summary.js.map +1 -1
  705. package/dist/memory/summary_buffer.cjs +3 -4
  706. package/dist/memory/summary_buffer.cjs.map +1 -1
  707. package/dist/memory/summary_buffer.js +1 -2
  708. package/dist/memory/summary_buffer.js.map +1 -1
  709. package/dist/memory/vector_store.cjs +3 -4
  710. package/dist/memory/vector_store.cjs.map +1 -1
  711. package/dist/memory/vector_store.js +1 -2
  712. package/dist/memory/vector_store.js.map +1 -1
  713. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/_runner.d.cts +1 -4
  714. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/_runner.d.ts +1 -4
  715. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluate_comparative.d.cts +1 -2
  716. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/evaluate_comparative.d.ts +1 -2
  717. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/index.d.cts +1 -4
  718. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/index.d.ts +1 -4
  719. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/string_evaluator.d.cts +1 -1
  720. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/evaluation/string_evaluator.d.ts +1 -1
  721. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.cts +0 -1
  722. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.cts.map +1 -1
  723. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.ts +0 -1
  724. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/singletons/traceable.d.ts.map +1 -1
  725. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.cts +0 -2
  726. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.cts.map +1 -1
  727. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.ts +0 -2
  728. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/async_caller.d.ts.map +1 -1
  729. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/p-queue.d.cts +1 -1
  730. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/dist/utils/p-queue.d.ts +1 -1
  731. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/evaluation.d.cts +1 -2
  732. package/dist/node_modules/.pnpm/langsmith@0.5.9_@opentelemetry_api@1.9.0_openai@6.22.0_ws@8.19.0_bufferutil@4.1.0__zod@4.3.6_/node_modules/langsmith/evaluation.d.ts +1 -2
  733. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.d.cts +1 -1
  734. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.d.ts +1 -1
  735. package/dist/output_parsers/combining.cjs +2 -3
  736. package/dist/output_parsers/combining.cjs.map +1 -1
  737. package/dist/output_parsers/combining.js +1 -2
  738. package/dist/output_parsers/combining.js.map +1 -1
  739. package/dist/output_parsers/datetime.cjs +2 -3
  740. package/dist/output_parsers/datetime.cjs.map +1 -1
  741. package/dist/output_parsers/datetime.js +1 -2
  742. package/dist/output_parsers/datetime.js.map +1 -1
  743. package/dist/output_parsers/expression.cjs +10 -11
  744. package/dist/output_parsers/expression.cjs.map +1 -1
  745. package/dist/output_parsers/expression.js +1 -2
  746. package/dist/output_parsers/expression.js.map +1 -1
  747. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs +2 -3
  748. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs.map +1 -1
  749. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js +1 -2
  750. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js.map +1 -1
  751. package/dist/output_parsers/expression_type_handlers/base.cjs +2 -3
  752. package/dist/output_parsers/expression_type_handlers/base.cjs.map +1 -1
  753. package/dist/output_parsers/expression_type_handlers/base.js +1 -2
  754. package/dist/output_parsers/expression_type_handlers/base.js.map +1 -1
  755. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs +2 -3
  756. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs.map +1 -1
  757. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js +1 -2
  758. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js.map +1 -1
  759. package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs +2 -3
  760. package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs.map +1 -1
  761. package/dist/output_parsers/expression_type_handlers/call_expression_handler.js +1 -2
  762. package/dist/output_parsers/expression_type_handlers/call_expression_handler.js.map +1 -1
  763. package/dist/output_parsers/expression_type_handlers/factory.cjs +11 -12
  764. package/dist/output_parsers/expression_type_handlers/factory.cjs.map +1 -1
  765. package/dist/output_parsers/expression_type_handlers/factory.js +1 -2
  766. package/dist/output_parsers/expression_type_handlers/factory.js.map +1 -1
  767. package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs +1 -2
  768. package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs.map +1 -1
  769. package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js +1 -1
  770. package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs +2 -3
  771. package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs.map +1 -1
  772. package/dist/output_parsers/expression_type_handlers/identifier_handler.js +1 -2
  773. package/dist/output_parsers/expression_type_handlers/identifier_handler.js.map +1 -1
  774. package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs +2 -3
  775. package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs.map +1 -1
  776. package/dist/output_parsers/expression_type_handlers/member_expression_handler.js +1 -2
  777. package/dist/output_parsers/expression_type_handlers/member_expression_handler.js.map +1 -1
  778. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs +2 -3
  779. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs.map +1 -1
  780. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js +1 -2
  781. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js.map +1 -1
  782. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs +3 -4
  783. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs.map +1 -1
  784. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js +1 -2
  785. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js.map +1 -1
  786. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs +2 -3
  787. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs.map +1 -1
  788. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js +1 -2
  789. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js.map +1 -1
  790. package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs +2 -3
  791. package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs.map +1 -1
  792. package/dist/output_parsers/expression_type_handlers/string_literal_handler.js +1 -2
  793. package/dist/output_parsers/expression_type_handlers/string_literal_handler.js.map +1 -1
  794. package/dist/output_parsers/fix.cjs +4 -5
  795. package/dist/output_parsers/fix.cjs.map +1 -1
  796. package/dist/output_parsers/fix.js +1 -2
  797. package/dist/output_parsers/fix.js.map +1 -1
  798. package/dist/output_parsers/http_response.cjs +2 -3
  799. package/dist/output_parsers/http_response.cjs.map +1 -1
  800. package/dist/output_parsers/http_response.js +1 -2
  801. package/dist/output_parsers/http_response.js.map +1 -1
  802. package/dist/output_parsers/index.cjs +32 -33
  803. package/dist/output_parsers/index.js +1 -2
  804. package/dist/output_parsers/noop.cjs +2 -3
  805. package/dist/output_parsers/noop.cjs.map +1 -1
  806. package/dist/output_parsers/noop.js +1 -2
  807. package/dist/output_parsers/noop.js.map +1 -1
  808. package/dist/output_parsers/openai_functions.cjs +2 -3
  809. package/dist/output_parsers/openai_functions.cjs.map +1 -1
  810. package/dist/output_parsers/openai_functions.js +1 -2
  811. package/dist/output_parsers/openai_functions.js.map +1 -1
  812. package/dist/output_parsers/openai_tools.cjs +2 -3
  813. package/dist/output_parsers/openai_tools.cjs.map +1 -1
  814. package/dist/output_parsers/openai_tools.js +1 -2
  815. package/dist/output_parsers/openai_tools.js.map +1 -1
  816. package/dist/output_parsers/prompts.cjs +4 -8
  817. package/dist/output_parsers/prompts.cjs.map +1 -1
  818. package/dist/output_parsers/prompts.js +3 -6
  819. package/dist/output_parsers/prompts.js.map +1 -1
  820. package/dist/output_parsers/regex.cjs +2 -3
  821. package/dist/output_parsers/regex.cjs.map +1 -1
  822. package/dist/output_parsers/regex.js +1 -2
  823. package/dist/output_parsers/regex.js.map +1 -1
  824. package/dist/output_parsers/router.cjs +3 -4
  825. package/dist/output_parsers/router.cjs.map +1 -1
  826. package/dist/output_parsers/router.js +1 -2
  827. package/dist/output_parsers/router.js.map +1 -1
  828. package/dist/output_parsers/structured.cjs +2 -3
  829. package/dist/output_parsers/structured.cjs.map +1 -1
  830. package/dist/output_parsers/structured.js +1 -2
  831. package/dist/output_parsers/structured.js.map +1 -1
  832. package/dist/retrievers/contextual_compression.cjs +8 -9
  833. package/dist/retrievers/contextual_compression.cjs.map +1 -1
  834. package/dist/retrievers/contextual_compression.js +1 -2
  835. package/dist/retrievers/contextual_compression.js.map +1 -1
  836. package/dist/retrievers/document_compressors/chain_extract.cjs +11 -12
  837. package/dist/retrievers/document_compressors/chain_extract.cjs.map +1 -1
  838. package/dist/retrievers/document_compressors/chain_extract.js +1 -2
  839. package/dist/retrievers/document_compressors/chain_extract.js.map +1 -1
  840. package/dist/retrievers/document_compressors/chain_extract_prompt.cjs +1 -2
  841. package/dist/retrievers/document_compressors/chain_extract_prompt.cjs.map +1 -1
  842. package/dist/retrievers/document_compressors/chain_extract_prompt.js +1 -1
  843. package/dist/retrievers/document_compressors/embeddings_filter.cjs +9 -10
  844. package/dist/retrievers/document_compressors/embeddings_filter.cjs.map +1 -1
  845. package/dist/retrievers/document_compressors/embeddings_filter.js +1 -2
  846. package/dist/retrievers/document_compressors/embeddings_filter.js.map +1 -1
  847. package/dist/retrievers/document_compressors/index.cjs +8 -10
  848. package/dist/retrievers/document_compressors/index.cjs.map +1 -1
  849. package/dist/retrievers/document_compressors/index.js +1 -2
  850. package/dist/retrievers/document_compressors/index.js.map +1 -1
  851. package/dist/retrievers/ensemble.cjs +8 -9
  852. package/dist/retrievers/ensemble.cjs.map +1 -1
  853. package/dist/retrievers/ensemble.js +1 -2
  854. package/dist/retrievers/ensemble.js.map +1 -1
  855. package/dist/retrievers/hyde.cjs +8 -9
  856. package/dist/retrievers/hyde.cjs.map +1 -1
  857. package/dist/retrievers/hyde.js +1 -2
  858. package/dist/retrievers/hyde.js.map +1 -1
  859. package/dist/retrievers/matryoshka_retriever.cjs +8 -9
  860. package/dist/retrievers/matryoshka_retriever.cjs.map +1 -1
  861. package/dist/retrievers/matryoshka_retriever.js +1 -2
  862. package/dist/retrievers/matryoshka_retriever.js.map +1 -1
  863. package/dist/retrievers/multi_query.cjs +9 -10
  864. package/dist/retrievers/multi_query.cjs.map +1 -1
  865. package/dist/retrievers/multi_query.js +1 -2
  866. package/dist/retrievers/multi_query.js.map +1 -1
  867. package/dist/retrievers/multi_vector.cjs +9 -10
  868. package/dist/retrievers/multi_vector.cjs.map +1 -1
  869. package/dist/retrievers/multi_vector.js +1 -2
  870. package/dist/retrievers/multi_vector.js.map +1 -1
  871. package/dist/retrievers/parent_document.cjs +9 -10
  872. package/dist/retrievers/parent_document.cjs.map +1 -1
  873. package/dist/retrievers/parent_document.js +1 -2
  874. package/dist/retrievers/parent_document.js.map +1 -1
  875. package/dist/retrievers/score_threshold.cjs +8 -9
  876. package/dist/retrievers/score_threshold.cjs.map +1 -1
  877. package/dist/retrievers/score_threshold.js +1 -2
  878. package/dist/retrievers/score_threshold.js.map +1 -1
  879. package/dist/retrievers/self_query/functional.cjs +13 -14
  880. package/dist/retrievers/self_query/functional.js +1 -2
  881. package/dist/retrievers/self_query/index.cjs +24 -25
  882. package/dist/retrievers/self_query/index.cjs.map +1 -1
  883. package/dist/retrievers/self_query/index.js +1 -2
  884. package/dist/retrievers/self_query/index.js.map +1 -1
  885. package/dist/retrievers/time_weighted.cjs +9 -10
  886. package/dist/retrievers/time_weighted.cjs.map +1 -1
  887. package/dist/retrievers/time_weighted.js +2 -3
  888. package/dist/retrievers/time_weighted.js.map +1 -1
  889. package/dist/schema/prompt_template.cjs +8 -10
  890. package/dist/schema/prompt_template.cjs.map +1 -1
  891. package/dist/schema/prompt_template.js +1 -2
  892. package/dist/schema/prompt_template.js.map +1 -1
  893. package/dist/schema/query_constructor.cjs +8 -10
  894. package/dist/schema/query_constructor.cjs.map +1 -1
  895. package/dist/schema/query_constructor.js +1 -2
  896. package/dist/schema/query_constructor.js.map +1 -1
  897. package/dist/smith/config.cjs +1 -2
  898. package/dist/smith/config.cjs.map +1 -1
  899. package/dist/smith/config.d.cts +0 -1
  900. package/dist/smith/config.d.cts.map +1 -1
  901. package/dist/smith/config.d.ts +0 -2
  902. package/dist/smith/config.d.ts.map +1 -1
  903. package/dist/smith/config.js +1 -1
  904. package/dist/smith/index.cjs +10 -11
  905. package/dist/smith/index.js +1 -2
  906. package/dist/smith/name_generation.cjs +1 -2
  907. package/dist/smith/name_generation.cjs.map +1 -1
  908. package/dist/smith/name_generation.js +1 -1
  909. package/dist/smith/progress.cjs +1 -2
  910. package/dist/smith/progress.cjs.map +1 -1
  911. package/dist/smith/progress.js +1 -1
  912. package/dist/smith/progress.js.map +1 -1
  913. package/dist/smith/runner_utils.cjs +6 -7
  914. package/dist/smith/runner_utils.cjs.map +1 -1
  915. package/dist/smith/runner_utils.d.cts +0 -1
  916. package/dist/smith/runner_utils.d.cts.map +1 -1
  917. package/dist/smith/runner_utils.d.ts +0 -1
  918. package/dist/smith/runner_utils.d.ts.map +1 -1
  919. package/dist/smith/runner_utils.js +1 -2
  920. package/dist/smith/runner_utils.js.map +1 -1
  921. package/dist/sql_db.cjs +9 -10
  922. package/dist/sql_db.cjs.map +1 -1
  923. package/dist/sql_db.js +1 -2
  924. package/dist/sql_db.js.map +1 -1
  925. package/dist/storage/encoder_backed.cjs +8 -9
  926. package/dist/storage/encoder_backed.cjs.map +1 -1
  927. package/dist/storage/encoder_backed.js +1 -2
  928. package/dist/storage/encoder_backed.js.map +1 -1
  929. package/dist/storage/file_system.cjs +8 -9
  930. package/dist/storage/file_system.cjs.map +1 -1
  931. package/dist/storage/file_system.js +1 -2
  932. package/dist/storage/file_system.js.map +1 -1
  933. package/dist/storage/in_memory.cjs +13 -14
  934. package/dist/storage/in_memory.js +1 -2
  935. package/dist/stores/doc/base.cjs +8 -10
  936. package/dist/stores/doc/base.cjs.map +1 -1
  937. package/dist/stores/doc/base.js +1 -2
  938. package/dist/stores/doc/base.js.map +1 -1
  939. package/dist/stores/doc/in_memory.cjs +9 -10
  940. package/dist/stores/doc/in_memory.cjs.map +1 -1
  941. package/dist/stores/doc/in_memory.js +1 -2
  942. package/dist/stores/doc/in_memory.js.map +1 -1
  943. package/dist/stores/file/base.cjs +2 -3
  944. package/dist/stores/file/base.cjs.map +1 -1
  945. package/dist/stores/file/base.js +1 -2
  946. package/dist/stores/file/base.js.map +1 -1
  947. package/dist/stores/file/in_memory.cjs +9 -10
  948. package/dist/stores/file/in_memory.cjs.map +1 -1
  949. package/dist/stores/file/in_memory.js +1 -2
  950. package/dist/stores/file/in_memory.js.map +1 -1
  951. package/dist/stores/file/node.cjs +9 -10
  952. package/dist/stores/file/node.cjs.map +1 -1
  953. package/dist/stores/file/node.js +1 -2
  954. package/dist/stores/file/node.js.map +1 -1
  955. package/dist/stores/message/in_memory.cjs +13 -14
  956. package/dist/stores/message/in_memory.js +1 -2
  957. package/dist/text_splitter.cjs +14 -14
  958. package/dist/text_splitter.d.cts +0 -1
  959. package/dist/text_splitter.d.ts +0 -1
  960. package/dist/text_splitter.js +2 -4
  961. package/dist/tools/chain.cjs +8 -9
  962. package/dist/tools/chain.cjs.map +1 -1
  963. package/dist/tools/chain.js +1 -2
  964. package/dist/tools/chain.js.map +1 -1
  965. package/dist/tools/fs.cjs +2 -3
  966. package/dist/tools/fs.cjs.map +1 -1
  967. package/dist/tools/fs.js +1 -2
  968. package/dist/tools/fs.js.map +1 -1
  969. package/dist/tools/index.cjs +33 -34
  970. package/dist/tools/index.js +1 -2
  971. package/dist/tools/json.cjs +2 -3
  972. package/dist/tools/json.cjs.map +1 -1
  973. package/dist/tools/json.js +1 -2
  974. package/dist/tools/json.js.map +1 -1
  975. package/dist/tools/render.cjs +8 -9
  976. package/dist/tools/render.cjs.map +1 -1
  977. package/dist/tools/render.js +1 -2
  978. package/dist/tools/render.js.map +1 -1
  979. package/dist/tools/requests.cjs +2 -3
  980. package/dist/tools/requests.cjs.map +1 -1
  981. package/dist/tools/requests.js +1 -2
  982. package/dist/tools/requests.js.map +1 -1
  983. package/dist/tools/retriever.cjs +9 -10
  984. package/dist/tools/retriever.cjs.map +1 -1
  985. package/dist/tools/retriever.js +1 -2
  986. package/dist/tools/retriever.js.map +1 -1
  987. package/dist/tools/sql.cjs +9 -10
  988. package/dist/tools/sql.cjs.map +1 -1
  989. package/dist/tools/sql.js +1 -2
  990. package/dist/tools/sql.js.map +1 -1
  991. package/dist/tools/vectorstore.cjs +3 -4
  992. package/dist/tools/vectorstore.cjs.map +1 -1
  993. package/dist/tools/vectorstore.js +1 -2
  994. package/dist/tools/vectorstore.js.map +1 -1
  995. package/dist/tools/webbrowser.cjs +10 -11
  996. package/dist/tools/webbrowser.cjs.map +1 -1
  997. package/dist/tools/webbrowser.js +1 -2
  998. package/dist/tools/webbrowser.js.map +1 -1
  999. package/dist/util/document.cjs +8 -10
  1000. package/dist/util/document.cjs.map +1 -1
  1001. package/dist/util/document.js +1 -2
  1002. package/dist/util/document.js.map +1 -1
  1003. package/dist/util/entrypoint_deprecation.cjs +1 -1
  1004. package/dist/util/entrypoint_deprecation.js +1 -2
  1005. package/dist/util/env.cjs +2 -2
  1006. package/dist/util/env.js +1 -2
  1007. package/dist/util/extname.cjs +1 -2
  1008. package/dist/util/extname.cjs.map +1 -1
  1009. package/dist/util/extname.js +1 -1
  1010. package/dist/util/hub.cjs +4 -5
  1011. package/dist/util/hub.cjs.map +1 -1
  1012. package/dist/util/hub.js +1 -2
  1013. package/dist/util/hub.js.map +1 -1
  1014. package/dist/util/is-network-error/index.cjs +1 -2
  1015. package/dist/util/is-network-error/index.cjs.map +1 -1
  1016. package/dist/util/is-network-error/index.js +1 -1
  1017. package/dist/util/is-network-error/index.js.map +1 -1
  1018. package/dist/util/load.cjs +1 -2
  1019. package/dist/util/load.cjs.map +1 -1
  1020. package/dist/util/load.js +1 -1
  1021. package/dist/util/math.cjs +14 -14
  1022. package/dist/util/math.js +2 -4
  1023. package/dist/util/ml-distance/distances.cjs +1 -2
  1024. package/dist/util/ml-distance/distances.cjs.map +1 -1
  1025. package/dist/util/ml-distance/distances.js +1 -1
  1026. package/dist/util/ml-distance/similarities.cjs +1 -2
  1027. package/dist/util/ml-distance/similarities.cjs.map +1 -1
  1028. package/dist/util/ml-distance/similarities.js +1 -1
  1029. package/dist/util/ml-distance-euclidean/euclidean.cjs +1 -2
  1030. package/dist/util/ml-distance-euclidean/euclidean.cjs.map +1 -1
  1031. package/dist/util/ml-distance-euclidean/euclidean.js +1 -1
  1032. package/dist/util/openapi.cjs +2 -3
  1033. package/dist/util/openapi.cjs.map +1 -1
  1034. package/dist/util/openapi.js +1 -2
  1035. package/dist/util/openapi.js.map +1 -1
  1036. package/dist/util/p-retry/index.cjs +2 -3
  1037. package/dist/util/p-retry/index.cjs.map +1 -1
  1038. package/dist/util/p-retry/index.js +1 -2
  1039. package/dist/util/p-retry/index.js.map +1 -1
  1040. package/dist/util/parse.cjs +3 -4
  1041. package/dist/util/parse.cjs.map +1 -1
  1042. package/dist/util/parse.js +1 -2
  1043. package/dist/util/parse.js.map +1 -1
  1044. package/dist/util/set.cjs +1 -2
  1045. package/dist/util/set.cjs.map +1 -1
  1046. package/dist/util/set.js +1 -1
  1047. package/dist/util/sql_utils.cjs +2 -3
  1048. package/dist/util/sql_utils.cjs.map +1 -1
  1049. package/dist/util/sql_utils.js +1 -2
  1050. package/dist/util/sql_utils.js.map +1 -1
  1051. package/dist/util/time.cjs +8 -10
  1052. package/dist/util/time.cjs.map +1 -1
  1053. package/dist/util/time.js +1 -2
  1054. package/dist/util/time.js.map +1 -1
  1055. package/dist/vectorstores/memory.cjs +9 -10
  1056. package/dist/vectorstores/memory.cjs.map +1 -1
  1057. package/dist/vectorstores/memory.js +1 -2
  1058. package/dist/vectorstores/memory.js.map +1 -1
  1059. package/package.json +21 -17
  1060. package/agents/format_scratchpad/log.cjs +0 -1
  1061. package/agents/format_scratchpad/log.d.cts +0 -1
  1062. package/agents/format_scratchpad/log.d.ts +0 -1
  1063. package/agents/format_scratchpad/log.js +0 -1
  1064. package/agents/format_scratchpad/log_to_message.cjs +0 -1
  1065. package/agents/format_scratchpad/log_to_message.d.cts +0 -1
  1066. package/agents/format_scratchpad/log_to_message.d.ts +0 -1
  1067. package/agents/format_scratchpad/log_to_message.js +0 -1
  1068. package/agents/format_scratchpad/openai_functions.cjs +0 -1
  1069. package/agents/format_scratchpad/openai_functions.d.cts +0 -1
  1070. package/agents/format_scratchpad/openai_functions.d.ts +0 -1
  1071. package/agents/format_scratchpad/openai_functions.js +0 -1
  1072. package/agents/format_scratchpad/openai_tools.cjs +0 -1
  1073. package/agents/format_scratchpad/openai_tools.d.cts +0 -1
  1074. package/agents/format_scratchpad/openai_tools.d.ts +0 -1
  1075. package/agents/format_scratchpad/openai_tools.js +0 -1
  1076. package/agents/format_scratchpad/xml.cjs +0 -1
  1077. package/agents/format_scratchpad/xml.d.cts +0 -1
  1078. package/agents/format_scratchpad/xml.d.ts +0 -1
  1079. package/agents/format_scratchpad/xml.js +0 -1
  1080. package/agents/load.cjs +0 -1
  1081. package/agents/load.d.cts +0 -1
  1082. package/agents/load.d.ts +0 -1
  1083. package/agents/load.js +0 -1
  1084. package/agents/openai/output_parser.cjs +0 -1
  1085. package/agents/openai/output_parser.d.cts +0 -1
  1086. package/agents/openai/output_parser.d.ts +0 -1
  1087. package/agents/openai/output_parser.js +0 -1
  1088. package/agents/react/output_parser.cjs +0 -1
  1089. package/agents/react/output_parser.d.cts +0 -1
  1090. package/agents/react/output_parser.d.ts +0 -1
  1091. package/agents/react/output_parser.js +0 -1
  1092. package/agents/toolkits/sql.cjs +0 -1
  1093. package/agents/toolkits/sql.d.cts +0 -1
  1094. package/agents/toolkits/sql.d.ts +0 -1
  1095. package/agents/toolkits/sql.js +0 -1
  1096. package/agents/toolkits.cjs +0 -1
  1097. package/agents/toolkits.d.cts +0 -1
  1098. package/agents/toolkits.d.ts +0 -1
  1099. package/agents/toolkits.js +0 -1
  1100. package/agents/xml/output_parser.cjs +0 -1
  1101. package/agents/xml/output_parser.d.cts +0 -1
  1102. package/agents/xml/output_parser.d.ts +0 -1
  1103. package/agents/xml/output_parser.js +0 -1
  1104. package/agents.cjs +0 -1
  1105. package/agents.d.cts +0 -1
  1106. package/agents.d.ts +0 -1
  1107. package/agents.js +0 -1
  1108. package/cache/file_system.cjs +0 -1
  1109. package/cache/file_system.d.cts +0 -1
  1110. package/cache/file_system.d.ts +0 -1
  1111. package/cache/file_system.js +0 -1
  1112. package/callbacks.cjs +0 -1
  1113. package/callbacks.d.cts +0 -1
  1114. package/callbacks.d.ts +0 -1
  1115. package/callbacks.js +0 -1
  1116. package/chains/combine_documents/reduce.cjs +0 -1
  1117. package/chains/combine_documents/reduce.d.cts +0 -1
  1118. package/chains/combine_documents/reduce.d.ts +0 -1
  1119. package/chains/combine_documents/reduce.js +0 -1
  1120. package/chains/combine_documents.cjs +0 -1
  1121. package/chains/combine_documents.d.cts +0 -1
  1122. package/chains/combine_documents.d.ts +0 -1
  1123. package/chains/combine_documents.js +0 -1
  1124. package/chains/graph_qa/cypher.cjs +0 -1
  1125. package/chains/graph_qa/cypher.d.cts +0 -1
  1126. package/chains/graph_qa/cypher.d.ts +0 -1
  1127. package/chains/graph_qa/cypher.js +0 -1
  1128. package/chains/history_aware_retriever.cjs +0 -1
  1129. package/chains/history_aware_retriever.d.cts +0 -1
  1130. package/chains/history_aware_retriever.d.ts +0 -1
  1131. package/chains/history_aware_retriever.js +0 -1
  1132. package/chains/load.cjs +0 -1
  1133. package/chains/load.d.cts +0 -1
  1134. package/chains/load.d.ts +0 -1
  1135. package/chains/load.js +0 -1
  1136. package/chains/openai_functions.cjs +0 -1
  1137. package/chains/openai_functions.d.cts +0 -1
  1138. package/chains/openai_functions.d.ts +0 -1
  1139. package/chains/openai_functions.js +0 -1
  1140. package/chains/query_constructor/ir.cjs +0 -1
  1141. package/chains/query_constructor/ir.d.cts +0 -1
  1142. package/chains/query_constructor/ir.d.ts +0 -1
  1143. package/chains/query_constructor/ir.js +0 -1
  1144. package/chains/query_constructor.cjs +0 -1
  1145. package/chains/query_constructor.d.cts +0 -1
  1146. package/chains/query_constructor.d.ts +0 -1
  1147. package/chains/query_constructor.js +0 -1
  1148. package/chains/retrieval.cjs +0 -1
  1149. package/chains/retrieval.d.cts +0 -1
  1150. package/chains/retrieval.d.ts +0 -1
  1151. package/chains/retrieval.js +0 -1
  1152. package/chains/sql_db.cjs +0 -1
  1153. package/chains/sql_db.d.cts +0 -1
  1154. package/chains/sql_db.d.ts +0 -1
  1155. package/chains/sql_db.js +0 -1
  1156. package/chains.cjs +0 -1
  1157. package/chains.d.cts +0 -1
  1158. package/chains.d.ts +0 -1
  1159. package/chains.js +0 -1
  1160. package/chat_models/universal.cjs +0 -1
  1161. package/chat_models/universal.d.cts +0 -1
  1162. package/chat_models/universal.d.ts +0 -1
  1163. package/chat_models/universal.js +0 -1
  1164. package/document.cjs +0 -1
  1165. package/document.d.cts +0 -1
  1166. package/document.d.ts +0 -1
  1167. package/document.js +0 -1
  1168. package/document_loaders/base.cjs +0 -1
  1169. package/document_loaders/base.d.cts +0 -1
  1170. package/document_loaders/base.d.ts +0 -1
  1171. package/document_loaders/base.js +0 -1
  1172. package/document_loaders/fs/buffer.cjs +0 -1
  1173. package/document_loaders/fs/buffer.d.cts +0 -1
  1174. package/document_loaders/fs/buffer.d.ts +0 -1
  1175. package/document_loaders/fs/buffer.js +0 -1
  1176. package/document_loaders/fs/directory.cjs +0 -1
  1177. package/document_loaders/fs/directory.d.cts +0 -1
  1178. package/document_loaders/fs/directory.d.ts +0 -1
  1179. package/document_loaders/fs/directory.js +0 -1
  1180. package/document_loaders/fs/json.cjs +0 -1
  1181. package/document_loaders/fs/json.d.cts +0 -1
  1182. package/document_loaders/fs/json.d.ts +0 -1
  1183. package/document_loaders/fs/json.js +0 -1
  1184. package/document_loaders/fs/multi_file.cjs +0 -1
  1185. package/document_loaders/fs/multi_file.d.cts +0 -1
  1186. package/document_loaders/fs/multi_file.d.ts +0 -1
  1187. package/document_loaders/fs/multi_file.js +0 -1
  1188. package/document_loaders/fs/text.cjs +0 -1
  1189. package/document_loaders/fs/text.d.cts +0 -1
  1190. package/document_loaders/fs/text.d.ts +0 -1
  1191. package/document_loaders/fs/text.js +0 -1
  1192. package/document_transformers/openai_functions.cjs +0 -1
  1193. package/document_transformers/openai_functions.d.cts +0 -1
  1194. package/document_transformers/openai_functions.d.ts +0 -1
  1195. package/document_transformers/openai_functions.js +0 -1
  1196. package/embeddings/cache_backed.cjs +0 -1
  1197. package/embeddings/cache_backed.d.cts +0 -1
  1198. package/embeddings/cache_backed.d.ts +0 -1
  1199. package/embeddings/cache_backed.js +0 -1
  1200. package/embeddings/fake.cjs +0 -1
  1201. package/embeddings/fake.d.cts +0 -1
  1202. package/embeddings/fake.d.ts +0 -1
  1203. package/embeddings/fake.js +0 -1
  1204. package/evaluation.cjs +0 -1
  1205. package/evaluation.d.cts +0 -1
  1206. package/evaluation.d.ts +0 -1
  1207. package/evaluation.js +0 -1
  1208. package/experimental/autogpt.cjs +0 -1
  1209. package/experimental/autogpt.d.cts +0 -1
  1210. package/experimental/autogpt.d.ts +0 -1
  1211. package/experimental/autogpt.js +0 -1
  1212. package/experimental/babyagi.cjs +0 -1
  1213. package/experimental/babyagi.d.cts +0 -1
  1214. package/experimental/babyagi.d.ts +0 -1
  1215. package/experimental/babyagi.js +0 -1
  1216. package/experimental/chains/violation_of_expectations.cjs +0 -1
  1217. package/experimental/chains/violation_of_expectations.d.cts +0 -1
  1218. package/experimental/chains/violation_of_expectations.d.ts +0 -1
  1219. package/experimental/chains/violation_of_expectations.js +0 -1
  1220. package/experimental/generative_agents.cjs +0 -1
  1221. package/experimental/generative_agents.d.cts +0 -1
  1222. package/experimental/generative_agents.d.ts +0 -1
  1223. package/experimental/generative_agents.js +0 -1
  1224. package/experimental/masking.cjs +0 -1
  1225. package/experimental/masking.d.cts +0 -1
  1226. package/experimental/masking.d.ts +0 -1
  1227. package/experimental/masking.js +0 -1
  1228. package/experimental/openai_assistant.cjs +0 -1
  1229. package/experimental/openai_assistant.d.cts +0 -1
  1230. package/experimental/openai_assistant.d.ts +0 -1
  1231. package/experimental/openai_assistant.js +0 -1
  1232. package/experimental/openai_files.cjs +0 -1
  1233. package/experimental/openai_files.d.cts +0 -1
  1234. package/experimental/openai_files.d.ts +0 -1
  1235. package/experimental/openai_files.js +0 -1
  1236. package/experimental/plan_and_execute.cjs +0 -1
  1237. package/experimental/plan_and_execute.d.cts +0 -1
  1238. package/experimental/plan_and_execute.d.ts +0 -1
  1239. package/experimental/plan_and_execute.js +0 -1
  1240. package/experimental/prompts/custom_format.cjs +0 -1
  1241. package/experimental/prompts/custom_format.d.cts +0 -1
  1242. package/experimental/prompts/custom_format.d.ts +0 -1
  1243. package/experimental/prompts/custom_format.js +0 -1
  1244. package/experimental/prompts/handlebars.cjs +0 -1
  1245. package/experimental/prompts/handlebars.d.cts +0 -1
  1246. package/experimental/prompts/handlebars.d.ts +0 -1
  1247. package/experimental/prompts/handlebars.js +0 -1
  1248. package/hub/node.cjs +0 -1
  1249. package/hub/node.d.cts +0 -1
  1250. package/hub/node.d.ts +0 -1
  1251. package/hub/node.js +0 -1
  1252. package/hub.cjs +0 -1
  1253. package/hub.d.cts +0 -1
  1254. package/hub.d.ts +0 -1
  1255. package/hub.js +0 -1
  1256. package/indexes.cjs +0 -1
  1257. package/indexes.d.cts +0 -1
  1258. package/indexes.d.ts +0 -1
  1259. package/indexes.js +0 -1
  1260. package/load/serializable.cjs +0 -1
  1261. package/load/serializable.d.cts +0 -1
  1262. package/load/serializable.d.ts +0 -1
  1263. package/load/serializable.js +0 -1
  1264. package/load.cjs +0 -1
  1265. package/load.d.cts +0 -1
  1266. package/load.d.ts +0 -1
  1267. package/load.js +0 -1
  1268. package/memory/chat_memory.cjs +0 -1
  1269. package/memory/chat_memory.d.cts +0 -1
  1270. package/memory/chat_memory.d.ts +0 -1
  1271. package/memory/chat_memory.js +0 -1
  1272. package/memory.cjs +0 -1
  1273. package/memory.d.cts +0 -1
  1274. package/memory.d.ts +0 -1
  1275. package/memory.js +0 -1
  1276. package/output_parsers/expression.cjs +0 -1
  1277. package/output_parsers/expression.d.cts +0 -1
  1278. package/output_parsers/expression.d.ts +0 -1
  1279. package/output_parsers/expression.js +0 -1
  1280. package/output_parsers.cjs +0 -1
  1281. package/output_parsers.d.cts +0 -1
  1282. package/output_parsers.d.ts +0 -1
  1283. package/output_parsers.js +0 -1
  1284. package/retrievers/contextual_compression.cjs +0 -1
  1285. package/retrievers/contextual_compression.d.cts +0 -1
  1286. package/retrievers/contextual_compression.d.ts +0 -1
  1287. package/retrievers/contextual_compression.js +0 -1
  1288. package/retrievers/document_compressors/chain_extract.cjs +0 -1
  1289. package/retrievers/document_compressors/chain_extract.d.cts +0 -1
  1290. package/retrievers/document_compressors/chain_extract.d.ts +0 -1
  1291. package/retrievers/document_compressors/chain_extract.js +0 -1
  1292. package/retrievers/document_compressors/embeddings_filter.cjs +0 -1
  1293. package/retrievers/document_compressors/embeddings_filter.d.cts +0 -1
  1294. package/retrievers/document_compressors/embeddings_filter.d.ts +0 -1
  1295. package/retrievers/document_compressors/embeddings_filter.js +0 -1
  1296. package/retrievers/document_compressors.cjs +0 -1
  1297. package/retrievers/document_compressors.d.cts +0 -1
  1298. package/retrievers/document_compressors.d.ts +0 -1
  1299. package/retrievers/document_compressors.js +0 -1
  1300. package/retrievers/ensemble.cjs +0 -1
  1301. package/retrievers/ensemble.d.cts +0 -1
  1302. package/retrievers/ensemble.d.ts +0 -1
  1303. package/retrievers/ensemble.js +0 -1
  1304. package/retrievers/hyde.cjs +0 -1
  1305. package/retrievers/hyde.d.cts +0 -1
  1306. package/retrievers/hyde.d.ts +0 -1
  1307. package/retrievers/hyde.js +0 -1
  1308. package/retrievers/matryoshka_retriever.cjs +0 -1
  1309. package/retrievers/matryoshka_retriever.d.cts +0 -1
  1310. package/retrievers/matryoshka_retriever.d.ts +0 -1
  1311. package/retrievers/matryoshka_retriever.js +0 -1
  1312. package/retrievers/multi_query.cjs +0 -1
  1313. package/retrievers/multi_query.d.cts +0 -1
  1314. package/retrievers/multi_query.d.ts +0 -1
  1315. package/retrievers/multi_query.js +0 -1
  1316. package/retrievers/multi_vector.cjs +0 -1
  1317. package/retrievers/multi_vector.d.cts +0 -1
  1318. package/retrievers/multi_vector.d.ts +0 -1
  1319. package/retrievers/multi_vector.js +0 -1
  1320. package/retrievers/parent_document.cjs +0 -1
  1321. package/retrievers/parent_document.d.cts +0 -1
  1322. package/retrievers/parent_document.d.ts +0 -1
  1323. package/retrievers/parent_document.js +0 -1
  1324. package/retrievers/score_threshold.cjs +0 -1
  1325. package/retrievers/score_threshold.d.cts +0 -1
  1326. package/retrievers/score_threshold.d.ts +0 -1
  1327. package/retrievers/score_threshold.js +0 -1
  1328. package/retrievers/self_query/functional.cjs +0 -1
  1329. package/retrievers/self_query/functional.d.cts +0 -1
  1330. package/retrievers/self_query/functional.d.ts +0 -1
  1331. package/retrievers/self_query/functional.js +0 -1
  1332. package/retrievers/self_query.cjs +0 -1
  1333. package/retrievers/self_query.d.cts +0 -1
  1334. package/retrievers/self_query.d.ts +0 -1
  1335. package/retrievers/self_query.js +0 -1
  1336. package/retrievers/time_weighted.cjs +0 -1
  1337. package/retrievers/time_weighted.d.cts +0 -1
  1338. package/retrievers/time_weighted.d.ts +0 -1
  1339. package/retrievers/time_weighted.js +0 -1
  1340. package/schema/prompt_template.cjs +0 -1
  1341. package/schema/prompt_template.d.cts +0 -1
  1342. package/schema/prompt_template.d.ts +0 -1
  1343. package/schema/prompt_template.js +0 -1
  1344. package/schema/query_constructor.cjs +0 -1
  1345. package/schema/query_constructor.d.cts +0 -1
  1346. package/schema/query_constructor.d.ts +0 -1
  1347. package/schema/query_constructor.js +0 -1
  1348. package/smith.cjs +0 -1
  1349. package/smith.d.cts +0 -1
  1350. package/smith.d.ts +0 -1
  1351. package/smith.js +0 -1
  1352. package/sql_db.cjs +0 -1
  1353. package/sql_db.d.cts +0 -1
  1354. package/sql_db.d.ts +0 -1
  1355. package/sql_db.js +0 -1
  1356. package/storage/encoder_backed.cjs +0 -1
  1357. package/storage/encoder_backed.d.cts +0 -1
  1358. package/storage/encoder_backed.d.ts +0 -1
  1359. package/storage/encoder_backed.js +0 -1
  1360. package/storage/file_system.cjs +0 -1
  1361. package/storage/file_system.d.cts +0 -1
  1362. package/storage/file_system.d.ts +0 -1
  1363. package/storage/file_system.js +0 -1
  1364. package/storage/in_memory.cjs +0 -1
  1365. package/storage/in_memory.d.cts +0 -1
  1366. package/storage/in_memory.d.ts +0 -1
  1367. package/storage/in_memory.js +0 -1
  1368. package/stores/doc/base.cjs +0 -1
  1369. package/stores/doc/base.d.cts +0 -1
  1370. package/stores/doc/base.d.ts +0 -1
  1371. package/stores/doc/base.js +0 -1
  1372. package/stores/doc/in_memory.cjs +0 -1
  1373. package/stores/doc/in_memory.d.cts +0 -1
  1374. package/stores/doc/in_memory.d.ts +0 -1
  1375. package/stores/doc/in_memory.js +0 -1
  1376. package/stores/file/in_memory.cjs +0 -1
  1377. package/stores/file/in_memory.d.cts +0 -1
  1378. package/stores/file/in_memory.d.ts +0 -1
  1379. package/stores/file/in_memory.js +0 -1
  1380. package/stores/file/node.cjs +0 -1
  1381. package/stores/file/node.d.cts +0 -1
  1382. package/stores/file/node.d.ts +0 -1
  1383. package/stores/file/node.js +0 -1
  1384. package/stores/message/in_memory.cjs +0 -1
  1385. package/stores/message/in_memory.d.cts +0 -1
  1386. package/stores/message/in_memory.d.ts +0 -1
  1387. package/stores/message/in_memory.js +0 -1
  1388. package/text_splitter.cjs +0 -1
  1389. package/text_splitter.d.cts +0 -1
  1390. package/text_splitter.d.ts +0 -1
  1391. package/text_splitter.js +0 -1
  1392. package/tools/chain.cjs +0 -1
  1393. package/tools/chain.d.cts +0 -1
  1394. package/tools/chain.d.ts +0 -1
  1395. package/tools/chain.js +0 -1
  1396. package/tools/render.cjs +0 -1
  1397. package/tools/render.d.cts +0 -1
  1398. package/tools/render.d.ts +0 -1
  1399. package/tools/render.js +0 -1
  1400. package/tools/retriever.cjs +0 -1
  1401. package/tools/retriever.d.cts +0 -1
  1402. package/tools/retriever.d.ts +0 -1
  1403. package/tools/retriever.js +0 -1
  1404. package/tools/sql.cjs +0 -1
  1405. package/tools/sql.d.cts +0 -1
  1406. package/tools/sql.d.ts +0 -1
  1407. package/tools/sql.js +0 -1
  1408. package/tools/webbrowser.cjs +0 -1
  1409. package/tools/webbrowser.d.cts +0 -1
  1410. package/tools/webbrowser.d.ts +0 -1
  1411. package/tools/webbrowser.js +0 -1
  1412. package/tools.cjs +0 -1
  1413. package/tools.d.cts +0 -1
  1414. package/tools.d.ts +0 -1
  1415. package/tools.js +0 -1
  1416. package/util/document.cjs +0 -1
  1417. package/util/document.d.cts +0 -1
  1418. package/util/document.d.ts +0 -1
  1419. package/util/document.js +0 -1
  1420. package/util/math.cjs +0 -1
  1421. package/util/math.d.cts +0 -1
  1422. package/util/math.d.ts +0 -1
  1423. package/util/math.js +0 -1
  1424. package/util/time.cjs +0 -1
  1425. package/util/time.d.cts +0 -1
  1426. package/util/time.d.ts +0 -1
  1427. package/util/time.js +0 -1
  1428. package/vectorstores/memory.cjs +0 -1
  1429. package/vectorstores/memory.d.cts +0 -1
  1430. package/vectorstores/memory.d.ts +0 -1
  1431. package/vectorstores/memory.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"sql_db_prompt.cjs","names":["PromptTemplate"],"sources":["../../../src/chains/sql_db/sql_db_prompt.ts"],"sourcesContent":["import { BasePromptTemplate, PromptTemplate } from \"@langchain/core/prompts\";\n\nexport const DEFAULT_SQL_DATABASE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `Given an input question, first create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer. Unless the user specifies in his question a specific number of examples he wishes to obtain, always limit your query to at most {top_k} results. You can order the results by a relevant column to return the most interesting examples in the database.\n\nNever query for all the columns from a specific table, only ask for a the few relevant columns given the question.\n\nPay attention to use only the column names that you can see in the schema description. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the tables listed below.\n\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_POSTGRES_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a PostgreSQL expert. Given an input question, first create a syntactically correct PostgreSQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per PostgreSQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_SQLITE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a SQLite expert. Given an input question, first create a syntactically correct SQLite query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per SQLite. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_MYSQL_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a MySQL expert. Given an input question, first create a syntactically correct MySQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per MySQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in backticks (\\`) to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_MSSQL_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are an MS SQL expert. Given an input question, first create a syntactically correct MS SQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the TOP clause as per MS SQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in square brackets ([]) to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_SAP_HANA_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a SAP HANA expert. Given an input question, first create a syntactically correct SAP HANA query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per SAP HANA. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\nAlways use a schema name when executing a query.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_ORACLE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a ORACLE expert. Given an input question, first create a syntactically correct ORACLE query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the ROWNUM clause as per ORACLE. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport type SqlDialect =\n | \"oracle\"\n | \"postgres\"\n | \"sqlite\"\n | \"mysql\"\n | \"mssql\"\n | \"sap hana\";\n\nexport const SQL_PROMPTS_MAP: Record<SqlDialect, BasePromptTemplate> = {\n oracle: SQL_ORACLE_PROMPT,\n postgres: SQL_POSTGRES_PROMPT,\n sqlite: SQL_SQLITE_PROMPT,\n mysql: SQL_MYSQL_PROMPT,\n mssql: SQL_MSSQL_PROMPT,\n \"sap hana\": SQL_SAP_HANA_PROMPT,\n};\n"],"mappings":";;;;AAEA,MAAa,8CAA4C,IAAIA,uCAAe;CAC1E,UAAU;;;;;;;;;;;;;;;;;;CAkBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,sCAAoC,IAAIA,uCAAe;CAClE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,oCAAkC,IAAIA,uCAAe;CAChE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,mCAAiC,IAAIA,uCAAe;CAC/D,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,mCAAiC,IAAIA,uCAAe;CAC/D,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,sCAAoC,IAAIA,uCAAe;CAClE,UAAU;;;;;;;;;;;;;;;;;CAiBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,oCAAkC,IAAIA,uCAAe;CAChE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAUF,MAAa,kBAA0D;CACrE,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,OAAO;CACP,OAAO;CACP,YAAY;CACb"}
1
+ {"version":3,"file":"sql_db_prompt.cjs","names":["PromptTemplate"],"sources":["../../../src/chains/sql_db/sql_db_prompt.ts"],"sourcesContent":["import { BasePromptTemplate, PromptTemplate } from \"@langchain/core/prompts\";\n\nexport const DEFAULT_SQL_DATABASE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `Given an input question, first create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer. Unless the user specifies in his question a specific number of examples he wishes to obtain, always limit your query to at most {top_k} results. You can order the results by a relevant column to return the most interesting examples in the database.\n\nNever query for all the columns from a specific table, only ask for a the few relevant columns given the question.\n\nPay attention to use only the column names that you can see in the schema description. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the tables listed below.\n\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_POSTGRES_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a PostgreSQL expert. Given an input question, first create a syntactically correct PostgreSQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per PostgreSQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_SQLITE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a SQLite expert. Given an input question, first create a syntactically correct SQLite query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per SQLite. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_MYSQL_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a MySQL expert. Given an input question, first create a syntactically correct MySQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per MySQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in backticks (\\`) to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_MSSQL_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are an MS SQL expert. Given an input question, first create a syntactically correct MS SQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the TOP clause as per MS SQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in square brackets ([]) to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_SAP_HANA_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a SAP HANA expert. Given an input question, first create a syntactically correct SAP HANA query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per SAP HANA. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\nAlways use a schema name when executing a query.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_ORACLE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a ORACLE expert. Given an input question, first create a syntactically correct ORACLE query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the ROWNUM clause as per ORACLE. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport type SqlDialect =\n | \"oracle\"\n | \"postgres\"\n | \"sqlite\"\n | \"mysql\"\n | \"mssql\"\n | \"sap hana\";\n\nexport const SQL_PROMPTS_MAP: Record<SqlDialect, BasePromptTemplate> = {\n oracle: SQL_ORACLE_PROMPT,\n postgres: SQL_POSTGRES_PROMPT,\n sqlite: SQL_SQLITE_PROMPT,\n mysql: SQL_MYSQL_PROMPT,\n mssql: SQL_MSSQL_PROMPT,\n \"sap hana\": SQL_SAP_HANA_PROMPT,\n};\n"],"mappings":";;;AAEA,MAAa,8CAA4C,IAAIA,wBAAAA,eAAe;CAC1E,UAAU;;;;;;;;;;;;;;;;;;CAkBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,sCAAoC,IAAIA,wBAAAA,eAAe;CAClE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,oCAAkC,IAAIA,wBAAAA,eAAe;CAChE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,mCAAiC,IAAIA,wBAAAA,eAAe;CAC/D,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,mCAAiC,IAAIA,wBAAAA,eAAe;CAC/D,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,sCAAoC,IAAIA,wBAAAA,eAAe;CAClE,UAAU;;;;;;;;;;;;;;;;;CAiBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,oCAAkC,IAAIA,wBAAAA,eAAe;CAChE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAUF,MAAa,kBAA0D;CACrE,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,OAAO;CACP,OAAO;CACP,YAAY;CACb"}
@@ -1,5 +1,4 @@
1
1
  import { PromptTemplate } from "@langchain/core/prompts";
2
-
3
2
  //#region src/chains/sql_db/sql_db_prompt.ts
4
3
  const DEFAULT_SQL_DATABASE_PROMPT = /* @__PURE__ */ new PromptTemplate({
5
4
  template: `Given an input question, first create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer. Unless the user specifies in his question a specific number of examples he wishes to obtain, always limit your query to at most {top_k} results. You can order the results by a relevant column to return the most interesting examples in the database.
@@ -180,7 +179,7 @@ const SQL_PROMPTS_MAP = {
180
179
  mssql: SQL_MSSQL_PROMPT,
181
180
  "sap hana": SQL_SAP_HANA_PROMPT
182
181
  };
183
-
184
182
  //#endregion
185
183
  export { DEFAULT_SQL_DATABASE_PROMPT, SQL_MSSQL_PROMPT, SQL_MYSQL_PROMPT, SQL_ORACLE_PROMPT, SQL_POSTGRES_PROMPT, SQL_PROMPTS_MAP, SQL_SAP_HANA_PROMPT, SQL_SQLITE_PROMPT };
184
+
186
185
  //# sourceMappingURL=sql_db_prompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql_db_prompt.js","names":[],"sources":["../../../src/chains/sql_db/sql_db_prompt.ts"],"sourcesContent":["import { BasePromptTemplate, PromptTemplate } from \"@langchain/core/prompts\";\n\nexport const DEFAULT_SQL_DATABASE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `Given an input question, first create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer. Unless the user specifies in his question a specific number of examples he wishes to obtain, always limit your query to at most {top_k} results. You can order the results by a relevant column to return the most interesting examples in the database.\n\nNever query for all the columns from a specific table, only ask for a the few relevant columns given the question.\n\nPay attention to use only the column names that you can see in the schema description. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the tables listed below.\n\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_POSTGRES_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a PostgreSQL expert. Given an input question, first create a syntactically correct PostgreSQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per PostgreSQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_SQLITE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a SQLite expert. Given an input question, first create a syntactically correct SQLite query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per SQLite. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_MYSQL_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a MySQL expert. Given an input question, first create a syntactically correct MySQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per MySQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in backticks (\\`) to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_MSSQL_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are an MS SQL expert. Given an input question, first create a syntactically correct MS SQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the TOP clause as per MS SQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in square brackets ([]) to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_SAP_HANA_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a SAP HANA expert. Given an input question, first create a syntactically correct SAP HANA query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per SAP HANA. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\nAlways use a schema name when executing a query.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_ORACLE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a ORACLE expert. Given an input question, first create a syntactically correct ORACLE query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the ROWNUM clause as per ORACLE. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport type SqlDialect =\n | \"oracle\"\n | \"postgres\"\n | \"sqlite\"\n | \"mysql\"\n | \"mssql\"\n | \"sap hana\";\n\nexport const SQL_PROMPTS_MAP: Record<SqlDialect, BasePromptTemplate> = {\n oracle: SQL_ORACLE_PROMPT,\n postgres: SQL_POSTGRES_PROMPT,\n sqlite: SQL_SQLITE_PROMPT,\n mysql: SQL_MYSQL_PROMPT,\n mssql: SQL_MSSQL_PROMPT,\n \"sap hana\": SQL_SAP_HANA_PROMPT,\n};\n"],"mappings":";;;AAEA,MAAa,8CAA4C,IAAI,eAAe;CAC1E,UAAU;;;;;;;;;;;;;;;;;;CAkBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,sCAAoC,IAAI,eAAe;CAClE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,oCAAkC,IAAI,eAAe;CAChE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,mCAAiC,IAAI,eAAe;CAC/D,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,mCAAiC,IAAI,eAAe;CAC/D,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,sCAAoC,IAAI,eAAe;CAClE,UAAU;;;;;;;;;;;;;;;;;CAiBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,oCAAkC,IAAI,eAAe;CAChE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAUF,MAAa,kBAA0D;CACrE,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,OAAO;CACP,OAAO;CACP,YAAY;CACb"}
1
+ {"version":3,"file":"sql_db_prompt.js","names":[],"sources":["../../../src/chains/sql_db/sql_db_prompt.ts"],"sourcesContent":["import { BasePromptTemplate, PromptTemplate } from \"@langchain/core/prompts\";\n\nexport const DEFAULT_SQL_DATABASE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `Given an input question, first create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer. Unless the user specifies in his question a specific number of examples he wishes to obtain, always limit your query to at most {top_k} results. You can order the results by a relevant column to return the most interesting examples in the database.\n\nNever query for all the columns from a specific table, only ask for a the few relevant columns given the question.\n\nPay attention to use only the column names that you can see in the schema description. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the tables listed below.\n\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_POSTGRES_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a PostgreSQL expert. Given an input question, first create a syntactically correct PostgreSQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per PostgreSQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_SQLITE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a SQLite expert. Given an input question, first create a syntactically correct SQLite query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per SQLite. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_MYSQL_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a MySQL expert. Given an input question, first create a syntactically correct MySQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per MySQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in backticks (\\`) to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_MSSQL_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are an MS SQL expert. Given an input question, first create a syntactically correct MS SQL query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the TOP clause as per MS SQL. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in square brackets ([]) to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_SAP_HANA_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a SAP HANA expert. Given an input question, first create a syntactically correct SAP HANA query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per SAP HANA. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (\") to denote them as delimited identifiers.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\nAlways use a schema name when executing a query.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport const SQL_ORACLE_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template: `You are a ORACLE expert. Given an input question, first create a syntactically correct ORACLE query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the ROWNUM clause as per ORACLE. You can order the results to return the most informative data in the database.\nNever query for all columns from a table. You must query only the columns that are needed to answer the question.\nPay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nUse the following format:\n\nQuestion: \"Question here\"\nSQLQuery: \"SQL Query to run\"\nSQLResult: \"Result of the SQLQuery\"\nAnswer: \"Final answer here\"\n\nOnly use the following tables:\n{table_info}\n\nQuestion: {input}`,\n inputVariables: [\"dialect\", \"table_info\", \"input\", \"top_k\"],\n});\n\nexport type SqlDialect =\n | \"oracle\"\n | \"postgres\"\n | \"sqlite\"\n | \"mysql\"\n | \"mssql\"\n | \"sap hana\";\n\nexport const SQL_PROMPTS_MAP: Record<SqlDialect, BasePromptTemplate> = {\n oracle: SQL_ORACLE_PROMPT,\n postgres: SQL_POSTGRES_PROMPT,\n sqlite: SQL_SQLITE_PROMPT,\n mysql: SQL_MYSQL_PROMPT,\n mssql: SQL_MSSQL_PROMPT,\n \"sap hana\": SQL_SAP_HANA_PROMPT,\n};\n"],"mappings":";;AAEA,MAAa,8CAA4C,IAAI,eAAe;CAC1E,UAAU;;;;;;;;;;;;;;;;;;CAkBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,sCAAoC,IAAI,eAAe;CAClE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,oCAAkC,IAAI,eAAe;CAChE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,mCAAiC,IAAI,eAAe;CAC/D,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,mCAAiC,IAAI,eAAe;CAC/D,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,sCAAoC,IAAI,eAAe;CAClE,UAAU;;;;;;;;;;;;;;;;;CAiBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAEF,MAAa,oCAAkC,IAAI,eAAe;CAChE,UAAU;;;;;;;;;;;;;;;;CAgBV,gBAAgB;EAAC;EAAW;EAAc;EAAS;EAAQ;CAC5D,CAAC;AAUF,MAAa,kBAA0D;CACrE,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,OAAO;CACP,OAAO;CACP,YAAY;CACb"}
@@ -1,8 +1,7 @@
1
- const require_llm_chain = require('../llm_chain.cjs');
2
- const require_combine_docs_chain = require('../combine_docs_chain.cjs');
3
- const require_stuff_prompts = require('./stuff_prompts.cjs');
4
- const require_refine_prompts = require('./refine_prompts.cjs');
5
-
1
+ const require_llm_chain = require("../llm_chain.cjs");
2
+ const require_combine_docs_chain = require("../combine_docs_chain.cjs");
3
+ const require_stuff_prompts = require("./stuff_prompts.cjs");
4
+ const require_refine_prompts = require("./refine_prompts.cjs");
6
5
  //#region src/chains/summarization/load.ts
7
6
  const loadSummarizationChain = (llm, params = { type: "map_reduce" }) => {
8
7
  const { verbose } = params;
@@ -59,7 +58,7 @@ const loadSummarizationChain = (llm, params = { type: "map_reduce" }) => {
59
58
  }
60
59
  throw new Error(`Invalid _type: ${params.type}`);
61
60
  };
62
-
63
61
  //#endregion
64
62
  exports.loadSummarizationChain = loadSummarizationChain;
63
+
65
64
  //# sourceMappingURL=load.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"load.cjs","names":["DEFAULT_PROMPT","StuffDocumentsChain","LLMChain","MapReduceDocumentsChain","REFINE_PROMPT","RefineDocumentsChain"],"sources":["../../../src/chains/summarization/load.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { BasePromptTemplate } from \"@langchain/core/prompts\";\nimport { LLMChain } from \"../llm_chain.js\";\nimport {\n StuffDocumentsChain,\n MapReduceDocumentsChain,\n RefineDocumentsChain,\n MapReduceDocumentsChainInput,\n} from \"../combine_docs_chain.js\";\nimport { DEFAULT_PROMPT } from \"./stuff_prompts.js\";\nimport { REFINE_PROMPT } from \"./refine_prompts.js\";\n\n/**\n * Type for the base parameters that can be used to configure a\n * summarization chain.\n */\ntype BaseParams = {\n verbose?: boolean;\n};\n\n/** @interface */\nexport type SummarizationChainParams = BaseParams &\n (\n | {\n type?: \"stuff\";\n prompt?: BasePromptTemplate;\n }\n | ({\n type?: \"map_reduce\";\n combineMapPrompt?: BasePromptTemplate;\n combinePrompt?: BasePromptTemplate;\n combineLLM?: BaseLanguageModelInterface;\n } & Pick<MapReduceDocumentsChainInput, \"returnIntermediateSteps\">)\n | {\n type?: \"refine\";\n refinePrompt?: BasePromptTemplate;\n refineLLM?: BaseLanguageModelInterface;\n questionPrompt?: BasePromptTemplate;\n }\n );\n\nexport const loadSummarizationChain = (\n llm: BaseLanguageModelInterface,\n params: SummarizationChainParams = { type: \"map_reduce\" }\n) => {\n const { verbose } = params;\n if (params.type === \"stuff\") {\n const { prompt = DEFAULT_PROMPT } = params;\n const llmChain = new LLMChain({ prompt, llm, verbose });\n const chain = new StuffDocumentsChain({\n llmChain,\n documentVariableName: \"text\",\n verbose,\n });\n return chain;\n }\n if (params.type === \"map_reduce\") {\n const {\n combineMapPrompt = DEFAULT_PROMPT,\n combinePrompt = DEFAULT_PROMPT,\n combineLLM,\n returnIntermediateSteps,\n } = params;\n const llmChain = new LLMChain({ prompt: combineMapPrompt, llm, verbose });\n const combineLLMChain = new LLMChain({\n prompt: combinePrompt,\n llm: combineLLM ?? llm,\n verbose,\n });\n const combineDocumentChain = new StuffDocumentsChain({\n llmChain: combineLLMChain,\n documentVariableName: \"text\",\n verbose,\n });\n const chain = new MapReduceDocumentsChain({\n llmChain,\n combineDocumentChain,\n documentVariableName: \"text\",\n returnIntermediateSteps,\n verbose,\n });\n return chain;\n }\n if (params.type === \"refine\") {\n const {\n refinePrompt = REFINE_PROMPT,\n refineLLM,\n questionPrompt = DEFAULT_PROMPT,\n } = params;\n const llmChain = new LLMChain({ prompt: questionPrompt, llm, verbose });\n const refineLLMChain = new LLMChain({\n prompt: refinePrompt,\n llm: refineLLM ?? llm,\n verbose,\n });\n const chain = new RefineDocumentsChain({\n llmChain,\n refineLLMChain,\n documentVariableName: \"text\",\n verbose,\n });\n return chain;\n }\n throw new Error(`Invalid _type: ${params.type}`);\n};\n"],"mappings":";;;;;;AAyCA,MAAa,0BACX,KACA,SAAmC,EAAE,MAAM,cAAc,KACtD;CACH,MAAM,EAAE,YAAY;AACpB,KAAI,OAAO,SAAS,SAAS;EAC3B,MAAM,EAAE,SAASA,yCAAmB;AAOpC,SALc,IAAIC,+CAAoB;GACpC,UAFe,IAAIC,2BAAS;IAAE;IAAQ;IAAK;IAAS,CAAC;GAGrD,sBAAsB;GACtB;GACD,CAAC;;AAGJ,KAAI,OAAO,SAAS,cAAc;EAChC,MAAM,EACJ,mBAAmBF,sCACnB,gBAAgBA,sCAChB,YACA,4BACE;AAmBJ,SAPc,IAAIG,mDAAwB;GACxC,UAZe,IAAID,2BAAS;IAAE,QAAQ;IAAkB;IAAK;IAAS,CAAC;GAavE,sBAP2B,IAAID,+CAAoB;IACnD,UANsB,IAAIC,2BAAS;KACnC,QAAQ;KACR,KAAK,cAAc;KACnB;KACD,CAAC;IAGA,sBAAsB;IACtB;IACD,CAAC;GAIA,sBAAsB;GACtB;GACA;GACD,CAAC;;AAGJ,KAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,EACJ,eAAeE,sCACf,WACA,iBAAiBJ,yCACf;AAaJ,SANc,IAAIK,gDAAqB;GACrC,UAPe,IAAIH,2BAAS;IAAE,QAAQ;IAAgB;IAAK;IAAS,CAAC;GAQrE,gBAPqB,IAAIA,2BAAS;IAClC,QAAQ;IACR,KAAK,aAAa;IAClB;IACD,CAAC;GAIA,sBAAsB;GACtB;GACD,CAAC;;AAGJ,OAAM,IAAI,MAAM,kBAAkB,OAAO,OAAO"}
1
+ {"version":3,"file":"load.cjs","names":["DEFAULT_PROMPT","StuffDocumentsChain","LLMChain","MapReduceDocumentsChain","REFINE_PROMPT","RefineDocumentsChain"],"sources":["../../../src/chains/summarization/load.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { BasePromptTemplate } from \"@langchain/core/prompts\";\nimport { LLMChain } from \"../llm_chain.js\";\nimport {\n StuffDocumentsChain,\n MapReduceDocumentsChain,\n RefineDocumentsChain,\n MapReduceDocumentsChainInput,\n} from \"../combine_docs_chain.js\";\nimport { DEFAULT_PROMPT } from \"./stuff_prompts.js\";\nimport { REFINE_PROMPT } from \"./refine_prompts.js\";\n\n/**\n * Type for the base parameters that can be used to configure a\n * summarization chain.\n */\ntype BaseParams = {\n verbose?: boolean;\n};\n\n/** @interface */\nexport type SummarizationChainParams = BaseParams &\n (\n | {\n type?: \"stuff\";\n prompt?: BasePromptTemplate;\n }\n | ({\n type?: \"map_reduce\";\n combineMapPrompt?: BasePromptTemplate;\n combinePrompt?: BasePromptTemplate;\n combineLLM?: BaseLanguageModelInterface;\n } & Pick<MapReduceDocumentsChainInput, \"returnIntermediateSteps\">)\n | {\n type?: \"refine\";\n refinePrompt?: BasePromptTemplate;\n refineLLM?: BaseLanguageModelInterface;\n questionPrompt?: BasePromptTemplate;\n }\n );\n\nexport const loadSummarizationChain = (\n llm: BaseLanguageModelInterface,\n params: SummarizationChainParams = { type: \"map_reduce\" }\n) => {\n const { verbose } = params;\n if (params.type === \"stuff\") {\n const { prompt = DEFAULT_PROMPT } = params;\n const llmChain = new LLMChain({ prompt, llm, verbose });\n const chain = new StuffDocumentsChain({\n llmChain,\n documentVariableName: \"text\",\n verbose,\n });\n return chain;\n }\n if (params.type === \"map_reduce\") {\n const {\n combineMapPrompt = DEFAULT_PROMPT,\n combinePrompt = DEFAULT_PROMPT,\n combineLLM,\n returnIntermediateSteps,\n } = params;\n const llmChain = new LLMChain({ prompt: combineMapPrompt, llm, verbose });\n const combineLLMChain = new LLMChain({\n prompt: combinePrompt,\n llm: combineLLM ?? llm,\n verbose,\n });\n const combineDocumentChain = new StuffDocumentsChain({\n llmChain: combineLLMChain,\n documentVariableName: \"text\",\n verbose,\n });\n const chain = new MapReduceDocumentsChain({\n llmChain,\n combineDocumentChain,\n documentVariableName: \"text\",\n returnIntermediateSteps,\n verbose,\n });\n return chain;\n }\n if (params.type === \"refine\") {\n const {\n refinePrompt = REFINE_PROMPT,\n refineLLM,\n questionPrompt = DEFAULT_PROMPT,\n } = params;\n const llmChain = new LLMChain({ prompt: questionPrompt, llm, verbose });\n const refineLLMChain = new LLMChain({\n prompt: refinePrompt,\n llm: refineLLM ?? llm,\n verbose,\n });\n const chain = new RefineDocumentsChain({\n llmChain,\n refineLLMChain,\n documentVariableName: \"text\",\n verbose,\n });\n return chain;\n }\n throw new Error(`Invalid _type: ${params.type}`);\n};\n"],"mappings":";;;;;AAyCA,MAAa,0BACX,KACA,SAAmC,EAAE,MAAM,cAAc,KACtD;CACH,MAAM,EAAE,YAAY;AACpB,KAAI,OAAO,SAAS,SAAS;EAC3B,MAAM,EAAE,SAASA,sBAAAA,mBAAmB;AAOpC,SALc,IAAIC,2BAAAA,oBAAoB;GACpC,UAFe,IAAIC,kBAAAA,SAAS;IAAE;IAAQ;IAAK;IAAS,CAAC;GAGrD,sBAAsB;GACtB;GACD,CAAC;;AAGJ,KAAI,OAAO,SAAS,cAAc;EAChC,MAAM,EACJ,mBAAmBF,sBAAAA,gBACnB,gBAAgBA,sBAAAA,gBAChB,YACA,4BACE;AAmBJ,SAPc,IAAIG,2BAAAA,wBAAwB;GACxC,UAZe,IAAID,kBAAAA,SAAS;IAAE,QAAQ;IAAkB;IAAK;IAAS,CAAC;GAavE,sBAP2B,IAAID,2BAAAA,oBAAoB;IACnD,UANsB,IAAIC,kBAAAA,SAAS;KACnC,QAAQ;KACR,KAAK,cAAc;KACnB;KACD,CAAC;IAGA,sBAAsB;IACtB;IACD,CAAC;GAIA,sBAAsB;GACtB;GACA;GACD,CAAC;;AAGJ,KAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,EACJ,eAAeE,uBAAAA,eACf,WACA,iBAAiBJ,sBAAAA,mBACf;AAaJ,SANc,IAAIK,2BAAAA,qBAAqB;GACrC,UAPe,IAAIH,kBAAAA,SAAS;IAAE,QAAQ;IAAgB;IAAK;IAAS,CAAC;GAQrE,gBAPqB,IAAIA,kBAAAA,SAAS;IAClC,QAAQ;IACR,KAAK,aAAa;IAClB;IACD,CAAC;GAIA,sBAAsB;GACtB;GACD,CAAC;;AAGJ,OAAM,IAAI,MAAM,kBAAkB,OAAO,OAAO"}
@@ -2,7 +2,6 @@ import { LLMChain } from "../llm_chain.js";
2
2
  import { MapReduceDocumentsChain, RefineDocumentsChain, StuffDocumentsChain } from "../combine_docs_chain.js";
3
3
  import { DEFAULT_PROMPT } from "./stuff_prompts.js";
4
4
  import { REFINE_PROMPT } from "./refine_prompts.js";
5
-
6
5
  //#region src/chains/summarization/load.ts
7
6
  const loadSummarizationChain = (llm, params = { type: "map_reduce" }) => {
8
7
  const { verbose } = params;
@@ -59,7 +58,7 @@ const loadSummarizationChain = (llm, params = { type: "map_reduce" }) => {
59
58
  }
60
59
  throw new Error(`Invalid _type: ${params.type}`);
61
60
  };
62
-
63
61
  //#endregion
64
62
  export { loadSummarizationChain };
63
+
65
64
  //# sourceMappingURL=load.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"load.js","names":[],"sources":["../../../src/chains/summarization/load.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { BasePromptTemplate } from \"@langchain/core/prompts\";\nimport { LLMChain } from \"../llm_chain.js\";\nimport {\n StuffDocumentsChain,\n MapReduceDocumentsChain,\n RefineDocumentsChain,\n MapReduceDocumentsChainInput,\n} from \"../combine_docs_chain.js\";\nimport { DEFAULT_PROMPT } from \"./stuff_prompts.js\";\nimport { REFINE_PROMPT } from \"./refine_prompts.js\";\n\n/**\n * Type for the base parameters that can be used to configure a\n * summarization chain.\n */\ntype BaseParams = {\n verbose?: boolean;\n};\n\n/** @interface */\nexport type SummarizationChainParams = BaseParams &\n (\n | {\n type?: \"stuff\";\n prompt?: BasePromptTemplate;\n }\n | ({\n type?: \"map_reduce\";\n combineMapPrompt?: BasePromptTemplate;\n combinePrompt?: BasePromptTemplate;\n combineLLM?: BaseLanguageModelInterface;\n } & Pick<MapReduceDocumentsChainInput, \"returnIntermediateSteps\">)\n | {\n type?: \"refine\";\n refinePrompt?: BasePromptTemplate;\n refineLLM?: BaseLanguageModelInterface;\n questionPrompt?: BasePromptTemplate;\n }\n );\n\nexport const loadSummarizationChain = (\n llm: BaseLanguageModelInterface,\n params: SummarizationChainParams = { type: \"map_reduce\" }\n) => {\n const { verbose } = params;\n if (params.type === \"stuff\") {\n const { prompt = DEFAULT_PROMPT } = params;\n const llmChain = new LLMChain({ prompt, llm, verbose });\n const chain = new StuffDocumentsChain({\n llmChain,\n documentVariableName: \"text\",\n verbose,\n });\n return chain;\n }\n if (params.type === \"map_reduce\") {\n const {\n combineMapPrompt = DEFAULT_PROMPT,\n combinePrompt = DEFAULT_PROMPT,\n combineLLM,\n returnIntermediateSteps,\n } = params;\n const llmChain = new LLMChain({ prompt: combineMapPrompt, llm, verbose });\n const combineLLMChain = new LLMChain({\n prompt: combinePrompt,\n llm: combineLLM ?? llm,\n verbose,\n });\n const combineDocumentChain = new StuffDocumentsChain({\n llmChain: combineLLMChain,\n documentVariableName: \"text\",\n verbose,\n });\n const chain = new MapReduceDocumentsChain({\n llmChain,\n combineDocumentChain,\n documentVariableName: \"text\",\n returnIntermediateSteps,\n verbose,\n });\n return chain;\n }\n if (params.type === \"refine\") {\n const {\n refinePrompt = REFINE_PROMPT,\n refineLLM,\n questionPrompt = DEFAULT_PROMPT,\n } = params;\n const llmChain = new LLMChain({ prompt: questionPrompt, llm, verbose });\n const refineLLMChain = new LLMChain({\n prompt: refinePrompt,\n llm: refineLLM ?? llm,\n verbose,\n });\n const chain = new RefineDocumentsChain({\n llmChain,\n refineLLMChain,\n documentVariableName: \"text\",\n verbose,\n });\n return chain;\n }\n throw new Error(`Invalid _type: ${params.type}`);\n};\n"],"mappings":";;;;;;AAyCA,MAAa,0BACX,KACA,SAAmC,EAAE,MAAM,cAAc,KACtD;CACH,MAAM,EAAE,YAAY;AACpB,KAAI,OAAO,SAAS,SAAS;EAC3B,MAAM,EAAE,SAAS,mBAAmB;AAOpC,SALc,IAAI,oBAAoB;GACpC,UAFe,IAAI,SAAS;IAAE;IAAQ;IAAK;IAAS,CAAC;GAGrD,sBAAsB;GACtB;GACD,CAAC;;AAGJ,KAAI,OAAO,SAAS,cAAc;EAChC,MAAM,EACJ,mBAAmB,gBACnB,gBAAgB,gBAChB,YACA,4BACE;AAmBJ,SAPc,IAAI,wBAAwB;GACxC,UAZe,IAAI,SAAS;IAAE,QAAQ;IAAkB;IAAK;IAAS,CAAC;GAavE,sBAP2B,IAAI,oBAAoB;IACnD,UANsB,IAAI,SAAS;KACnC,QAAQ;KACR,KAAK,cAAc;KACnB;KACD,CAAC;IAGA,sBAAsB;IACtB;IACD,CAAC;GAIA,sBAAsB;GACtB;GACA;GACD,CAAC;;AAGJ,KAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,EACJ,eAAe,eACf,WACA,iBAAiB,mBACf;AAaJ,SANc,IAAI,qBAAqB;GACrC,UAPe,IAAI,SAAS;IAAE,QAAQ;IAAgB;IAAK;IAAS,CAAC;GAQrE,gBAPqB,IAAI,SAAS;IAClC,QAAQ;IACR,KAAK,aAAa;IAClB;IACD,CAAC;GAIA,sBAAsB;GACtB;GACD,CAAC;;AAGJ,OAAM,IAAI,MAAM,kBAAkB,OAAO,OAAO"}
1
+ {"version":3,"file":"load.js","names":[],"sources":["../../../src/chains/summarization/load.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { BasePromptTemplate } from \"@langchain/core/prompts\";\nimport { LLMChain } from \"../llm_chain.js\";\nimport {\n StuffDocumentsChain,\n MapReduceDocumentsChain,\n RefineDocumentsChain,\n MapReduceDocumentsChainInput,\n} from \"../combine_docs_chain.js\";\nimport { DEFAULT_PROMPT } from \"./stuff_prompts.js\";\nimport { REFINE_PROMPT } from \"./refine_prompts.js\";\n\n/**\n * Type for the base parameters that can be used to configure a\n * summarization chain.\n */\ntype BaseParams = {\n verbose?: boolean;\n};\n\n/** @interface */\nexport type SummarizationChainParams = BaseParams &\n (\n | {\n type?: \"stuff\";\n prompt?: BasePromptTemplate;\n }\n | ({\n type?: \"map_reduce\";\n combineMapPrompt?: BasePromptTemplate;\n combinePrompt?: BasePromptTemplate;\n combineLLM?: BaseLanguageModelInterface;\n } & Pick<MapReduceDocumentsChainInput, \"returnIntermediateSteps\">)\n | {\n type?: \"refine\";\n refinePrompt?: BasePromptTemplate;\n refineLLM?: BaseLanguageModelInterface;\n questionPrompt?: BasePromptTemplate;\n }\n );\n\nexport const loadSummarizationChain = (\n llm: BaseLanguageModelInterface,\n params: SummarizationChainParams = { type: \"map_reduce\" }\n) => {\n const { verbose } = params;\n if (params.type === \"stuff\") {\n const { prompt = DEFAULT_PROMPT } = params;\n const llmChain = new LLMChain({ prompt, llm, verbose });\n const chain = new StuffDocumentsChain({\n llmChain,\n documentVariableName: \"text\",\n verbose,\n });\n return chain;\n }\n if (params.type === \"map_reduce\") {\n const {\n combineMapPrompt = DEFAULT_PROMPT,\n combinePrompt = DEFAULT_PROMPT,\n combineLLM,\n returnIntermediateSteps,\n } = params;\n const llmChain = new LLMChain({ prompt: combineMapPrompt, llm, verbose });\n const combineLLMChain = new LLMChain({\n prompt: combinePrompt,\n llm: combineLLM ?? llm,\n verbose,\n });\n const combineDocumentChain = new StuffDocumentsChain({\n llmChain: combineLLMChain,\n documentVariableName: \"text\",\n verbose,\n });\n const chain = new MapReduceDocumentsChain({\n llmChain,\n combineDocumentChain,\n documentVariableName: \"text\",\n returnIntermediateSteps,\n verbose,\n });\n return chain;\n }\n if (params.type === \"refine\") {\n const {\n refinePrompt = REFINE_PROMPT,\n refineLLM,\n questionPrompt = DEFAULT_PROMPT,\n } = params;\n const llmChain = new LLMChain({ prompt: questionPrompt, llm, verbose });\n const refineLLMChain = new LLMChain({\n prompt: refinePrompt,\n llm: refineLLM ?? llm,\n verbose,\n });\n const chain = new RefineDocumentsChain({\n llmChain,\n refineLLMChain,\n documentVariableName: \"text\",\n verbose,\n });\n return chain;\n }\n throw new Error(`Invalid _type: ${params.type}`);\n};\n"],"mappings":";;;;;AAyCA,MAAa,0BACX,KACA,SAAmC,EAAE,MAAM,cAAc,KACtD;CACH,MAAM,EAAE,YAAY;AACpB,KAAI,OAAO,SAAS,SAAS;EAC3B,MAAM,EAAE,SAAS,mBAAmB;AAOpC,SALc,IAAI,oBAAoB;GACpC,UAFe,IAAI,SAAS;IAAE;IAAQ;IAAK;IAAS,CAAC;GAGrD,sBAAsB;GACtB;GACD,CAAC;;AAGJ,KAAI,OAAO,SAAS,cAAc;EAChC,MAAM,EACJ,mBAAmB,gBACnB,gBAAgB,gBAChB,YACA,4BACE;AAmBJ,SAPc,IAAI,wBAAwB;GACxC,UAZe,IAAI,SAAS;IAAE,QAAQ;IAAkB;IAAK;IAAS,CAAC;GAavE,sBAP2B,IAAI,oBAAoB;IACnD,UANsB,IAAI,SAAS;KACnC,QAAQ;KACR,KAAK,cAAc;KACnB;KACD,CAAC;IAGA,sBAAsB;IACtB;IACD,CAAC;GAIA,sBAAsB;GACtB;GACA;GACD,CAAC;;AAGJ,KAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,EACJ,eAAe,eACf,WACA,iBAAiB,mBACf;AAaJ,SANc,IAAI,qBAAqB;GACrC,UAPe,IAAI,SAAS;IAAE,QAAQ;IAAgB;IAAK;IAAS,CAAC;GAQrE,gBAPqB,IAAI,SAAS;IAClC,QAAQ;IACR,KAAK,aAAa;IAClB;IACD,CAAC;GAIA,sBAAsB;GACtB;GACD,CAAC;;AAGJ,OAAM,IAAI,MAAM,kBAAkB,OAAO,OAAO"}
@@ -1,8 +1,6 @@
1
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
- let _langchain_core_prompts = require("@langchain/core/prompts");
3
-
4
- //#region src/chains/summarization/refine_prompts.ts
5
- const refinePromptTemplate = `Your job is to produce a final summary
1
+ require("../../_virtual/_rolldown/runtime.cjs");
2
+ const REFINE_PROMPT = /* @__PURE__ */ new (require("@langchain/core/prompts")).PromptTemplate({
3
+ template: `Your job is to produce a final summary
6
4
  We have provided an existing summary up to a certain point: "{existing_answer}"
7
5
  We have the opportunity to refine the existing summary
8
6
  (only if needed) with some more context below.
@@ -13,12 +11,10 @@ We have the opportunity to refine the existing summary
13
11
  Given the new context, refine the original summary
14
12
  If the context isn't useful, return the original summary.
15
13
 
16
- REFINED SUMMARY:`;
17
- const REFINE_PROMPT = /* @__PURE__ */ new _langchain_core_prompts.PromptTemplate({
18
- template: refinePromptTemplate,
14
+ REFINED SUMMARY:`,
19
15
  inputVariables: ["existing_answer", "text"]
20
16
  });
21
-
22
17
  //#endregion
23
18
  exports.REFINE_PROMPT = REFINE_PROMPT;
19
+
24
20
  //# sourceMappingURL=refine_prompts.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"refine_prompts.cjs","names":["PromptTemplate"],"sources":["../../../src/chains/summarization/refine_prompts.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst refinePromptTemplate = `Your job is to produce a final summary\nWe have provided an existing summary up to a certain point: \"{existing_answer}\"\nWe have the opportunity to refine the existing summary\n(only if needed) with some more context below.\n------------\n\"{text}\"\n------------\n\nGiven the new context, refine the original summary\nIf the context isn't useful, return the original summary.\n\nREFINED SUMMARY:`;\n\nexport const REFINE_PROMPT = /* #__PURE__ */ new PromptTemplate({\n template: refinePromptTemplate,\n inputVariables: [\"existing_answer\", \"text\"],\n});\n"],"mappings":";;;;AAEA,MAAM,uBAAuB;;;;;;;;;;;;AAa7B,MAAa,gCAAgC,IAAIA,uCAAe;CAC9D,UAAU;CACV,gBAAgB,CAAC,mBAAmB,OAAO;CAC5C,CAAC"}
1
+ {"version":3,"file":"refine_prompts.cjs","names":["PromptTemplate"],"sources":["../../../src/chains/summarization/refine_prompts.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst refinePromptTemplate = `Your job is to produce a final summary\nWe have provided an existing summary up to a certain point: \"{existing_answer}\"\nWe have the opportunity to refine the existing summary\n(only if needed) with some more context below.\n------------\n\"{text}\"\n------------\n\nGiven the new context, refine the original summary\nIf the context isn't useful, return the original summary.\n\nREFINED SUMMARY:`;\n\nexport const REFINE_PROMPT = /* #__PURE__ */ new PromptTemplate({\n template: refinePromptTemplate,\n inputVariables: [\"existing_answer\", \"text\"],\n});\n"],"mappings":";AAeA,MAAa,gCAAgC,yCAAIA,eAAe;CAC9D,UAd2B;;;;;;;;;;;;CAe3B,gBAAgB,CAAC,mBAAmB,OAAO;CAC5C,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { PromptTemplate } from "@langchain/core/prompts";
2
-
3
- //#region src/chains/summarization/refine_prompts.ts
4
- const refinePromptTemplate = `Your job is to produce a final summary
2
+ const REFINE_PROMPT = /* @__PURE__ */ new PromptTemplate({
3
+ template: `Your job is to produce a final summary
5
4
  We have provided an existing summary up to a certain point: "{existing_answer}"
6
5
  We have the opportunity to refine the existing summary
7
6
  (only if needed) with some more context below.
@@ -12,12 +11,10 @@ We have the opportunity to refine the existing summary
12
11
  Given the new context, refine the original summary
13
12
  If the context isn't useful, return the original summary.
14
13
 
15
- REFINED SUMMARY:`;
16
- const REFINE_PROMPT = /* @__PURE__ */ new PromptTemplate({
17
- template: refinePromptTemplate,
14
+ REFINED SUMMARY:`,
18
15
  inputVariables: ["existing_answer", "text"]
19
16
  });
20
-
21
17
  //#endregion
22
18
  export { REFINE_PROMPT };
19
+
23
20
  //# sourceMappingURL=refine_prompts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"refine_prompts.js","names":[],"sources":["../../../src/chains/summarization/refine_prompts.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst refinePromptTemplate = `Your job is to produce a final summary\nWe have provided an existing summary up to a certain point: \"{existing_answer}\"\nWe have the opportunity to refine the existing summary\n(only if needed) with some more context below.\n------------\n\"{text}\"\n------------\n\nGiven the new context, refine the original summary\nIf the context isn't useful, return the original summary.\n\nREFINED SUMMARY:`;\n\nexport const REFINE_PROMPT = /* #__PURE__ */ new PromptTemplate({\n template: refinePromptTemplate,\n inputVariables: [\"existing_answer\", \"text\"],\n});\n"],"mappings":";;;AAEA,MAAM,uBAAuB;;;;;;;;;;;;AAa7B,MAAa,gCAAgC,IAAI,eAAe;CAC9D,UAAU;CACV,gBAAgB,CAAC,mBAAmB,OAAO;CAC5C,CAAC"}
1
+ {"version":3,"file":"refine_prompts.js","names":[],"sources":["../../../src/chains/summarization/refine_prompts.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst refinePromptTemplate = `Your job is to produce a final summary\nWe have provided an existing summary up to a certain point: \"{existing_answer}\"\nWe have the opportunity to refine the existing summary\n(only if needed) with some more context below.\n------------\n\"{text}\"\n------------\n\nGiven the new context, refine the original summary\nIf the context isn't useful, return the original summary.\n\nREFINED SUMMARY:`;\n\nexport const REFINE_PROMPT = /* #__PURE__ */ new PromptTemplate({\n template: refinePromptTemplate,\n inputVariables: [\"existing_answer\", \"text\"],\n});\n"],"mappings":";AAeA,MAAa,gCAAgC,IAAI,eAAe;CAC9D,UAd2B;;;;;;;;;;;;CAe3B,gBAAgB,CAAC,mBAAmB,OAAO;CAC5C,CAAC"}
@@ -1,19 +1,15 @@
1
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
- let _langchain_core_prompts = require("@langchain/core/prompts");
3
-
4
- //#region src/chains/summarization/stuff_prompts.ts
5
- const template = `Write a concise summary of the following:
1
+ require("../../_virtual/_rolldown/runtime.cjs");
2
+ const DEFAULT_PROMPT = /* @__PURE__ */ new (require("@langchain/core/prompts")).PromptTemplate({
3
+ template: `Write a concise summary of the following:
6
4
 
7
5
 
8
6
  "{text}"
9
7
 
10
8
 
11
- CONCISE SUMMARY:`;
12
- const DEFAULT_PROMPT = /* @__PURE__ */ new _langchain_core_prompts.PromptTemplate({
13
- template,
9
+ CONCISE SUMMARY:`,
14
10
  inputVariables: ["text"]
15
11
  });
16
-
17
12
  //#endregion
18
13
  exports.DEFAULT_PROMPT = DEFAULT_PROMPT;
14
+
19
15
  //# sourceMappingURL=stuff_prompts.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"stuff_prompts.cjs","names":["PromptTemplate"],"sources":["../../../src/chains/summarization/stuff_prompts.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst template = `Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:`;\n\nexport const DEFAULT_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template,\n inputVariables: [\"text\"],\n});\n"],"mappings":";;;;AAEA,MAAM,WAAW;;;;;;;AAQjB,MAAa,iCAA+B,IAAIA,uCAAe;CAC7D;CACA,gBAAgB,CAAC,OAAO;CACzB,CAAC"}
1
+ {"version":3,"file":"stuff_prompts.cjs","names":["PromptTemplate"],"sources":["../../../src/chains/summarization/stuff_prompts.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst template = `Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:`;\n\nexport const DEFAULT_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template,\n inputVariables: [\"text\"],\n});\n"],"mappings":";AAUA,MAAa,iCAA+B,yCAAIA,eAAe;CAC7D,UATe;;;;;;;CAUf,gBAAgB,CAAC,OAAO;CACzB,CAAC"}
@@ -1,18 +1,15 @@
1
1
  import { PromptTemplate } from "@langchain/core/prompts";
2
-
3
- //#region src/chains/summarization/stuff_prompts.ts
4
- const template = `Write a concise summary of the following:
2
+ const DEFAULT_PROMPT = /* @__PURE__ */ new PromptTemplate({
3
+ template: `Write a concise summary of the following:
5
4
 
6
5
 
7
6
  "{text}"
8
7
 
9
8
 
10
- CONCISE SUMMARY:`;
11
- const DEFAULT_PROMPT = /* @__PURE__ */ new PromptTemplate({
12
- template,
9
+ CONCISE SUMMARY:`,
13
10
  inputVariables: ["text"]
14
11
  });
15
-
16
12
  //#endregion
17
13
  export { DEFAULT_PROMPT };
14
+
18
15
  //# sourceMappingURL=stuff_prompts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stuff_prompts.js","names":[],"sources":["../../../src/chains/summarization/stuff_prompts.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst template = `Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:`;\n\nexport const DEFAULT_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template,\n inputVariables: [\"text\"],\n});\n"],"mappings":";;;AAEA,MAAM,WAAW;;;;;;;AAQjB,MAAa,iCAA+B,IAAI,eAAe;CAC7D;CACA,gBAAgB,CAAC,OAAO;CACzB,CAAC"}
1
+ {"version":3,"file":"stuff_prompts.js","names":[],"sources":["../../../src/chains/summarization/stuff_prompts.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\n\nconst template = `Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:`;\n\nexport const DEFAULT_PROMPT = /*#__PURE__*/ new PromptTemplate({\n template,\n inputVariables: [\"text\"],\n});\n"],"mappings":";AAUA,MAAa,iCAA+B,IAAI,eAAe;CAC7D,UATe;;;;;;;CAUf,gBAAgB,CAAC,OAAO;CACzB,CAAC"}
@@ -1,5 +1,4 @@
1
- const require_base = require('./base.cjs');
2
-
1
+ const require_base = require("./base.cjs");
3
2
  //#region src/chains/transform.ts
4
3
  /**
5
4
  * Class that represents a transform chain. It extends the `BaseChain`
@@ -33,7 +32,7 @@ var TransformChain = class extends require_base.BaseChain {
33
32
  return this.transformFunc(values, runManager?.getChild("transform"));
34
33
  }
35
34
  };
36
-
37
35
  //#endregion
38
36
  exports.TransformChain = TransformChain;
37
+
39
38
  //# sourceMappingURL=transform.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform.cjs","names":["BaseChain"],"sources":["../../src/chains/transform.ts"],"sourcesContent":["import {\n CallbackManagerForChainRun,\n Callbacks,\n} from \"@langchain/core/callbacks/manager\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { ChainInputs, BaseChain } from \"./base.js\";\n\n/**\n * Interface that extends the `ChainInputs` interface and defines the\n * fields required for a transform chain. It includes the `transform`\n * function, `inputVariables`, and `outputVariables` properties.\n */\nexport interface TransformChainFields<\n I extends ChainValues,\n O extends ChainValues,\n> extends ChainInputs {\n transform: (values: I, callbacks?: Callbacks) => O | Promise<O>;\n inputVariables: (keyof I extends string ? keyof I : never)[];\n outputVariables: (keyof O extends string ? keyof O : never)[];\n}\n\n/**\n * Class that represents a transform chain. It extends the `BaseChain`\n * class and implements the `TransformChainFields` interface. It provides\n * a way to transform input values to output values using a specified\n * transform function.\n */\nexport class TransformChain<\n I extends ChainValues,\n O extends ChainValues,\n> extends BaseChain {\n static lc_name() {\n return \"TransformChain\";\n }\n\n transformFunc: (values: I, callbacks?: Callbacks) => O | Promise<O>;\n\n inputVariables: (keyof I extends string ? keyof I : never)[];\n\n outputVariables: (keyof O extends string ? keyof O : never)[];\n\n _chainType() {\n return \"transform\" as const;\n }\n\n get inputKeys() {\n return this.inputVariables;\n }\n\n get outputKeys() {\n return this.outputVariables;\n }\n\n constructor(fields: TransformChainFields<I, O>) {\n super(fields);\n this.transformFunc = fields.transform;\n this.inputVariables = fields.inputVariables;\n this.outputVariables = fields.outputVariables;\n }\n\n async _call(values: I, runManager?: CallbackManagerForChainRun): Promise<O> {\n return this.transformFunc(values, runManager?.getChild(\"transform\"));\n }\n}\n"],"mappings":";;;;;;;;;AA2BA,IAAa,iBAAb,cAGUA,uBAAU;CAClB,OAAO,UAAU;AACf,SAAO;;CAGT;CAEA;CAEA;CAEA,aAAa;AACX,SAAO;;CAGT,IAAI,YAAY;AACd,SAAO,KAAK;;CAGd,IAAI,aAAa;AACf,SAAO,KAAK;;CAGd,YAAY,QAAoC;AAC9C,QAAM,OAAO;AACb,OAAK,gBAAgB,OAAO;AAC5B,OAAK,iBAAiB,OAAO;AAC7B,OAAK,kBAAkB,OAAO;;CAGhC,MAAM,MAAM,QAAW,YAAqD;AAC1E,SAAO,KAAK,cAAc,QAAQ,YAAY,SAAS,YAAY,CAAC"}
1
+ {"version":3,"file":"transform.cjs","names":["BaseChain"],"sources":["../../src/chains/transform.ts"],"sourcesContent":["import {\n CallbackManagerForChainRun,\n Callbacks,\n} from \"@langchain/core/callbacks/manager\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { ChainInputs, BaseChain } from \"./base.js\";\n\n/**\n * Interface that extends the `ChainInputs` interface and defines the\n * fields required for a transform chain. It includes the `transform`\n * function, `inputVariables`, and `outputVariables` properties.\n */\nexport interface TransformChainFields<\n I extends ChainValues,\n O extends ChainValues,\n> extends ChainInputs {\n transform: (values: I, callbacks?: Callbacks) => O | Promise<O>;\n inputVariables: (keyof I extends string ? keyof I : never)[];\n outputVariables: (keyof O extends string ? keyof O : never)[];\n}\n\n/**\n * Class that represents a transform chain. It extends the `BaseChain`\n * class and implements the `TransformChainFields` interface. It provides\n * a way to transform input values to output values using a specified\n * transform function.\n */\nexport class TransformChain<\n I extends ChainValues,\n O extends ChainValues,\n> extends BaseChain {\n static lc_name() {\n return \"TransformChain\";\n }\n\n transformFunc: (values: I, callbacks?: Callbacks) => O | Promise<O>;\n\n inputVariables: (keyof I extends string ? keyof I : never)[];\n\n outputVariables: (keyof O extends string ? keyof O : never)[];\n\n _chainType() {\n return \"transform\" as const;\n }\n\n get inputKeys() {\n return this.inputVariables;\n }\n\n get outputKeys() {\n return this.outputVariables;\n }\n\n constructor(fields: TransformChainFields<I, O>) {\n super(fields);\n this.transformFunc = fields.transform;\n this.inputVariables = fields.inputVariables;\n this.outputVariables = fields.outputVariables;\n }\n\n async _call(values: I, runManager?: CallbackManagerForChainRun): Promise<O> {\n return this.transformFunc(values, runManager?.getChild(\"transform\"));\n }\n}\n"],"mappings":";;;;;;;;AA2BA,IAAa,iBAAb,cAGUA,aAAAA,UAAU;CAClB,OAAO,UAAU;AACf,SAAO;;CAGT;CAEA;CAEA;CAEA,aAAa;AACX,SAAO;;CAGT,IAAI,YAAY;AACd,SAAO,KAAK;;CAGd,IAAI,aAAa;AACf,SAAO,KAAK;;CAGd,YAAY,QAAoC;AAC9C,QAAM,OAAO;AACb,OAAK,gBAAgB,OAAO;AAC5B,OAAK,iBAAiB,OAAO;AAC7B,OAAK,kBAAkB,OAAO;;CAGhC,MAAM,MAAM,QAAW,YAAqD;AAC1E,SAAO,KAAK,cAAc,QAAQ,YAAY,SAAS,YAAY,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { BaseChain } from "./base.js";
2
-
3
2
  //#region src/chains/transform.ts
4
3
  /**
5
4
  * Class that represents a transform chain. It extends the `BaseChain`
@@ -33,7 +32,7 @@ var TransformChain = class extends BaseChain {
33
32
  return this.transformFunc(values, runManager?.getChild("transform"));
34
33
  }
35
34
  };
36
-
37
35
  //#endregion
38
36
  export { TransformChain };
37
+
39
38
  //# sourceMappingURL=transform.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform.js","names":[],"sources":["../../src/chains/transform.ts"],"sourcesContent":["import {\n CallbackManagerForChainRun,\n Callbacks,\n} from \"@langchain/core/callbacks/manager\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { ChainInputs, BaseChain } from \"./base.js\";\n\n/**\n * Interface that extends the `ChainInputs` interface and defines the\n * fields required for a transform chain. It includes the `transform`\n * function, `inputVariables`, and `outputVariables` properties.\n */\nexport interface TransformChainFields<\n I extends ChainValues,\n O extends ChainValues,\n> extends ChainInputs {\n transform: (values: I, callbacks?: Callbacks) => O | Promise<O>;\n inputVariables: (keyof I extends string ? keyof I : never)[];\n outputVariables: (keyof O extends string ? keyof O : never)[];\n}\n\n/**\n * Class that represents a transform chain. It extends the `BaseChain`\n * class and implements the `TransformChainFields` interface. It provides\n * a way to transform input values to output values using a specified\n * transform function.\n */\nexport class TransformChain<\n I extends ChainValues,\n O extends ChainValues,\n> extends BaseChain {\n static lc_name() {\n return \"TransformChain\";\n }\n\n transformFunc: (values: I, callbacks?: Callbacks) => O | Promise<O>;\n\n inputVariables: (keyof I extends string ? keyof I : never)[];\n\n outputVariables: (keyof O extends string ? keyof O : never)[];\n\n _chainType() {\n return \"transform\" as const;\n }\n\n get inputKeys() {\n return this.inputVariables;\n }\n\n get outputKeys() {\n return this.outputVariables;\n }\n\n constructor(fields: TransformChainFields<I, O>) {\n super(fields);\n this.transformFunc = fields.transform;\n this.inputVariables = fields.inputVariables;\n this.outputVariables = fields.outputVariables;\n }\n\n async _call(values: I, runManager?: CallbackManagerForChainRun): Promise<O> {\n return this.transformFunc(values, runManager?.getChild(\"transform\"));\n }\n}\n"],"mappings":";;;;;;;;;AA2BA,IAAa,iBAAb,cAGU,UAAU;CAClB,OAAO,UAAU;AACf,SAAO;;CAGT;CAEA;CAEA;CAEA,aAAa;AACX,SAAO;;CAGT,IAAI,YAAY;AACd,SAAO,KAAK;;CAGd,IAAI,aAAa;AACf,SAAO,KAAK;;CAGd,YAAY,QAAoC;AAC9C,QAAM,OAAO;AACb,OAAK,gBAAgB,OAAO;AAC5B,OAAK,iBAAiB,OAAO;AAC7B,OAAK,kBAAkB,OAAO;;CAGhC,MAAM,MAAM,QAAW,YAAqD;AAC1E,SAAO,KAAK,cAAc,QAAQ,YAAY,SAAS,YAAY,CAAC"}
1
+ {"version":3,"file":"transform.js","names":[],"sources":["../../src/chains/transform.ts"],"sourcesContent":["import {\n CallbackManagerForChainRun,\n Callbacks,\n} from \"@langchain/core/callbacks/manager\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { ChainInputs, BaseChain } from \"./base.js\";\n\n/**\n * Interface that extends the `ChainInputs` interface and defines the\n * fields required for a transform chain. It includes the `transform`\n * function, `inputVariables`, and `outputVariables` properties.\n */\nexport interface TransformChainFields<\n I extends ChainValues,\n O extends ChainValues,\n> extends ChainInputs {\n transform: (values: I, callbacks?: Callbacks) => O | Promise<O>;\n inputVariables: (keyof I extends string ? keyof I : never)[];\n outputVariables: (keyof O extends string ? keyof O : never)[];\n}\n\n/**\n * Class that represents a transform chain. It extends the `BaseChain`\n * class and implements the `TransformChainFields` interface. It provides\n * a way to transform input values to output values using a specified\n * transform function.\n */\nexport class TransformChain<\n I extends ChainValues,\n O extends ChainValues,\n> extends BaseChain {\n static lc_name() {\n return \"TransformChain\";\n }\n\n transformFunc: (values: I, callbacks?: Callbacks) => O | Promise<O>;\n\n inputVariables: (keyof I extends string ? keyof I : never)[];\n\n outputVariables: (keyof O extends string ? keyof O : never)[];\n\n _chainType() {\n return \"transform\" as const;\n }\n\n get inputKeys() {\n return this.inputVariables;\n }\n\n get outputKeys() {\n return this.outputVariables;\n }\n\n constructor(fields: TransformChainFields<I, O>) {\n super(fields);\n this.transformFunc = fields.transform;\n this.inputVariables = fields.inputVariables;\n this.outputVariables = fields.outputVariables;\n }\n\n async _call(values: I, runManager?: CallbackManagerForChainRun): Promise<O> {\n return this.transformFunc(values, runManager?.getChild(\"transform\"));\n }\n}\n"],"mappings":";;;;;;;;AA2BA,IAAa,iBAAb,cAGU,UAAU;CAClB,OAAO,UAAU;AACf,SAAO;;CAGT;CAEA;CAEA;CAEA,aAAa;AACX,SAAO;;CAGT,IAAI,YAAY;AACd,SAAO,KAAK;;CAGd,IAAI,aAAa;AACf,SAAO,KAAK;;CAGd,YAAY,QAAoC;AAC9C,QAAM,OAAO;AACb,OAAK,gBAAgB,OAAO;AAC5B,OAAK,iBAAiB,OAAO;AAC7B,OAAK,kBAAkB,OAAO;;CAGhC,MAAM,MAAM,QAAW,YAAqD;AAC1E,SAAO,KAAK,cAAc,QAAQ,YAAY,SAAS,YAAY,CAAC"}
@@ -1,6 +1,5 @@
1
- const require_base = require('./base.cjs');
2
- const require_load = require('./question_answering/load.cjs');
3
-
1
+ const require_base = require("./base.cjs");
2
+ const require_load = require("./question_answering/load.cjs");
4
3
  //#region src/chains/vector_db_qa.ts
5
4
  /**
6
5
  * Class that represents a VectorDBQAChain. It extends the `BaseChain`
@@ -85,7 +84,7 @@ var VectorDBQAChain = class VectorDBQAChain extends require_base.BaseChain {
85
84
  });
86
85
  }
87
86
  };
88
-
89
87
  //#endregion
90
88
  exports.VectorDBQAChain = VectorDBQAChain;
89
+
91
90
  //# sourceMappingURL=vector_db_qa.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"vector_db_qa.cjs","names":["BaseChain","loadQAStuffChain"],"sources":["../../src/chains/vector_db_qa.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport type { VectorStoreInterface } from \"@langchain/core/vectorstores\";\nimport { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { BaseChain, ChainInputs } from \"./base.js\";\nimport { SerializedVectorDBQAChain } from \"./serde.js\";\nimport { loadQAStuffChain } from \"./question_answering/load.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type LoadValues = Record<string, any>;\n\n/**\n * Interface that extends the `ChainInputs` interface and defines the\n * input fields required for a VectorDBQAChain. It includes properties\n * such as `vectorstore`, `combineDocumentsChain`,\n * `returnSourceDocuments`, `k`, and `inputKey`.\n */\nexport interface VectorDBQAChainInput extends Omit<ChainInputs, \"memory\"> {\n vectorstore: VectorStoreInterface;\n combineDocumentsChain: BaseChain;\n returnSourceDocuments?: boolean;\n k?: number;\n inputKey?: string;\n}\n\n/**\n * Class that represents a VectorDBQAChain. It extends the `BaseChain`\n * class and implements the `VectorDBQAChainInput` interface. It performs\n * a similarity search using a vector store and combines the search\n * results using a specified combine documents chain.\n */\nexport class VectorDBQAChain extends BaseChain implements VectorDBQAChainInput {\n static lc_name() {\n return \"VectorDBQAChain\";\n }\n\n k = 4;\n\n inputKey = \"query\";\n\n get inputKeys() {\n return [this.inputKey];\n }\n\n get outputKeys() {\n return this.combineDocumentsChain.outputKeys.concat(\n this.returnSourceDocuments ? [\"sourceDocuments\"] : []\n );\n }\n\n vectorstore: VectorStoreInterface;\n\n combineDocumentsChain: BaseChain;\n\n returnSourceDocuments = false;\n\n constructor(fields: VectorDBQAChainInput) {\n super(fields);\n this.vectorstore = fields.vectorstore;\n this.combineDocumentsChain = fields.combineDocumentsChain;\n this.inputKey = fields.inputKey ?? this.inputKey;\n this.k = fields.k ?? this.k;\n this.returnSourceDocuments =\n fields.returnSourceDocuments ?? this.returnSourceDocuments;\n }\n\n /** @ignore */\n async _call(\n values: ChainValues,\n runManager?: CallbackManagerForChainRun\n ): Promise<ChainValues> {\n if (!(this.inputKey in values)) {\n throw new Error(`Question key ${this.inputKey} not found.`);\n }\n const question: string = values[this.inputKey];\n const docs = await this.vectorstore.similaritySearch(\n question,\n this.k,\n values.filter,\n runManager?.getChild(\"vectorstore\")\n );\n const inputs = { question, input_documents: docs };\n const result = await this.combineDocumentsChain.call(\n inputs,\n runManager?.getChild(\"combine_documents\")\n );\n if (this.returnSourceDocuments) {\n return {\n ...result,\n sourceDocuments: docs,\n };\n }\n return result;\n }\n\n _chainType() {\n return \"vector_db_qa\" as const;\n }\n\n static async deserialize(\n data: SerializedVectorDBQAChain,\n values: LoadValues\n ) {\n if (!(\"vectorstore\" in values)) {\n throw new Error(\n `Need to pass in a vectorstore to deserialize VectorDBQAChain`\n );\n }\n const { vectorstore } = values;\n if (!data.combine_documents_chain) {\n throw new Error(\n `VectorDBQAChain must have combine_documents_chain in serialized data`\n );\n }\n\n return new VectorDBQAChain({\n combineDocumentsChain: await BaseChain.deserialize(\n data.combine_documents_chain\n ),\n k: data.k,\n vectorstore,\n });\n }\n\n serialize(): SerializedVectorDBQAChain {\n return {\n _type: this._chainType(),\n combine_documents_chain: this.combineDocumentsChain.serialize(),\n k: this.k,\n };\n }\n\n /**\n * Static method that creates a VectorDBQAChain instance from a\n * BaseLanguageModel and a vector store. It also accepts optional options\n * to customize the chain.\n * @param llm The BaseLanguageModel instance.\n * @param vectorstore The vector store used for similarity search.\n * @param options Optional options to customize the chain.\n * @returns A new instance of VectorDBQAChain.\n */\n static fromLLM(\n llm: BaseLanguageModelInterface,\n vectorstore: VectorStoreInterface,\n options?: Partial<\n Omit<VectorDBQAChainInput, \"combineDocumentsChain\" | \"vectorstore\">\n >\n ): VectorDBQAChain {\n const qaChain = loadQAStuffChain(llm);\n return new this({\n vectorstore,\n combineDocumentsChain: qaChain,\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;;AA+BA,IAAa,kBAAb,MAAa,wBAAwBA,uBAA0C;CAC7E,OAAO,UAAU;AACf,SAAO;;CAGT,IAAI;CAEJ,WAAW;CAEX,IAAI,YAAY;AACd,SAAO,CAAC,KAAK,SAAS;;CAGxB,IAAI,aAAa;AACf,SAAO,KAAK,sBAAsB,WAAW,OAC3C,KAAK,wBAAwB,CAAC,kBAAkB,GAAG,EAAE,CACtD;;CAGH;CAEA;CAEA,wBAAwB;CAExB,YAAY,QAA8B;AACxC,QAAM,OAAO;AACb,OAAK,cAAc,OAAO;AAC1B,OAAK,wBAAwB,OAAO;AACpC,OAAK,WAAW,OAAO,YAAY,KAAK;AACxC,OAAK,IAAI,OAAO,KAAK,KAAK;AAC1B,OAAK,wBACH,OAAO,yBAAyB,KAAK;;;CAIzC,MAAM,MACJ,QACA,YACsB;AACtB,MAAI,EAAE,KAAK,YAAY,QACrB,OAAM,IAAI,MAAM,gBAAgB,KAAK,SAAS,aAAa;EAE7D,MAAM,WAAmB,OAAO,KAAK;EACrC,MAAM,OAAO,MAAM,KAAK,YAAY,iBAClC,UACA,KAAK,GACL,OAAO,QACP,YAAY,SAAS,cAAc,CACpC;EACD,MAAM,SAAS;GAAE;GAAU,iBAAiB;GAAM;EAClD,MAAM,SAAS,MAAM,KAAK,sBAAsB,KAC9C,QACA,YAAY,SAAS,oBAAoB,CAC1C;AACD,MAAI,KAAK,sBACP,QAAO;GACL,GAAG;GACH,iBAAiB;GAClB;AAEH,SAAO;;CAGT,aAAa;AACX,SAAO;;CAGT,aAAa,YACX,MACA,QACA;AACA,MAAI,EAAE,iBAAiB,QACrB,OAAM,IAAI,MACR,+DACD;EAEH,MAAM,EAAE,gBAAgB;AACxB,MAAI,CAAC,KAAK,wBACR,OAAM,IAAI,MACR,uEACD;AAGH,SAAO,IAAI,gBAAgB;GACzB,uBAAuB,MAAMA,uBAAU,YACrC,KAAK,wBACN;GACD,GAAG,KAAK;GACR;GACD,CAAC;;CAGJ,YAAuC;AACrC,SAAO;GACL,OAAO,KAAK,YAAY;GACxB,yBAAyB,KAAK,sBAAsB,WAAW;GAC/D,GAAG,KAAK;GACT;;;;;;;;;;;CAYH,OAAO,QACL,KACA,aACA,SAGiB;EACjB,MAAM,UAAUC,8BAAiB,IAAI;AACrC,SAAO,IAAI,KAAK;GACd;GACA,uBAAuB;GACvB,GAAG;GACJ,CAAC"}
1
+ {"version":3,"file":"vector_db_qa.cjs","names":["BaseChain","loadQAStuffChain"],"sources":["../../src/chains/vector_db_qa.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport type { VectorStoreInterface } from \"@langchain/core/vectorstores\";\nimport { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { BaseChain, ChainInputs } from \"./base.js\";\nimport { SerializedVectorDBQAChain } from \"./serde.js\";\nimport { loadQAStuffChain } from \"./question_answering/load.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type LoadValues = Record<string, any>;\n\n/**\n * Interface that extends the `ChainInputs` interface and defines the\n * input fields required for a VectorDBQAChain. It includes properties\n * such as `vectorstore`, `combineDocumentsChain`,\n * `returnSourceDocuments`, `k`, and `inputKey`.\n */\nexport interface VectorDBQAChainInput extends Omit<ChainInputs, \"memory\"> {\n vectorstore: VectorStoreInterface;\n combineDocumentsChain: BaseChain;\n returnSourceDocuments?: boolean;\n k?: number;\n inputKey?: string;\n}\n\n/**\n * Class that represents a VectorDBQAChain. It extends the `BaseChain`\n * class and implements the `VectorDBQAChainInput` interface. It performs\n * a similarity search using a vector store and combines the search\n * results using a specified combine documents chain.\n */\nexport class VectorDBQAChain extends BaseChain implements VectorDBQAChainInput {\n static lc_name() {\n return \"VectorDBQAChain\";\n }\n\n k = 4;\n\n inputKey = \"query\";\n\n get inputKeys() {\n return [this.inputKey];\n }\n\n get outputKeys() {\n return this.combineDocumentsChain.outputKeys.concat(\n this.returnSourceDocuments ? [\"sourceDocuments\"] : []\n );\n }\n\n vectorstore: VectorStoreInterface;\n\n combineDocumentsChain: BaseChain;\n\n returnSourceDocuments = false;\n\n constructor(fields: VectorDBQAChainInput) {\n super(fields);\n this.vectorstore = fields.vectorstore;\n this.combineDocumentsChain = fields.combineDocumentsChain;\n this.inputKey = fields.inputKey ?? this.inputKey;\n this.k = fields.k ?? this.k;\n this.returnSourceDocuments =\n fields.returnSourceDocuments ?? this.returnSourceDocuments;\n }\n\n /** @ignore */\n async _call(\n values: ChainValues,\n runManager?: CallbackManagerForChainRun\n ): Promise<ChainValues> {\n if (!(this.inputKey in values)) {\n throw new Error(`Question key ${this.inputKey} not found.`);\n }\n const question: string = values[this.inputKey];\n const docs = await this.vectorstore.similaritySearch(\n question,\n this.k,\n values.filter,\n runManager?.getChild(\"vectorstore\")\n );\n const inputs = { question, input_documents: docs };\n const result = await this.combineDocumentsChain.call(\n inputs,\n runManager?.getChild(\"combine_documents\")\n );\n if (this.returnSourceDocuments) {\n return {\n ...result,\n sourceDocuments: docs,\n };\n }\n return result;\n }\n\n _chainType() {\n return \"vector_db_qa\" as const;\n }\n\n static async deserialize(\n data: SerializedVectorDBQAChain,\n values: LoadValues\n ) {\n if (!(\"vectorstore\" in values)) {\n throw new Error(\n `Need to pass in a vectorstore to deserialize VectorDBQAChain`\n );\n }\n const { vectorstore } = values;\n if (!data.combine_documents_chain) {\n throw new Error(\n `VectorDBQAChain must have combine_documents_chain in serialized data`\n );\n }\n\n return new VectorDBQAChain({\n combineDocumentsChain: await BaseChain.deserialize(\n data.combine_documents_chain\n ),\n k: data.k,\n vectorstore,\n });\n }\n\n serialize(): SerializedVectorDBQAChain {\n return {\n _type: this._chainType(),\n combine_documents_chain: this.combineDocumentsChain.serialize(),\n k: this.k,\n };\n }\n\n /**\n * Static method that creates a VectorDBQAChain instance from a\n * BaseLanguageModel and a vector store. It also accepts optional options\n * to customize the chain.\n * @param llm The BaseLanguageModel instance.\n * @param vectorstore The vector store used for similarity search.\n * @param options Optional options to customize the chain.\n * @returns A new instance of VectorDBQAChain.\n */\n static fromLLM(\n llm: BaseLanguageModelInterface,\n vectorstore: VectorStoreInterface,\n options?: Partial<\n Omit<VectorDBQAChainInput, \"combineDocumentsChain\" | \"vectorstore\">\n >\n ): VectorDBQAChain {\n const qaChain = loadQAStuffChain(llm);\n return new this({\n vectorstore,\n combineDocumentsChain: qaChain,\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;AA+BA,IAAa,kBAAb,MAAa,wBAAwBA,aAAAA,UAA0C;CAC7E,OAAO,UAAU;AACf,SAAO;;CAGT,IAAI;CAEJ,WAAW;CAEX,IAAI,YAAY;AACd,SAAO,CAAC,KAAK,SAAS;;CAGxB,IAAI,aAAa;AACf,SAAO,KAAK,sBAAsB,WAAW,OAC3C,KAAK,wBAAwB,CAAC,kBAAkB,GAAG,EAAE,CACtD;;CAGH;CAEA;CAEA,wBAAwB;CAExB,YAAY,QAA8B;AACxC,QAAM,OAAO;AACb,OAAK,cAAc,OAAO;AAC1B,OAAK,wBAAwB,OAAO;AACpC,OAAK,WAAW,OAAO,YAAY,KAAK;AACxC,OAAK,IAAI,OAAO,KAAK,KAAK;AAC1B,OAAK,wBACH,OAAO,yBAAyB,KAAK;;;CAIzC,MAAM,MACJ,QACA,YACsB;AACtB,MAAI,EAAE,KAAK,YAAY,QACrB,OAAM,IAAI,MAAM,gBAAgB,KAAK,SAAS,aAAa;EAE7D,MAAM,WAAmB,OAAO,KAAK;EACrC,MAAM,OAAO,MAAM,KAAK,YAAY,iBAClC,UACA,KAAK,GACL,OAAO,QACP,YAAY,SAAS,cAAc,CACpC;EACD,MAAM,SAAS;GAAE;GAAU,iBAAiB;GAAM;EAClD,MAAM,SAAS,MAAM,KAAK,sBAAsB,KAC9C,QACA,YAAY,SAAS,oBAAoB,CAC1C;AACD,MAAI,KAAK,sBACP,QAAO;GACL,GAAG;GACH,iBAAiB;GAClB;AAEH,SAAO;;CAGT,aAAa;AACX,SAAO;;CAGT,aAAa,YACX,MACA,QACA;AACA,MAAI,EAAE,iBAAiB,QACrB,OAAM,IAAI,MACR,+DACD;EAEH,MAAM,EAAE,gBAAgB;AACxB,MAAI,CAAC,KAAK,wBACR,OAAM,IAAI,MACR,uEACD;AAGH,SAAO,IAAI,gBAAgB;GACzB,uBAAuB,MAAMA,aAAAA,UAAU,YACrC,KAAK,wBACN;GACD,GAAG,KAAK;GACR;GACD,CAAC;;CAGJ,YAAuC;AACrC,SAAO;GACL,OAAO,KAAK,YAAY;GACxB,yBAAyB,KAAK,sBAAsB,WAAW;GAC/D,GAAG,KAAK;GACT;;;;;;;;;;;CAYH,OAAO,QACL,KACA,aACA,SAGiB;EACjB,MAAM,UAAUC,aAAAA,iBAAiB,IAAI;AACrC,SAAO,IAAI,KAAK;GACd;GACA,uBAAuB;GACvB,GAAG;GACJ,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { BaseChain } from "./base.js";
2
2
  import { loadQAStuffChain } from "./question_answering/load.js";
3
-
4
3
  //#region src/chains/vector_db_qa.ts
5
4
  /**
6
5
  * Class that represents a VectorDBQAChain. It extends the `BaseChain`
@@ -85,7 +84,7 @@ var VectorDBQAChain = class VectorDBQAChain extends BaseChain {
85
84
  });
86
85
  }
87
86
  };
88
-
89
87
  //#endregion
90
88
  export { VectorDBQAChain };
89
+
91
90
  //# sourceMappingURL=vector_db_qa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vector_db_qa.js","names":[],"sources":["../../src/chains/vector_db_qa.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport type { VectorStoreInterface } from \"@langchain/core/vectorstores\";\nimport { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { BaseChain, ChainInputs } from \"./base.js\";\nimport { SerializedVectorDBQAChain } from \"./serde.js\";\nimport { loadQAStuffChain } from \"./question_answering/load.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type LoadValues = Record<string, any>;\n\n/**\n * Interface that extends the `ChainInputs` interface and defines the\n * input fields required for a VectorDBQAChain. It includes properties\n * such as `vectorstore`, `combineDocumentsChain`,\n * `returnSourceDocuments`, `k`, and `inputKey`.\n */\nexport interface VectorDBQAChainInput extends Omit<ChainInputs, \"memory\"> {\n vectorstore: VectorStoreInterface;\n combineDocumentsChain: BaseChain;\n returnSourceDocuments?: boolean;\n k?: number;\n inputKey?: string;\n}\n\n/**\n * Class that represents a VectorDBQAChain. It extends the `BaseChain`\n * class and implements the `VectorDBQAChainInput` interface. It performs\n * a similarity search using a vector store and combines the search\n * results using a specified combine documents chain.\n */\nexport class VectorDBQAChain extends BaseChain implements VectorDBQAChainInput {\n static lc_name() {\n return \"VectorDBQAChain\";\n }\n\n k = 4;\n\n inputKey = \"query\";\n\n get inputKeys() {\n return [this.inputKey];\n }\n\n get outputKeys() {\n return this.combineDocumentsChain.outputKeys.concat(\n this.returnSourceDocuments ? [\"sourceDocuments\"] : []\n );\n }\n\n vectorstore: VectorStoreInterface;\n\n combineDocumentsChain: BaseChain;\n\n returnSourceDocuments = false;\n\n constructor(fields: VectorDBQAChainInput) {\n super(fields);\n this.vectorstore = fields.vectorstore;\n this.combineDocumentsChain = fields.combineDocumentsChain;\n this.inputKey = fields.inputKey ?? this.inputKey;\n this.k = fields.k ?? this.k;\n this.returnSourceDocuments =\n fields.returnSourceDocuments ?? this.returnSourceDocuments;\n }\n\n /** @ignore */\n async _call(\n values: ChainValues,\n runManager?: CallbackManagerForChainRun\n ): Promise<ChainValues> {\n if (!(this.inputKey in values)) {\n throw new Error(`Question key ${this.inputKey} not found.`);\n }\n const question: string = values[this.inputKey];\n const docs = await this.vectorstore.similaritySearch(\n question,\n this.k,\n values.filter,\n runManager?.getChild(\"vectorstore\")\n );\n const inputs = { question, input_documents: docs };\n const result = await this.combineDocumentsChain.call(\n inputs,\n runManager?.getChild(\"combine_documents\")\n );\n if (this.returnSourceDocuments) {\n return {\n ...result,\n sourceDocuments: docs,\n };\n }\n return result;\n }\n\n _chainType() {\n return \"vector_db_qa\" as const;\n }\n\n static async deserialize(\n data: SerializedVectorDBQAChain,\n values: LoadValues\n ) {\n if (!(\"vectorstore\" in values)) {\n throw new Error(\n `Need to pass in a vectorstore to deserialize VectorDBQAChain`\n );\n }\n const { vectorstore } = values;\n if (!data.combine_documents_chain) {\n throw new Error(\n `VectorDBQAChain must have combine_documents_chain in serialized data`\n );\n }\n\n return new VectorDBQAChain({\n combineDocumentsChain: await BaseChain.deserialize(\n data.combine_documents_chain\n ),\n k: data.k,\n vectorstore,\n });\n }\n\n serialize(): SerializedVectorDBQAChain {\n return {\n _type: this._chainType(),\n combine_documents_chain: this.combineDocumentsChain.serialize(),\n k: this.k,\n };\n }\n\n /**\n * Static method that creates a VectorDBQAChain instance from a\n * BaseLanguageModel and a vector store. It also accepts optional options\n * to customize the chain.\n * @param llm The BaseLanguageModel instance.\n * @param vectorstore The vector store used for similarity search.\n * @param options Optional options to customize the chain.\n * @returns A new instance of VectorDBQAChain.\n */\n static fromLLM(\n llm: BaseLanguageModelInterface,\n vectorstore: VectorStoreInterface,\n options?: Partial<\n Omit<VectorDBQAChainInput, \"combineDocumentsChain\" | \"vectorstore\">\n >\n ): VectorDBQAChain {\n const qaChain = loadQAStuffChain(llm);\n return new this({\n vectorstore,\n combineDocumentsChain: qaChain,\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;;AA+BA,IAAa,kBAAb,MAAa,wBAAwB,UAA0C;CAC7E,OAAO,UAAU;AACf,SAAO;;CAGT,IAAI;CAEJ,WAAW;CAEX,IAAI,YAAY;AACd,SAAO,CAAC,KAAK,SAAS;;CAGxB,IAAI,aAAa;AACf,SAAO,KAAK,sBAAsB,WAAW,OAC3C,KAAK,wBAAwB,CAAC,kBAAkB,GAAG,EAAE,CACtD;;CAGH;CAEA;CAEA,wBAAwB;CAExB,YAAY,QAA8B;AACxC,QAAM,OAAO;AACb,OAAK,cAAc,OAAO;AAC1B,OAAK,wBAAwB,OAAO;AACpC,OAAK,WAAW,OAAO,YAAY,KAAK;AACxC,OAAK,IAAI,OAAO,KAAK,KAAK;AAC1B,OAAK,wBACH,OAAO,yBAAyB,KAAK;;;CAIzC,MAAM,MACJ,QACA,YACsB;AACtB,MAAI,EAAE,KAAK,YAAY,QACrB,OAAM,IAAI,MAAM,gBAAgB,KAAK,SAAS,aAAa;EAE7D,MAAM,WAAmB,OAAO,KAAK;EACrC,MAAM,OAAO,MAAM,KAAK,YAAY,iBAClC,UACA,KAAK,GACL,OAAO,QACP,YAAY,SAAS,cAAc,CACpC;EACD,MAAM,SAAS;GAAE;GAAU,iBAAiB;GAAM;EAClD,MAAM,SAAS,MAAM,KAAK,sBAAsB,KAC9C,QACA,YAAY,SAAS,oBAAoB,CAC1C;AACD,MAAI,KAAK,sBACP,QAAO;GACL,GAAG;GACH,iBAAiB;GAClB;AAEH,SAAO;;CAGT,aAAa;AACX,SAAO;;CAGT,aAAa,YACX,MACA,QACA;AACA,MAAI,EAAE,iBAAiB,QACrB,OAAM,IAAI,MACR,+DACD;EAEH,MAAM,EAAE,gBAAgB;AACxB,MAAI,CAAC,KAAK,wBACR,OAAM,IAAI,MACR,uEACD;AAGH,SAAO,IAAI,gBAAgB;GACzB,uBAAuB,MAAM,UAAU,YACrC,KAAK,wBACN;GACD,GAAG,KAAK;GACR;GACD,CAAC;;CAGJ,YAAuC;AACrC,SAAO;GACL,OAAO,KAAK,YAAY;GACxB,yBAAyB,KAAK,sBAAsB,WAAW;GAC/D,GAAG,KAAK;GACT;;;;;;;;;;;CAYH,OAAO,QACL,KACA,aACA,SAGiB;EACjB,MAAM,UAAU,iBAAiB,IAAI;AACrC,SAAO,IAAI,KAAK;GACd;GACA,uBAAuB;GACvB,GAAG;GACJ,CAAC"}
1
+ {"version":3,"file":"vector_db_qa.js","names":[],"sources":["../../src/chains/vector_db_qa.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport type { VectorStoreInterface } from \"@langchain/core/vectorstores\";\nimport { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { BaseChain, ChainInputs } from \"./base.js\";\nimport { SerializedVectorDBQAChain } from \"./serde.js\";\nimport { loadQAStuffChain } from \"./question_answering/load.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type LoadValues = Record<string, any>;\n\n/**\n * Interface that extends the `ChainInputs` interface and defines the\n * input fields required for a VectorDBQAChain. It includes properties\n * such as `vectorstore`, `combineDocumentsChain`,\n * `returnSourceDocuments`, `k`, and `inputKey`.\n */\nexport interface VectorDBQAChainInput extends Omit<ChainInputs, \"memory\"> {\n vectorstore: VectorStoreInterface;\n combineDocumentsChain: BaseChain;\n returnSourceDocuments?: boolean;\n k?: number;\n inputKey?: string;\n}\n\n/**\n * Class that represents a VectorDBQAChain. It extends the `BaseChain`\n * class and implements the `VectorDBQAChainInput` interface. It performs\n * a similarity search using a vector store and combines the search\n * results using a specified combine documents chain.\n */\nexport class VectorDBQAChain extends BaseChain implements VectorDBQAChainInput {\n static lc_name() {\n return \"VectorDBQAChain\";\n }\n\n k = 4;\n\n inputKey = \"query\";\n\n get inputKeys() {\n return [this.inputKey];\n }\n\n get outputKeys() {\n return this.combineDocumentsChain.outputKeys.concat(\n this.returnSourceDocuments ? [\"sourceDocuments\"] : []\n );\n }\n\n vectorstore: VectorStoreInterface;\n\n combineDocumentsChain: BaseChain;\n\n returnSourceDocuments = false;\n\n constructor(fields: VectorDBQAChainInput) {\n super(fields);\n this.vectorstore = fields.vectorstore;\n this.combineDocumentsChain = fields.combineDocumentsChain;\n this.inputKey = fields.inputKey ?? this.inputKey;\n this.k = fields.k ?? this.k;\n this.returnSourceDocuments =\n fields.returnSourceDocuments ?? this.returnSourceDocuments;\n }\n\n /** @ignore */\n async _call(\n values: ChainValues,\n runManager?: CallbackManagerForChainRun\n ): Promise<ChainValues> {\n if (!(this.inputKey in values)) {\n throw new Error(`Question key ${this.inputKey} not found.`);\n }\n const question: string = values[this.inputKey];\n const docs = await this.vectorstore.similaritySearch(\n question,\n this.k,\n values.filter,\n runManager?.getChild(\"vectorstore\")\n );\n const inputs = { question, input_documents: docs };\n const result = await this.combineDocumentsChain.call(\n inputs,\n runManager?.getChild(\"combine_documents\")\n );\n if (this.returnSourceDocuments) {\n return {\n ...result,\n sourceDocuments: docs,\n };\n }\n return result;\n }\n\n _chainType() {\n return \"vector_db_qa\" as const;\n }\n\n static async deserialize(\n data: SerializedVectorDBQAChain,\n values: LoadValues\n ) {\n if (!(\"vectorstore\" in values)) {\n throw new Error(\n `Need to pass in a vectorstore to deserialize VectorDBQAChain`\n );\n }\n const { vectorstore } = values;\n if (!data.combine_documents_chain) {\n throw new Error(\n `VectorDBQAChain must have combine_documents_chain in serialized data`\n );\n }\n\n return new VectorDBQAChain({\n combineDocumentsChain: await BaseChain.deserialize(\n data.combine_documents_chain\n ),\n k: data.k,\n vectorstore,\n });\n }\n\n serialize(): SerializedVectorDBQAChain {\n return {\n _type: this._chainType(),\n combine_documents_chain: this.combineDocumentsChain.serialize(),\n k: this.k,\n };\n }\n\n /**\n * Static method that creates a VectorDBQAChain instance from a\n * BaseLanguageModel and a vector store. It also accepts optional options\n * to customize the chain.\n * @param llm The BaseLanguageModel instance.\n * @param vectorstore The vector store used for similarity search.\n * @param options Optional options to customize the chain.\n * @returns A new instance of VectorDBQAChain.\n */\n static fromLLM(\n llm: BaseLanguageModelInterface,\n vectorstore: VectorStoreInterface,\n options?: Partial<\n Omit<VectorDBQAChainInput, \"combineDocumentsChain\" | \"vectorstore\">\n >\n ): VectorDBQAChain {\n const qaChain = loadQAStuffChain(llm);\n return new this({\n vectorstore,\n combineDocumentsChain: qaChain,\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;AA+BA,IAAa,kBAAb,MAAa,wBAAwB,UAA0C;CAC7E,OAAO,UAAU;AACf,SAAO;;CAGT,IAAI;CAEJ,WAAW;CAEX,IAAI,YAAY;AACd,SAAO,CAAC,KAAK,SAAS;;CAGxB,IAAI,aAAa;AACf,SAAO,KAAK,sBAAsB,WAAW,OAC3C,KAAK,wBAAwB,CAAC,kBAAkB,GAAG,EAAE,CACtD;;CAGH;CAEA;CAEA,wBAAwB;CAExB,YAAY,QAA8B;AACxC,QAAM,OAAO;AACb,OAAK,cAAc,OAAO;AAC1B,OAAK,wBAAwB,OAAO;AACpC,OAAK,WAAW,OAAO,YAAY,KAAK;AACxC,OAAK,IAAI,OAAO,KAAK,KAAK;AAC1B,OAAK,wBACH,OAAO,yBAAyB,KAAK;;;CAIzC,MAAM,MACJ,QACA,YACsB;AACtB,MAAI,EAAE,KAAK,YAAY,QACrB,OAAM,IAAI,MAAM,gBAAgB,KAAK,SAAS,aAAa;EAE7D,MAAM,WAAmB,OAAO,KAAK;EACrC,MAAM,OAAO,MAAM,KAAK,YAAY,iBAClC,UACA,KAAK,GACL,OAAO,QACP,YAAY,SAAS,cAAc,CACpC;EACD,MAAM,SAAS;GAAE;GAAU,iBAAiB;GAAM;EAClD,MAAM,SAAS,MAAM,KAAK,sBAAsB,KAC9C,QACA,YAAY,SAAS,oBAAoB,CAC1C;AACD,MAAI,KAAK,sBACP,QAAO;GACL,GAAG;GACH,iBAAiB;GAClB;AAEH,SAAO;;CAGT,aAAa;AACX,SAAO;;CAGT,aAAa,YACX,MACA,QACA;AACA,MAAI,EAAE,iBAAiB,QACrB,OAAM,IAAI,MACR,+DACD;EAEH,MAAM,EAAE,gBAAgB;AACxB,MAAI,CAAC,KAAK,wBACR,OAAM,IAAI,MACR,uEACD;AAGH,SAAO,IAAI,gBAAgB;GACzB,uBAAuB,MAAM,UAAU,YACrC,KAAK,wBACN;GACD,GAAG,KAAK;GACR;GACD,CAAC;;CAGJ,YAAuC;AACrC,SAAO;GACL,OAAO,KAAK,YAAY;GACxB,yBAAyB,KAAK,sBAAsB,WAAW;GAC/D,GAAG,KAAK;GACT;;;;;;;;;;;CAYH,OAAO,QACL,KACA,aACA,SAGiB;EACjB,MAAM,UAAU,iBAAiB,IAAI;AACrC,SAAO,IAAI,KAAK;GACd;GACA,uBAAuB;GACvB,GAAG;GACJ,CAAC"}
@@ -1,9 +1,8 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
3
  let _langchain_core_runnables = require("@langchain/core/runnables");
4
4
  let _langchain_core_language_models_chat_models = require("@langchain/core/language_models/chat_models");
5
5
  let _langchain_core_utils_stream = require("@langchain/core/utils/stream");
6
-
7
6
  //#region src/chat_models/universal.ts
8
7
  var universal_exports = /* @__PURE__ */ require_runtime.__exportAll({
9
8
  ConfigurableModel: () => ConfigurableModel,
@@ -536,17 +535,17 @@ async function initChatModel(model, fields) {
536
535
  });
537
536
  }
538
537
  }
539
-
540
538
  //#endregion
541
539
  exports.ConfigurableModel = ConfigurableModel;
542
540
  exports.MODEL_PROVIDER_CONFIG = MODEL_PROVIDER_CONFIG;
543
541
  exports._inferModelProvider = _inferModelProvider;
544
542
  exports.getChatModelByClassName = getChatModelByClassName;
545
543
  exports.initChatModel = initChatModel;
546
- Object.defineProperty(exports, 'universal_exports', {
547
- enumerable: true,
548
- get: function () {
549
- return universal_exports;
550
- }
544
+ Object.defineProperty(exports, "universal_exports", {
545
+ enumerable: true,
546
+ get: function() {
547
+ return universal_exports;
548
+ }
551
549
  });
550
+
552
551
  //# sourceMappingURL=universal.cjs.map