@langchain/classic 1.0.0-alpha.1

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 (2294) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/dist/_virtual/rolldown_runtime.cjs +38 -0
  4. package/dist/_virtual/rolldown_runtime.js +34 -0
  5. package/dist/agents/agent.cjs +390 -0
  6. package/dist/agents/agent.cjs.map +1 -0
  7. package/dist/agents/agent.d.cts +274 -0
  8. package/dist/agents/agent.d.cts.map +1 -0
  9. package/dist/agents/agent.d.ts +274 -0
  10. package/dist/agents/agent.d.ts.map +1 -0
  11. package/dist/agents/agent.js +381 -0
  12. package/dist/agents/agent.js.map +1 -0
  13. package/dist/agents/chat/index.cjs +123 -0
  14. package/dist/agents/chat/index.cjs.map +1 -0
  15. package/dist/agents/chat/index.d.cts +88 -0
  16. package/dist/agents/chat/index.d.cts.map +1 -0
  17. package/dist/agents/chat/index.d.ts +88 -0
  18. package/dist/agents/chat/index.d.ts.map +1 -0
  19. package/dist/agents/chat/index.js +122 -0
  20. package/dist/agents/chat/index.js.map +1 -0
  21. package/dist/agents/chat/outputParser.cjs +93 -0
  22. package/dist/agents/chat/outputParser.cjs.map +1 -0
  23. package/dist/agents/chat/outputParser.d.cts +75 -0
  24. package/dist/agents/chat/outputParser.d.cts.map +1 -0
  25. package/dist/agents/chat/outputParser.d.ts +75 -0
  26. package/dist/agents/chat/outputParser.d.ts.map +1 -0
  27. package/dist/agents/chat/outputParser.js +92 -0
  28. package/dist/agents/chat/outputParser.js.map +1 -0
  29. package/dist/agents/chat/prompt.cjs +33 -0
  30. package/dist/agents/chat/prompt.cjs.map +1 -0
  31. package/dist/agents/chat/prompt.js +30 -0
  32. package/dist/agents/chat/prompt.js.map +1 -0
  33. package/dist/agents/chat_convo/index.cjs +136 -0
  34. package/dist/agents/chat_convo/index.cjs.map +1 -0
  35. package/dist/agents/chat_convo/index.d.cts +86 -0
  36. package/dist/agents/chat_convo/index.d.cts.map +1 -0
  37. package/dist/agents/chat_convo/index.d.ts +86 -0
  38. package/dist/agents/chat_convo/index.d.ts.map +1 -0
  39. package/dist/agents/chat_convo/index.js +135 -0
  40. package/dist/agents/chat_convo/index.js.map +1 -0
  41. package/dist/agents/chat_convo/outputParser.cjs +131 -0
  42. package/dist/agents/chat_convo/outputParser.cjs.map +1 -0
  43. package/dist/agents/chat_convo/outputParser.d.cts +80 -0
  44. package/dist/agents/chat_convo/outputParser.d.cts.map +1 -0
  45. package/dist/agents/chat_convo/outputParser.d.ts +80 -0
  46. package/dist/agents/chat_convo/outputParser.d.ts.map +1 -0
  47. package/dist/agents/chat_convo/outputParser.js +129 -0
  48. package/dist/agents/chat_convo/outputParser.js.map +1 -0
  49. package/dist/agents/chat_convo/prompt.cjs +67 -0
  50. package/dist/agents/chat_convo/prompt.cjs.map +1 -0
  51. package/dist/agents/chat_convo/prompt.js +62 -0
  52. package/dist/agents/chat_convo/prompt.js.map +1 -0
  53. package/dist/agents/executor.cjs +445 -0
  54. package/dist/agents/executor.cjs.map +1 -0
  55. package/dist/agents/executor.d.cts +107 -0
  56. package/dist/agents/executor.d.cts.map +1 -0
  57. package/dist/agents/executor.d.ts +107 -0
  58. package/dist/agents/executor.d.ts.map +1 -0
  59. package/dist/agents/executor.js +444 -0
  60. package/dist/agents/executor.js.map +1 -0
  61. package/dist/agents/format_scratchpad/log.cjs +30 -0
  62. package/dist/agents/format_scratchpad/log.cjs.map +1 -0
  63. package/dist/agents/format_scratchpad/log.d.cts +15 -0
  64. package/dist/agents/format_scratchpad/log.d.cts.map +1 -0
  65. package/dist/agents/format_scratchpad/log.d.ts +15 -0
  66. package/dist/agents/format_scratchpad/log.d.ts.map +1 -0
  67. package/dist/agents/format_scratchpad/log.js +24 -0
  68. package/dist/agents/format_scratchpad/log.js.map +1 -0
  69. package/dist/agents/format_scratchpad/log_to_message.cjs +28 -0
  70. package/dist/agents/format_scratchpad/log_to_message.cjs.map +1 -0
  71. package/dist/agents/format_scratchpad/log_to_message.d.cts +8 -0
  72. package/dist/agents/format_scratchpad/log_to_message.d.cts.map +1 -0
  73. package/dist/agents/format_scratchpad/log_to_message.d.ts +8 -0
  74. package/dist/agents/format_scratchpad/log_to_message.d.ts.map +1 -0
  75. package/dist/agents/format_scratchpad/log_to_message.js +22 -0
  76. package/dist/agents/format_scratchpad/log_to_message.js.map +1 -0
  77. package/dist/agents/format_scratchpad/openai_functions.cjs +54 -0
  78. package/dist/agents/format_scratchpad/openai_functions.cjs.map +1 -0
  79. package/dist/agents/format_scratchpad/openai_functions.d.cts +26 -0
  80. package/dist/agents/format_scratchpad/openai_functions.d.cts.map +1 -0
  81. package/dist/agents/format_scratchpad/openai_functions.d.ts +26 -0
  82. package/dist/agents/format_scratchpad/openai_functions.d.ts.map +1 -0
  83. package/dist/agents/format_scratchpad/openai_functions.js +47 -0
  84. package/dist/agents/format_scratchpad/openai_functions.js.map +1 -0
  85. package/dist/agents/format_scratchpad/openai_tools.cjs +16 -0
  86. package/dist/agents/format_scratchpad/openai_tools.cjs.map +1 -0
  87. package/dist/agents/format_scratchpad/openai_tools.d.cts +2 -0
  88. package/dist/agents/format_scratchpad/openai_tools.d.ts +2 -0
  89. package/dist/agents/format_scratchpad/openai_tools.js +10 -0
  90. package/dist/agents/format_scratchpad/openai_tools.js.map +1 -0
  91. package/dist/agents/format_scratchpad/tool_calling.cjs +32 -0
  92. package/dist/agents/format_scratchpad/tool_calling.cjs.map +1 -0
  93. package/dist/agents/format_scratchpad/tool_calling.d.cts +9 -0
  94. package/dist/agents/format_scratchpad/tool_calling.d.cts.map +1 -0
  95. package/dist/agents/format_scratchpad/tool_calling.d.ts +9 -0
  96. package/dist/agents/format_scratchpad/tool_calling.d.ts.map +1 -0
  97. package/dist/agents/format_scratchpad/tool_calling.js +31 -0
  98. package/dist/agents/format_scratchpad/tool_calling.js.map +1 -0
  99. package/dist/agents/format_scratchpad/xml.cjs +23 -0
  100. package/dist/agents/format_scratchpad/xml.cjs.map +1 -0
  101. package/dist/agents/format_scratchpad/xml.d.cts +7 -0
  102. package/dist/agents/format_scratchpad/xml.d.cts.map +1 -0
  103. package/dist/agents/format_scratchpad/xml.d.ts +7 -0
  104. package/dist/agents/format_scratchpad/xml.d.ts.map +1 -0
  105. package/dist/agents/format_scratchpad/xml.js +17 -0
  106. package/dist/agents/format_scratchpad/xml.js.map +1 -0
  107. package/dist/agents/helpers.cjs +20 -0
  108. package/dist/agents/helpers.cjs.map +1 -0
  109. package/dist/agents/helpers.js +20 -0
  110. package/dist/agents/helpers.js.map +1 -0
  111. package/dist/agents/index.cjs +117 -0
  112. package/dist/agents/index.cjs.map +1 -0
  113. package/dist/agents/index.d.cts +23 -0
  114. package/dist/agents/index.d.ts +23 -0
  115. package/dist/agents/index.js +69 -0
  116. package/dist/agents/index.js.map +1 -0
  117. package/dist/agents/initialize.cjs +119 -0
  118. package/dist/agents/initialize.cjs.map +1 -0
  119. package/dist/agents/initialize.d.cts +62 -0
  120. package/dist/agents/initialize.d.cts.map +1 -0
  121. package/dist/agents/initialize.d.ts +62 -0
  122. package/dist/agents/initialize.d.ts.map +1 -0
  123. package/dist/agents/initialize.js +118 -0
  124. package/dist/agents/initialize.js.map +1 -0
  125. package/dist/agents/load.cjs +31 -0
  126. package/dist/agents/load.cjs.map +1 -0
  127. package/dist/agents/load.d.cts +14 -0
  128. package/dist/agents/load.d.cts.map +1 -0
  129. package/dist/agents/load.d.ts +14 -0
  130. package/dist/agents/load.d.ts.map +1 -0
  131. package/dist/agents/load.js +25 -0
  132. package/dist/agents/load.js.map +1 -0
  133. package/dist/agents/mrkl/index.cjs +139 -0
  134. package/dist/agents/mrkl/index.cjs.map +1 -0
  135. package/dist/agents/mrkl/index.d.cts +97 -0
  136. package/dist/agents/mrkl/index.d.cts.map +1 -0
  137. package/dist/agents/mrkl/index.d.ts +97 -0
  138. package/dist/agents/mrkl/index.d.ts.map +1 -0
  139. package/dist/agents/mrkl/index.js +138 -0
  140. package/dist/agents/mrkl/index.js.map +1 -0
  141. package/dist/agents/mrkl/outputParser.cjs +58 -0
  142. package/dist/agents/mrkl/outputParser.cjs.map +1 -0
  143. package/dist/agents/mrkl/outputParser.d.cts +42 -0
  144. package/dist/agents/mrkl/outputParser.d.cts.map +1 -0
  145. package/dist/agents/mrkl/outputParser.d.ts +42 -0
  146. package/dist/agents/mrkl/outputParser.d.ts.map +1 -0
  147. package/dist/agents/mrkl/outputParser.js +57 -0
  148. package/dist/agents/mrkl/outputParser.js.map +1 -0
  149. package/dist/agents/mrkl/prompt.cjs +23 -0
  150. package/dist/agents/mrkl/prompt.cjs.map +1 -0
  151. package/dist/agents/mrkl/prompt.js +20 -0
  152. package/dist/agents/mrkl/prompt.js.map +1 -0
  153. package/dist/agents/openai/output_parser.cjs +21 -0
  154. package/dist/agents/openai/output_parser.cjs.map +1 -0
  155. package/dist/agents/openai/output_parser.d.cts +4 -0
  156. package/dist/agents/openai/output_parser.d.ts +4 -0
  157. package/dist/agents/openai/output_parser.js +14 -0
  158. package/dist/agents/openai/output_parser.js.map +1 -0
  159. package/dist/agents/openai_functions/index.cjs +217 -0
  160. package/dist/agents/openai_functions/index.cjs.map +1 -0
  161. package/dist/agents/openai_functions/index.d.cts +162 -0
  162. package/dist/agents/openai_functions/index.d.cts.map +1 -0
  163. package/dist/agents/openai_functions/index.d.ts +162 -0
  164. package/dist/agents/openai_functions/index.d.ts.map +1 -0
  165. package/dist/agents/openai_functions/index.js +214 -0
  166. package/dist/agents/openai_functions/index.js.map +1 -0
  167. package/dist/agents/openai_functions/output_parser.cjs +88 -0
  168. package/dist/agents/openai_functions/output_parser.cjs.map +1 -0
  169. package/dist/agents/openai_functions/output_parser.d.cts +62 -0
  170. package/dist/agents/openai_functions/output_parser.d.cts.map +1 -0
  171. package/dist/agents/openai_functions/output_parser.d.ts +62 -0
  172. package/dist/agents/openai_functions/output_parser.d.ts.map +1 -0
  173. package/dist/agents/openai_functions/output_parser.js +87 -0
  174. package/dist/agents/openai_functions/output_parser.js.map +1 -0
  175. package/dist/agents/openai_functions/prompt.cjs +7 -0
  176. package/dist/agents/openai_functions/prompt.cjs.map +1 -0
  177. package/dist/agents/openai_functions/prompt.js +6 -0
  178. package/dist/agents/openai_functions/prompt.js.map +1 -0
  179. package/dist/agents/openai_tools/index.cjs +84 -0
  180. package/dist/agents/openai_tools/index.cjs.map +1 -0
  181. package/dist/agents/openai_tools/index.d.cts +102 -0
  182. package/dist/agents/openai_tools/index.d.cts.map +1 -0
  183. package/dist/agents/openai_tools/index.d.ts +102 -0
  184. package/dist/agents/openai_tools/index.d.ts.map +1 -0
  185. package/dist/agents/openai_tools/index.js +83 -0
  186. package/dist/agents/openai_tools/index.js.map +1 -0
  187. package/dist/agents/openai_tools/output_parser.cjs +92 -0
  188. package/dist/agents/openai_tools/output_parser.cjs.map +1 -0
  189. package/dist/agents/openai_tools/output_parser.d.cts +54 -0
  190. package/dist/agents/openai_tools/output_parser.d.cts.map +1 -0
  191. package/dist/agents/openai_tools/output_parser.d.ts +54 -0
  192. package/dist/agents/openai_tools/output_parser.d.ts.map +1 -0
  193. package/dist/agents/openai_tools/output_parser.js +91 -0
  194. package/dist/agents/openai_tools/output_parser.js.map +1 -0
  195. package/dist/agents/react/index.cjs +80 -0
  196. package/dist/agents/react/index.cjs.map +1 -0
  197. package/dist/agents/react/index.d.cts +81 -0
  198. package/dist/agents/react/index.d.cts.map +1 -0
  199. package/dist/agents/react/index.d.ts +81 -0
  200. package/dist/agents/react/index.d.ts.map +1 -0
  201. package/dist/agents/react/index.js +79 -0
  202. package/dist/agents/react/index.js.map +1 -0
  203. package/dist/agents/react/output_parser.cjs +111 -0
  204. package/dist/agents/react/output_parser.cjs.map +1 -0
  205. package/dist/agents/react/output_parser.d.cts +68 -0
  206. package/dist/agents/react/output_parser.d.cts.map +1 -0
  207. package/dist/agents/react/output_parser.d.ts +68 -0
  208. package/dist/agents/react/output_parser.d.ts.map +1 -0
  209. package/dist/agents/react/output_parser.js +105 -0
  210. package/dist/agents/react/output_parser.js.map +1 -0
  211. package/dist/agents/react/prompt.cjs +16 -0
  212. package/dist/agents/react/prompt.cjs.map +1 -0
  213. package/dist/agents/react/prompt.js +15 -0
  214. package/dist/agents/react/prompt.js.map +1 -0
  215. package/dist/agents/structured_chat/index.cjs +243 -0
  216. package/dist/agents/structured_chat/index.cjs.map +1 -0
  217. package/dist/agents/structured_chat/index.d.cts +182 -0
  218. package/dist/agents/structured_chat/index.d.cts.map +1 -0
  219. package/dist/agents/structured_chat/index.d.ts +182 -0
  220. package/dist/agents/structured_chat/index.d.ts.map +1 -0
  221. package/dist/agents/structured_chat/index.js +241 -0
  222. package/dist/agents/structured_chat/index.js.map +1 -0
  223. package/dist/agents/structured_chat/outputParser.cjs +136 -0
  224. package/dist/agents/structured_chat/outputParser.cjs.map +1 -0
  225. package/dist/agents/structured_chat/outputParser.d.cts +95 -0
  226. package/dist/agents/structured_chat/outputParser.d.cts.map +1 -0
  227. package/dist/agents/structured_chat/outputParser.d.ts +95 -0
  228. package/dist/agents/structured_chat/outputParser.d.ts.map +1 -0
  229. package/dist/agents/structured_chat/outputParser.js +134 -0
  230. package/dist/agents/structured_chat/outputParser.js.map +1 -0
  231. package/dist/agents/structured_chat/prompt.cjs +68 -0
  232. package/dist/agents/structured_chat/prompt.cjs.map +1 -0
  233. package/dist/agents/structured_chat/prompt.js +64 -0
  234. package/dist/agents/structured_chat/prompt.js.map +1 -0
  235. package/dist/agents/tool_calling/index.cjs +84 -0
  236. package/dist/agents/tool_calling/index.cjs.map +1 -0
  237. package/dist/agents/tool_calling/index.d.cts +89 -0
  238. package/dist/agents/tool_calling/index.d.cts.map +1 -0
  239. package/dist/agents/tool_calling/index.d.ts +89 -0
  240. package/dist/agents/tool_calling/index.d.ts.map +1 -0
  241. package/dist/agents/tool_calling/index.js +83 -0
  242. package/dist/agents/tool_calling/index.js.map +1 -0
  243. package/dist/agents/tool_calling/output_parser.cjs +65 -0
  244. package/dist/agents/tool_calling/output_parser.cjs.map +1 -0
  245. package/dist/agents/tool_calling/output_parser.d.cts +19 -0
  246. package/dist/agents/tool_calling/output_parser.d.cts.map +1 -0
  247. package/dist/agents/tool_calling/output_parser.d.ts +19 -0
  248. package/dist/agents/tool_calling/output_parser.d.ts.map +1 -0
  249. package/dist/agents/tool_calling/output_parser.js +64 -0
  250. package/dist/agents/tool_calling/output_parser.js.map +1 -0
  251. package/dist/agents/toolkits/base.cjs +2 -0
  252. package/dist/agents/toolkits/base.d.cts +2 -0
  253. package/dist/agents/toolkits/base.d.ts +2 -0
  254. package/dist/agents/toolkits/base.js +3 -0
  255. package/dist/agents/toolkits/conversational_retrieval/openai_functions.cjs +45 -0
  256. package/dist/agents/toolkits/conversational_retrieval/openai_functions.cjs.map +1 -0
  257. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.cts +27 -0
  258. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.cts.map +1 -0
  259. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.ts +27 -0
  260. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.ts.map +1 -0
  261. package/dist/agents/toolkits/conversational_retrieval/openai_functions.js +45 -0
  262. package/dist/agents/toolkits/conversational_retrieval/openai_functions.js.map +1 -0
  263. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.cjs +90 -0
  264. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.cjs.map +1 -0
  265. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts +59 -0
  266. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts.map +1 -0
  267. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts +59 -0
  268. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts.map +1 -0
  269. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.js +89 -0
  270. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.js.map +1 -0
  271. package/dist/agents/toolkits/conversational_retrieval/tool.cjs +22 -0
  272. package/dist/agents/toolkits/conversational_retrieval/tool.cjs.map +1 -0
  273. package/dist/agents/toolkits/conversational_retrieval/tool.d.cts +13 -0
  274. package/dist/agents/toolkits/conversational_retrieval/tool.d.cts.map +1 -0
  275. package/dist/agents/toolkits/conversational_retrieval/tool.d.ts +13 -0
  276. package/dist/agents/toolkits/conversational_retrieval/tool.d.ts.map +1 -0
  277. package/dist/agents/toolkits/conversational_retrieval/tool.js +21 -0
  278. package/dist/agents/toolkits/conversational_retrieval/tool.js.map +1 -0
  279. package/dist/agents/toolkits/index.cjs +45 -0
  280. package/dist/agents/toolkits/index.cjs.map +1 -0
  281. package/dist/agents/toolkits/index.d.cts +7 -0
  282. package/dist/agents/toolkits/index.d.ts +7 -0
  283. package/dist/agents/toolkits/index.js +28 -0
  284. package/dist/agents/toolkits/index.js.map +1 -0
  285. package/dist/agents/toolkits/json/json.cjs +67 -0
  286. package/dist/agents/toolkits/json/json.cjs.map +1 -0
  287. package/dist/agents/toolkits/json/json.d.cts +40 -0
  288. package/dist/agents/toolkits/json/json.d.cts.map +1 -0
  289. package/dist/agents/toolkits/json/json.d.ts +40 -0
  290. package/dist/agents/toolkits/json/json.d.ts.map +1 -0
  291. package/dist/agents/toolkits/json/json.js +65 -0
  292. package/dist/agents/toolkits/json/json.js.map +1 -0
  293. package/dist/agents/toolkits/json/prompt.cjs +31 -0
  294. package/dist/agents/toolkits/json/prompt.cjs.map +1 -0
  295. package/dist/agents/toolkits/json/prompt.js +29 -0
  296. package/dist/agents/toolkits/json/prompt.js.map +1 -0
  297. package/dist/agents/toolkits/openapi/openapi.cjs +107 -0
  298. package/dist/agents/toolkits/openapi/openapi.cjs.map +1 -0
  299. package/dist/agents/toolkits/openapi/openapi.d.cts +67 -0
  300. package/dist/agents/toolkits/openapi/openapi.d.cts.map +1 -0
  301. package/dist/agents/toolkits/openapi/openapi.d.ts +67 -0
  302. package/dist/agents/toolkits/openapi/openapi.d.ts.map +1 -0
  303. package/dist/agents/toolkits/openapi/openapi.js +104 -0
  304. package/dist/agents/toolkits/openapi/openapi.js.map +1 -0
  305. package/dist/agents/toolkits/openapi/prompt.cjs +37 -0
  306. package/dist/agents/toolkits/openapi/prompt.cjs.map +1 -0
  307. package/dist/agents/toolkits/openapi/prompt.js +34 -0
  308. package/dist/agents/toolkits/openapi/prompt.js.map +1 -0
  309. package/dist/agents/toolkits/sql/index.cjs +25 -0
  310. package/dist/agents/toolkits/sql/index.cjs.map +1 -0
  311. package/dist/agents/toolkits/sql/index.d.cts +3 -0
  312. package/dist/agents/toolkits/sql/index.d.ts +3 -0
  313. package/dist/agents/toolkits/sql/index.js +16 -0
  314. package/dist/agents/toolkits/sql/index.js.map +1 -0
  315. package/dist/agents/toolkits/sql/prompt.cjs +24 -0
  316. package/dist/agents/toolkits/sql/prompt.cjs.map +1 -0
  317. package/dist/agents/toolkits/sql/prompt.d.cts +6 -0
  318. package/dist/agents/toolkits/sql/prompt.d.cts.map +1 -0
  319. package/dist/agents/toolkits/sql/prompt.d.ts +6 -0
  320. package/dist/agents/toolkits/sql/prompt.d.ts.map +1 -0
  321. package/dist/agents/toolkits/sql/prompt.js +22 -0
  322. package/dist/agents/toolkits/sql/prompt.js.map +1 -0
  323. package/dist/agents/toolkits/sql/sql.cjs +68 -0
  324. package/dist/agents/toolkits/sql/sql.cjs.map +1 -0
  325. package/dist/agents/toolkits/sql/sql.d.cts +38 -0
  326. package/dist/agents/toolkits/sql/sql.d.cts.map +1 -0
  327. package/dist/agents/toolkits/sql/sql.d.ts +38 -0
  328. package/dist/agents/toolkits/sql/sql.d.ts.map +1 -0
  329. package/dist/agents/toolkits/sql/sql.js +66 -0
  330. package/dist/agents/toolkits/sql/sql.js.map +1 -0
  331. package/dist/agents/toolkits/vectorstore/prompt.cjs +15 -0
  332. package/dist/agents/toolkits/vectorstore/prompt.cjs.map +1 -0
  333. package/dist/agents/toolkits/vectorstore/prompt.js +13 -0
  334. package/dist/agents/toolkits/vectorstore/prompt.js.map +1 -0
  335. package/dist/agents/toolkits/vectorstore/vectorstore.cjs +117 -0
  336. package/dist/agents/toolkits/vectorstore/vectorstore.cjs.map +1 -0
  337. package/dist/agents/toolkits/vectorstore/vectorstore.d.cts +59 -0
  338. package/dist/agents/toolkits/vectorstore/vectorstore.d.cts.map +1 -0
  339. package/dist/agents/toolkits/vectorstore/vectorstore.d.ts +59 -0
  340. package/dist/agents/toolkits/vectorstore/vectorstore.d.ts.map +1 -0
  341. package/dist/agents/toolkits/vectorstore/vectorstore.js +113 -0
  342. package/dist/agents/toolkits/vectorstore/vectorstore.js.map +1 -0
  343. package/dist/agents/types.cjs +20 -0
  344. package/dist/agents/types.cjs.map +1 -0
  345. package/dist/agents/types.d.cts +89 -0
  346. package/dist/agents/types.d.cts.map +1 -0
  347. package/dist/agents/types.d.ts +89 -0
  348. package/dist/agents/types.d.ts.map +1 -0
  349. package/dist/agents/types.js +18 -0
  350. package/dist/agents/types.js.map +1 -0
  351. package/dist/agents/xml/index.cjs +154 -0
  352. package/dist/agents/xml/index.cjs.map +1 -0
  353. package/dist/agents/xml/index.d.cts +130 -0
  354. package/dist/agents/xml/index.d.cts.map +1 -0
  355. package/dist/agents/xml/index.d.ts +130 -0
  356. package/dist/agents/xml/index.d.ts.map +1 -0
  357. package/dist/agents/xml/index.js +152 -0
  358. package/dist/agents/xml/index.js.map +1 -0
  359. package/dist/agents/xml/output_parser.cjs +77 -0
  360. package/dist/agents/xml/output_parser.cjs.map +1 -0
  361. package/dist/agents/xml/output_parser.d.cts +41 -0
  362. package/dist/agents/xml/output_parser.d.cts.map +1 -0
  363. package/dist/agents/xml/output_parser.d.ts +41 -0
  364. package/dist/agents/xml/output_parser.d.ts.map +1 -0
  365. package/dist/agents/xml/output_parser.js +71 -0
  366. package/dist/agents/xml/output_parser.js.map +1 -0
  367. package/dist/agents/xml/prompt.cjs +26 -0
  368. package/dist/agents/xml/prompt.cjs.map +1 -0
  369. package/dist/agents/xml/prompt.js +25 -0
  370. package/dist/agents/xml/prompt.js.map +1 -0
  371. package/dist/cache/file_system.cjs +68 -0
  372. package/dist/cache/file_system.cjs.map +1 -0
  373. package/dist/cache/file_system.d.cts +40 -0
  374. package/dist/cache/file_system.d.cts.map +1 -0
  375. package/dist/cache/file_system.d.ts +40 -0
  376. package/dist/cache/file_system.d.ts.map +1 -0
  377. package/dist/cache/file_system.js +62 -0
  378. package/dist/cache/file_system.js.map +1 -0
  379. package/dist/callbacks/handlers/console.cjs +22 -0
  380. package/dist/callbacks/handlers/console.cjs.map +1 -0
  381. package/dist/callbacks/handlers/console.d.cts +10 -0
  382. package/dist/callbacks/handlers/console.d.cts.map +1 -0
  383. package/dist/callbacks/handlers/console.d.ts +10 -0
  384. package/dist/callbacks/handlers/console.d.ts.map +1 -0
  385. package/dist/callbacks/handlers/console.js +12 -0
  386. package/dist/callbacks/handlers/console.js.map +1 -0
  387. package/dist/callbacks/handlers/run_collector.cjs +22 -0
  388. package/dist/callbacks/handlers/run_collector.cjs.map +1 -0
  389. package/dist/callbacks/handlers/run_collector.d.cts +10 -0
  390. package/dist/callbacks/handlers/run_collector.d.cts.map +1 -0
  391. package/dist/callbacks/handlers/run_collector.d.ts +10 -0
  392. package/dist/callbacks/handlers/run_collector.d.ts.map +1 -0
  393. package/dist/callbacks/handlers/run_collector.js +12 -0
  394. package/dist/callbacks/handlers/run_collector.js.map +1 -0
  395. package/dist/callbacks/handlers/tracer.cjs +22 -0
  396. package/dist/callbacks/handlers/tracer.cjs.map +1 -0
  397. package/dist/callbacks/handlers/tracer.d.cts +10 -0
  398. package/dist/callbacks/handlers/tracer.d.cts.map +1 -0
  399. package/dist/callbacks/handlers/tracer.d.ts +10 -0
  400. package/dist/callbacks/handlers/tracer.d.ts.map +1 -0
  401. package/dist/callbacks/handlers/tracer.js +12 -0
  402. package/dist/callbacks/handlers/tracer.js.map +1 -0
  403. package/dist/callbacks/handlers/tracer_langchain.cjs +22 -0
  404. package/dist/callbacks/handlers/tracer_langchain.cjs.map +1 -0
  405. package/dist/callbacks/handlers/tracer_langchain.d.cts +10 -0
  406. package/dist/callbacks/handlers/tracer_langchain.d.cts.map +1 -0
  407. package/dist/callbacks/handlers/tracer_langchain.d.ts +10 -0
  408. package/dist/callbacks/handlers/tracer_langchain.d.ts.map +1 -0
  409. package/dist/callbacks/handlers/tracer_langchain.js +12 -0
  410. package/dist/callbacks/handlers/tracer_langchain.js.map +1 -0
  411. package/dist/callbacks/index.cjs +62 -0
  412. package/dist/callbacks/index.cjs.map +1 -0
  413. package/dist/callbacks/index.d.cts +6 -0
  414. package/dist/callbacks/index.d.ts +6 -0
  415. package/dist/callbacks/index.js +27 -0
  416. package/dist/callbacks/index.js.map +1 -0
  417. package/dist/callbacks/promises.cjs +22 -0
  418. package/dist/callbacks/promises.cjs.map +1 -0
  419. package/dist/callbacks/promises.d.cts +10 -0
  420. package/dist/callbacks/promises.d.cts.map +1 -0
  421. package/dist/callbacks/promises.d.ts +10 -0
  422. package/dist/callbacks/promises.d.ts.map +1 -0
  423. package/dist/callbacks/promises.js +12 -0
  424. package/dist/callbacks/promises.js.map +1 -0
  425. package/dist/chains/analyze_documents_chain.cjs +83 -0
  426. package/dist/chains/analyze_documents_chain.cjs.map +1 -0
  427. package/dist/chains/analyze_documents_chain.d.cts +58 -0
  428. package/dist/chains/analyze_documents_chain.d.cts.map +1 -0
  429. package/dist/chains/analyze_documents_chain.d.ts +58 -0
  430. package/dist/chains/analyze_documents_chain.d.ts.map +1 -0
  431. package/dist/chains/analyze_documents_chain.js +82 -0
  432. package/dist/chains/analyze_documents_chain.js.map +1 -0
  433. package/dist/chains/api/api_chain.cjs +100 -0
  434. package/dist/chains/api/api_chain.cjs.map +1 -0
  435. package/dist/chains/api/api_chain.d.cts +63 -0
  436. package/dist/chains/api/api_chain.d.cts.map +1 -0
  437. package/dist/chains/api/api_chain.d.ts +63 -0
  438. package/dist/chains/api/api_chain.d.ts.map +1 -0
  439. package/dist/chains/api/api_chain.js +100 -0
  440. package/dist/chains/api/api_chain.js.map +1 -0
  441. package/dist/chains/api/prompts.cjs +38 -0
  442. package/dist/chains/api/prompts.cjs.map +1 -0
  443. package/dist/chains/api/prompts.js +36 -0
  444. package/dist/chains/api/prompts.js.map +1 -0
  445. package/dist/chains/base.cjs +180 -0
  446. package/dist/chains/base.cjs.map +1 -0
  447. package/dist/chains/base.d.cts +88 -0
  448. package/dist/chains/base.d.cts.map +1 -0
  449. package/dist/chains/base.d.ts +88 -0
  450. package/dist/chains/base.d.ts.map +1 -0
  451. package/dist/chains/base.js +179 -0
  452. package/dist/chains/base.js.map +1 -0
  453. package/dist/chains/chat_vector_db_chain.cjs +130 -0
  454. package/dist/chains/chat_vector_db_chain.cjs.map +1 -0
  455. package/dist/chains/chat_vector_db_chain.d.cts +62 -0
  456. package/dist/chains/chat_vector_db_chain.d.cts.map +1 -0
  457. package/dist/chains/chat_vector_db_chain.d.ts +62 -0
  458. package/dist/chains/chat_vector_db_chain.d.ts.map +1 -0
  459. package/dist/chains/chat_vector_db_chain.js +129 -0
  460. package/dist/chains/chat_vector_db_chain.js.map +1 -0
  461. package/dist/chains/combine_docs_chain.cjs +275 -0
  462. package/dist/chains/combine_docs_chain.cjs.map +1 -0
  463. package/dist/chains/combine_docs_chain.d.cts +126 -0
  464. package/dist/chains/combine_docs_chain.d.cts.map +1 -0
  465. package/dist/chains/combine_docs_chain.d.ts +126 -0
  466. package/dist/chains/combine_docs_chain.d.ts.map +1 -0
  467. package/dist/chains/combine_docs_chain.js +272 -0
  468. package/dist/chains/combine_docs_chain.js.map +1 -0
  469. package/dist/chains/combine_documents/base.cjs +22 -0
  470. package/dist/chains/combine_documents/base.cjs.map +1 -0
  471. package/dist/chains/combine_documents/base.js +18 -0
  472. package/dist/chains/combine_documents/base.js.map +1 -0
  473. package/dist/chains/combine_documents/index.cjs +16 -0
  474. package/dist/chains/combine_documents/index.cjs.map +1 -0
  475. package/dist/chains/combine_documents/index.d.cts +2 -0
  476. package/dist/chains/combine_documents/index.d.ts +2 -0
  477. package/dist/chains/combine_documents/index.js +10 -0
  478. package/dist/chains/combine_documents/index.js.map +1 -0
  479. package/dist/chains/combine_documents/reduce.cjs +73 -0
  480. package/dist/chains/combine_documents/reduce.cjs.map +1 -0
  481. package/dist/chains/combine_documents/reduce.d.cts +36 -0
  482. package/dist/chains/combine_documents/reduce.d.cts.map +1 -0
  483. package/dist/chains/combine_documents/reduce.d.ts +36 -0
  484. package/dist/chains/combine_documents/reduce.d.ts.map +1 -0
  485. package/dist/chains/combine_documents/reduce.js +66 -0
  486. package/dist/chains/combine_documents/reduce.js.map +1 -0
  487. package/dist/chains/combine_documents/stuff.cjs +41 -0
  488. package/dist/chains/combine_documents/stuff.cjs.map +1 -0
  489. package/dist/chains/combine_documents/stuff.d.cts +40 -0
  490. package/dist/chains/combine_documents/stuff.d.cts.map +1 -0
  491. package/dist/chains/combine_documents/stuff.d.ts +40 -0
  492. package/dist/chains/combine_documents/stuff.d.ts.map +1 -0
  493. package/dist/chains/combine_documents/stuff.js +40 -0
  494. package/dist/chains/combine_documents/stuff.js.map +1 -0
  495. package/dist/chains/constitutional_ai/constitutional_chain.cjs +131 -0
  496. package/dist/chains/constitutional_ai/constitutional_chain.cjs.map +1 -0
  497. package/dist/chains/constitutional_ai/constitutional_chain.d.cts +79 -0
  498. package/dist/chains/constitutional_ai/constitutional_chain.d.cts.map +1 -0
  499. package/dist/chains/constitutional_ai/constitutional_chain.d.ts +79 -0
  500. package/dist/chains/constitutional_ai/constitutional_chain.d.ts.map +1 -0
  501. package/dist/chains/constitutional_ai/constitutional_chain.js +131 -0
  502. package/dist/chains/constitutional_ai/constitutional_chain.js.map +1 -0
  503. package/dist/chains/constitutional_ai/constitutional_principle.cjs +322 -0
  504. package/dist/chains/constitutional_ai/constitutional_principle.cjs.map +1 -0
  505. package/dist/chains/constitutional_ai/constitutional_principle.d.cts +50 -0
  506. package/dist/chains/constitutional_ai/constitutional_principle.d.cts.map +1 -0
  507. package/dist/chains/constitutional_ai/constitutional_principle.d.ts +50 -0
  508. package/dist/chains/constitutional_ai/constitutional_principle.d.ts.map +1 -0
  509. package/dist/chains/constitutional_ai/constitutional_principle.js +320 -0
  510. package/dist/chains/constitutional_ai/constitutional_principle.js.map +1 -0
  511. package/dist/chains/constitutional_ai/constitutional_prompts.cjs +96 -0
  512. package/dist/chains/constitutional_ai/constitutional_prompts.cjs.map +1 -0
  513. package/dist/chains/constitutional_ai/constitutional_prompts.js +94 -0
  514. package/dist/chains/constitutional_ai/constitutional_prompts.js.map +1 -0
  515. package/dist/chains/conversation.cjs +50 -0
  516. package/dist/chains/conversation.cjs.map +1 -0
  517. package/dist/chains/conversation.d.cts +34 -0
  518. package/dist/chains/conversation.d.cts.map +1 -0
  519. package/dist/chains/conversation.d.ts +34 -0
  520. package/dist/chains/conversation.d.ts.map +1 -0
  521. package/dist/chains/conversation.js +48 -0
  522. package/dist/chains/conversation.js.map +1 -0
  523. package/dist/chains/conversational_retrieval_chain.cjs +215 -0
  524. package/dist/chains/conversational_retrieval_chain.cjs.map +1 -0
  525. package/dist/chains/conversational_retrieval_chain.d.cts +149 -0
  526. package/dist/chains/conversational_retrieval_chain.d.cts.map +1 -0
  527. package/dist/chains/conversational_retrieval_chain.d.ts +149 -0
  528. package/dist/chains/conversational_retrieval_chain.d.ts.map +1 -0
  529. package/dist/chains/conversational_retrieval_chain.js +214 -0
  530. package/dist/chains/conversational_retrieval_chain.js.map +1 -0
  531. package/dist/chains/graph_qa/cypher.cjs +133 -0
  532. package/dist/chains/graph_qa/cypher.cjs.map +1 -0
  533. package/dist/chains/graph_qa/cypher.d.cts +76 -0
  534. package/dist/chains/graph_qa/cypher.d.cts.map +1 -0
  535. package/dist/chains/graph_qa/cypher.d.ts +76 -0
  536. package/dist/chains/graph_qa/cypher.d.ts.map +1 -0
  537. package/dist/chains/graph_qa/cypher.js +126 -0
  538. package/dist/chains/graph_qa/cypher.js.map +1 -0
  539. package/dist/chains/graph_qa/prompts.cjs +46 -0
  540. package/dist/chains/graph_qa/prompts.cjs.map +1 -0
  541. package/dist/chains/graph_qa/prompts.js +44 -0
  542. package/dist/chains/graph_qa/prompts.js.map +1 -0
  543. package/dist/chains/history_aware_retriever.cjs +55 -0
  544. package/dist/chains/history_aware_retriever.cjs.map +1 -0
  545. package/dist/chains/history_aware_retriever.d.cts +64 -0
  546. package/dist/chains/history_aware_retriever.d.cts.map +1 -0
  547. package/dist/chains/history_aware_retriever.d.ts +64 -0
  548. package/dist/chains/history_aware_retriever.d.ts.map +1 -0
  549. package/dist/chains/history_aware_retriever.js +49 -0
  550. package/dist/chains/history_aware_retriever.js.map +1 -0
  551. package/dist/chains/index.cjs +106 -0
  552. package/dist/chains/index.cjs.map +1 -0
  553. package/dist/chains/index.d.cts +25 -0
  554. package/dist/chains/index.d.ts +25 -0
  555. package/dist/chains/index.js +67 -0
  556. package/dist/chains/index.js.map +1 -0
  557. package/dist/chains/llm_chain.cjs +152 -0
  558. package/dist/chains/llm_chain.cjs.map +1 -0
  559. package/dist/chains/llm_chain.d.cts +94 -0
  560. package/dist/chains/llm_chain.d.cts.map +1 -0
  561. package/dist/chains/llm_chain.d.ts +94 -0
  562. package/dist/chains/llm_chain.d.ts.map +1 -0
  563. package/dist/chains/llm_chain.js +151 -0
  564. package/dist/chains/llm_chain.js.map +1 -0
  565. package/dist/chains/load.cjs +46 -0
  566. package/dist/chains/load.cjs.map +1 -0
  567. package/dist/chains/load.d.cts +28 -0
  568. package/dist/chains/load.d.cts.map +1 -0
  569. package/dist/chains/load.d.ts +28 -0
  570. package/dist/chains/load.d.ts.map +1 -0
  571. package/dist/chains/load.js +40 -0
  572. package/dist/chains/load.js.map +1 -0
  573. package/dist/chains/openai_functions/base.cjs +139 -0
  574. package/dist/chains/openai_functions/base.cjs.map +1 -0
  575. package/dist/chains/openai_functions/base.d.cts +172 -0
  576. package/dist/chains/openai_functions/base.d.cts.map +1 -0
  577. package/dist/chains/openai_functions/base.d.ts +172 -0
  578. package/dist/chains/openai_functions/base.d.ts.map +1 -0
  579. package/dist/chains/openai_functions/base.js +137 -0
  580. package/dist/chains/openai_functions/base.js.map +1 -0
  581. package/dist/chains/openai_functions/extraction.cjs +71 -0
  582. package/dist/chains/openai_functions/extraction.cjs.map +1 -0
  583. package/dist/chains/openai_functions/extraction.d.cts +29 -0
  584. package/dist/chains/openai_functions/extraction.d.cts.map +1 -0
  585. package/dist/chains/openai_functions/extraction.d.ts +29 -0
  586. package/dist/chains/openai_functions/extraction.d.ts.map +1 -0
  587. package/dist/chains/openai_functions/extraction.js +69 -0
  588. package/dist/chains/openai_functions/extraction.js.map +1 -0
  589. package/dist/chains/openai_functions/index.cjs +33 -0
  590. package/dist/chains/openai_functions/index.cjs.map +1 -0
  591. package/dist/chains/openai_functions/index.d.cts +5 -0
  592. package/dist/chains/openai_functions/index.d.ts +5 -0
  593. package/dist/chains/openai_functions/index.js +21 -0
  594. package/dist/chains/openai_functions/index.js.map +1 -0
  595. package/dist/chains/openai_functions/openapi.cjs +290 -0
  596. package/dist/chains/openai_functions/openapi.cjs.map +1 -0
  597. package/dist/chains/openai_functions/openapi.d.cts +61 -0
  598. package/dist/chains/openai_functions/openapi.d.cts.map +1 -0
  599. package/dist/chains/openai_functions/openapi.d.ts +61 -0
  600. package/dist/chains/openai_functions/openapi.d.ts.map +1 -0
  601. package/dist/chains/openai_functions/openapi.js +288 -0
  602. package/dist/chains/openai_functions/openapi.js.map +1 -0
  603. package/dist/chains/openai_functions/tagging.cjs +72 -0
  604. package/dist/chains/openai_functions/tagging.cjs.map +1 -0
  605. package/dist/chains/openai_functions/tagging.d.cts +47 -0
  606. package/dist/chains/openai_functions/tagging.d.cts.map +1 -0
  607. package/dist/chains/openai_functions/tagging.d.ts +47 -0
  608. package/dist/chains/openai_functions/tagging.d.ts.map +1 -0
  609. package/dist/chains/openai_functions/tagging.js +70 -0
  610. package/dist/chains/openai_functions/tagging.js.map +1 -0
  611. package/dist/chains/query_constructor/index.cjs +145 -0
  612. package/dist/chains/query_constructor/index.cjs.map +1 -0
  613. package/dist/chains/query_constructor/index.d.cts +82 -0
  614. package/dist/chains/query_constructor/index.d.cts.map +1 -0
  615. package/dist/chains/query_constructor/index.d.ts +82 -0
  616. package/dist/chains/query_constructor/index.d.ts.map +1 -0
  617. package/dist/chains/query_constructor/index.js +130 -0
  618. package/dist/chains/query_constructor/index.js.map +1 -0
  619. package/dist/chains/query_constructor/ir.cjs +22 -0
  620. package/dist/chains/query_constructor/ir.cjs.map +1 -0
  621. package/dist/chains/query_constructor/ir.d.cts +1 -0
  622. package/dist/chains/query_constructor/ir.d.ts +1 -0
  623. package/dist/chains/query_constructor/ir.js +12 -0
  624. package/dist/chains/query_constructor/ir.js.map +1 -0
  625. package/dist/chains/query_constructor/parser.cjs +80 -0
  626. package/dist/chains/query_constructor/parser.cjs.map +1 -0
  627. package/dist/chains/query_constructor/parser.d.cts +43 -0
  628. package/dist/chains/query_constructor/parser.d.cts.map +1 -0
  629. package/dist/chains/query_constructor/parser.d.ts +43 -0
  630. package/dist/chains/query_constructor/parser.d.ts.map +1 -0
  631. package/dist/chains/query_constructor/parser.js +79 -0
  632. package/dist/chains/query_constructor/parser.js.map +1 -0
  633. package/dist/chains/query_constructor/prompt.cjs +137 -0
  634. package/dist/chains/query_constructor/prompt.cjs.map +1 -0
  635. package/dist/chains/query_constructor/prompt.d.cts +22 -0
  636. package/dist/chains/query_constructor/prompt.d.cts.map +1 -0
  637. package/dist/chains/query_constructor/prompt.d.ts +22 -0
  638. package/dist/chains/query_constructor/prompt.d.ts.map +1 -0
  639. package/dist/chains/query_constructor/prompt.js +132 -0
  640. package/dist/chains/query_constructor/prompt.js.map +1 -0
  641. package/dist/chains/question_answering/load.cjs +99 -0
  642. package/dist/chains/question_answering/load.cjs.map +1 -0
  643. package/dist/chains/question_answering/load.d.cts +72 -0
  644. package/dist/chains/question_answering/load.d.cts.map +1 -0
  645. package/dist/chains/question_answering/load.d.ts +72 -0
  646. package/dist/chains/question_answering/load.d.ts.map +1 -0
  647. package/dist/chains/question_answering/load.js +96 -0
  648. package/dist/chains/question_answering/load.js.map +1 -0
  649. package/dist/chains/question_answering/map_reduce_prompts.cjs +61 -0
  650. package/dist/chains/question_answering/map_reduce_prompts.cjs.map +1 -0
  651. package/dist/chains/question_answering/map_reduce_prompts.js +59 -0
  652. package/dist/chains/question_answering/map_reduce_prompts.js.map +1 -0
  653. package/dist/chains/question_answering/refine_prompts.cjs +60 -0
  654. package/dist/chains/question_answering/refine_prompts.cjs.map +1 -0
  655. package/dist/chains/question_answering/refine_prompts.js +58 -0
  656. package/dist/chains/question_answering/refine_prompts.js.map +1 -0
  657. package/dist/chains/question_answering/stuff_prompts.cjs +20 -0
  658. package/dist/chains/question_answering/stuff_prompts.cjs.map +1 -0
  659. package/dist/chains/question_answering/stuff_prompts.js +19 -0
  660. package/dist/chains/question_answering/stuff_prompts.js.map +1 -0
  661. package/dist/chains/retrieval.cjs +55 -0
  662. package/dist/chains/retrieval.cjs.map +1 -0
  663. package/dist/chains/retrieval.d.cts +77 -0
  664. package/dist/chains/retrieval.d.cts.map +1 -0
  665. package/dist/chains/retrieval.d.ts +77 -0
  666. package/dist/chains/retrieval.d.ts.map +1 -0
  667. package/dist/chains/retrieval.js +49 -0
  668. package/dist/chains/retrieval.js.map +1 -0
  669. package/dist/chains/retrieval_qa.cjs +104 -0
  670. package/dist/chains/retrieval_qa.cjs.map +1 -0
  671. package/dist/chains/retrieval_qa.d.cts +79 -0
  672. package/dist/chains/retrieval_qa.d.cts.map +1 -0
  673. package/dist/chains/retrieval_qa.d.ts +79 -0
  674. package/dist/chains/retrieval_qa.d.ts.map +1 -0
  675. package/dist/chains/retrieval_qa.js +104 -0
  676. package/dist/chains/retrieval_qa.js.map +1 -0
  677. package/dist/chains/router/llm_router.cjs +50 -0
  678. package/dist/chains/router/llm_router.cjs.map +1 -0
  679. package/dist/chains/router/llm_router.d.cts +54 -0
  680. package/dist/chains/router/llm_router.d.cts.map +1 -0
  681. package/dist/chains/router/llm_router.d.ts +54 -0
  682. package/dist/chains/router/llm_router.d.ts.map +1 -0
  683. package/dist/chains/router/llm_router.js +50 -0
  684. package/dist/chains/router/llm_router.js.map +1 -0
  685. package/dist/chains/router/multi_prompt.cjs +116 -0
  686. package/dist/chains/router/multi_prompt.cjs.map +1 -0
  687. package/dist/chains/router/multi_prompt.d.cts +76 -0
  688. package/dist/chains/router/multi_prompt.d.cts.map +1 -0
  689. package/dist/chains/router/multi_prompt.d.ts +76 -0
  690. package/dist/chains/router/multi_prompt.d.ts.map +1 -0
  691. package/dist/chains/router/multi_prompt.js +115 -0
  692. package/dist/chains/router/multi_prompt.js.map +1 -0
  693. package/dist/chains/router/multi_prompt_prompt.cjs +22 -0
  694. package/dist/chains/router/multi_prompt_prompt.cjs.map +1 -0
  695. package/dist/chains/router/multi_prompt_prompt.js +21 -0
  696. package/dist/chains/router/multi_prompt_prompt.js.map +1 -0
  697. package/dist/chains/router/multi_retrieval_prompt.cjs +22 -0
  698. package/dist/chains/router/multi_retrieval_prompt.cjs.map +1 -0
  699. package/dist/chains/router/multi_retrieval_prompt.js +21 -0
  700. package/dist/chains/router/multi_retrieval_prompt.js.map +1 -0
  701. package/dist/chains/router/multi_retrieval_qa.cjs +137 -0
  702. package/dist/chains/router/multi_retrieval_qa.cjs.map +1 -0
  703. package/dist/chains/router/multi_retrieval_qa.d.cts +100 -0
  704. package/dist/chains/router/multi_retrieval_qa.d.cts.map +1 -0
  705. package/dist/chains/router/multi_retrieval_qa.d.ts +100 -0
  706. package/dist/chains/router/multi_retrieval_qa.d.ts.map +1 -0
  707. package/dist/chains/router/multi_retrieval_qa.js +136 -0
  708. package/dist/chains/router/multi_retrieval_qa.js.map +1 -0
  709. package/dist/chains/router/multi_route.cjs +69 -0
  710. package/dist/chains/router/multi_route.cjs.map +1 -0
  711. package/dist/chains/router/multi_route.d.cts +69 -0
  712. package/dist/chains/router/multi_route.d.cts.map +1 -0
  713. package/dist/chains/router/multi_route.d.ts +69 -0
  714. package/dist/chains/router/multi_route.d.ts.map +1 -0
  715. package/dist/chains/router/multi_route.js +68 -0
  716. package/dist/chains/router/multi_route.js.map +1 -0
  717. package/dist/chains/router/utils.cjs +18 -0
  718. package/dist/chains/router/utils.cjs.map +1 -0
  719. package/dist/chains/router/utils.js +17 -0
  720. package/dist/chains/router/utils.js.map +1 -0
  721. package/dist/chains/sequential_chain.cjs +250 -0
  722. package/dist/chains/sequential_chain.cjs.map +1 -0
  723. package/dist/chains/sequential_chain.d.cts +148 -0
  724. package/dist/chains/sequential_chain.d.cts.map +1 -0
  725. package/dist/chains/sequential_chain.d.ts +148 -0
  726. package/dist/chains/sequential_chain.d.ts.map +1 -0
  727. package/dist/chains/sequential_chain.js +249 -0
  728. package/dist/chains/sequential_chain.js.map +1 -0
  729. package/dist/chains/serde.d.cts +156 -0
  730. package/dist/chains/serde.d.cts.map +1 -0
  731. package/dist/chains/serde.d.ts +156 -0
  732. package/dist/chains/serde.d.ts.map +1 -0
  733. package/dist/chains/sql_db/index.cjs +35 -0
  734. package/dist/chains/sql_db/index.cjs.map +1 -0
  735. package/dist/chains/sql_db/index.d.cts +3 -0
  736. package/dist/chains/sql_db/index.d.ts +3 -0
  737. package/dist/chains/sql_db/index.js +21 -0
  738. package/dist/chains/sql_db/index.js.map +1 -0
  739. package/dist/chains/sql_db/sql_db_chain.cjs +196 -0
  740. package/dist/chains/sql_db/sql_db_chain.cjs.map +1 -0
  741. package/dist/chains/sql_db/sql_db_chain.d.cts +124 -0
  742. package/dist/chains/sql_db/sql_db_chain.d.cts.map +1 -0
  743. package/dist/chains/sql_db/sql_db_chain.d.ts +124 -0
  744. package/dist/chains/sql_db/sql_db_chain.d.ts.map +1 -0
  745. package/dist/chains/sql_db/sql_db_chain.js +194 -0
  746. package/dist/chains/sql_db/sql_db_chain.js.map +1 -0
  747. package/dist/chains/sql_db/sql_db_prompt.cjs +194 -0
  748. package/dist/chains/sql_db/sql_db_prompt.cjs.map +1 -0
  749. package/dist/chains/sql_db/sql_db_prompt.d.cts +44 -0
  750. package/dist/chains/sql_db/sql_db_prompt.d.cts.map +1 -0
  751. package/dist/chains/sql_db/sql_db_prompt.d.ts +44 -0
  752. package/dist/chains/sql_db/sql_db_prompt.d.ts.map +1 -0
  753. package/dist/chains/sql_db/sql_db_prompt.js +186 -0
  754. package/dist/chains/sql_db/sql_db_prompt.js.map +1 -0
  755. package/dist/chains/summarization/load.cjs +74 -0
  756. package/dist/chains/summarization/load.cjs.map +1 -0
  757. package/dist/chains/summarization/load.d.cts +33 -0
  758. package/dist/chains/summarization/load.d.cts.map +1 -0
  759. package/dist/chains/summarization/load.d.ts +33 -0
  760. package/dist/chains/summarization/load.d.ts.map +1 -0
  761. package/dist/chains/summarization/load.js +74 -0
  762. package/dist/chains/summarization/load.js.map +1 -0
  763. package/dist/chains/summarization/refine_prompts.cjs +24 -0
  764. package/dist/chains/summarization/refine_prompts.cjs.map +1 -0
  765. package/dist/chains/summarization/refine_prompts.js +23 -0
  766. package/dist/chains/summarization/refine_prompts.js.map +1 -0
  767. package/dist/chains/summarization/stuff_prompts.cjs +19 -0
  768. package/dist/chains/summarization/stuff_prompts.cjs.map +1 -0
  769. package/dist/chains/summarization/stuff_prompts.js +18 -0
  770. package/dist/chains/summarization/stuff_prompts.js.map +1 -0
  771. package/dist/chains/transform.cjs +39 -0
  772. package/dist/chains/transform.cjs.map +1 -0
  773. package/dist/chains/transform.d.cts +36 -0
  774. package/dist/chains/transform.d.cts.map +1 -0
  775. package/dist/chains/transform.d.ts +36 -0
  776. package/dist/chains/transform.d.ts.map +1 -0
  777. package/dist/chains/transform.js +39 -0
  778. package/dist/chains/transform.js.map +1 -0
  779. package/dist/chains/vector_db_qa.cjs +91 -0
  780. package/dist/chains/vector_db_qa.cjs.map +1 -0
  781. package/dist/chains/vector_db_qa.d.cts +58 -0
  782. package/dist/chains/vector_db_qa.d.cts.map +1 -0
  783. package/dist/chains/vector_db_qa.d.ts +58 -0
  784. package/dist/chains/vector_db_qa.d.ts.map +1 -0
  785. package/dist/chains/vector_db_qa.js +91 -0
  786. package/dist/chains/vector_db_qa.js.map +1 -0
  787. package/dist/chat_models/universal.cjs +551 -0
  788. package/dist/chat_models/universal.cjs.map +1 -0
  789. package/dist/chat_models/universal.d.cts +218 -0
  790. package/dist/chat_models/universal.d.cts.map +1 -0
  791. package/dist/chat_models/universal.d.ts +218 -0
  792. package/dist/chat_models/universal.d.ts.map +1 -0
  793. package/dist/chat_models/universal.js +541 -0
  794. package/dist/chat_models/universal.js.map +1 -0
  795. package/dist/document.cjs +21 -0
  796. package/dist/document.cjs.map +1 -0
  797. package/dist/document.d.cts +2 -0
  798. package/dist/document.d.ts +2 -0
  799. package/dist/document.js +10 -0
  800. package/dist/document.js.map +1 -0
  801. package/dist/document_loaders/base.cjs +22 -0
  802. package/dist/document_loaders/base.cjs.map +1 -0
  803. package/dist/document_loaders/base.d.cts +1 -0
  804. package/dist/document_loaders/base.d.ts +1 -0
  805. package/dist/document_loaders/base.js +12 -0
  806. package/dist/document_loaders/base.js.map +1 -0
  807. package/dist/document_loaders/fs/buffer.cjs +69 -0
  808. package/dist/document_loaders/fs/buffer.cjs.map +1 -0
  809. package/dist/document_loaders/fs/buffer.d.cts +46 -0
  810. package/dist/document_loaders/fs/buffer.d.cts.map +1 -0
  811. package/dist/document_loaders/fs/buffer.d.ts +46 -0
  812. package/dist/document_loaders/fs/buffer.d.ts.map +1 -0
  813. package/dist/document_loaders/fs/buffer.js +63 -0
  814. package/dist/document_loaders/fs/buffer.js.map +1 -0
  815. package/dist/document_loaders/fs/directory.cjs +116 -0
  816. package/dist/document_loaders/fs/directory.cjs.map +1 -0
  817. package/dist/document_loaders/fs/directory.d.cts +76 -0
  818. package/dist/document_loaders/fs/directory.d.cts.map +1 -0
  819. package/dist/document_loaders/fs/directory.d.ts +76 -0
  820. package/dist/document_loaders/fs/directory.d.ts.map +1 -0
  821. package/dist/document_loaders/fs/directory.js +109 -0
  822. package/dist/document_loaders/fs/directory.js.map +1 -0
  823. package/dist/document_loaders/fs/json.cjs +128 -0
  824. package/dist/document_loaders/fs/json.cjs.map +1 -0
  825. package/dist/document_loaders/fs/json.d.cts +65 -0
  826. package/dist/document_loaders/fs/json.d.cts.map +1 -0
  827. package/dist/document_loaders/fs/json.d.ts +65 -0
  828. package/dist/document_loaders/fs/json.d.ts.map +1 -0
  829. package/dist/document_loaders/fs/json.js +121 -0
  830. package/dist/document_loaders/fs/json.js.map +1 -0
  831. package/dist/document_loaders/fs/multi_file.cjs +82 -0
  832. package/dist/document_loaders/fs/multi_file.cjs.map +1 -0
  833. package/dist/document_loaders/fs/multi_file.d.cts +43 -0
  834. package/dist/document_loaders/fs/multi_file.d.cts.map +1 -0
  835. package/dist/document_loaders/fs/multi_file.d.ts +43 -0
  836. package/dist/document_loaders/fs/multi_file.d.ts.map +1 -0
  837. package/dist/document_loaders/fs/multi_file.js +76 -0
  838. package/dist/document_loaders/fs/multi_file.js.map +1 -0
  839. package/dist/document_loaders/fs/text.cjs +101 -0
  840. package/dist/document_loaders/fs/text.cjs.map +1 -0
  841. package/dist/document_loaders/fs/text.d.cts +57 -0
  842. package/dist/document_loaders/fs/text.d.cts.map +1 -0
  843. package/dist/document_loaders/fs/text.d.ts +57 -0
  844. package/dist/document_loaders/fs/text.d.ts.map +1 -0
  845. package/dist/document_loaders/fs/text.js +95 -0
  846. package/dist/document_loaders/fs/text.js.map +1 -0
  847. package/dist/document_transformers/openai_functions.cjs +60 -0
  848. package/dist/document_transformers/openai_functions.cjs.map +1 -0
  849. package/dist/document_transformers/openai_functions.d.cts +29 -0
  850. package/dist/document_transformers/openai_functions.d.cts.map +1 -0
  851. package/dist/document_transformers/openai_functions.d.ts +29 -0
  852. package/dist/document_transformers/openai_functions.d.ts.map +1 -0
  853. package/dist/document_transformers/openai_functions.js +52 -0
  854. package/dist/document_transformers/openai_functions.js.map +1 -0
  855. package/dist/embeddings/cache_backed.cjs +140 -0
  856. package/dist/embeddings/cache_backed.cjs.map +1 -0
  857. package/dist/embeddings/cache_backed.d.cts +107 -0
  858. package/dist/embeddings/cache_backed.d.cts.map +1 -0
  859. package/dist/embeddings/cache_backed.d.ts +107 -0
  860. package/dist/embeddings/cache_backed.d.ts.map +1 -0
  861. package/dist/embeddings/cache_backed.js +134 -0
  862. package/dist/embeddings/cache_backed.js.map +1 -0
  863. package/dist/embeddings/fake.cjs +22 -0
  864. package/dist/embeddings/fake.cjs.map +1 -0
  865. package/dist/embeddings/fake.d.cts +1 -0
  866. package/dist/embeddings/fake.d.ts +1 -0
  867. package/dist/embeddings/fake.js +12 -0
  868. package/dist/embeddings/fake.js.map +1 -0
  869. package/dist/evaluation/agents/index.cjs +1 -0
  870. package/dist/evaluation/agents/index.js +1 -0
  871. package/dist/evaluation/agents/prompt.cjs +132 -0
  872. package/dist/evaluation/agents/prompt.cjs.map +1 -0
  873. package/dist/evaluation/agents/prompt.js +130 -0
  874. package/dist/evaluation/agents/prompt.js.map +1 -0
  875. package/dist/evaluation/agents/trajectory.cjs +132 -0
  876. package/dist/evaluation/agents/trajectory.cjs.map +1 -0
  877. package/dist/evaluation/agents/trajectory.d.cts +61 -0
  878. package/dist/evaluation/agents/trajectory.d.cts.map +1 -0
  879. package/dist/evaluation/agents/trajectory.d.ts +61 -0
  880. package/dist/evaluation/agents/trajectory.d.ts.map +1 -0
  881. package/dist/evaluation/agents/trajectory.js +130 -0
  882. package/dist/evaluation/agents/trajectory.js.map +1 -0
  883. package/dist/evaluation/base.cjs +169 -0
  884. package/dist/evaluation/base.cjs.map +1 -0
  885. package/dist/evaluation/base.d.cts +240 -0
  886. package/dist/evaluation/base.d.cts.map +1 -0
  887. package/dist/evaluation/base.d.ts +240 -0
  888. package/dist/evaluation/base.d.ts.map +1 -0
  889. package/dist/evaluation/base.js +164 -0
  890. package/dist/evaluation/base.js.map +1 -0
  891. package/dist/evaluation/comparison/index.cjs +1 -0
  892. package/dist/evaluation/comparison/index.js +1 -0
  893. package/dist/evaluation/comparison/pairwise.cjs +178 -0
  894. package/dist/evaluation/comparison/pairwise.cjs.map +1 -0
  895. package/dist/evaluation/comparison/pairwise.d.cts +56 -0
  896. package/dist/evaluation/comparison/pairwise.d.cts.map +1 -0
  897. package/dist/evaluation/comparison/pairwise.d.ts +56 -0
  898. package/dist/evaluation/comparison/pairwise.d.ts.map +1 -0
  899. package/dist/evaluation/comparison/pairwise.js +175 -0
  900. package/dist/evaluation/comparison/pairwise.js.map +1 -0
  901. package/dist/evaluation/comparison/prompt.cjs +77 -0
  902. package/dist/evaluation/comparison/prompt.cjs.map +1 -0
  903. package/dist/evaluation/comparison/prompt.js +75 -0
  904. package/dist/evaluation/comparison/prompt.js.map +1 -0
  905. package/dist/evaluation/criteria/criteria.cjs +164 -0
  906. package/dist/evaluation/criteria/criteria.cjs.map +1 -0
  907. package/dist/evaluation/criteria/criteria.d.cts +85 -0
  908. package/dist/evaluation/criteria/criteria.d.cts.map +1 -0
  909. package/dist/evaluation/criteria/criteria.d.ts +85 -0
  910. package/dist/evaluation/criteria/criteria.d.ts.map +1 -0
  911. package/dist/evaluation/criteria/criteria.js +161 -0
  912. package/dist/evaluation/criteria/criteria.js.map +1 -0
  913. package/dist/evaluation/criteria/index.cjs +1 -0
  914. package/dist/evaluation/criteria/index.js +1 -0
  915. package/dist/evaluation/criteria/prompt.cjs +50 -0
  916. package/dist/evaluation/criteria/prompt.cjs.map +1 -0
  917. package/dist/evaluation/criteria/prompt.js +48 -0
  918. package/dist/evaluation/criteria/prompt.js.map +1 -0
  919. package/dist/evaluation/embedding_distance/base.cjs +108 -0
  920. package/dist/evaluation/embedding_distance/base.cjs.map +1 -0
  921. package/dist/evaluation/embedding_distance/base.d.cts +82 -0
  922. package/dist/evaluation/embedding_distance/base.d.cts.map +1 -0
  923. package/dist/evaluation/embedding_distance/base.d.ts +82 -0
  924. package/dist/evaluation/embedding_distance/base.d.ts.map +1 -0
  925. package/dist/evaluation/embedding_distance/base.js +105 -0
  926. package/dist/evaluation/embedding_distance/base.js.map +1 -0
  927. package/dist/evaluation/embedding_distance/index.cjs +1 -0
  928. package/dist/evaluation/embedding_distance/index.js +1 -0
  929. package/dist/evaluation/index.cjs +54 -0
  930. package/dist/evaluation/index.cjs.map +1 -0
  931. package/dist/evaluation/index.d.cts +8 -0
  932. package/dist/evaluation/index.d.ts +8 -0
  933. package/dist/evaluation/index.js +35 -0
  934. package/dist/evaluation/index.js.map +1 -0
  935. package/dist/evaluation/loader.cjs +57 -0
  936. package/dist/evaluation/loader.cjs.map +1 -0
  937. package/dist/evaluation/loader.d.cts +38 -0
  938. package/dist/evaluation/loader.d.cts.map +1 -0
  939. package/dist/evaluation/loader.d.ts +38 -0
  940. package/dist/evaluation/loader.d.ts.map +1 -0
  941. package/dist/evaluation/loader.js +56 -0
  942. package/dist/evaluation/loader.js.map +1 -0
  943. package/dist/evaluation/qa/eval_chain.cjs +41 -0
  944. package/dist/evaluation/qa/eval_chain.cjs.map +1 -0
  945. package/dist/evaluation/qa/eval_chain.d.cts +22 -0
  946. package/dist/evaluation/qa/eval_chain.d.cts.map +1 -0
  947. package/dist/evaluation/qa/eval_chain.d.ts +22 -0
  948. package/dist/evaluation/qa/eval_chain.d.ts.map +1 -0
  949. package/dist/evaluation/qa/eval_chain.js +41 -0
  950. package/dist/evaluation/qa/eval_chain.js.map +1 -0
  951. package/dist/evaluation/qa/index.cjs +1 -0
  952. package/dist/evaluation/qa/index.js +1 -0
  953. package/dist/evaluation/qa/prompt.cjs +31 -0
  954. package/dist/evaluation/qa/prompt.cjs.map +1 -0
  955. package/dist/evaluation/qa/prompt.js +30 -0
  956. package/dist/evaluation/qa/prompt.js.map +1 -0
  957. package/dist/evaluation/types.d.cts +40 -0
  958. package/dist/evaluation/types.d.cts.map +1 -0
  959. package/dist/evaluation/types.d.ts +40 -0
  960. package/dist/evaluation/types.d.ts.map +1 -0
  961. package/dist/experimental/autogpt/agent.cjs +152 -0
  962. package/dist/experimental/autogpt/agent.cjs.map +1 -0
  963. package/dist/experimental/autogpt/agent.d.cts +102 -0
  964. package/dist/experimental/autogpt/agent.d.cts.map +1 -0
  965. package/dist/experimental/autogpt/agent.d.ts +102 -0
  966. package/dist/experimental/autogpt/agent.d.ts.map +1 -0
  967. package/dist/experimental/autogpt/agent.js +151 -0
  968. package/dist/experimental/autogpt/agent.js.map +1 -0
  969. package/dist/experimental/autogpt/index.cjs +26 -0
  970. package/dist/experimental/autogpt/index.cjs.map +1 -0
  971. package/dist/experimental/autogpt/index.d.cts +5 -0
  972. package/dist/experimental/autogpt/index.d.ts +5 -0
  973. package/dist/experimental/autogpt/index.js +17 -0
  974. package/dist/experimental/autogpt/index.js.map +1 -0
  975. package/dist/experimental/autogpt/output_parser.cjs +77 -0
  976. package/dist/experimental/autogpt/output_parser.cjs.map +1 -0
  977. package/dist/experimental/autogpt/output_parser.d.cts +39 -0
  978. package/dist/experimental/autogpt/output_parser.d.cts.map +1 -0
  979. package/dist/experimental/autogpt/output_parser.d.ts +39 -0
  980. package/dist/experimental/autogpt/output_parser.d.ts.map +1 -0
  981. package/dist/experimental/autogpt/output_parser.js +75 -0
  982. package/dist/experimental/autogpt/output_parser.js.map +1 -0
  983. package/dist/experimental/autogpt/prompt.cjs +110 -0
  984. package/dist/experimental/autogpt/prompt.cjs.map +1 -0
  985. package/dist/experimental/autogpt/prompt.d.cts +69 -0
  986. package/dist/experimental/autogpt/prompt.d.cts.map +1 -0
  987. package/dist/experimental/autogpt/prompt.d.ts +69 -0
  988. package/dist/experimental/autogpt/prompt.d.ts.map +1 -0
  989. package/dist/experimental/autogpt/prompt.js +109 -0
  990. package/dist/experimental/autogpt/prompt.js.map +1 -0
  991. package/dist/experimental/autogpt/prompt_generator.cjs +119 -0
  992. package/dist/experimental/autogpt/prompt_generator.cjs.map +1 -0
  993. package/dist/experimental/autogpt/prompt_generator.js +118 -0
  994. package/dist/experimental/autogpt/prompt_generator.js.map +1 -0
  995. package/dist/experimental/autogpt/schema.cjs +7 -0
  996. package/dist/experimental/autogpt/schema.cjs.map +1 -0
  997. package/dist/experimental/autogpt/schema.d.cts +24 -0
  998. package/dist/experimental/autogpt/schema.d.cts.map +1 -0
  999. package/dist/experimental/autogpt/schema.d.ts +24 -0
  1000. package/dist/experimental/autogpt/schema.d.ts.map +1 -0
  1001. package/dist/experimental/autogpt/schema.js +6 -0
  1002. package/dist/experimental/autogpt/schema.js.map +1 -0
  1003. package/dist/experimental/babyagi/agent.cjs +242 -0
  1004. package/dist/experimental/babyagi/agent.cjs.map +1 -0
  1005. package/dist/experimental/babyagi/agent.d.cts +159 -0
  1006. package/dist/experimental/babyagi/agent.d.cts.map +1 -0
  1007. package/dist/experimental/babyagi/agent.d.ts +159 -0
  1008. package/dist/experimental/babyagi/agent.d.ts.map +1 -0
  1009. package/dist/experimental/babyagi/agent.js +241 -0
  1010. package/dist/experimental/babyagi/agent.js.map +1 -0
  1011. package/dist/experimental/babyagi/index.cjs +27 -0
  1012. package/dist/experimental/babyagi/index.cjs.map +1 -0
  1013. package/dist/experimental/babyagi/index.d.cts +5 -0
  1014. package/dist/experimental/babyagi/index.d.ts +5 -0
  1015. package/dist/experimental/babyagi/index.js +18 -0
  1016. package/dist/experimental/babyagi/index.js.map +1 -0
  1017. package/dist/experimental/babyagi/task_creation.cjs +41 -0
  1018. package/dist/experimental/babyagi/task_creation.cjs.map +1 -0
  1019. package/dist/experimental/babyagi/task_creation.d.cts +21 -0
  1020. package/dist/experimental/babyagi/task_creation.d.cts.map +1 -0
  1021. package/dist/experimental/babyagi/task_creation.d.ts +21 -0
  1022. package/dist/experimental/babyagi/task_creation.d.ts.map +1 -0
  1023. package/dist/experimental/babyagi/task_creation.js +40 -0
  1024. package/dist/experimental/babyagi/task_creation.js.map +1 -0
  1025. package/dist/experimental/babyagi/task_execution.cjs +39 -0
  1026. package/dist/experimental/babyagi/task_execution.cjs.map +1 -0
  1027. package/dist/experimental/babyagi/task_execution.d.cts +20 -0
  1028. package/dist/experimental/babyagi/task_execution.d.cts.map +1 -0
  1029. package/dist/experimental/babyagi/task_execution.d.ts +20 -0
  1030. package/dist/experimental/babyagi/task_execution.d.ts.map +1 -0
  1031. package/dist/experimental/babyagi/task_execution.js +38 -0
  1032. package/dist/experimental/babyagi/task_execution.js.map +1 -0
  1033. package/dist/experimental/babyagi/task_prioritization.cjs +38 -0
  1034. package/dist/experimental/babyagi/task_prioritization.cjs.map +1 -0
  1035. package/dist/experimental/babyagi/task_prioritization.d.cts +19 -0
  1036. package/dist/experimental/babyagi/task_prioritization.d.cts.map +1 -0
  1037. package/dist/experimental/babyagi/task_prioritization.d.ts +19 -0
  1038. package/dist/experimental/babyagi/task_prioritization.d.ts.map +1 -0
  1039. package/dist/experimental/babyagi/task_prioritization.js +37 -0
  1040. package/dist/experimental/babyagi/task_prioritization.js.map +1 -0
  1041. package/dist/experimental/chains/violation_of_expectations/index.cjs +16 -0
  1042. package/dist/experimental/chains/violation_of_expectations/index.cjs.map +1 -0
  1043. package/dist/experimental/chains/violation_of_expectations/index.d.cts +2 -0
  1044. package/dist/experimental/chains/violation_of_expectations/index.d.ts +2 -0
  1045. package/dist/experimental/chains/violation_of_expectations/index.js +10 -0
  1046. package/dist/experimental/chains/violation_of_expectations/index.js.map +1 -0
  1047. package/dist/experimental/chains/violation_of_expectations/types.cjs +53 -0
  1048. package/dist/experimental/chains/violation_of_expectations/types.cjs.map +1 -0
  1049. package/dist/experimental/chains/violation_of_expectations/types.d.cts +19 -0
  1050. package/dist/experimental/chains/violation_of_expectations/types.d.cts.map +1 -0
  1051. package/dist/experimental/chains/violation_of_expectations/types.d.ts +19 -0
  1052. package/dist/experimental/chains/violation_of_expectations/types.d.ts.map +1 -0
  1053. package/dist/experimental/chains/violation_of_expectations/types.js +51 -0
  1054. package/dist/experimental/chains/violation_of_expectations/types.js.map +1 -0
  1055. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.cjs +263 -0
  1056. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.cjs.map +1 -0
  1057. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.cts +102 -0
  1058. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.cts.map +1 -0
  1059. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts +102 -0
  1060. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts.map +1 -0
  1061. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.js +262 -0
  1062. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.js.map +1 -0
  1063. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.cjs +52 -0
  1064. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.cjs.map +1 -0
  1065. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.js +48 -0
  1066. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.js.map +1 -0
  1067. package/dist/experimental/generative_agents/generative_agent.cjs +319 -0
  1068. package/dist/experimental/generative_agents/generative_agent.cjs.map +1 -0
  1069. package/dist/experimental/generative_agents/generative_agent.d.cts +174 -0
  1070. package/dist/experimental/generative_agents/generative_agent.d.cts.map +1 -0
  1071. package/dist/experimental/generative_agents/generative_agent.d.ts +174 -0
  1072. package/dist/experimental/generative_agents/generative_agent.d.ts.map +1 -0
  1073. package/dist/experimental/generative_agents/generative_agent.js +318 -0
  1074. package/dist/experimental/generative_agents/generative_agent.js.map +1 -0
  1075. package/dist/experimental/generative_agents/generative_agent_memory.cjs +364 -0
  1076. package/dist/experimental/generative_agents/generative_agent_memory.cjs.map +1 -0
  1077. package/dist/experimental/generative_agents/generative_agent_memory.d.cts +205 -0
  1078. package/dist/experimental/generative_agents/generative_agent_memory.d.cts.map +1 -0
  1079. package/dist/experimental/generative_agents/generative_agent_memory.d.ts +205 -0
  1080. package/dist/experimental/generative_agents/generative_agent_memory.d.ts.map +1 -0
  1081. package/dist/experimental/generative_agents/generative_agent_memory.js +363 -0
  1082. package/dist/experimental/generative_agents/generative_agent_memory.js.map +1 -0
  1083. package/dist/experimental/generative_agents/index.cjs +21 -0
  1084. package/dist/experimental/generative_agents/index.cjs.map +1 -0
  1085. package/dist/experimental/generative_agents/index.d.cts +3 -0
  1086. package/dist/experimental/generative_agents/index.d.ts +3 -0
  1087. package/dist/experimental/generative_agents/index.js +14 -0
  1088. package/dist/experimental/generative_agents/index.js.map +1 -0
  1089. package/dist/experimental/masking/index.cjs +24 -0
  1090. package/dist/experimental/masking/index.cjs.map +1 -0
  1091. package/dist/experimental/masking/index.d.cts +5 -0
  1092. package/dist/experimental/masking/index.d.ts +5 -0
  1093. package/dist/experimental/masking/index.js +16 -0
  1094. package/dist/experimental/masking/index.js.map +1 -0
  1095. package/dist/experimental/masking/parser.cjs +79 -0
  1096. package/dist/experimental/masking/parser.cjs.map +1 -0
  1097. package/dist/experimental/masking/parser.d.cts +50 -0
  1098. package/dist/experimental/masking/parser.d.cts.map +1 -0
  1099. package/dist/experimental/masking/parser.d.ts +50 -0
  1100. package/dist/experimental/masking/parser.d.ts.map +1 -0
  1101. package/dist/experimental/masking/parser.js +78 -0
  1102. package/dist/experimental/masking/parser.js.map +1 -0
  1103. package/dist/experimental/masking/regex_masking_transformer.cjs +91 -0
  1104. package/dist/experimental/masking/regex_masking_transformer.cjs.map +1 -0
  1105. package/dist/experimental/masking/regex_masking_transformer.d.cts +54 -0
  1106. package/dist/experimental/masking/regex_masking_transformer.d.cts.map +1 -0
  1107. package/dist/experimental/masking/regex_masking_transformer.d.ts +54 -0
  1108. package/dist/experimental/masking/regex_masking_transformer.d.ts.map +1 -0
  1109. package/dist/experimental/masking/regex_masking_transformer.js +91 -0
  1110. package/dist/experimental/masking/regex_masking_transformer.js.map +1 -0
  1111. package/dist/experimental/masking/transformer.cjs +10 -0
  1112. package/dist/experimental/masking/transformer.cjs.map +1 -0
  1113. package/dist/experimental/masking/transformer.d.cts +11 -0
  1114. package/dist/experimental/masking/transformer.d.cts.map +1 -0
  1115. package/dist/experimental/masking/transformer.d.ts +11 -0
  1116. package/dist/experimental/masking/transformer.d.ts.map +1 -0
  1117. package/dist/experimental/masking/transformer.js +9 -0
  1118. package/dist/experimental/masking/transformer.js.map +1 -0
  1119. package/dist/experimental/masking/types.d.cts +31 -0
  1120. package/dist/experimental/masking/types.d.cts.map +1 -0
  1121. package/dist/experimental/masking/types.d.ts +31 -0
  1122. package/dist/experimental/masking/types.d.ts.map +1 -0
  1123. package/dist/experimental/openai_assistant/index.cjs +236 -0
  1124. package/dist/experimental/openai_assistant/index.cjs.map +1 -0
  1125. package/dist/experimental/openai_assistant/index.d.cts +93 -0
  1126. package/dist/experimental/openai_assistant/index.d.cts.map +1 -0
  1127. package/dist/experimental/openai_assistant/index.d.ts +93 -0
  1128. package/dist/experimental/openai_assistant/index.d.ts.map +1 -0
  1129. package/dist/experimental/openai_assistant/index.js +229 -0
  1130. package/dist/experimental/openai_assistant/index.js.map +1 -0
  1131. package/dist/experimental/openai_assistant/schema.d.cts +17 -0
  1132. package/dist/experimental/openai_assistant/schema.d.cts.map +1 -0
  1133. package/dist/experimental/openai_assistant/schema.d.ts +17 -0
  1134. package/dist/experimental/openai_assistant/schema.d.ts.map +1 -0
  1135. package/dist/experimental/openai_files/index.cjs +92 -0
  1136. package/dist/experimental/openai_files/index.cjs.map +1 -0
  1137. package/dist/experimental/openai_files/index.d.cts +105 -0
  1138. package/dist/experimental/openai_files/index.d.cts.map +1 -0
  1139. package/dist/experimental/openai_files/index.d.ts +105 -0
  1140. package/dist/experimental/openai_files/index.d.ts.map +1 -0
  1141. package/dist/experimental/openai_files/index.js +86 -0
  1142. package/dist/experimental/openai_files/index.js.map +1 -0
  1143. package/dist/experimental/plan_and_execute/agent_executor.cjs +144 -0
  1144. package/dist/experimental/plan_and_execute/agent_executor.cjs.map +1 -0
  1145. package/dist/experimental/plan_and_execute/agent_executor.d.cts +97 -0
  1146. package/dist/experimental/plan_and_execute/agent_executor.d.cts.map +1 -0
  1147. package/dist/experimental/plan_and_execute/agent_executor.d.ts +97 -0
  1148. package/dist/experimental/plan_and_execute/agent_executor.d.ts.map +1 -0
  1149. package/dist/experimental/plan_and_execute/agent_executor.js +144 -0
  1150. package/dist/experimental/plan_and_execute/agent_executor.js.map +1 -0
  1151. package/dist/experimental/plan_and_execute/base.cjs +76 -0
  1152. package/dist/experimental/plan_and_execute/base.cjs.map +1 -0
  1153. package/dist/experimental/plan_and_execute/base.d.cts +90 -0
  1154. package/dist/experimental/plan_and_execute/base.d.cts.map +1 -0
  1155. package/dist/experimental/plan_and_execute/base.d.ts +90 -0
  1156. package/dist/experimental/plan_and_execute/base.d.ts.map +1 -0
  1157. package/dist/experimental/plan_and_execute/base.js +70 -0
  1158. package/dist/experimental/plan_and_execute/base.js.map +1 -0
  1159. package/dist/experimental/plan_and_execute/index.cjs +34 -0
  1160. package/dist/experimental/plan_and_execute/index.cjs.map +1 -0
  1161. package/dist/experimental/plan_and_execute/index.d.cts +4 -0
  1162. package/dist/experimental/plan_and_execute/index.d.ts +4 -0
  1163. package/dist/experimental/plan_and_execute/index.js +21 -0
  1164. package/dist/experimental/plan_and_execute/index.js.map +1 -0
  1165. package/dist/experimental/plan_and_execute/outputParser.cjs +40 -0
  1166. package/dist/experimental/plan_and_execute/outputParser.cjs.map +1 -0
  1167. package/dist/experimental/plan_and_execute/outputParser.d.cts +31 -0
  1168. package/dist/experimental/plan_and_execute/outputParser.d.cts.map +1 -0
  1169. package/dist/experimental/plan_and_execute/outputParser.d.ts +31 -0
  1170. package/dist/experimental/plan_and_execute/outputParser.d.ts.map +1 -0
  1171. package/dist/experimental/plan_and_execute/outputParser.js +39 -0
  1172. package/dist/experimental/plan_and_execute/outputParser.js.map +1 -0
  1173. package/dist/experimental/plan_and_execute/prompt.cjs +43 -0
  1174. package/dist/experimental/plan_and_execute/prompt.cjs.map +1 -0
  1175. package/dist/experimental/plan_and_execute/prompt.js +40 -0
  1176. package/dist/experimental/plan_and_execute/prompt.js.map +1 -0
  1177. package/dist/experimental/prompts/custom_format.cjs +58 -0
  1178. package/dist/experimental/prompts/custom_format.cjs.map +1 -0
  1179. package/dist/experimental/prompts/custom_format.d.cts +38 -0
  1180. package/dist/experimental/prompts/custom_format.d.cts.map +1 -0
  1181. package/dist/experimental/prompts/custom_format.d.ts +38 -0
  1182. package/dist/experimental/prompts/custom_format.d.ts.map +1 -0
  1183. package/dist/experimental/prompts/custom_format.js +52 -0
  1184. package/dist/experimental/prompts/custom_format.js.map +1 -0
  1185. package/dist/experimental/prompts/handlebars.cjs +72 -0
  1186. package/dist/experimental/prompts/handlebars.cjs.map +1 -0
  1187. package/dist/experimental/prompts/handlebars.d.cts +22 -0
  1188. package/dist/experimental/prompts/handlebars.d.cts.map +1 -0
  1189. package/dist/experimental/prompts/handlebars.d.ts +22 -0
  1190. package/dist/experimental/prompts/handlebars.d.ts.map +1 -0
  1191. package/dist/experimental/prompts/handlebars.js +64 -0
  1192. package/dist/experimental/prompts/handlebars.js.map +1 -0
  1193. package/dist/hub/base.cjs +112 -0
  1194. package/dist/hub/base.cjs.map +1 -0
  1195. package/dist/hub/base.d.cts +29 -0
  1196. package/dist/hub/base.d.cts.map +1 -0
  1197. package/dist/hub/base.d.ts +29 -0
  1198. package/dist/hub/base.d.ts.map +1 -0
  1199. package/dist/hub/base.js +107 -0
  1200. package/dist/hub/base.js.map +1 -0
  1201. package/dist/hub/index.cjs +49 -0
  1202. package/dist/hub/index.cjs.map +1 -0
  1203. package/dist/hub/index.d.cts +32 -0
  1204. package/dist/hub/index.d.cts.map +1 -0
  1205. package/dist/hub/index.d.ts +32 -0
  1206. package/dist/hub/index.d.ts.map +1 -0
  1207. package/dist/hub/index.js +48 -0
  1208. package/dist/hub/index.js.map +1 -0
  1209. package/dist/hub/node.cjs +35 -0
  1210. package/dist/hub/node.cjs.map +1 -0
  1211. package/dist/hub/node.d.cts +23 -0
  1212. package/dist/hub/node.d.cts.map +1 -0
  1213. package/dist/hub/node.d.ts +23 -0
  1214. package/dist/hub/node.d.ts.map +1 -0
  1215. package/dist/hub/node.js +34 -0
  1216. package/dist/hub/node.js.map +1 -0
  1217. package/dist/index.cjs +13 -0
  1218. package/dist/index.cjs.map +1 -0
  1219. package/dist/index.d.cts +1 -0
  1220. package/dist/index.d.ts +1 -0
  1221. package/dist/index.js +7 -0
  1222. package/dist/index.js.map +1 -0
  1223. package/dist/indexes/index.cjs +28 -0
  1224. package/dist/indexes/index.cjs.map +1 -0
  1225. package/dist/indexes/index.d.cts +2 -0
  1226. package/dist/indexes/index.d.ts +2 -0
  1227. package/dist/indexes/index.js +17 -0
  1228. package/dist/indexes/index.js.map +1 -0
  1229. package/dist/langchain-core/dist/load/map_keys.d.cts +10 -0
  1230. package/dist/langchain-core/dist/load/map_keys.d.cts.map +1 -0
  1231. package/dist/langchain-core/dist/load/serializable.d.cts +82 -0
  1232. package/dist/langchain-core/dist/load/serializable.d.cts.map +1 -0
  1233. package/dist/langchain-core/dist/messages/base.d.cts +125 -0
  1234. package/dist/langchain-core/dist/messages/base.d.cts.map +1 -0
  1235. package/dist/langchain-core/dist/messages/content/base.d.cts +22 -0
  1236. package/dist/langchain-core/dist/messages/content/base.d.cts.map +1 -0
  1237. package/dist/langchain-core/dist/messages/content/data.d.cts +96 -0
  1238. package/dist/langchain-core/dist/messages/content/data.d.cts.map +1 -0
  1239. package/dist/langchain-core/dist/messages/content/index.d.cts +121 -0
  1240. package/dist/langchain-core/dist/messages/content/index.d.cts.map +1 -0
  1241. package/dist/langchain-core/dist/messages/content/multimodal.d.cts +110 -0
  1242. package/dist/langchain-core/dist/messages/content/multimodal.d.cts.map +1 -0
  1243. package/dist/langchain-core/dist/messages/content/tools.d.cts +130 -0
  1244. package/dist/langchain-core/dist/messages/content/tools.d.cts.map +1 -0
  1245. package/dist/langchain-core/dist/messages/message.d.cts +598 -0
  1246. package/dist/langchain-core/dist/messages/message.d.cts.map +1 -0
  1247. package/dist/langchain-core/dist/messages/metadata.d.cts +100 -0
  1248. package/dist/langchain-core/dist/messages/metadata.d.cts.map +1 -0
  1249. package/dist/langchain-core/dist/messages/utils.d.cts +75 -0
  1250. package/dist/langchain-core/dist/messages/utils.d.cts.map +1 -0
  1251. package/dist/langchain-core/dist/prompt_values.d.cts +13 -0
  1252. package/dist/langchain-core/dist/prompt_values.d.cts.map +1 -0
  1253. package/dist/langchain-core/dist/tools/types.d.cts +41 -0
  1254. package/dist/langchain-core/dist/tools/types.d.cts.map +1 -0
  1255. package/dist/langchain-core/dist/utils/types/index.d.cts +8 -0
  1256. package/dist/langchain-core/dist/utils/types/index.d.cts.map +1 -0
  1257. package/dist/libs/langchain-core/dist/callbacks/base.d.ts +1 -0
  1258. package/dist/libs/langchain-core/dist/callbacks/manager.d.ts +2 -0
  1259. package/dist/libs/langchain-core/dist/language_models/base.d.ts +6 -0
  1260. package/dist/libs/langchain-core/dist/load/map_keys.d.ts +10 -0
  1261. package/dist/libs/langchain-core/dist/load/map_keys.d.ts.map +1 -0
  1262. package/dist/libs/langchain-core/dist/load/serializable.d.ts +82 -0
  1263. package/dist/libs/langchain-core/dist/load/serializable.d.ts.map +1 -0
  1264. package/dist/libs/langchain-core/dist/messages/base.d.ts +125 -0
  1265. package/dist/libs/langchain-core/dist/messages/base.d.ts.map +1 -0
  1266. package/dist/libs/langchain-core/dist/messages/content/base.d.ts +22 -0
  1267. package/dist/libs/langchain-core/dist/messages/content/base.d.ts.map +1 -0
  1268. package/dist/libs/langchain-core/dist/messages/content/data.d.ts +96 -0
  1269. package/dist/libs/langchain-core/dist/messages/content/data.d.ts.map +1 -0
  1270. package/dist/libs/langchain-core/dist/messages/content/index.d.ts +121 -0
  1271. package/dist/libs/langchain-core/dist/messages/content/index.d.ts.map +1 -0
  1272. package/dist/libs/langchain-core/dist/messages/content/multimodal.d.ts +110 -0
  1273. package/dist/libs/langchain-core/dist/messages/content/multimodal.d.ts.map +1 -0
  1274. package/dist/libs/langchain-core/dist/messages/content/tools.d.ts +130 -0
  1275. package/dist/libs/langchain-core/dist/messages/content/tools.d.ts.map +1 -0
  1276. package/dist/libs/langchain-core/dist/messages/message.d.ts +598 -0
  1277. package/dist/libs/langchain-core/dist/messages/message.d.ts.map +1 -0
  1278. package/dist/libs/langchain-core/dist/messages/metadata.d.ts +100 -0
  1279. package/dist/libs/langchain-core/dist/messages/metadata.d.ts.map +1 -0
  1280. package/dist/libs/langchain-core/dist/messages/utils.d.ts +75 -0
  1281. package/dist/libs/langchain-core/dist/messages/utils.d.ts.map +1 -0
  1282. package/dist/libs/langchain-core/dist/prompt_values.d.ts +13 -0
  1283. package/dist/libs/langchain-core/dist/prompt_values.d.ts.map +1 -0
  1284. package/dist/libs/langchain-core/dist/runnables/base.d.ts +8 -0
  1285. package/dist/libs/langchain-core/dist/runnables/graph.d.ts +1 -0
  1286. package/dist/libs/langchain-core/dist/runnables/types.d.ts +2 -0
  1287. package/dist/libs/langchain-core/dist/tools/types.d.ts +47 -0
  1288. package/dist/libs/langchain-core/dist/tools/types.d.ts.map +1 -0
  1289. package/dist/libs/langchain-core/dist/tracers/base.d.ts +2 -0
  1290. package/dist/libs/langchain-core/dist/tracers/event_stream.d.ts +1 -0
  1291. package/dist/libs/langchain-core/dist/tracers/log_stream.d.ts +3 -0
  1292. package/dist/libs/langchain-core/dist/utils/types/index.d.ts +10 -0
  1293. package/dist/libs/langchain-core/dist/utils/types/index.d.ts.map +1 -0
  1294. package/dist/libs/langchain-core/dist/utils/types/zod.d.ts +1 -0
  1295. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parseTypes.d.ts +16 -0
  1296. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/array.d.ts +2 -0
  1297. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/bigint.d.ts +1 -0
  1298. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/date.d.ts +2 -0
  1299. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/enum.d.ts +1 -0
  1300. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/intersection.d.ts +2 -0
  1301. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/literal.d.ts +1 -0
  1302. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/map.d.ts +2 -0
  1303. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts +1 -0
  1304. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/nullable.d.ts +2 -0
  1305. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/number.d.ts +1 -0
  1306. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/object.d.ts +2 -0
  1307. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/record.d.ts +4 -0
  1308. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/set.d.ts +2 -0
  1309. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/string.d.ts +1 -0
  1310. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/tuple.d.ts +2 -0
  1311. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/union.d.ts +2 -0
  1312. package/dist/load/import_constants.cjs +32 -0
  1313. package/dist/load/import_constants.cjs.map +1 -0
  1314. package/dist/load/import_constants.js +31 -0
  1315. package/dist/load/import_constants.js.map +1 -0
  1316. package/dist/load/import_map.cjs +200 -0
  1317. package/dist/load/import_map.cjs.map +1 -0
  1318. package/dist/load/import_map.js +195 -0
  1319. package/dist/load/import_map.js.map +1 -0
  1320. package/dist/load/import_type.d.cts +6 -0
  1321. package/dist/load/import_type.d.cts.map +1 -0
  1322. package/dist/load/import_type.d.ts +6 -0
  1323. package/dist/load/import_type.d.ts.map +1 -0
  1324. package/dist/load/index.cjs +30 -0
  1325. package/dist/load/index.cjs.map +1 -0
  1326. package/dist/load/index.d.cts +23 -0
  1327. package/dist/load/index.d.cts.map +1 -0
  1328. package/dist/load/index.d.ts +23 -0
  1329. package/dist/load/index.d.ts.map +1 -0
  1330. package/dist/load/index.js +29 -0
  1331. package/dist/load/index.js.map +1 -0
  1332. package/dist/load/map_keys.d.cts +8 -0
  1333. package/dist/load/map_keys.d.cts.map +1 -0
  1334. package/dist/load/map_keys.d.ts +8 -0
  1335. package/dist/load/map_keys.d.ts.map +1 -0
  1336. package/dist/load/serializable.cjs +22 -0
  1337. package/dist/load/serializable.cjs.map +1 -0
  1338. package/dist/load/serializable.d.cts +10 -0
  1339. package/dist/load/serializable.d.cts.map +1 -0
  1340. package/dist/load/serializable.d.ts +10 -0
  1341. package/dist/load/serializable.d.ts.map +1 -0
  1342. package/dist/load/serializable.js +12 -0
  1343. package/dist/load/serializable.js.map +1 -0
  1344. package/dist/memory/buffer_memory.cjs +80 -0
  1345. package/dist/memory/buffer_memory.cjs.map +1 -0
  1346. package/dist/memory/buffer_memory.d.cts +67 -0
  1347. package/dist/memory/buffer_memory.d.cts.map +1 -0
  1348. package/dist/memory/buffer_memory.d.ts +67 -0
  1349. package/dist/memory/buffer_memory.d.ts.map +1 -0
  1350. package/dist/memory/buffer_memory.js +79 -0
  1351. package/dist/memory/buffer_memory.js.map +1 -0
  1352. package/dist/memory/buffer_token_memory.cjs +80 -0
  1353. package/dist/memory/buffer_token_memory.cjs.map +1 -0
  1354. package/dist/memory/buffer_token_memory.d.cts +67 -0
  1355. package/dist/memory/buffer_token_memory.d.cts.map +1 -0
  1356. package/dist/memory/buffer_token_memory.d.ts +67 -0
  1357. package/dist/memory/buffer_token_memory.d.ts.map +1 -0
  1358. package/dist/memory/buffer_token_memory.js +79 -0
  1359. package/dist/memory/buffer_token_memory.js.map +1 -0
  1360. package/dist/memory/buffer_window_memory.cjs +77 -0
  1361. package/dist/memory/buffer_window_memory.cjs.map +1 -0
  1362. package/dist/memory/buffer_window_memory.d.cts +64 -0
  1363. package/dist/memory/buffer_window_memory.d.cts.map +1 -0
  1364. package/dist/memory/buffer_window_memory.d.ts +64 -0
  1365. package/dist/memory/buffer_window_memory.d.ts.map +1 -0
  1366. package/dist/memory/buffer_window_memory.js +76 -0
  1367. package/dist/memory/buffer_window_memory.js.map +1 -0
  1368. package/dist/memory/chat_memory.cjs +53 -0
  1369. package/dist/memory/chat_memory.cjs.map +1 -0
  1370. package/dist/memory/chat_memory.d.cts +42 -0
  1371. package/dist/memory/chat_memory.d.cts.map +1 -0
  1372. package/dist/memory/chat_memory.d.ts +42 -0
  1373. package/dist/memory/chat_memory.d.ts.map +1 -0
  1374. package/dist/memory/chat_memory.js +47 -0
  1375. package/dist/memory/chat_memory.js.map +1 -0
  1376. package/dist/memory/combined_memory.cjs +88 -0
  1377. package/dist/memory/combined_memory.cjs.map +1 -0
  1378. package/dist/memory/combined_memory.d.cts +60 -0
  1379. package/dist/memory/combined_memory.d.cts.map +1 -0
  1380. package/dist/memory/combined_memory.d.ts +60 -0
  1381. package/dist/memory/combined_memory.d.ts.map +1 -0
  1382. package/dist/memory/combined_memory.js +88 -0
  1383. package/dist/memory/combined_memory.js.map +1 -0
  1384. package/dist/memory/entity_memory.cjs +144 -0
  1385. package/dist/memory/entity_memory.cjs.map +1 -0
  1386. package/dist/memory/entity_memory.d.cts +99 -0
  1387. package/dist/memory/entity_memory.d.cts.map +1 -0
  1388. package/dist/memory/entity_memory.d.ts +99 -0
  1389. package/dist/memory/entity_memory.d.ts.map +1 -0
  1390. package/dist/memory/entity_memory.js +143 -0
  1391. package/dist/memory/entity_memory.js.map +1 -0
  1392. package/dist/memory/index.cjs +85 -0
  1393. package/dist/memory/index.cjs.map +1 -0
  1394. package/dist/memory/index.d.cts +14 -0
  1395. package/dist/memory/index.d.ts +14 -0
  1396. package/dist/memory/index.js +39 -0
  1397. package/dist/memory/index.js.map +1 -0
  1398. package/dist/memory/prompt.cjs +124 -0
  1399. package/dist/memory/prompt.cjs.map +1 -0
  1400. package/dist/memory/prompt.d.cts +12 -0
  1401. package/dist/memory/prompt.d.cts.map +1 -0
  1402. package/dist/memory/prompt.d.ts +12 -0
  1403. package/dist/memory/prompt.d.ts.map +1 -0
  1404. package/dist/memory/prompt.js +120 -0
  1405. package/dist/memory/prompt.js.map +1 -0
  1406. package/dist/memory/stores/entity/base.cjs +13 -0
  1407. package/dist/memory/stores/entity/base.cjs.map +1 -0
  1408. package/dist/memory/stores/entity/base.d.cts +18 -0
  1409. package/dist/memory/stores/entity/base.d.cts.map +1 -0
  1410. package/dist/memory/stores/entity/base.d.ts +18 -0
  1411. package/dist/memory/stores/entity/base.d.ts.map +1 -0
  1412. package/dist/memory/stores/entity/base.js +12 -0
  1413. package/dist/memory/stores/entity/base.js.map +1 -0
  1414. package/dist/memory/stores/entity/in_memory.cjs +64 -0
  1415. package/dist/memory/stores/entity/in_memory.cjs.map +1 -0
  1416. package/dist/memory/stores/entity/in_memory.js +64 -0
  1417. package/dist/memory/stores/entity/in_memory.js.map +1 -0
  1418. package/dist/memory/summary.cjs +127 -0
  1419. package/dist/memory/summary.cjs.map +1 -0
  1420. package/dist/memory/summary.d.cts +101 -0
  1421. package/dist/memory/summary.d.cts.map +1 -0
  1422. package/dist/memory/summary.d.ts +101 -0
  1423. package/dist/memory/summary.d.ts.map +1 -0
  1424. package/dist/memory/summary.js +125 -0
  1425. package/dist/memory/summary.js.map +1 -0
  1426. package/dist/memory/summary_buffer.cjs +117 -0
  1427. package/dist/memory/summary_buffer.cjs.map +1 -0
  1428. package/dist/memory/summary_buffer.d.cts +90 -0
  1429. package/dist/memory/summary_buffer.d.cts.map +1 -0
  1430. package/dist/memory/summary_buffer.d.ts +90 -0
  1431. package/dist/memory/summary_buffer.d.ts.map +1 -0
  1432. package/dist/memory/summary_buffer.js +116 -0
  1433. package/dist/memory/summary_buffer.js.map +1 -0
  1434. package/dist/memory/vector_store.cjs +87 -0
  1435. package/dist/memory/vector_store.cjs.map +1 -0
  1436. package/dist/memory/vector_store.d.cts +81 -0
  1437. package/dist/memory/vector_store.d.cts.map +1 -0
  1438. package/dist/memory/vector_store.d.ts +81 -0
  1439. package/dist/memory/vector_store.d.ts.map +1 -0
  1440. package/dist/memory/vector_store.js +86 -0
  1441. package/dist/memory/vector_store.js.map +1 -0
  1442. package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.cjs +248 -0
  1443. package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.cjs.map +1 -0
  1444. package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +244 -0
  1445. package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js.map +1 -0
  1446. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/client.cjs +3040 -0
  1447. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/client.cjs.map +1 -0
  1448. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/client.js +3039 -0
  1449. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/client.js.map +1 -0
  1450. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/env.cjs +12 -0
  1451. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/env.cjs.map +1 -0
  1452. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/env.js +12 -0
  1453. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/env.js.map +1 -0
  1454. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/constants.cjs +71 -0
  1455. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/constants.cjs.map +1 -0
  1456. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/constants.js +38 -0
  1457. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/constants.js.map +1 -0
  1458. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/translator.cjs +221 -0
  1459. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/translator.cjs.map +1 -0
  1460. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/translator.js +221 -0
  1461. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/translator.js.map +1 -0
  1462. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/index.cjs +11 -0
  1463. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/index.cjs.map +1 -0
  1464. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/index.js +11 -0
  1465. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/index.js.map +1 -0
  1466. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/run_trees.cjs +701 -0
  1467. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/run_trees.cjs.map +1 -0
  1468. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/run_trees.js +700 -0
  1469. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/run_trees.js.map +1 -0
  1470. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/constants.cjs +7 -0
  1471. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/constants.cjs.map +1 -0
  1472. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/constants.js +6 -0
  1473. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/constants.js.map +1 -0
  1474. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/fetch.cjs +29 -0
  1475. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/fetch.cjs.map +1 -0
  1476. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/fetch.js +28 -0
  1477. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/fetch.js.map +1 -0
  1478. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/otel.cjs +115 -0
  1479. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/otel.cjs.map +1 -0
  1480. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/otel.js +113 -0
  1481. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/otel.js.map +1 -0
  1482. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/_uuid.cjs +14 -0
  1483. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/_uuid.cjs.map +1 -0
  1484. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/_uuid.js +13 -0
  1485. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/_uuid.js.map +1 -0
  1486. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/async_caller.cjs +94 -0
  1487. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/async_caller.cjs.map +1 -0
  1488. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/async_caller.js +94 -0
  1489. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/async_caller.js.map +1 -0
  1490. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/env.cjs +140 -0
  1491. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/env.cjs.map +1 -0
  1492. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/env.js +135 -0
  1493. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/env.js.map +1 -0
  1494. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/error.cjs +89 -0
  1495. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/error.cjs.map +1 -0
  1496. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/error.js +86 -0
  1497. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/error.js.map +1 -0
  1498. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs +140 -0
  1499. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs.map +1 -0
  1500. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js +140 -0
  1501. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js.map +1 -0
  1502. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/messages.cjs +18 -0
  1503. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/messages.cjs.map +1 -0
  1504. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/messages.js +16 -0
  1505. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/messages.js.map +1 -0
  1506. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/project.cjs +10 -0
  1507. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/project.cjs.map +1 -0
  1508. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/project.js +10 -0
  1509. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/project.js.map +1 -0
  1510. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/prompts.cjs +30 -0
  1511. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/prompts.cjs.map +1 -0
  1512. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/prompts.js +30 -0
  1513. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/prompts.js.map +1 -0
  1514. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/warn.cjs +13 -0
  1515. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/warn.cjs.map +1 -0
  1516. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/warn.js +12 -0
  1517. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/warn.js.map +1 -0
  1518. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/index.cjs +6 -0
  1519. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/index.js +6 -0
  1520. package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.cjs +27 -0
  1521. package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.cjs.map +1 -0
  1522. package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.js +23 -0
  1523. package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.js.map +1 -0
  1524. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.cjs +267 -0
  1525. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.cjs.map +1 -0
  1526. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.js +263 -0
  1527. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.js.map +1 -0
  1528. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.cjs +32 -0
  1529. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.cjs.map +1 -0
  1530. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.js +28 -0
  1531. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.js.map +1 -0
  1532. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.cjs +49 -0
  1533. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.cjs.map +1 -0
  1534. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.js +45 -0
  1535. package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.js.map +1 -0
  1536. package/dist/node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.cjs +52 -0
  1537. package/dist/node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.cjs.map +1 -0
  1538. package/dist/node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.js +48 -0
  1539. package/dist/node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.js.map +1 -0
  1540. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.cjs +90 -0
  1541. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.cjs.map +1 -0
  1542. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js +86 -0
  1543. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js.map +1 -0
  1544. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.cjs +294 -0
  1545. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.cjs.map +1 -0
  1546. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js +290 -0
  1547. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js.map +1 -0
  1548. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.cjs +191 -0
  1549. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.cjs.map +1 -0
  1550. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js +187 -0
  1551. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js.map +1 -0
  1552. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.cjs +24 -0
  1553. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.cjs.map +1 -0
  1554. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js +20 -0
  1555. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js.map +1 -0
  1556. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.cjs +51 -0
  1557. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.cjs.map +1 -0
  1558. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js +47 -0
  1559. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js.map +1 -0
  1560. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.cjs +48 -0
  1561. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.cjs.map +1 -0
  1562. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js +44 -0
  1563. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js.map +1 -0
  1564. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.cjs +25 -0
  1565. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.cjs.map +1 -0
  1566. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js +21 -0
  1567. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js.map +1 -0
  1568. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.cjs +21 -0
  1569. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.cjs.map +1 -0
  1570. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js +17 -0
  1571. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js.map +1 -0
  1572. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.cjs +21 -0
  1573. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.cjs.map +1 -0
  1574. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js +17 -0
  1575. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js.map +1 -0
  1576. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.cjs +43 -0
  1577. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.cjs.map +1 -0
  1578. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js +39 -0
  1579. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js.map +1 -0
  1580. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.cjs +21 -0
  1581. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.cjs.map +1 -0
  1582. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js +17 -0
  1583. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js.map +1 -0
  1584. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.cjs +21 -0
  1585. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.cjs.map +1 -0
  1586. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js +17 -0
  1587. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js.map +1 -0
  1588. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.cjs +21 -0
  1589. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.cjs.map +1 -0
  1590. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js +17 -0
  1591. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js.map +1 -0
  1592. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.cjs +32 -0
  1593. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.cjs.map +1 -0
  1594. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js +28 -0
  1595. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js.map +1 -0
  1596. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.cjs +21 -0
  1597. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.cjs.map +1 -0
  1598. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js +17 -0
  1599. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js.map +1 -0
  1600. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.cjs +21 -0
  1601. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.cjs.map +1 -0
  1602. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js +17 -0
  1603. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js.map +1 -0
  1604. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.cjs +21 -0
  1605. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.cjs.map +1 -0
  1606. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js +17 -0
  1607. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js.map +1 -0
  1608. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.cjs +21 -0
  1609. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.cjs.map +1 -0
  1610. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js +17 -0
  1611. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js.map +1 -0
  1612. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.cjs +21 -0
  1613. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.cjs.map +1 -0
  1614. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js +17 -0
  1615. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js.map +1 -0
  1616. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.cjs +29 -0
  1617. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.cjs.map +1 -0
  1618. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js +25 -0
  1619. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js.map +1 -0
  1620. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.cjs +21 -0
  1621. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.cjs.map +1 -0
  1622. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js +17 -0
  1623. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js.map +1 -0
  1624. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.cjs +24 -0
  1625. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.cjs.map +1 -0
  1626. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js +20 -0
  1627. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js.map +1 -0
  1628. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.cjs +21 -0
  1629. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.cjs.map +1 -0
  1630. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js +17 -0
  1631. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js.map +1 -0
  1632. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.cjs +21 -0
  1633. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.cjs.map +1 -0
  1634. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js +17 -0
  1635. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js.map +1 -0
  1636. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.cjs +28 -0
  1637. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.cjs.map +1 -0
  1638. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js +24 -0
  1639. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js.map +1 -0
  1640. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.cjs +21 -0
  1641. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.cjs.map +1 -0
  1642. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js +17 -0
  1643. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js.map +1 -0
  1644. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.cjs +24 -0
  1645. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.cjs.map +1 -0
  1646. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js +20 -0
  1647. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js.map +1 -0
  1648. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.cjs +146 -0
  1649. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.cjs.map +1 -0
  1650. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js +142 -0
  1651. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js.map +1 -0
  1652. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.cjs +41 -0
  1653. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.cjs.map +1 -0
  1654. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js +37 -0
  1655. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js.map +1 -0
  1656. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.cjs +19 -0
  1657. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.cjs.map +1 -0
  1658. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js +15 -0
  1659. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js.map +1 -0
  1660. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.cjs +32 -0
  1661. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.cjs.map +1 -0
  1662. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js +28 -0
  1663. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js.map +1 -0
  1664. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.cjs +47 -0
  1665. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.cjs.map +1 -0
  1666. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js +43 -0
  1667. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js.map +1 -0
  1668. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.cjs +25 -0
  1669. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.cjs.map +1 -0
  1670. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js +21 -0
  1671. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js.map +1 -0
  1672. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.cjs +94 -0
  1673. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.cjs.map +1 -0
  1674. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js +90 -0
  1675. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js.map +1 -0
  1676. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.cjs +21 -0
  1677. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.cjs.map +1 -0
  1678. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js +17 -0
  1679. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js.map +1 -0
  1680. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.cjs +25 -0
  1681. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.cjs.map +1 -0
  1682. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js +21 -0
  1683. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js.map +1 -0
  1684. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.cjs +21 -0
  1685. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.cjs.map +1 -0
  1686. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js +17 -0
  1687. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js.map +1 -0
  1688. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.cjs +41 -0
  1689. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.cjs.map +1 -0
  1690. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js +37 -0
  1691. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js.map +1 -0
  1692. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.cjs +41 -0
  1693. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.cjs.map +1 -0
  1694. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js +37 -0
  1695. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js.map +1 -0
  1696. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.cjs +55 -0
  1697. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.cjs.map +1 -0
  1698. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js +51 -0
  1699. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js.map +1 -0
  1700. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.cjs +74 -0
  1701. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.cjs.map +1 -0
  1702. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js +70 -0
  1703. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js.map +1 -0
  1704. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.cjs +48 -0
  1705. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.cjs.map +1 -0
  1706. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js +44 -0
  1707. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js.map +1 -0
  1708. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.cjs +112 -0
  1709. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.cjs.map +1 -0
  1710. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js +108 -0
  1711. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js.map +1 -0
  1712. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.cjs +21 -0
  1713. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.cjs.map +1 -0
  1714. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js +17 -0
  1715. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js.map +1 -0
  1716. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.cjs +27 -0
  1717. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.cjs.map +1 -0
  1718. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js +23 -0
  1719. package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js.map +1 -0
  1720. package/dist/output_parsers/combining.cjs +61 -0
  1721. package/dist/output_parsers/combining.cjs.map +1 -0
  1722. package/dist/output_parsers/combining.d.cts +46 -0
  1723. package/dist/output_parsers/combining.d.cts.map +1 -0
  1724. package/dist/output_parsers/combining.d.ts +46 -0
  1725. package/dist/output_parsers/combining.d.ts.map +1 -0
  1726. package/dist/output_parsers/combining.js +60 -0
  1727. package/dist/output_parsers/combining.js.map +1 -0
  1728. package/dist/output_parsers/datetime.cjs +46 -0
  1729. package/dist/output_parsers/datetime.cjs.map +1 -0
  1730. package/dist/output_parsers/datetime.d.cts +33 -0
  1731. package/dist/output_parsers/datetime.d.cts.map +1 -0
  1732. package/dist/output_parsers/datetime.d.ts +33 -0
  1733. package/dist/output_parsers/datetime.d.ts.map +1 -0
  1734. package/dist/output_parsers/datetime.js +45 -0
  1735. package/dist/output_parsers/datetime.js.map +1 -0
  1736. package/dist/output_parsers/expression.cjs +86 -0
  1737. package/dist/output_parsers/expression.cjs.map +1 -0
  1738. package/dist/output_parsers/expression.d.cts +53 -0
  1739. package/dist/output_parsers/expression.d.cts.map +1 -0
  1740. package/dist/output_parsers/expression.d.ts +53 -0
  1741. package/dist/output_parsers/expression.d.ts.map +1 -0
  1742. package/dist/output_parsers/expression.js +79 -0
  1743. package/dist/output_parsers/expression.js.map +1 -0
  1744. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs +38 -0
  1745. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs.map +1 -0
  1746. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js +38 -0
  1747. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js.map +1 -0
  1748. package/dist/output_parsers/expression_type_handlers/base.cjs +130 -0
  1749. package/dist/output_parsers/expression_type_handlers/base.cjs.map +1 -0
  1750. package/dist/output_parsers/expression_type_handlers/base.d.cts +108 -0
  1751. package/dist/output_parsers/expression_type_handlers/base.d.cts.map +1 -0
  1752. package/dist/output_parsers/expression_type_handlers/base.d.ts +108 -0
  1753. package/dist/output_parsers/expression_type_handlers/base.d.ts.map +1 -0
  1754. package/dist/output_parsers/expression_type_handlers/base.js +129 -0
  1755. package/dist/output_parsers/expression_type_handlers/base.js.map +1 -0
  1756. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs +38 -0
  1757. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs.map +1 -0
  1758. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js +38 -0
  1759. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js.map +1 -0
  1760. package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs +64 -0
  1761. package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs.map +1 -0
  1762. package/dist/output_parsers/expression_type_handlers/call_expression_handler.js +64 -0
  1763. package/dist/output_parsers/expression_type_handlers/call_expression_handler.js.map +1 -0
  1764. package/dist/output_parsers/expression_type_handlers/factory.cjs +68 -0
  1765. package/dist/output_parsers/expression_type_handlers/factory.cjs.map +1 -0
  1766. package/dist/output_parsers/expression_type_handlers/factory.d.cts +35 -0
  1767. package/dist/output_parsers/expression_type_handlers/factory.d.cts.map +1 -0
  1768. package/dist/output_parsers/expression_type_handlers/factory.d.ts +35 -0
  1769. package/dist/output_parsers/expression_type_handlers/factory.d.ts.map +1 -0
  1770. package/dist/output_parsers/expression_type_handlers/factory.js +68 -0
  1771. package/dist/output_parsers/expression_type_handlers/factory.js.map +1 -0
  1772. package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs +299 -0
  1773. package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs.map +1 -0
  1774. package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js +298 -0
  1775. package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js.map +1 -0
  1776. package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs +40 -0
  1777. package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs.map +1 -0
  1778. package/dist/output_parsers/expression_type_handlers/identifier_handler.js +40 -0
  1779. package/dist/output_parsers/expression_type_handlers/identifier_handler.js.map +1 -0
  1780. package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs +48 -0
  1781. package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs.map +1 -0
  1782. package/dist/output_parsers/expression_type_handlers/member_expression_handler.js +48 -0
  1783. package/dist/output_parsers/expression_type_handlers/member_expression_handler.js.map +1 -0
  1784. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs +36 -0
  1785. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs.map +1 -0
  1786. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js +36 -0
  1787. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js.map +1 -0
  1788. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs +40 -0
  1789. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs.map +1 -0
  1790. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js +40 -0
  1791. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js.map +1 -0
  1792. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs +45 -0
  1793. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs.map +1 -0
  1794. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js +45 -0
  1795. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js.map +1 -0
  1796. package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs +37 -0
  1797. package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs.map +1 -0
  1798. package/dist/output_parsers/expression_type_handlers/string_literal_handler.js +37 -0
  1799. package/dist/output_parsers/expression_type_handlers/string_literal_handler.js.map +1 -0
  1800. package/dist/output_parsers/expression_type_handlers/types.d.cts +95 -0
  1801. package/dist/output_parsers/expression_type_handlers/types.d.cts.map +1 -0
  1802. package/dist/output_parsers/expression_type_handlers/types.d.ts +95 -0
  1803. package/dist/output_parsers/expression_type_handlers/types.d.ts.map +1 -0
  1804. package/dist/output_parsers/fix.cjs +92 -0
  1805. package/dist/output_parsers/fix.cjs.map +1 -0
  1806. package/dist/output_parsers/fix.d.cts +60 -0
  1807. package/dist/output_parsers/fix.d.cts.map +1 -0
  1808. package/dist/output_parsers/fix.d.ts +60 -0
  1809. package/dist/output_parsers/fix.d.ts.map +1 -0
  1810. package/dist/output_parsers/fix.js +91 -0
  1811. package/dist/output_parsers/fix.js.map +1 -0
  1812. package/dist/output_parsers/http_response.cjs +53 -0
  1813. package/dist/output_parsers/http_response.cjs.map +1 -0
  1814. package/dist/output_parsers/http_response.d.cts +33 -0
  1815. package/dist/output_parsers/http_response.d.cts.map +1 -0
  1816. package/dist/output_parsers/http_response.d.ts +33 -0
  1817. package/dist/output_parsers/http_response.d.ts.map +1 -0
  1818. package/dist/output_parsers/http_response.js +52 -0
  1819. package/dist/output_parsers/http_response.js.map +1 -0
  1820. package/dist/output_parsers/index.cjs +74 -0
  1821. package/dist/output_parsers/index.cjs.map +1 -0
  1822. package/dist/output_parsers/index.d.cts +11 -0
  1823. package/dist/output_parsers/index.d.ts +11 -0
  1824. package/dist/output_parsers/index.js +37 -0
  1825. package/dist/output_parsers/index.js.map +1 -0
  1826. package/dist/output_parsers/noop.cjs +43 -0
  1827. package/dist/output_parsers/noop.cjs.map +1 -0
  1828. package/dist/output_parsers/noop.js +42 -0
  1829. package/dist/output_parsers/noop.js.map +1 -0
  1830. package/dist/output_parsers/openai_functions.cjs +145 -0
  1831. package/dist/output_parsers/openai_functions.cjs.map +1 -0
  1832. package/dist/output_parsers/openai_functions.d.cts +85 -0
  1833. package/dist/output_parsers/openai_functions.d.cts.map +1 -0
  1834. package/dist/output_parsers/openai_functions.d.ts +85 -0
  1835. package/dist/output_parsers/openai_functions.d.ts.map +1 -0
  1836. package/dist/output_parsers/openai_functions.js +142 -0
  1837. package/dist/output_parsers/openai_functions.js.map +1 -0
  1838. package/dist/output_parsers/openai_tools.cjs +89 -0
  1839. package/dist/output_parsers/openai_tools.cjs.map +1 -0
  1840. package/dist/output_parsers/openai_tools.d.cts +69 -0
  1841. package/dist/output_parsers/openai_tools.d.cts.map +1 -0
  1842. package/dist/output_parsers/openai_tools.d.ts +69 -0
  1843. package/dist/output_parsers/openai_tools.d.ts.map +1 -0
  1844. package/dist/output_parsers/openai_tools.js +87 -0
  1845. package/dist/output_parsers/openai_tools.js.map +1 -0
  1846. package/dist/output_parsers/prompts.cjs +25 -0
  1847. package/dist/output_parsers/prompts.cjs.map +1 -0
  1848. package/dist/output_parsers/prompts.js +24 -0
  1849. package/dist/output_parsers/prompts.js.map +1 -0
  1850. package/dist/output_parsers/regex.cjs +74 -0
  1851. package/dist/output_parsers/regex.cjs.map +1 -0
  1852. package/dist/output_parsers/regex.d.cts +49 -0
  1853. package/dist/output_parsers/regex.d.cts.map +1 -0
  1854. package/dist/output_parsers/regex.d.ts +49 -0
  1855. package/dist/output_parsers/regex.d.ts.map +1 -0
  1856. package/dist/output_parsers/regex.js +73 -0
  1857. package/dist/output_parsers/regex.js.map +1 -0
  1858. package/dist/output_parsers/router.cjs +40 -0
  1859. package/dist/output_parsers/router.cjs.map +1 -0
  1860. package/dist/output_parsers/router.d.cts +36 -0
  1861. package/dist/output_parsers/router.d.cts.map +1 -0
  1862. package/dist/output_parsers/router.d.ts +36 -0
  1863. package/dist/output_parsers/router.d.ts.map +1 -0
  1864. package/dist/output_parsers/router.js +39 -0
  1865. package/dist/output_parsers/router.js.map +1 -0
  1866. package/dist/output_parsers/structured.cjs +164 -0
  1867. package/dist/output_parsers/structured.cjs.map +1 -0
  1868. package/dist/output_parsers/structured.d.cts +91 -0
  1869. package/dist/output_parsers/structured.d.cts.map +1 -0
  1870. package/dist/output_parsers/structured.d.ts +91 -0
  1871. package/dist/output_parsers/structured.d.ts.map +1 -0
  1872. package/dist/output_parsers/structured.js +161 -0
  1873. package/dist/output_parsers/structured.js.map +1 -0
  1874. package/dist/retrievers/contextual_compression.cjs +53 -0
  1875. package/dist/retrievers/contextual_compression.cjs.map +1 -0
  1876. package/dist/retrievers/contextual_compression.d.cts +42 -0
  1877. package/dist/retrievers/contextual_compression.d.cts.map +1 -0
  1878. package/dist/retrievers/contextual_compression.d.ts +42 -0
  1879. package/dist/retrievers/contextual_compression.d.ts.map +1 -0
  1880. package/dist/retrievers/contextual_compression.js +47 -0
  1881. package/dist/retrievers/contextual_compression.js.map +1 -0
  1882. package/dist/retrievers/document_compressors/chain_extract.cjs +103 -0
  1883. package/dist/retrievers/document_compressors/chain_extract.cjs.map +1 -0
  1884. package/dist/retrievers/document_compressors/chain_extract.d.cts +47 -0
  1885. package/dist/retrievers/document_compressors/chain_extract.d.cts.map +1 -0
  1886. package/dist/retrievers/document_compressors/chain_extract.d.ts +47 -0
  1887. package/dist/retrievers/document_compressors/chain_extract.d.ts.map +1 -0
  1888. package/dist/retrievers/document_compressors/chain_extract.js +97 -0
  1889. package/dist/retrievers/document_compressors/chain_extract.js.map +1 -0
  1890. package/dist/retrievers/document_compressors/chain_extract_prompt.cjs +16 -0
  1891. package/dist/retrievers/document_compressors/chain_extract_prompt.cjs.map +1 -0
  1892. package/dist/retrievers/document_compressors/chain_extract_prompt.js +15 -0
  1893. package/dist/retrievers/document_compressors/chain_extract_prompt.js.map +1 -0
  1894. package/dist/retrievers/document_compressors/embeddings_filter.cjs +74 -0
  1895. package/dist/retrievers/document_compressors/embeddings_filter.cjs.map +1 -0
  1896. package/dist/retrievers/document_compressors/embeddings_filter.d.cts +58 -0
  1897. package/dist/retrievers/document_compressors/embeddings_filter.d.cts.map +1 -0
  1898. package/dist/retrievers/document_compressors/embeddings_filter.d.ts +58 -0
  1899. package/dist/retrievers/document_compressors/embeddings_filter.d.ts.map +1 -0
  1900. package/dist/retrievers/document_compressors/embeddings_filter.js +68 -0
  1901. package/dist/retrievers/document_compressors/embeddings_filter.js.map +1 -0
  1902. package/dist/retrievers/document_compressors/index.cjs +69 -0
  1903. package/dist/retrievers/document_compressors/index.cjs.map +1 -0
  1904. package/dist/retrievers/document_compressors/index.d.cts +61 -0
  1905. package/dist/retrievers/document_compressors/index.d.cts.map +1 -0
  1906. package/dist/retrievers/document_compressors/index.d.ts +61 -0
  1907. package/dist/retrievers/document_compressors/index.d.ts.map +1 -0
  1908. package/dist/retrievers/document_compressors/index.js +62 -0
  1909. package/dist/retrievers/document_compressors/index.js.map +1 -0
  1910. package/dist/retrievers/ensemble.cjs +76 -0
  1911. package/dist/retrievers/ensemble.cjs.map +1 -0
  1912. package/dist/retrievers/ensemble.d.cts +39 -0
  1913. package/dist/retrievers/ensemble.d.cts.map +1 -0
  1914. package/dist/retrievers/ensemble.d.ts +39 -0
  1915. package/dist/retrievers/ensemble.d.ts.map +1 -0
  1916. package/dist/retrievers/ensemble.js +70 -0
  1917. package/dist/retrievers/ensemble.js.map +1 -0
  1918. package/dist/retrievers/hyde.cjs +128 -0
  1919. package/dist/retrievers/hyde.cjs.map +1 -0
  1920. package/dist/retrievers/hyde.d.cts +61 -0
  1921. package/dist/retrievers/hyde.d.cts.map +1 -0
  1922. package/dist/retrievers/hyde.d.ts +61 -0
  1923. package/dist/retrievers/hyde.d.ts.map +1 -0
  1924. package/dist/retrievers/hyde.js +121 -0
  1925. package/dist/retrievers/hyde.js.map +1 -0
  1926. package/dist/retrievers/matryoshka_retriever.cjs +116 -0
  1927. package/dist/retrievers/matryoshka_retriever.cjs.map +1 -0
  1928. package/dist/retrievers/matryoshka_retriever.d.cts +99 -0
  1929. package/dist/retrievers/matryoshka_retriever.d.cts.map +1 -0
  1930. package/dist/retrievers/matryoshka_retriever.d.ts +99 -0
  1931. package/dist/retrievers/matryoshka_retriever.d.ts.map +1 -0
  1932. package/dist/retrievers/matryoshka_retriever.js +110 -0
  1933. package/dist/retrievers/matryoshka_retriever.js.map +1 -0
  1934. package/dist/retrievers/multi_query.cjs +150 -0
  1935. package/dist/retrievers/multi_query.cjs.map +1 -0
  1936. package/dist/retrievers/multi_query.d.cts +59 -0
  1937. package/dist/retrievers/multi_query.d.cts.map +1 -0
  1938. package/dist/retrievers/multi_query.d.ts +59 -0
  1939. package/dist/retrievers/multi_query.d.ts.map +1 -0
  1940. package/dist/retrievers/multi_query.js +144 -0
  1941. package/dist/retrievers/multi_query.js.map +1 -0
  1942. package/dist/retrievers/multi_vector.cjs +67 -0
  1943. package/dist/retrievers/multi_vector.cjs.map +1 -0
  1944. package/dist/retrievers/multi_vector.d.cts +51 -0
  1945. package/dist/retrievers/multi_vector.d.cts.map +1 -0
  1946. package/dist/retrievers/multi_vector.d.ts +51 -0
  1947. package/dist/retrievers/multi_vector.d.ts.map +1 -0
  1948. package/dist/retrievers/multi_vector.js +61 -0
  1949. package/dist/retrievers/multi_vector.js.map +1 -0
  1950. package/dist/retrievers/parent_document.cjs +137 -0
  1951. package/dist/retrievers/parent_document.cjs.map +1 -0
  1952. package/dist/retrievers/parent_document.d.cts +92 -0
  1953. package/dist/retrievers/parent_document.d.cts.map +1 -0
  1954. package/dist/retrievers/parent_document.d.ts +92 -0
  1955. package/dist/retrievers/parent_document.d.ts.map +1 -0
  1956. package/dist/retrievers/parent_document.js +131 -0
  1957. package/dist/retrievers/parent_document.js.map +1 -0
  1958. package/dist/retrievers/score_threshold.cjs +43 -0
  1959. package/dist/retrievers/score_threshold.cjs.map +1 -0
  1960. package/dist/retrievers/score_threshold.d.cts +20 -0
  1961. package/dist/retrievers/score_threshold.d.cts.map +1 -0
  1962. package/dist/retrievers/score_threshold.d.ts +20 -0
  1963. package/dist/retrievers/score_threshold.d.ts.map +1 -0
  1964. package/dist/retrievers/score_threshold.js +37 -0
  1965. package/dist/retrievers/score_threshold.js.map +1 -0
  1966. package/dist/retrievers/self_query/functional.cjs +21 -0
  1967. package/dist/retrievers/self_query/functional.cjs.map +1 -0
  1968. package/dist/retrievers/self_query/functional.d.cts +2 -0
  1969. package/dist/retrievers/self_query/functional.d.ts +2 -0
  1970. package/dist/retrievers/self_query/functional.js +10 -0
  1971. package/dist/retrievers/self_query/functional.js.map +1 -0
  1972. package/dist/retrievers/self_query/index.cjs +130 -0
  1973. package/dist/retrievers/self_query/index.cjs.map +1 -0
  1974. package/dist/retrievers/self_query/index.d.cts +79 -0
  1975. package/dist/retrievers/self_query/index.d.cts.map +1 -0
  1976. package/dist/retrievers/self_query/index.d.ts +79 -0
  1977. package/dist/retrievers/self_query/index.d.ts.map +1 -0
  1978. package/dist/retrievers/self_query/index.js +106 -0
  1979. package/dist/retrievers/self_query/index.js.map +1 -0
  1980. package/dist/retrievers/time_weighted.cjs +236 -0
  1981. package/dist/retrievers/time_weighted.cjs.map +1 -0
  1982. package/dist/retrievers/time_weighted.d.cts +142 -0
  1983. package/dist/retrievers/time_weighted.d.cts.map +1 -0
  1984. package/dist/retrievers/time_weighted.d.ts +142 -0
  1985. package/dist/retrievers/time_weighted.d.ts.map +1 -0
  1986. package/dist/retrievers/time_weighted.js +228 -0
  1987. package/dist/retrievers/time_weighted.js.map +1 -0
  1988. package/dist/schema/prompt_template.cjs +36 -0
  1989. package/dist/schema/prompt_template.cjs.map +1 -0
  1990. package/dist/schema/prompt_template.d.cts +19 -0
  1991. package/dist/schema/prompt_template.d.cts.map +1 -0
  1992. package/dist/schema/prompt_template.d.ts +19 -0
  1993. package/dist/schema/prompt_template.d.ts.map +1 -0
  1994. package/dist/schema/prompt_template.js +30 -0
  1995. package/dist/schema/prompt_template.js.map +1 -0
  1996. package/dist/schema/query_constructor.cjs +27 -0
  1997. package/dist/schema/query_constructor.cjs.map +1 -0
  1998. package/dist/schema/query_constructor.d.cts +15 -0
  1999. package/dist/schema/query_constructor.d.cts.map +1 -0
  2000. package/dist/schema/query_constructor.d.ts +15 -0
  2001. package/dist/schema/query_constructor.d.ts.map +1 -0
  2002. package/dist/schema/query_constructor.js +21 -0
  2003. package/dist/schema/query_constructor.js.map +1 -0
  2004. package/dist/smith/config.cjs +70 -0
  2005. package/dist/smith/config.cjs.map +1 -0
  2006. package/dist/smith/config.d.cts +266 -0
  2007. package/dist/smith/config.d.cts.map +1 -0
  2008. package/dist/smith/config.d.ts +266 -0
  2009. package/dist/smith/config.d.ts.map +1 -0
  2010. package/dist/smith/config.js +65 -0
  2011. package/dist/smith/config.js.map +1 -0
  2012. package/dist/smith/index.cjs +29 -0
  2013. package/dist/smith/index.cjs.map +1 -0
  2014. package/dist/smith/index.d.cts +3 -0
  2015. package/dist/smith/index.d.ts +3 -0
  2016. package/dist/smith/index.js +18 -0
  2017. package/dist/smith/index.js.map +1 -0
  2018. package/dist/smith/name_generation.cjs +728 -0
  2019. package/dist/smith/name_generation.cjs.map +1 -0
  2020. package/dist/smith/name_generation.js +727 -0
  2021. package/dist/smith/name_generation.js.map +1 -0
  2022. package/dist/smith/progress.cjs +49 -0
  2023. package/dist/smith/progress.cjs.map +1 -0
  2024. package/dist/smith/progress.js +48 -0
  2025. package/dist/smith/progress.js.map +1 -0
  2026. package/dist/smith/runner_utils.cjs +411 -0
  2027. package/dist/smith/runner_utils.cjs.map +1 -0
  2028. package/dist/smith/runner_utils.d.cts +99 -0
  2029. package/dist/smith/runner_utils.d.cts.map +1 -0
  2030. package/dist/smith/runner_utils.d.ts +99 -0
  2031. package/dist/smith/runner_utils.d.ts.map +1 -0
  2032. package/dist/smith/runner_utils.js +410 -0
  2033. package/dist/smith/runner_utils.js.map +1 -0
  2034. package/dist/sql_db.cjs +119 -0
  2035. package/dist/sql_db.cjs.map +1 -0
  2036. package/dist/sql_db.d.cts +60 -0
  2037. package/dist/sql_db.d.cts.map +1 -0
  2038. package/dist/sql_db.d.ts +60 -0
  2039. package/dist/sql_db.d.ts.map +1 -0
  2040. package/dist/sql_db.js +113 -0
  2041. package/dist/sql_db.js.map +1 -0
  2042. package/dist/storage/encoder_backed.cjs +94 -0
  2043. package/dist/storage/encoder_backed.cjs.map +1 -0
  2044. package/dist/storage/encoder_backed.d.cts +54 -0
  2045. package/dist/storage/encoder_backed.d.cts.map +1 -0
  2046. package/dist/storage/encoder_backed.d.ts +54 -0
  2047. package/dist/storage/encoder_backed.d.ts.map +1 -0
  2048. package/dist/storage/encoder_backed.js +87 -0
  2049. package/dist/storage/encoder_backed.js.map +1 -0
  2050. package/dist/storage/file_system.cjs +157 -0
  2051. package/dist/storage/file_system.cjs.map +1 -0
  2052. package/dist/storage/file_system.d.cts +83 -0
  2053. package/dist/storage/file_system.d.cts.map +1 -0
  2054. package/dist/storage/file_system.d.ts +83 -0
  2055. package/dist/storage/file_system.d.ts.map +1 -0
  2056. package/dist/storage/file_system.js +151 -0
  2057. package/dist/storage/file_system.js.map +1 -0
  2058. package/dist/storage/in_memory.cjs +21 -0
  2059. package/dist/storage/in_memory.cjs.map +1 -0
  2060. package/dist/storage/in_memory.d.cts +2 -0
  2061. package/dist/storage/in_memory.d.ts +2 -0
  2062. package/dist/storage/in_memory.js +10 -0
  2063. package/dist/storage/in_memory.js.map +1 -0
  2064. package/dist/stores/doc/base.cjs +20 -0
  2065. package/dist/stores/doc/base.cjs.map +1 -0
  2066. package/dist/stores/doc/base.d.cts +15 -0
  2067. package/dist/stores/doc/base.d.cts.map +1 -0
  2068. package/dist/stores/doc/base.d.ts +15 -0
  2069. package/dist/stores/doc/base.d.ts.map +1 -0
  2070. package/dist/stores/doc/base.js +14 -0
  2071. package/dist/stores/doc/base.js.map +1 -0
  2072. package/dist/stores/doc/in_memory.cjs +94 -0
  2073. package/dist/stores/doc/in_memory.cjs.map +1 -0
  2074. package/dist/stores/doc/in_memory.d.cts +53 -0
  2075. package/dist/stores/doc/in_memory.d.cts.map +1 -0
  2076. package/dist/stores/doc/in_memory.d.ts +53 -0
  2077. package/dist/stores/doc/in_memory.d.ts.map +1 -0
  2078. package/dist/stores/doc/in_memory.js +87 -0
  2079. package/dist/stores/doc/in_memory.js.map +1 -0
  2080. package/dist/stores/file/base.cjs +13 -0
  2081. package/dist/stores/file/base.cjs.map +1 -0
  2082. package/dist/stores/file/base.d.cts +15 -0
  2083. package/dist/stores/file/base.d.cts.map +1 -0
  2084. package/dist/stores/file/base.d.ts +15 -0
  2085. package/dist/stores/file/base.d.ts.map +1 -0
  2086. package/dist/stores/file/base.js +12 -0
  2087. package/dist/stores/file/base.js.map +1 -0
  2088. package/dist/stores/file/in_memory.cjs +53 -0
  2089. package/dist/stores/file/in_memory.cjs.map +1 -0
  2090. package/dist/stores/file/in_memory.d.cts +33 -0
  2091. package/dist/stores/file/in_memory.d.cts.map +1 -0
  2092. package/dist/stores/file/in_memory.d.ts +33 -0
  2093. package/dist/stores/file/in_memory.d.ts.map +1 -0
  2094. package/dist/stores/file/in_memory.js +47 -0
  2095. package/dist/stores/file/in_memory.js.map +1 -0
  2096. package/dist/stores/file/node.cjs +52 -0
  2097. package/dist/stores/file/node.cjs.map +1 -0
  2098. package/dist/stores/file/node.d.cts +29 -0
  2099. package/dist/stores/file/node.d.cts.map +1 -0
  2100. package/dist/stores/file/node.d.ts +29 -0
  2101. package/dist/stores/file/node.d.ts.map +1 -0
  2102. package/dist/stores/file/node.js +46 -0
  2103. package/dist/stores/file/node.js.map +1 -0
  2104. package/dist/stores/message/in_memory.cjs +21 -0
  2105. package/dist/stores/message/in_memory.cjs.map +1 -0
  2106. package/dist/stores/message/in_memory.d.cts +2 -0
  2107. package/dist/stores/message/in_memory.d.ts +2 -0
  2108. package/dist/stores/message/in_memory.js +10 -0
  2109. package/dist/stores/message/in_memory.js.map +1 -0
  2110. package/dist/text_splitter.cjs +22 -0
  2111. package/dist/text_splitter.cjs.map +1 -0
  2112. package/dist/text_splitter.d.cts +10 -0
  2113. package/dist/text_splitter.d.cts.map +1 -0
  2114. package/dist/text_splitter.d.ts +10 -0
  2115. package/dist/text_splitter.d.ts.map +1 -0
  2116. package/dist/text_splitter.js +12 -0
  2117. package/dist/text_splitter.js.map +1 -0
  2118. package/dist/tools/chain.cjs +35 -0
  2119. package/dist/tools/chain.cjs.map +1 -0
  2120. package/dist/tools/chain.d.cts +30 -0
  2121. package/dist/tools/chain.d.cts.map +1 -0
  2122. package/dist/tools/chain.d.ts +30 -0
  2123. package/dist/tools/chain.d.ts.map +1 -0
  2124. package/dist/tools/chain.js +29 -0
  2125. package/dist/tools/chain.js.map +1 -0
  2126. package/dist/tools/fs.cjs +56 -0
  2127. package/dist/tools/fs.cjs.map +1 -0
  2128. package/dist/tools/fs.d.cts +92 -0
  2129. package/dist/tools/fs.d.cts.map +1 -0
  2130. package/dist/tools/fs.d.ts +92 -0
  2131. package/dist/tools/fs.d.ts.map +1 -0
  2132. package/dist/tools/fs.js +54 -0
  2133. package/dist/tools/fs.js.map +1 -0
  2134. package/dist/tools/index.cjs +68 -0
  2135. package/dist/tools/index.cjs.map +1 -0
  2136. package/dist/tools/index.d.cts +8 -0
  2137. package/dist/tools/index.d.ts +8 -0
  2138. package/dist/tools/index.js +30 -0
  2139. package/dist/tools/index.js.map +1 -0
  2140. package/dist/tools/json.cjs +107 -0
  2141. package/dist/tools/json.cjs.map +1 -0
  2142. package/dist/tools/json.d.cts +65 -0
  2143. package/dist/tools/json.d.cts.map +1 -0
  2144. package/dist/tools/json.d.ts +65 -0
  2145. package/dist/tools/json.d.ts.map +1 -0
  2146. package/dist/tools/json.js +104 -0
  2147. package/dist/tools/json.js.map +1 -0
  2148. package/dist/tools/render.cjs +55 -0
  2149. package/dist/tools/render.cjs.map +1 -0
  2150. package/dist/tools/render.d.cts +32 -0
  2151. package/dist/tools/render.d.cts.map +1 -0
  2152. package/dist/tools/render.d.ts +32 -0
  2153. package/dist/tools/render.d.ts.map +1 -0
  2154. package/dist/tools/render.js +48 -0
  2155. package/dist/tools/render.js.map +1 -0
  2156. package/dist/tools/requests.cjs +73 -0
  2157. package/dist/tools/requests.cjs.map +1 -0
  2158. package/dist/tools/requests.d.cts +56 -0
  2159. package/dist/tools/requests.d.cts.map +1 -0
  2160. package/dist/tools/requests.d.ts +56 -0
  2161. package/dist/tools/requests.d.ts.map +1 -0
  2162. package/dist/tools/requests.js +71 -0
  2163. package/dist/tools/requests.js.map +1 -0
  2164. package/dist/tools/retriever.cjs +30 -0
  2165. package/dist/tools/retriever.cjs.map +1 -0
  2166. package/dist/tools/retriever.d.cts +8 -0
  2167. package/dist/tools/retriever.d.cts.map +1 -0
  2168. package/dist/tools/retriever.d.ts +8 -0
  2169. package/dist/tools/retriever.d.ts.map +1 -0
  2170. package/dist/tools/retriever.js +24 -0
  2171. package/dist/tools/retriever.js.map +1 -0
  2172. package/dist/tools/sql.cjs +165 -0
  2173. package/dist/tools/sql.cjs.map +1 -0
  2174. package/dist/tools/sql.d.cts +86 -0
  2175. package/dist/tools/sql.d.cts.map +1 -0
  2176. package/dist/tools/sql.d.ts +86 -0
  2177. package/dist/tools/sql.d.ts.map +1 -0
  2178. package/dist/tools/sql.js +156 -0
  2179. package/dist/tools/sql.js.map +1 -0
  2180. package/dist/tools/vectorstore.cjs +45 -0
  2181. package/dist/tools/vectorstore.cjs.map +1 -0
  2182. package/dist/tools/vectorstore.d.cts +40 -0
  2183. package/dist/tools/vectorstore.d.cts.map +1 -0
  2184. package/dist/tools/vectorstore.d.ts +40 -0
  2185. package/dist/tools/vectorstore.d.ts.map +1 -0
  2186. package/dist/tools/vectorstore.js +44 -0
  2187. package/dist/tools/vectorstore.js.map +1 -0
  2188. package/dist/tools/webbrowser.cjs +176 -0
  2189. package/dist/tools/webbrowser.cjs.map +1 -0
  2190. package/dist/tools/webbrowser.d.cts +69 -0
  2191. package/dist/tools/webbrowser.d.cts.map +1 -0
  2192. package/dist/tools/webbrowser.d.ts +69 -0
  2193. package/dist/tools/webbrowser.d.ts.map +1 -0
  2194. package/dist/tools/webbrowser.js +168 -0
  2195. package/dist/tools/webbrowser.js.map +1 -0
  2196. package/dist/types/expression-parser.d.cts +91 -0
  2197. package/dist/types/expression-parser.d.cts.map +1 -0
  2198. package/dist/types/expression-parser.d.ts +91 -0
  2199. package/dist/types/expression-parser.d.ts.map +1 -0
  2200. package/dist/types/type-utils.d.cts +7 -0
  2201. package/dist/types/type-utils.d.cts.map +1 -0
  2202. package/dist/types/type-utils.d.ts +7 -0
  2203. package/dist/types/type-utils.d.ts.map +1 -0
  2204. package/dist/util/document.cjs +23 -0
  2205. package/dist/util/document.cjs.map +1 -0
  2206. package/dist/util/document.d.cts +15 -0
  2207. package/dist/util/document.d.cts.map +1 -0
  2208. package/dist/util/document.d.ts +15 -0
  2209. package/dist/util/document.d.ts.map +1 -0
  2210. package/dist/util/document.js +17 -0
  2211. package/dist/util/document.js.map +1 -0
  2212. package/dist/util/entrypoint_deprecation.cjs +1 -0
  2213. package/dist/util/entrypoint_deprecation.js +1 -0
  2214. package/dist/util/env.cjs +2 -0
  2215. package/dist/util/env.js +1 -0
  2216. package/dist/util/extname.cjs +7 -0
  2217. package/dist/util/extname.cjs.map +1 -0
  2218. package/dist/util/extname.js +6 -0
  2219. package/dist/util/extname.js.map +1 -0
  2220. package/dist/util/hub.cjs +39 -0
  2221. package/dist/util/hub.cjs.map +1 -0
  2222. package/dist/util/hub.js +38 -0
  2223. package/dist/util/hub.js.map +1 -0
  2224. package/dist/util/load.cjs +15 -0
  2225. package/dist/util/load.cjs.map +1 -0
  2226. package/dist/util/load.d.cts +6 -0
  2227. package/dist/util/load.d.cts.map +1 -0
  2228. package/dist/util/load.d.ts +6 -0
  2229. package/dist/util/load.d.ts.map +1 -0
  2230. package/dist/util/load.js +14 -0
  2231. package/dist/util/load.js.map +1 -0
  2232. package/dist/util/math.cjs +22 -0
  2233. package/dist/util/math.cjs.map +1 -0
  2234. package/dist/util/math.d.cts +1 -0
  2235. package/dist/util/math.d.ts +1 -0
  2236. package/dist/util/math.js +12 -0
  2237. package/dist/util/math.js.map +1 -0
  2238. package/dist/util/ml-distance/distances.cjs +35 -0
  2239. package/dist/util/ml-distance/distances.cjs.map +1 -0
  2240. package/dist/util/ml-distance/distances.js +33 -0
  2241. package/dist/util/ml-distance/distances.js.map +1 -0
  2242. package/dist/util/ml-distance/similarities.cjs +23 -0
  2243. package/dist/util/ml-distance/similarities.cjs.map +1 -0
  2244. package/dist/util/ml-distance/similarities.d.cts +11 -0
  2245. package/dist/util/ml-distance/similarities.d.cts.map +1 -0
  2246. package/dist/util/ml-distance/similarities.d.ts +11 -0
  2247. package/dist/util/ml-distance/similarities.d.ts.map +1 -0
  2248. package/dist/util/ml-distance/similarities.js +22 -0
  2249. package/dist/util/ml-distance/similarities.js.map +1 -0
  2250. package/dist/util/ml-distance-euclidean/euclidean.cjs +14 -0
  2251. package/dist/util/ml-distance-euclidean/euclidean.cjs.map +1 -0
  2252. package/dist/util/ml-distance-euclidean/euclidean.js +13 -0
  2253. package/dist/util/ml-distance-euclidean/euclidean.js.map +1 -0
  2254. package/dist/util/openapi.cjs +149 -0
  2255. package/dist/util/openapi.cjs.map +1 -0
  2256. package/dist/util/openapi.d.cts +83 -0
  2257. package/dist/util/openapi.d.cts.map +1 -0
  2258. package/dist/util/openapi.d.ts +83 -0
  2259. package/dist/util/openapi.d.ts.map +1 -0
  2260. package/dist/util/openapi.js +148 -0
  2261. package/dist/util/openapi.js.map +1 -0
  2262. package/dist/util/parse.cjs +22 -0
  2263. package/dist/util/parse.cjs.map +1 -0
  2264. package/dist/util/parse.js +21 -0
  2265. package/dist/util/parse.js.map +1 -0
  2266. package/dist/util/set.cjs +35 -0
  2267. package/dist/util/set.cjs.map +1 -0
  2268. package/dist/util/set.js +32 -0
  2269. package/dist/util/set.js.map +1 -0
  2270. package/dist/util/sql_utils.cjs +178 -0
  2271. package/dist/util/sql_utils.cjs.map +1 -0
  2272. package/dist/util/sql_utils.d.cts +31 -0
  2273. package/dist/util/sql_utils.d.cts.map +1 -0
  2274. package/dist/util/sql_utils.d.ts +31 -0
  2275. package/dist/util/sql_utils.d.ts.map +1 -0
  2276. package/dist/util/sql_utils.js +173 -0
  2277. package/dist/util/sql_utils.js.map +1 -0
  2278. package/dist/util/time.cjs +25 -0
  2279. package/dist/util/time.cjs.map +1 -0
  2280. package/dist/util/time.d.cts +10 -0
  2281. package/dist/util/time.d.cts.map +1 -0
  2282. package/dist/util/time.d.ts +10 -0
  2283. package/dist/util/time.d.ts.map +1 -0
  2284. package/dist/util/time.js +19 -0
  2285. package/dist/util/time.js.map +1 -0
  2286. package/dist/vectorstores/memory.cjs +265 -0
  2287. package/dist/vectorstores/memory.cjs.map +1 -0
  2288. package/dist/vectorstores/memory.d.cts +216 -0
  2289. package/dist/vectorstores/memory.d.cts.map +1 -0
  2290. package/dist/vectorstores/memory.d.ts +216 -0
  2291. package/dist/vectorstores/memory.d.ts.map +1 -0
  2292. package/dist/vectorstores/memory.js +259 -0
  2293. package/dist/vectorstores/memory.js.map +1 -0
  2294. package/package.json +1233 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"violation_of_expectations_chain.cjs","names":["BaseChain","fields: ViolationOfExpectationsChainInput","JsonOutputFunctionsParser","StringOutputParser","chatHistory: BaseMessage[]","strings: Array<string>","newArray: MessageChunkResult[]","tempArray: BaseMessage[]","userResponse: BaseMessage | undefined","HumanMessage","values: ChainValues","runManager?: CallbackManagerForChainRun","chatHistory: unknown[]","PREDICT_NEXT_USER_MESSAGE_FUNCTION","PREDICT_NEXT_USER_MESSAGE_PROMPT","insights: Array<string>","PREDICTION_VIOLATIONS_FUNCTION","PREDICTION_VIOLATIONS_PROMPT","GENERATE_REVISED_PREDICTION_PROMPT","GENERATE_FACTS_PROMPT","llm: ChatOpenAI","retriever: BaseRetrieverInterface","options?: Partial<\n Omit<ViolationOfExpectationsChainInput, \"llm\" | \"retriever\">\n >"],"sources":["../../../../src/experimental/chains/violation_of_expectations/violation_of_expectations_chain.ts"],"sourcesContent":["import type { BaseRetrieverInterface } from \"@langchain/core/retrievers\";\nimport { ChatOpenAI } from \"@langchain/openai\";\nimport {\n BaseMessage,\n HumanMessage,\n isBaseMessage,\n} from \"@langchain/core/messages\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { StringOutputParser } from \"@langchain/core/output_parsers\";\nimport { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { JsonOutputFunctionsParser } from \"../../../output_parsers/openai_functions.js\";\nimport { BaseChain, ChainInputs } from \"../../../chains/base.js\";\nimport {\n GetPredictionViolationsResponse,\n MessageChunkResult,\n PREDICTION_VIOLATIONS_FUNCTION,\n PREDICT_NEXT_USER_MESSAGE_FUNCTION,\n PredictNextUserMessageResponse,\n} from \"./types.js\";\nimport {\n GENERATE_FACTS_PROMPT,\n GENERATE_REVISED_PREDICTION_PROMPT,\n PREDICTION_VIOLATIONS_PROMPT,\n PREDICT_NEXT_USER_MESSAGE_PROMPT,\n} from \"./violation_of_expectations_prompt.js\";\n\n/**\n * Interface for the input parameters of the ViolationOfExpectationsChain class.\n */\nexport interface ViolationOfExpectationsChainInput extends ChainInputs {\n /**\n * The retriever to use for retrieving stored\n * thoughts and insights.\n */\n retriever: BaseRetrieverInterface;\n /**\n * The LLM to use\n */\n llm: ChatOpenAI;\n}\n\n/**\n * Chain that generates key insights/facts of a user based on a\n * a chat conversation with an AI.\n */\nexport class ViolationOfExpectationsChain\n extends BaseChain\n implements ViolationOfExpectationsChainInput\n{\n static lc_name() {\n return \"ViolationOfExpectationsChain\";\n }\n\n _chainType(): string {\n return \"violation_of_expectation_chain\";\n }\n\n chatHistoryKey = \"chat_history\";\n\n thoughtsKey = \"thoughts\";\n\n get inputKeys() {\n return [this.chatHistoryKey];\n }\n\n get outputKeys() {\n return [this.thoughtsKey];\n }\n\n retriever: BaseRetrieverInterface;\n\n llm: ChatOpenAI;\n\n jsonOutputParser: JsonOutputFunctionsParser;\n\n stringOutputParser: StringOutputParser;\n\n constructor(fields: ViolationOfExpectationsChainInput) {\n super(fields);\n this.retriever = fields.retriever;\n this.llm = fields.llm;\n this.jsonOutputParser = new JsonOutputFunctionsParser();\n this.stringOutputParser = new StringOutputParser();\n }\n\n getChatHistoryString(chatHistory: BaseMessage[]): string {\n return chatHistory\n .map((chatMessage) => {\n if (chatMessage._getType() === \"human\") {\n return `Human: ${chatMessage.content}`;\n } else if (chatMessage._getType() === \"ai\") {\n return `AI: ${chatMessage.content}`;\n } else {\n return `${chatMessage.content}`;\n }\n })\n .join(\"\\n\");\n }\n\n removeDuplicateStrings(strings: Array<string>): Array<string> {\n return [...new Set(strings)];\n }\n\n /**\n * This method breaks down the chat history into chunks of messages.\n * Each chunk consists of a sequence of messages ending with an AI message and the subsequent user response, if any.\n *\n * @param {BaseMessage[]} chatHistory - The chat history to be chunked.\n *\n * @returns {MessageChunkResult[]} An array of message chunks. Each chunk includes a sequence of messages and the subsequent user response.\n *\n * @description\n * The method iterates over the chat history and pushes each message into a temporary array.\n * When it encounters an AI message, it checks for a subsequent user message.\n * If a user message is found, it is considered as the user response to the AI message.\n * If no user message is found after the AI message, the user response is undefined.\n * The method then pushes the chunk (sequence of messages and user response) into the result array.\n * This process continues until all messages in the chat history have been processed.\n */\n chunkMessagesByAIResponse(chatHistory: BaseMessage[]): MessageChunkResult[] {\n const newArray: MessageChunkResult[] = [];\n const tempArray: BaseMessage[] = [];\n\n chatHistory.forEach((item, index) => {\n tempArray.push(item);\n if (item._getType() === \"ai\") {\n let userResponse: BaseMessage | undefined = chatHistory[index + 1];\n if (!userResponse || userResponse._getType() !== \"human\") {\n userResponse = undefined;\n }\n\n newArray.push({\n chunkedMessages: tempArray,\n userResponse: userResponse\n ? new HumanMessage(userResponse)\n : undefined,\n });\n }\n });\n\n return newArray;\n }\n\n /**\n * This method processes a chat history to generate insights about the user.\n *\n * @param {ChainValues} values - The input values for the chain. It should contain a key for chat history.\n * @param {CallbackManagerForChainRun} [runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<ChainValues>} A promise that resolves to a list of insights about the user.\n *\n * @throws {Error} If the chat history key is not found in the input values or if the chat history is not an array of BaseMessages.\n *\n * @description\n * The method performs the following steps:\n * 1. Checks if the chat history key is present in the input values and if the chat history is an array of BaseMessages.\n * 2. Breaks the chat history into chunks of messages.\n * 3. For each chunk, it generates an initial prediction for the user's next message.\n * 4. For each prediction, it generates insights and prediction violations, and regenerates the prediction based on the violations.\n * 5. For each set of messages, it generates a fact/insight about the user.\n * The method returns a list of these insights.\n */\n async _call(\n values: ChainValues,\n runManager?: CallbackManagerForChainRun\n ): Promise<ChainValues> {\n if (!(this.chatHistoryKey in values)) {\n throw new Error(`Chat history key ${this.chatHistoryKey} not found`);\n }\n\n const chatHistory: unknown[] = values[this.chatHistoryKey];\n\n const isEveryMessageBaseMessage = chatHistory.every((message) =>\n isBaseMessage(message)\n );\n if (!isEveryMessageBaseMessage) {\n throw new Error(\"Chat history must be an array of BaseMessages\");\n }\n\n const messageChunks = this.chunkMessagesByAIResponse(\n chatHistory as BaseMessage[]\n );\n\n // Generate the initial prediction for every user message.\n const userPredictions = await Promise.all(\n messageChunks.map(async (chatHistoryChunk) => ({\n userPredictions: await this.predictNextUserMessage(\n chatHistoryChunk.chunkedMessages\n ),\n userResponse: chatHistoryChunk.userResponse,\n runManager,\n }))\n );\n\n // Generate insights, and prediction violations for every user message.\n // This call also regenerates the prediction based on the violations.\n const predictionViolations = await Promise.all(\n userPredictions.map((prediction) =>\n this.getPredictionViolations({\n userPredictions: prediction.userPredictions,\n userResponse: prediction.userResponse,\n runManager,\n })\n )\n );\n\n // Generate a fact/insight about the user for every set of messages.\n const insights = await Promise.all(\n predictionViolations.map((violation) =>\n this.generateFacts({\n userResponse: violation.userResponse,\n predictions: {\n revisedPrediction: violation.revisedPrediction,\n explainedPredictionErrors: violation.explainedPredictionErrors,\n },\n })\n )\n );\n\n return {\n insights,\n };\n }\n\n /**\n * This method predicts the next user message based on the chat history.\n *\n * @param {BaseMessage[]} chatHistory - The chat history based on which the next user message is predicted.\n * @param {CallbackManagerForChainRun} [runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<PredictNextUserMessageResponse>} A promise that resolves to the predicted next user message, the user state, and any insights.\n *\n * @throws {Error} If the response from the language model does not contain the expected keys: 'userState', 'predictedUserMessage', and 'insights'.\n */\n private async predictNextUserMessage(\n chatHistory: BaseMessage[],\n runManager?: CallbackManagerForChainRun\n ): Promise<PredictNextUserMessageResponse> {\n const messageString = this.getChatHistoryString(chatHistory);\n\n const llmWithFunctions = this.llm\n .bindTools([PREDICT_NEXT_USER_MESSAGE_FUNCTION])\n .withConfig({\n function_call: { name: PREDICT_NEXT_USER_MESSAGE_FUNCTION.name },\n });\n\n const chain = PREDICT_NEXT_USER_MESSAGE_PROMPT.pipe(llmWithFunctions).pipe(\n this.jsonOutputParser\n );\n\n const res = await chain.invoke(\n {\n chat_history: messageString,\n },\n runManager?.getChild(\"prediction\")\n );\n\n if (\n !(\n \"userState\" in res &&\n \"predictedUserMessage\" in res &&\n \"insights\" in res\n )\n ) {\n throw new Error(`Invalid response from LLM: ${JSON.stringify(res)}`);\n }\n\n const predictionResponse = res as PredictNextUserMessageResponse;\n\n // Query the retriever for relevant insights. Use the generates insights as a query.\n const retrievedDocs = await this.retrieveRelevantInsights(\n predictionResponse.insights\n );\n const relevantDocs = this.removeDuplicateStrings([\n ...predictionResponse.insights,\n ...retrievedDocs,\n ]);\n\n return {\n ...predictionResponse,\n insights: relevantDocs,\n };\n }\n\n /**\n * Retrieves relevant insights based on the provided insights.\n *\n * @param {Array<string>} insights - An array of insights to be used for retrieving relevant documents.\n *\n * @returns {Promise<Array<string>>} A promise that resolves to an array of relevant insights content.\n */\n private async retrieveRelevantInsights(\n insights: Array<string>\n ): Promise<Array<string>> {\n // Only extract the first relevant doc from the retriever. We don't need more than one.\n const relevantInsightsDocuments = await Promise.all(\n insights.map(async (insight) => {\n const relevantInsight = await this.retriever.invoke(insight);\n return relevantInsight[0];\n })\n );\n\n const relevantInsightsContent = relevantInsightsDocuments.map(\n (document) => document.pageContent\n );\n\n return relevantInsightsContent;\n }\n\n /**\n * This method generates prediction violations based on the predicted and actual user responses.\n * It also generates a revised prediction based on the identified violations.\n *\n * @param {Object} params - The parameters for the method.\n * @param {PredictNextUserMessageResponse} params.userPredictions - The predicted user message, user state, and insights.\n * @param {BaseMessage} [params.userResponse] - The actual user response.\n * @param {CallbackManagerForChainRun} [params.runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<{ userResponse: BaseMessage | undefined; revisedPrediction: string; explainedPredictionErrors: Array<string>; }>} A promise that resolves to an object containing the actual user response, the revised prediction, and the explained prediction errors.\n *\n * @throws {Error} If the response from the language model does not contain the expected keys: 'violationExplanation', 'explainedPredictionErrors', and 'accuratePrediction'.\n */\n private async getPredictionViolations({\n userPredictions,\n userResponse,\n runManager,\n }: {\n userPredictions: PredictNextUserMessageResponse;\n userResponse?: BaseMessage;\n runManager?: CallbackManagerForChainRun;\n }): Promise<GetPredictionViolationsResponse> {\n const llmWithFunctions = this.llm\n .bindTools([PREDICTION_VIOLATIONS_FUNCTION])\n .withConfig({\n function_call: { name: PREDICTION_VIOLATIONS_FUNCTION.name },\n });\n\n const chain = PREDICTION_VIOLATIONS_PROMPT.pipe(llmWithFunctions).pipe(\n this.jsonOutputParser\n );\n\n if (typeof userResponse?.content !== \"string\") {\n throw new Error(\"This chain does not support non-string model output.\");\n }\n const res = (await chain.invoke(\n {\n predicted_output: userPredictions.predictedUserMessage,\n actual_output: userResponse?.content ?? \"\",\n user_insights: userPredictions.insights.join(\"\\n\"),\n },\n runManager?.getChild(\"prediction_violations\")\n )) as Awaited<{\n violationExplanation: string;\n explainedPredictionErrors: Array<string>;\n accuratePrediction: boolean;\n }>;\n\n // Generate a revised prediction based on violations.\n const revisedPrediction = await this.generateRevisedPrediction({\n originalPrediction: userPredictions.predictedUserMessage,\n explainedPredictionErrors: res.explainedPredictionErrors,\n userInsights: userPredictions.insights,\n runManager,\n });\n\n return {\n userResponse,\n revisedPrediction,\n explainedPredictionErrors: res.explainedPredictionErrors,\n };\n }\n\n /**\n * This method generates a revised prediction based on the original prediction, explained prediction errors, and user insights.\n *\n * @param {Object} params - The parameters for the method.\n * @param {string} params.originalPrediction - The original prediction made by the model.\n * @param {Array<string>} params.explainedPredictionErrors - An array of explained prediction errors.\n * @param {Array<string>} params.userInsights - An array of insights about the user.\n * @param {CallbackManagerForChainRun} [params.runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<string>} A promise that resolves to a revised prediction.\n */\n private async generateRevisedPrediction({\n originalPrediction,\n explainedPredictionErrors,\n userInsights,\n runManager,\n }: {\n originalPrediction: string;\n explainedPredictionErrors: Array<string>;\n userInsights: Array<string>;\n runManager?: CallbackManagerForChainRun;\n }): Promise<string> {\n const revisedPredictionChain = GENERATE_REVISED_PREDICTION_PROMPT.pipe(\n this.llm\n ).pipe(this.stringOutputParser);\n\n const revisedPredictionRes = await revisedPredictionChain.invoke(\n {\n prediction: originalPrediction,\n explained_prediction_errors: explainedPredictionErrors.join(\"\\n\"),\n user_insights: userInsights.join(\"\\n\"),\n },\n runManager?.getChild(\"prediction_revision\")\n );\n\n return revisedPredictionRes;\n }\n\n /**\n * This method generates facts or insights about the user based on the revised prediction, explained prediction errors, and the user's response.\n *\n * @param {Object} params - The parameters for the method.\n * @param {BaseMessage} [params.userResponse] - The actual user response.\n * @param {Object} params.predictions - The revised prediction and explained prediction errors.\n * @param {string} params.predictions.revisedPrediction - The revised prediction made by the model.\n * @param {Array<string>} params.predictions.explainedPredictionErrors - An array of explained prediction errors.\n * @param {CallbackManagerForChainRun} [params.runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<string>} A promise that resolves to a string containing the generated facts or insights about the user.\n */\n private async generateFacts({\n userResponse,\n predictions,\n runManager,\n }: {\n userResponse?: BaseMessage;\n /**\n * Optional if the prediction was accurate.\n */\n predictions: {\n revisedPrediction: string;\n explainedPredictionErrors: Array<string>;\n };\n runManager?: CallbackManagerForChainRun;\n }): Promise<string> {\n const chain = GENERATE_FACTS_PROMPT.pipe(this.llm).pipe(\n this.stringOutputParser\n );\n\n if (typeof userResponse?.content !== \"string\") {\n throw new Error(\"This chain does not support non-string model output.\");\n }\n const res = await chain.invoke(\n {\n prediction_violations: predictions.explainedPredictionErrors.join(\"\\n\"),\n prediction: predictions.revisedPrediction,\n user_message: userResponse?.content ?? \"\",\n },\n runManager?.getChild(\"generate_facts\")\n );\n\n return res;\n }\n\n /**\n * Static method that creates a ViolationOfExpectationsChain instance from a\n * ChatOpenAI and retriever. It also accepts optional options\n * to customize the chain.\n *\n * @param llm The ChatOpenAI instance.\n * @param retriever The retriever used for similarity search.\n * @param options Optional options to customize the chain.\n *\n * @returns A new instance of ViolationOfExpectationsChain.\n */\n static fromLLM(\n llm: ChatOpenAI,\n retriever: BaseRetrieverInterface,\n options?: Partial<\n Omit<ViolationOfExpectationsChainInput, \"llm\" | \"retriever\">\n >\n ): ViolationOfExpectationsChain {\n return new this({\n retriever,\n llm,\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;AA6CA,IAAa,+BAAb,cACUA,uBAEV;CACE,OAAO,UAAU;AACf,SAAO;CACR;CAED,aAAqB;AACnB,SAAO;CACR;CAED,iBAAiB;CAEjB,cAAc;CAEd,IAAI,YAAY;AACd,SAAO,CAAC,KAAK,cAAe;CAC7B;CAED,IAAI,aAAa;AACf,SAAO,CAAC,KAAK,WAAY;CAC1B;CAED;CAEA;CAEA;CAEA;CAEA,YAAYC,QAA2C;EACrD,MAAM,OAAO;EACb,KAAK,YAAY,OAAO;EACxB,KAAK,MAAM,OAAO;EAClB,KAAK,mBAAmB,IAAIC;EAC5B,KAAK,qBAAqB,IAAIC;CAC/B;CAED,qBAAqBC,aAAoC;AACvD,SAAO,YACJ,IAAI,CAAC,gBAAgB;AACpB,OAAI,YAAY,UAAU,KAAK,QAC7B,QAAO,CAAC,OAAO,EAAE,YAAY,SAAS;YAC7B,YAAY,UAAU,KAAK,KACpC,QAAO,CAAC,IAAI,EAAE,YAAY,SAAS;OAEnC,QAAO,GAAG,YAAY,SAAS;EAElC,EAAC,CACD,KAAK,KAAK;CACd;CAED,uBAAuBC,SAAuC;AAC5D,SAAO,CAAC,GAAG,IAAI,IAAI,QAAS;CAC7B;;;;;;;;;;;;;;;;;CAkBD,0BAA0BD,aAAkD;EAC1E,MAAME,WAAiC,CAAE;EACzC,MAAMC,YAA2B,CAAE;EAEnC,YAAY,QAAQ,CAAC,MAAM,UAAU;GACnC,UAAU,KAAK,KAAK;AACpB,OAAI,KAAK,UAAU,KAAK,MAAM;IAC5B,IAAIC,eAAwC,YAAY,QAAQ;AAChE,QAAI,CAAC,gBAAgB,aAAa,UAAU,KAAK,SAC/C,eAAe;IAGjB,SAAS,KAAK;KACZ,iBAAiB;KACjB,cAAc,eACV,IAAIC,uCAAa,gBACjB;IACL,EAAC;GACH;EACF,EAAC;AAEF,SAAO;CACR;;;;;;;;;;;;;;;;;;;;CAqBD,MAAM,MACJC,QACAC,YACsB;AACtB,MAAI,EAAE,KAAK,kBAAkB,QAC3B,OAAM,IAAI,MAAM,CAAC,iBAAiB,EAAE,KAAK,eAAe,UAAU,CAAC;EAGrE,MAAMC,cAAyB,OAAO,KAAK;EAE3C,MAAM,4BAA4B,YAAY,MAAM,CAAC,yDACrC,QAAQ,CACvB;AACD,MAAI,CAAC,0BACH,OAAM,IAAI,MAAM;EAGlB,MAAM,gBAAgB,KAAK,0BACzB,YACD;EAGD,MAAM,kBAAkB,MAAM,QAAQ,IACpC,cAAc,IAAI,OAAO,sBAAsB;GAC7C,iBAAiB,MAAM,KAAK,uBAC1B,iBAAiB,gBAClB;GACD,cAAc,iBAAiB;GAC/B;EACD,GAAE,CACJ;EAID,MAAM,uBAAuB,MAAM,QAAQ,IACzC,gBAAgB,IAAI,CAAC,eACnB,KAAK,wBAAwB;GAC3B,iBAAiB,WAAW;GAC5B,cAAc,WAAW;GACzB;EACD,EAAC,CACH,CACF;EAGD,MAAM,WAAW,MAAM,QAAQ,IAC7B,qBAAqB,IAAI,CAAC,cACxB,KAAK,cAAc;GACjB,cAAc,UAAU;GACxB,aAAa;IACX,mBAAmB,UAAU;IAC7B,2BAA2B,UAAU;GACtC;EACF,EAAC,CACH,CACF;AAED,SAAO,EACL,SACD;CACF;;;;;;;;;;;CAYD,MAAc,uBACZR,aACAO,YACyC;EACzC,MAAM,gBAAgB,KAAK,qBAAqB,YAAY;EAE5D,MAAM,mBAAmB,KAAK,IAC3B,UAAU,CAACE,gDAAmC,EAAC,CAC/C,WAAW,EACV,eAAe,EAAE,MAAMA,iDAAmC,KAAM,EACjE,EAAC;EAEJ,MAAM,QAAQC,0EAAiC,KAAK,iBAAiB,CAAC,KACpE,KAAK,iBACN;EAED,MAAM,MAAM,MAAM,MAAM,OACtB,EACE,cAAc,cACf,GACD,YAAY,SAAS,aAAa,CACnC;AAED,MACE,EACE,eAAe,OACf,0BAA0B,OAC1B,cAAc,KAGhB,OAAM,IAAI,MAAM,CAAC,2BAA2B,EAAE,KAAK,UAAU,IAAI,EAAE;EAGrE,MAAM,qBAAqB;EAG3B,MAAM,gBAAgB,MAAM,KAAK,yBAC/B,mBAAmB,SACpB;EACD,MAAM,eAAe,KAAK,uBAAuB,CAC/C,GAAG,mBAAmB,UACtB,GAAG,aACJ,EAAC;AAEF,SAAO;GACL,GAAG;GACH,UAAU;EACX;CACF;;;;;;;;CASD,MAAc,yBACZC,UACwB;EAExB,MAAM,4BAA4B,MAAM,QAAQ,IAC9C,SAAS,IAAI,OAAO,YAAY;GAC9B,MAAM,kBAAkB,MAAM,KAAK,UAAU,OAAO,QAAQ;AAC5D,UAAO,gBAAgB;EACxB,EAAC,CACH;EAED,MAAM,0BAA0B,0BAA0B,IACxD,CAAC,aAAa,SAAS,YACxB;AAED,SAAO;CACR;;;;;;;;;;;;;;CAeD,MAAc,wBAAwB,EACpC,iBACA,cACA,YAKD,EAA4C;EAC3C,MAAM,mBAAmB,KAAK,IAC3B,UAAU,CAACC,4CAA+B,EAAC,CAC3C,WAAW,EACV,eAAe,EAAE,MAAMA,6CAA+B,KAAM,EAC7D,EAAC;EAEJ,MAAM,QAAQC,sEAA6B,KAAK,iBAAiB,CAAC,KAChE,KAAK,iBACN;AAED,MAAI,OAAO,cAAc,YAAY,SACnC,OAAM,IAAI,MAAM;EAElB,MAAM,MAAO,MAAM,MAAM,OACvB;GACE,kBAAkB,gBAAgB;GAClC,eAAe,cAAc,WAAW;GACxC,eAAe,gBAAgB,SAAS,KAAK,KAAK;EACnD,GACD,YAAY,SAAS,wBAAwB,CAC9C;EAOD,MAAM,oBAAoB,MAAM,KAAK,0BAA0B;GAC7D,oBAAoB,gBAAgB;GACpC,2BAA2B,IAAI;GAC/B,cAAc,gBAAgB;GAC9B;EACD,EAAC;AAEF,SAAO;GACL;GACA;GACA,2BAA2B,IAAI;EAChC;CACF;;;;;;;;;;;;CAaD,MAAc,0BAA0B,EACtC,oBACA,2BACA,cACA,YAMD,EAAmB;EAClB,MAAM,yBAAyBC,4EAAmC,KAChE,KAAK,IACN,CAAC,KAAK,KAAK,mBAAmB;EAE/B,MAAM,uBAAuB,MAAM,uBAAuB,OACxD;GACE,YAAY;GACZ,6BAA6B,0BAA0B,KAAK,KAAK;GACjE,eAAe,aAAa,KAAK,KAAK;EACvC,GACD,YAAY,SAAS,sBAAsB,CAC5C;AAED,SAAO;CACR;;;;;;;;;;;;;CAcD,MAAc,cAAc,EAC1B,cACA,aACA,YAWD,EAAmB;EAClB,MAAM,QAAQC,+DAAsB,KAAK,KAAK,IAAI,CAAC,KACjD,KAAK,mBACN;AAED,MAAI,OAAO,cAAc,YAAY,SACnC,OAAM,IAAI,MAAM;EAElB,MAAM,MAAM,MAAM,MAAM,OACtB;GACE,uBAAuB,YAAY,0BAA0B,KAAK,KAAK;GACvE,YAAY,YAAY;GACxB,cAAc,cAAc,WAAW;EACxC,GACD,YAAY,SAAS,iBAAiB,CACvC;AAED,SAAO;CACR;;;;;;;;;;;;CAaD,OAAO,QACLC,KACAC,WACAC,SAG8B;AAC9B,SAAO,IAAI,KAAK;GACd;GACA;GACA,GAAG;EACJ;CACF;AACF"}
@@ -0,0 +1,102 @@
1
+ import { BaseChain, ChainInputs } from "../../../chains/base.cjs";
2
+ import { JsonOutputFunctionsParser } from "../../../output_parsers/openai_functions.cjs";
3
+ import { MessageChunkResult } from "./types.cjs";
4
+ import { BaseMessage } from "@langchain/core/messages";
5
+ import { StringOutputParser } from "@langchain/core/output_parsers";
6
+ import { ChainValues } from "@langchain/core/utils/types";
7
+ import { CallbackManagerForChainRun } from "@langchain/core/callbacks/manager";
8
+ import { BaseRetrieverInterface } from "@langchain/core/retrievers";
9
+ import { ChatOpenAI } from "@langchain/openai";
10
+
11
+ //#region src/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts
12
+
13
+ /**
14
+ * Interface for the input parameters of the ViolationOfExpectationsChain class.
15
+ */
16
+ interface ViolationOfExpectationsChainInput extends ChainInputs {
17
+ /**
18
+ * The retriever to use for retrieving stored
19
+ * thoughts and insights.
20
+ */
21
+ retriever: BaseRetrieverInterface;
22
+ /**
23
+ * The LLM to use
24
+ */
25
+ llm: ChatOpenAI;
26
+ }
27
+ /**
28
+ * Chain that generates key insights/facts of a user based on a
29
+ * a chat conversation with an AI.
30
+ */
31
+ declare class ViolationOfExpectationsChain extends BaseChain implements ViolationOfExpectationsChainInput {
32
+ static lc_name(): string;
33
+ _chainType(): string;
34
+ chatHistoryKey: string;
35
+ thoughtsKey: string;
36
+ get inputKeys(): string[];
37
+ get outputKeys(): string[];
38
+ retriever: BaseRetrieverInterface;
39
+ llm: ChatOpenAI;
40
+ jsonOutputParser: JsonOutputFunctionsParser;
41
+ stringOutputParser: StringOutputParser;
42
+ constructor(fields: ViolationOfExpectationsChainInput);
43
+ getChatHistoryString(chatHistory: BaseMessage[]): string;
44
+ removeDuplicateStrings(strings: Array<string>): Array<string>;
45
+ /**
46
+ * This method breaks down the chat history into chunks of messages.
47
+ * Each chunk consists of a sequence of messages ending with an AI message and the subsequent user response, if any.
48
+ *
49
+ * @param {BaseMessage[]} chatHistory - The chat history to be chunked.
50
+ *
51
+ * @returns {MessageChunkResult[]} An array of message chunks. Each chunk includes a sequence of messages and the subsequent user response.
52
+ *
53
+ * @description
54
+ * The method iterates over the chat history and pushes each message into a temporary array.
55
+ * When it encounters an AI message, it checks for a subsequent user message.
56
+ * If a user message is found, it is considered as the user response to the AI message.
57
+ * If no user message is found after the AI message, the user response is undefined.
58
+ * The method then pushes the chunk (sequence of messages and user response) into the result array.
59
+ * This process continues until all messages in the chat history have been processed.
60
+ */
61
+ chunkMessagesByAIResponse(chatHistory: BaseMessage[]): MessageChunkResult[];
62
+ /**
63
+ * This method processes a chat history to generate insights about the user.
64
+ *
65
+ * @param {ChainValues} values - The input values for the chain. It should contain a key for chat history.
66
+ * @param {CallbackManagerForChainRun} [runManager] - Optional callback manager for the chain run.
67
+ *
68
+ * @returns {Promise<ChainValues>} A promise that resolves to a list of insights about the user.
69
+ *
70
+ * @throws {Error} If the chat history key is not found in the input values or if the chat history is not an array of BaseMessages.
71
+ *
72
+ * @description
73
+ * The method performs the following steps:
74
+ * 1. Checks if the chat history key is present in the input values and if the chat history is an array of BaseMessages.
75
+ * 2. Breaks the chat history into chunks of messages.
76
+ * 3. For each chunk, it generates an initial prediction for the user's next message.
77
+ * 4. For each prediction, it generates insights and prediction violations, and regenerates the prediction based on the violations.
78
+ * 5. For each set of messages, it generates a fact/insight about the user.
79
+ * The method returns a list of these insights.
80
+ */
81
+ _call(values: ChainValues, runManager?: CallbackManagerForChainRun): Promise<ChainValues>;
82
+ private predictNextUserMessage;
83
+ private retrieveRelevantInsights;
84
+ private getPredictionViolations;
85
+ private generateRevisedPrediction;
86
+ private generateFacts;
87
+ /**
88
+ * Static method that creates a ViolationOfExpectationsChain instance from a
89
+ * ChatOpenAI and retriever. It also accepts optional options
90
+ * to customize the chain.
91
+ *
92
+ * @param llm The ChatOpenAI instance.
93
+ * @param retriever The retriever used for similarity search.
94
+ * @param options Optional options to customize the chain.
95
+ *
96
+ * @returns A new instance of ViolationOfExpectationsChain.
97
+ */
98
+ static fromLLM(llm: ChatOpenAI, retriever: BaseRetrieverInterface, options?: Partial<Omit<ViolationOfExpectationsChainInput, "llm" | "retriever">>): ViolationOfExpectationsChain;
99
+ }
100
+ //#endregion
101
+ export { ViolationOfExpectationsChain, ViolationOfExpectationsChainInput };
102
+ //# sourceMappingURL=violation_of_expectations_chain.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"violation_of_expectations_chain.d.cts","names":["BaseRetrieverInterface","ChatOpenAI","BaseMessage","ChainValues","StringOutputParser","CallbackManagerForChainRun","JsonOutputFunctionsParser","BaseChain","ChainInputs","MessageChunkResult","ViolationOfExpectationsChainInput","ViolationOfExpectationsChain","Array","Promise","Omit","Partial"],"sources":["../../../../src/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts"],"sourcesContent":["import type { BaseRetrieverInterface } from \"@langchain/core/retrievers\";\nimport { ChatOpenAI } from \"@langchain/openai\";\nimport { BaseMessage } from \"@langchain/core/messages\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { StringOutputParser } from \"@langchain/core/output_parsers\";\nimport { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { JsonOutputFunctionsParser } from \"../../../output_parsers/openai_functions.js\";\nimport { BaseChain, ChainInputs } from \"../../../chains/base.js\";\nimport { MessageChunkResult } from \"./types.js\";\n/**\n * Interface for the input parameters of the ViolationOfExpectationsChain class.\n */\nexport interface ViolationOfExpectationsChainInput extends ChainInputs {\n /**\n * The retriever to use for retrieving stored\n * thoughts and insights.\n */\n retriever: BaseRetrieverInterface;\n /**\n * The LLM to use\n */\n llm: ChatOpenAI;\n}\n/**\n * Chain that generates key insights/facts of a user based on a\n * a chat conversation with an AI.\n */\nexport declare class ViolationOfExpectationsChain extends BaseChain implements ViolationOfExpectationsChainInput {\n static lc_name(): string;\n _chainType(): string;\n chatHistoryKey: string;\n thoughtsKey: string;\n get inputKeys(): string[];\n get outputKeys(): string[];\n retriever: BaseRetrieverInterface;\n llm: ChatOpenAI;\n jsonOutputParser: JsonOutputFunctionsParser;\n stringOutputParser: StringOutputParser;\n constructor(fields: ViolationOfExpectationsChainInput);\n getChatHistoryString(chatHistory: BaseMessage[]): string;\n removeDuplicateStrings(strings: Array<string>): Array<string>;\n /**\n * This method breaks down the chat history into chunks of messages.\n * Each chunk consists of a sequence of messages ending with an AI message and the subsequent user response, if any.\n *\n * @param {BaseMessage[]} chatHistory - The chat history to be chunked.\n *\n * @returns {MessageChunkResult[]} An array of message chunks. Each chunk includes a sequence of messages and the subsequent user response.\n *\n * @description\n * The method iterates over the chat history and pushes each message into a temporary array.\n * When it encounters an AI message, it checks for a subsequent user message.\n * If a user message is found, it is considered as the user response to the AI message.\n * If no user message is found after the AI message, the user response is undefined.\n * The method then pushes the chunk (sequence of messages and user response) into the result array.\n * This process continues until all messages in the chat history have been processed.\n */\n chunkMessagesByAIResponse(chatHistory: BaseMessage[]): MessageChunkResult[];\n /**\n * This method processes a chat history to generate insights about the user.\n *\n * @param {ChainValues} values - The input values for the chain. It should contain a key for chat history.\n * @param {CallbackManagerForChainRun} [runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<ChainValues>} A promise that resolves to a list of insights about the user.\n *\n * @throws {Error} If the chat history key is not found in the input values or if the chat history is not an array of BaseMessages.\n *\n * @description\n * The method performs the following steps:\n * 1. Checks if the chat history key is present in the input values and if the chat history is an array of BaseMessages.\n * 2. Breaks the chat history into chunks of messages.\n * 3. For each chunk, it generates an initial prediction for the user's next message.\n * 4. For each prediction, it generates insights and prediction violations, and regenerates the prediction based on the violations.\n * 5. For each set of messages, it generates a fact/insight about the user.\n * The method returns a list of these insights.\n */\n _call(values: ChainValues, runManager?: CallbackManagerForChainRun): Promise<ChainValues>;\n private predictNextUserMessage;\n private retrieveRelevantInsights;\n private getPredictionViolations;\n private generateRevisedPrediction;\n private generateFacts;\n /**\n * Static method that creates a ViolationOfExpectationsChain instance from a\n * ChatOpenAI and retriever. It also accepts optional options\n * to customize the chain.\n *\n * @param llm The ChatOpenAI instance.\n * @param retriever The retriever used for similarity search.\n * @param options Optional options to customize the chain.\n *\n * @returns A new instance of ViolationOfExpectationsChain.\n */\n static fromLLM(llm: ChatOpenAI, retriever: BaseRetrieverInterface, options?: Partial<Omit<ViolationOfExpectationsChainInput, \"llm\" | \"retriever\">>): ViolationOfExpectationsChain;\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA;AAAkD,UAAjCU,iCAAAA,SAA0CF,WAAT,CAAA;EAAA;;;AAAoB;EAejDG,SAAAA,EAVNX,sBAUkC;EAAA;;;EAQ9B,GACGM,EAfbL,UAeaK;;;;;;AAqBqBJ,cA9BtBS,4BAAAA,SAAqCJ,SAAAA,YAAqBG,iCA8BpCR,CAAAA;EAAW,OAAKO,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAkB,UAoB3DN,CAAAA,CAAAA,EAAAA,MAAAA;EAAW,cAAeE,EAAAA,MAAAA;EAA0B,WAAWF,EAAAA,MAAAA;EAAW,IAAnBU,SAAAA,CAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAAO,IAiBxDZ,UAAAA,CAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAAU,SAAaD,EA5DhCA,sBA4DgCA;EAAsB,GAAyBU,EA3DrFT,UA2DqFS;EAAiC,gBAAtCI,EA1DnER,yBA0DmEQ;EAAI,kBAAZC,EAzDzDX,kBAyDyDW;EAAO,WAAiEJ,CAAAA,MAAAA,EAxDjID,iCAwDiIC;EAA4B,oBAnE3HJ,CAAAA,WAAAA,EAYpBL,WAZoBK,EAAAA,CAAAA,EAAAA,MAAAA;EAAS,sBAAYG,CAAAA,OAAAA,EAa3CE,KAb2CF,CAAAA,MAAAA,CAAAA,CAAAA,EAa3BE,KAb2BF,CAAAA,MAAAA,CAAAA;EAAiC;;;;;;;;;;;;;;;;yCA8BrER,gBAAgBO;;;;;;;;;;;;;;;;;;;;gBAoBzCN,0BAA0BE,6BAA6BQ,QAAQV;;;;;;;;;;;;;;;;;sBAiBzDF,uBAAuBD,kCAAkCe,QAAQD,KAAKJ,2DAA2DC"}
@@ -0,0 +1,102 @@
1
+ import { BaseChain, ChainInputs } from "../../../chains/base.js";
2
+ import { JsonOutputFunctionsParser } from "../../../output_parsers/openai_functions.js";
3
+ import { MessageChunkResult } from "./types.js";
4
+ import { CallbackManagerForChainRun } from "@langchain/core/callbacks/manager";
5
+ import { StringOutputParser } from "@langchain/core/output_parsers";
6
+ import { BaseMessage } from "@langchain/core/messages";
7
+ import { ChainValues } from "@langchain/core/utils/types";
8
+ import { ChatOpenAI } from "@langchain/openai";
9
+ import { BaseRetrieverInterface } from "@langchain/core/retrievers";
10
+
11
+ //#region src/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts
12
+
13
+ /**
14
+ * Interface for the input parameters of the ViolationOfExpectationsChain class.
15
+ */
16
+ interface ViolationOfExpectationsChainInput extends ChainInputs {
17
+ /**
18
+ * The retriever to use for retrieving stored
19
+ * thoughts and insights.
20
+ */
21
+ retriever: BaseRetrieverInterface;
22
+ /**
23
+ * The LLM to use
24
+ */
25
+ llm: ChatOpenAI;
26
+ }
27
+ /**
28
+ * Chain that generates key insights/facts of a user based on a
29
+ * a chat conversation with an AI.
30
+ */
31
+ declare class ViolationOfExpectationsChain extends BaseChain implements ViolationOfExpectationsChainInput {
32
+ static lc_name(): string;
33
+ _chainType(): string;
34
+ chatHistoryKey: string;
35
+ thoughtsKey: string;
36
+ get inputKeys(): string[];
37
+ get outputKeys(): string[];
38
+ retriever: BaseRetrieverInterface;
39
+ llm: ChatOpenAI;
40
+ jsonOutputParser: JsonOutputFunctionsParser;
41
+ stringOutputParser: StringOutputParser;
42
+ constructor(fields: ViolationOfExpectationsChainInput);
43
+ getChatHistoryString(chatHistory: BaseMessage[]): string;
44
+ removeDuplicateStrings(strings: Array<string>): Array<string>;
45
+ /**
46
+ * This method breaks down the chat history into chunks of messages.
47
+ * Each chunk consists of a sequence of messages ending with an AI message and the subsequent user response, if any.
48
+ *
49
+ * @param {BaseMessage[]} chatHistory - The chat history to be chunked.
50
+ *
51
+ * @returns {MessageChunkResult[]} An array of message chunks. Each chunk includes a sequence of messages and the subsequent user response.
52
+ *
53
+ * @description
54
+ * The method iterates over the chat history and pushes each message into a temporary array.
55
+ * When it encounters an AI message, it checks for a subsequent user message.
56
+ * If a user message is found, it is considered as the user response to the AI message.
57
+ * If no user message is found after the AI message, the user response is undefined.
58
+ * The method then pushes the chunk (sequence of messages and user response) into the result array.
59
+ * This process continues until all messages in the chat history have been processed.
60
+ */
61
+ chunkMessagesByAIResponse(chatHistory: BaseMessage[]): MessageChunkResult[];
62
+ /**
63
+ * This method processes a chat history to generate insights about the user.
64
+ *
65
+ * @param {ChainValues} values - The input values for the chain. It should contain a key for chat history.
66
+ * @param {CallbackManagerForChainRun} [runManager] - Optional callback manager for the chain run.
67
+ *
68
+ * @returns {Promise<ChainValues>} A promise that resolves to a list of insights about the user.
69
+ *
70
+ * @throws {Error} If the chat history key is not found in the input values or if the chat history is not an array of BaseMessages.
71
+ *
72
+ * @description
73
+ * The method performs the following steps:
74
+ * 1. Checks if the chat history key is present in the input values and if the chat history is an array of BaseMessages.
75
+ * 2. Breaks the chat history into chunks of messages.
76
+ * 3. For each chunk, it generates an initial prediction for the user's next message.
77
+ * 4. For each prediction, it generates insights and prediction violations, and regenerates the prediction based on the violations.
78
+ * 5. For each set of messages, it generates a fact/insight about the user.
79
+ * The method returns a list of these insights.
80
+ */
81
+ _call(values: ChainValues, runManager?: CallbackManagerForChainRun): Promise<ChainValues>;
82
+ private predictNextUserMessage;
83
+ private retrieveRelevantInsights;
84
+ private getPredictionViolations;
85
+ private generateRevisedPrediction;
86
+ private generateFacts;
87
+ /**
88
+ * Static method that creates a ViolationOfExpectationsChain instance from a
89
+ * ChatOpenAI and retriever. It also accepts optional options
90
+ * to customize the chain.
91
+ *
92
+ * @param llm The ChatOpenAI instance.
93
+ * @param retriever The retriever used for similarity search.
94
+ * @param options Optional options to customize the chain.
95
+ *
96
+ * @returns A new instance of ViolationOfExpectationsChain.
97
+ */
98
+ static fromLLM(llm: ChatOpenAI, retriever: BaseRetrieverInterface, options?: Partial<Omit<ViolationOfExpectationsChainInput, "llm" | "retriever">>): ViolationOfExpectationsChain;
99
+ }
100
+ //#endregion
101
+ export { ViolationOfExpectationsChain, ViolationOfExpectationsChainInput };
102
+ //# sourceMappingURL=violation_of_expectations_chain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"violation_of_expectations_chain.d.ts","names":["BaseRetrieverInterface","ChatOpenAI","BaseMessage","ChainValues","StringOutputParser","CallbackManagerForChainRun","JsonOutputFunctionsParser","BaseChain","ChainInputs","MessageChunkResult","ViolationOfExpectationsChainInput","ViolationOfExpectationsChain","Array","Promise","Omit","Partial"],"sources":["../../../../src/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts"],"sourcesContent":["import type { BaseRetrieverInterface } from \"@langchain/core/retrievers\";\nimport { ChatOpenAI } from \"@langchain/openai\";\nimport { BaseMessage } from \"@langchain/core/messages\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { StringOutputParser } from \"@langchain/core/output_parsers\";\nimport { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { JsonOutputFunctionsParser } from \"../../../output_parsers/openai_functions.js\";\nimport { BaseChain, ChainInputs } from \"../../../chains/base.js\";\nimport { MessageChunkResult } from \"./types.js\";\n/**\n * Interface for the input parameters of the ViolationOfExpectationsChain class.\n */\nexport interface ViolationOfExpectationsChainInput extends ChainInputs {\n /**\n * The retriever to use for retrieving stored\n * thoughts and insights.\n */\n retriever: BaseRetrieverInterface;\n /**\n * The LLM to use\n */\n llm: ChatOpenAI;\n}\n/**\n * Chain that generates key insights/facts of a user based on a\n * a chat conversation with an AI.\n */\nexport declare class ViolationOfExpectationsChain extends BaseChain implements ViolationOfExpectationsChainInput {\n static lc_name(): string;\n _chainType(): string;\n chatHistoryKey: string;\n thoughtsKey: string;\n get inputKeys(): string[];\n get outputKeys(): string[];\n retriever: BaseRetrieverInterface;\n llm: ChatOpenAI;\n jsonOutputParser: JsonOutputFunctionsParser;\n stringOutputParser: StringOutputParser;\n constructor(fields: ViolationOfExpectationsChainInput);\n getChatHistoryString(chatHistory: BaseMessage[]): string;\n removeDuplicateStrings(strings: Array<string>): Array<string>;\n /**\n * This method breaks down the chat history into chunks of messages.\n * Each chunk consists of a sequence of messages ending with an AI message and the subsequent user response, if any.\n *\n * @param {BaseMessage[]} chatHistory - The chat history to be chunked.\n *\n * @returns {MessageChunkResult[]} An array of message chunks. Each chunk includes a sequence of messages and the subsequent user response.\n *\n * @description\n * The method iterates over the chat history and pushes each message into a temporary array.\n * When it encounters an AI message, it checks for a subsequent user message.\n * If a user message is found, it is considered as the user response to the AI message.\n * If no user message is found after the AI message, the user response is undefined.\n * The method then pushes the chunk (sequence of messages and user response) into the result array.\n * This process continues until all messages in the chat history have been processed.\n */\n chunkMessagesByAIResponse(chatHistory: BaseMessage[]): MessageChunkResult[];\n /**\n * This method processes a chat history to generate insights about the user.\n *\n * @param {ChainValues} values - The input values for the chain. It should contain a key for chat history.\n * @param {CallbackManagerForChainRun} [runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<ChainValues>} A promise that resolves to a list of insights about the user.\n *\n * @throws {Error} If the chat history key is not found in the input values or if the chat history is not an array of BaseMessages.\n *\n * @description\n * The method performs the following steps:\n * 1. Checks if the chat history key is present in the input values and if the chat history is an array of BaseMessages.\n * 2. Breaks the chat history into chunks of messages.\n * 3. For each chunk, it generates an initial prediction for the user's next message.\n * 4. For each prediction, it generates insights and prediction violations, and regenerates the prediction based on the violations.\n * 5. For each set of messages, it generates a fact/insight about the user.\n * The method returns a list of these insights.\n */\n _call(values: ChainValues, runManager?: CallbackManagerForChainRun): Promise<ChainValues>;\n private predictNextUserMessage;\n private retrieveRelevantInsights;\n private getPredictionViolations;\n private generateRevisedPrediction;\n private generateFacts;\n /**\n * Static method that creates a ViolationOfExpectationsChain instance from a\n * ChatOpenAI and retriever. It also accepts optional options\n * to customize the chain.\n *\n * @param llm The ChatOpenAI instance.\n * @param retriever The retriever used for similarity search.\n * @param options Optional options to customize the chain.\n *\n * @returns A new instance of ViolationOfExpectationsChain.\n */\n static fromLLM(llm: ChatOpenAI, retriever: BaseRetrieverInterface, options?: Partial<Omit<ViolationOfExpectationsChainInput, \"llm\" | \"retriever\">>): ViolationOfExpectationsChain;\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA;AAAkD,UAAjCU,iCAAAA,SAA0CF,WAAT,CAAA;EAAA;;;AAAoB;EAejDG,SAAAA,EAVNX,sBAUkC;EAAA;;;EAQ9B,GACGM,EAfbL,UAeaK;;;;;;AAqBqBJ,cA9BtBS,4BAAAA,SAAqCJ,SAAAA,YAAqBG,iCA8BpCR,CAAAA;EAAW,OAAKO,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAkB,UAoB3DN,CAAAA,CAAAA,EAAAA,MAAAA;EAAW,cAAeE,EAAAA,MAAAA;EAA0B,WAAWF,EAAAA,MAAAA;EAAW,IAAnBU,SAAAA,CAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAAO,IAiBxDZ,UAAAA,CAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAAU,SAAaD,EA5DhCA,sBA4DgCA;EAAsB,GAAyBU,EA3DrFT,UA2DqFS;EAAiC,gBAAtCI,EA1DnER,yBA0DmEQ;EAAI,kBAAZC,EAzDzDX,kBAyDyDW;EAAO,WAAiEJ,CAAAA,MAAAA,EAxDjID,iCAwDiIC;EAA4B,oBAnE3HJ,CAAAA,WAAAA,EAYpBL,WAZoBK,EAAAA,CAAAA,EAAAA,MAAAA;EAAS,sBAAYG,CAAAA,OAAAA,EAa3CE,KAb2CF,CAAAA,MAAAA,CAAAA,CAAAA,EAa3BE,KAb2BF,CAAAA,MAAAA,CAAAA;EAAiC;;;;;;;;;;;;;;;;yCA8BrER,gBAAgBO;;;;;;;;;;;;;;;;;;;;gBAoBzCN,0BAA0BE,6BAA6BQ,QAAQV;;;;;;;;;;;;;;;;;sBAiBzDF,uBAAuBD,kCAAkCe,QAAQD,KAAKJ,2DAA2DC"}
@@ -0,0 +1,262 @@
1
+ import { BaseChain } from "../../../chains/base.js";
2
+ import { JsonOutputFunctionsParser } from "../../../output_parsers/openai_functions.js";
3
+ import { PREDICTION_VIOLATIONS_FUNCTION, PREDICT_NEXT_USER_MESSAGE_FUNCTION } from "./types.js";
4
+ import { GENERATE_FACTS_PROMPT, GENERATE_REVISED_PREDICTION_PROMPT, PREDICTION_VIOLATIONS_PROMPT, PREDICT_NEXT_USER_MESSAGE_PROMPT } from "./violation_of_expectations_prompt.js";
5
+ import { StringOutputParser } from "@langchain/core/output_parsers";
6
+ import { HumanMessage, isBaseMessage } from "@langchain/core/messages";
7
+
8
+ //#region src/experimental/chains/violation_of_expectations/violation_of_expectations_chain.ts
9
+ /**
10
+ * Chain that generates key insights/facts of a user based on a
11
+ * a chat conversation with an AI.
12
+ */
13
+ var ViolationOfExpectationsChain = class extends BaseChain {
14
+ static lc_name() {
15
+ return "ViolationOfExpectationsChain";
16
+ }
17
+ _chainType() {
18
+ return "violation_of_expectation_chain";
19
+ }
20
+ chatHistoryKey = "chat_history";
21
+ thoughtsKey = "thoughts";
22
+ get inputKeys() {
23
+ return [this.chatHistoryKey];
24
+ }
25
+ get outputKeys() {
26
+ return [this.thoughtsKey];
27
+ }
28
+ retriever;
29
+ llm;
30
+ jsonOutputParser;
31
+ stringOutputParser;
32
+ constructor(fields) {
33
+ super(fields);
34
+ this.retriever = fields.retriever;
35
+ this.llm = fields.llm;
36
+ this.jsonOutputParser = new JsonOutputFunctionsParser();
37
+ this.stringOutputParser = new StringOutputParser();
38
+ }
39
+ getChatHistoryString(chatHistory) {
40
+ return chatHistory.map((chatMessage) => {
41
+ if (chatMessage._getType() === "human") return `Human: ${chatMessage.content}`;
42
+ else if (chatMessage._getType() === "ai") return `AI: ${chatMessage.content}`;
43
+ else return `${chatMessage.content}`;
44
+ }).join("\n");
45
+ }
46
+ removeDuplicateStrings(strings) {
47
+ return [...new Set(strings)];
48
+ }
49
+ /**
50
+ * This method breaks down the chat history into chunks of messages.
51
+ * Each chunk consists of a sequence of messages ending with an AI message and the subsequent user response, if any.
52
+ *
53
+ * @param {BaseMessage[]} chatHistory - The chat history to be chunked.
54
+ *
55
+ * @returns {MessageChunkResult[]} An array of message chunks. Each chunk includes a sequence of messages and the subsequent user response.
56
+ *
57
+ * @description
58
+ * The method iterates over the chat history and pushes each message into a temporary array.
59
+ * When it encounters an AI message, it checks for a subsequent user message.
60
+ * If a user message is found, it is considered as the user response to the AI message.
61
+ * If no user message is found after the AI message, the user response is undefined.
62
+ * The method then pushes the chunk (sequence of messages and user response) into the result array.
63
+ * This process continues until all messages in the chat history have been processed.
64
+ */
65
+ chunkMessagesByAIResponse(chatHistory) {
66
+ const newArray = [];
67
+ const tempArray = [];
68
+ chatHistory.forEach((item, index) => {
69
+ tempArray.push(item);
70
+ if (item._getType() === "ai") {
71
+ let userResponse = chatHistory[index + 1];
72
+ if (!userResponse || userResponse._getType() !== "human") userResponse = void 0;
73
+ newArray.push({
74
+ chunkedMessages: tempArray,
75
+ userResponse: userResponse ? new HumanMessage(userResponse) : void 0
76
+ });
77
+ }
78
+ });
79
+ return newArray;
80
+ }
81
+ /**
82
+ * This method processes a chat history to generate insights about the user.
83
+ *
84
+ * @param {ChainValues} values - The input values for the chain. It should contain a key for chat history.
85
+ * @param {CallbackManagerForChainRun} [runManager] - Optional callback manager for the chain run.
86
+ *
87
+ * @returns {Promise<ChainValues>} A promise that resolves to a list of insights about the user.
88
+ *
89
+ * @throws {Error} If the chat history key is not found in the input values or if the chat history is not an array of BaseMessages.
90
+ *
91
+ * @description
92
+ * The method performs the following steps:
93
+ * 1. Checks if the chat history key is present in the input values and if the chat history is an array of BaseMessages.
94
+ * 2. Breaks the chat history into chunks of messages.
95
+ * 3. For each chunk, it generates an initial prediction for the user's next message.
96
+ * 4. For each prediction, it generates insights and prediction violations, and regenerates the prediction based on the violations.
97
+ * 5. For each set of messages, it generates a fact/insight about the user.
98
+ * The method returns a list of these insights.
99
+ */
100
+ async _call(values, runManager) {
101
+ if (!(this.chatHistoryKey in values)) throw new Error(`Chat history key ${this.chatHistoryKey} not found`);
102
+ const chatHistory = values[this.chatHistoryKey];
103
+ const isEveryMessageBaseMessage = chatHistory.every((message) => isBaseMessage(message));
104
+ if (!isEveryMessageBaseMessage) throw new Error("Chat history must be an array of BaseMessages");
105
+ const messageChunks = this.chunkMessagesByAIResponse(chatHistory);
106
+ const userPredictions = await Promise.all(messageChunks.map(async (chatHistoryChunk) => ({
107
+ userPredictions: await this.predictNextUserMessage(chatHistoryChunk.chunkedMessages),
108
+ userResponse: chatHistoryChunk.userResponse,
109
+ runManager
110
+ })));
111
+ const predictionViolations = await Promise.all(userPredictions.map((prediction) => this.getPredictionViolations({
112
+ userPredictions: prediction.userPredictions,
113
+ userResponse: prediction.userResponse,
114
+ runManager
115
+ })));
116
+ const insights = await Promise.all(predictionViolations.map((violation) => this.generateFacts({
117
+ userResponse: violation.userResponse,
118
+ predictions: {
119
+ revisedPrediction: violation.revisedPrediction,
120
+ explainedPredictionErrors: violation.explainedPredictionErrors
121
+ }
122
+ })));
123
+ return { insights };
124
+ }
125
+ /**
126
+ * This method predicts the next user message based on the chat history.
127
+ *
128
+ * @param {BaseMessage[]} chatHistory - The chat history based on which the next user message is predicted.
129
+ * @param {CallbackManagerForChainRun} [runManager] - Optional callback manager for the chain run.
130
+ *
131
+ * @returns {Promise<PredictNextUserMessageResponse>} A promise that resolves to the predicted next user message, the user state, and any insights.
132
+ *
133
+ * @throws {Error} If the response from the language model does not contain the expected keys: 'userState', 'predictedUserMessage', and 'insights'.
134
+ */
135
+ async predictNextUserMessage(chatHistory, runManager) {
136
+ const messageString = this.getChatHistoryString(chatHistory);
137
+ const llmWithFunctions = this.llm.bindTools([PREDICT_NEXT_USER_MESSAGE_FUNCTION]).withConfig({ function_call: { name: PREDICT_NEXT_USER_MESSAGE_FUNCTION.name } });
138
+ const chain = PREDICT_NEXT_USER_MESSAGE_PROMPT.pipe(llmWithFunctions).pipe(this.jsonOutputParser);
139
+ const res = await chain.invoke({ chat_history: messageString }, runManager?.getChild("prediction"));
140
+ if (!("userState" in res && "predictedUserMessage" in res && "insights" in res)) throw new Error(`Invalid response from LLM: ${JSON.stringify(res)}`);
141
+ const predictionResponse = res;
142
+ const retrievedDocs = await this.retrieveRelevantInsights(predictionResponse.insights);
143
+ const relevantDocs = this.removeDuplicateStrings([...predictionResponse.insights, ...retrievedDocs]);
144
+ return {
145
+ ...predictionResponse,
146
+ insights: relevantDocs
147
+ };
148
+ }
149
+ /**
150
+ * Retrieves relevant insights based on the provided insights.
151
+ *
152
+ * @param {Array<string>} insights - An array of insights to be used for retrieving relevant documents.
153
+ *
154
+ * @returns {Promise<Array<string>>} A promise that resolves to an array of relevant insights content.
155
+ */
156
+ async retrieveRelevantInsights(insights) {
157
+ const relevantInsightsDocuments = await Promise.all(insights.map(async (insight) => {
158
+ const relevantInsight = await this.retriever.invoke(insight);
159
+ return relevantInsight[0];
160
+ }));
161
+ const relevantInsightsContent = relevantInsightsDocuments.map((document) => document.pageContent);
162
+ return relevantInsightsContent;
163
+ }
164
+ /**
165
+ * This method generates prediction violations based on the predicted and actual user responses.
166
+ * It also generates a revised prediction based on the identified violations.
167
+ *
168
+ * @param {Object} params - The parameters for the method.
169
+ * @param {PredictNextUserMessageResponse} params.userPredictions - The predicted user message, user state, and insights.
170
+ * @param {BaseMessage} [params.userResponse] - The actual user response.
171
+ * @param {CallbackManagerForChainRun} [params.runManager] - Optional callback manager for the chain run.
172
+ *
173
+ * @returns {Promise<{ userResponse: BaseMessage | undefined; revisedPrediction: string; explainedPredictionErrors: Array<string>; }>} A promise that resolves to an object containing the actual user response, the revised prediction, and the explained prediction errors.
174
+ *
175
+ * @throws {Error} If the response from the language model does not contain the expected keys: 'violationExplanation', 'explainedPredictionErrors', and 'accuratePrediction'.
176
+ */
177
+ async getPredictionViolations({ userPredictions, userResponse, runManager }) {
178
+ const llmWithFunctions = this.llm.bindTools([PREDICTION_VIOLATIONS_FUNCTION]).withConfig({ function_call: { name: PREDICTION_VIOLATIONS_FUNCTION.name } });
179
+ const chain = PREDICTION_VIOLATIONS_PROMPT.pipe(llmWithFunctions).pipe(this.jsonOutputParser);
180
+ if (typeof userResponse?.content !== "string") throw new Error("This chain does not support non-string model output.");
181
+ const res = await chain.invoke({
182
+ predicted_output: userPredictions.predictedUserMessage,
183
+ actual_output: userResponse?.content ?? "",
184
+ user_insights: userPredictions.insights.join("\n")
185
+ }, runManager?.getChild("prediction_violations"));
186
+ const revisedPrediction = await this.generateRevisedPrediction({
187
+ originalPrediction: userPredictions.predictedUserMessage,
188
+ explainedPredictionErrors: res.explainedPredictionErrors,
189
+ userInsights: userPredictions.insights,
190
+ runManager
191
+ });
192
+ return {
193
+ userResponse,
194
+ revisedPrediction,
195
+ explainedPredictionErrors: res.explainedPredictionErrors
196
+ };
197
+ }
198
+ /**
199
+ * This method generates a revised prediction based on the original prediction, explained prediction errors, and user insights.
200
+ *
201
+ * @param {Object} params - The parameters for the method.
202
+ * @param {string} params.originalPrediction - The original prediction made by the model.
203
+ * @param {Array<string>} params.explainedPredictionErrors - An array of explained prediction errors.
204
+ * @param {Array<string>} params.userInsights - An array of insights about the user.
205
+ * @param {CallbackManagerForChainRun} [params.runManager] - Optional callback manager for the chain run.
206
+ *
207
+ * @returns {Promise<string>} A promise that resolves to a revised prediction.
208
+ */
209
+ async generateRevisedPrediction({ originalPrediction, explainedPredictionErrors, userInsights, runManager }) {
210
+ const revisedPredictionChain = GENERATE_REVISED_PREDICTION_PROMPT.pipe(this.llm).pipe(this.stringOutputParser);
211
+ const revisedPredictionRes = await revisedPredictionChain.invoke({
212
+ prediction: originalPrediction,
213
+ explained_prediction_errors: explainedPredictionErrors.join("\n"),
214
+ user_insights: userInsights.join("\n")
215
+ }, runManager?.getChild("prediction_revision"));
216
+ return revisedPredictionRes;
217
+ }
218
+ /**
219
+ * This method generates facts or insights about the user based on the revised prediction, explained prediction errors, and the user's response.
220
+ *
221
+ * @param {Object} params - The parameters for the method.
222
+ * @param {BaseMessage} [params.userResponse] - The actual user response.
223
+ * @param {Object} params.predictions - The revised prediction and explained prediction errors.
224
+ * @param {string} params.predictions.revisedPrediction - The revised prediction made by the model.
225
+ * @param {Array<string>} params.predictions.explainedPredictionErrors - An array of explained prediction errors.
226
+ * @param {CallbackManagerForChainRun} [params.runManager] - Optional callback manager for the chain run.
227
+ *
228
+ * @returns {Promise<string>} A promise that resolves to a string containing the generated facts or insights about the user.
229
+ */
230
+ async generateFacts({ userResponse, predictions, runManager }) {
231
+ const chain = GENERATE_FACTS_PROMPT.pipe(this.llm).pipe(this.stringOutputParser);
232
+ if (typeof userResponse?.content !== "string") throw new Error("This chain does not support non-string model output.");
233
+ const res = await chain.invoke({
234
+ prediction_violations: predictions.explainedPredictionErrors.join("\n"),
235
+ prediction: predictions.revisedPrediction,
236
+ user_message: userResponse?.content ?? ""
237
+ }, runManager?.getChild("generate_facts"));
238
+ return res;
239
+ }
240
+ /**
241
+ * Static method that creates a ViolationOfExpectationsChain instance from a
242
+ * ChatOpenAI and retriever. It also accepts optional options
243
+ * to customize the chain.
244
+ *
245
+ * @param llm The ChatOpenAI instance.
246
+ * @param retriever The retriever used for similarity search.
247
+ * @param options Optional options to customize the chain.
248
+ *
249
+ * @returns A new instance of ViolationOfExpectationsChain.
250
+ */
251
+ static fromLLM(llm, retriever, options) {
252
+ return new this({
253
+ retriever,
254
+ llm,
255
+ ...options
256
+ });
257
+ }
258
+ };
259
+
260
+ //#endregion
261
+ export { ViolationOfExpectationsChain };
262
+ //# sourceMappingURL=violation_of_expectations_chain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"violation_of_expectations_chain.js","names":["fields: ViolationOfExpectationsChainInput","chatHistory: BaseMessage[]","strings: Array<string>","newArray: MessageChunkResult[]","tempArray: BaseMessage[]","userResponse: BaseMessage | undefined","values: ChainValues","runManager?: CallbackManagerForChainRun","chatHistory: unknown[]","insights: Array<string>","llm: ChatOpenAI","retriever: BaseRetrieverInterface","options?: Partial<\n Omit<ViolationOfExpectationsChainInput, \"llm\" | \"retriever\">\n >"],"sources":["../../../../src/experimental/chains/violation_of_expectations/violation_of_expectations_chain.ts"],"sourcesContent":["import type { BaseRetrieverInterface } from \"@langchain/core/retrievers\";\nimport { ChatOpenAI } from \"@langchain/openai\";\nimport {\n BaseMessage,\n HumanMessage,\n isBaseMessage,\n} from \"@langchain/core/messages\";\nimport { ChainValues } from \"@langchain/core/utils/types\";\nimport { StringOutputParser } from \"@langchain/core/output_parsers\";\nimport { CallbackManagerForChainRun } from \"@langchain/core/callbacks/manager\";\nimport { JsonOutputFunctionsParser } from \"../../../output_parsers/openai_functions.js\";\nimport { BaseChain, ChainInputs } from \"../../../chains/base.js\";\nimport {\n GetPredictionViolationsResponse,\n MessageChunkResult,\n PREDICTION_VIOLATIONS_FUNCTION,\n PREDICT_NEXT_USER_MESSAGE_FUNCTION,\n PredictNextUserMessageResponse,\n} from \"./types.js\";\nimport {\n GENERATE_FACTS_PROMPT,\n GENERATE_REVISED_PREDICTION_PROMPT,\n PREDICTION_VIOLATIONS_PROMPT,\n PREDICT_NEXT_USER_MESSAGE_PROMPT,\n} from \"./violation_of_expectations_prompt.js\";\n\n/**\n * Interface for the input parameters of the ViolationOfExpectationsChain class.\n */\nexport interface ViolationOfExpectationsChainInput extends ChainInputs {\n /**\n * The retriever to use for retrieving stored\n * thoughts and insights.\n */\n retriever: BaseRetrieverInterface;\n /**\n * The LLM to use\n */\n llm: ChatOpenAI;\n}\n\n/**\n * Chain that generates key insights/facts of a user based on a\n * a chat conversation with an AI.\n */\nexport class ViolationOfExpectationsChain\n extends BaseChain\n implements ViolationOfExpectationsChainInput\n{\n static lc_name() {\n return \"ViolationOfExpectationsChain\";\n }\n\n _chainType(): string {\n return \"violation_of_expectation_chain\";\n }\n\n chatHistoryKey = \"chat_history\";\n\n thoughtsKey = \"thoughts\";\n\n get inputKeys() {\n return [this.chatHistoryKey];\n }\n\n get outputKeys() {\n return [this.thoughtsKey];\n }\n\n retriever: BaseRetrieverInterface;\n\n llm: ChatOpenAI;\n\n jsonOutputParser: JsonOutputFunctionsParser;\n\n stringOutputParser: StringOutputParser;\n\n constructor(fields: ViolationOfExpectationsChainInput) {\n super(fields);\n this.retriever = fields.retriever;\n this.llm = fields.llm;\n this.jsonOutputParser = new JsonOutputFunctionsParser();\n this.stringOutputParser = new StringOutputParser();\n }\n\n getChatHistoryString(chatHistory: BaseMessage[]): string {\n return chatHistory\n .map((chatMessage) => {\n if (chatMessage._getType() === \"human\") {\n return `Human: ${chatMessage.content}`;\n } else if (chatMessage._getType() === \"ai\") {\n return `AI: ${chatMessage.content}`;\n } else {\n return `${chatMessage.content}`;\n }\n })\n .join(\"\\n\");\n }\n\n removeDuplicateStrings(strings: Array<string>): Array<string> {\n return [...new Set(strings)];\n }\n\n /**\n * This method breaks down the chat history into chunks of messages.\n * Each chunk consists of a sequence of messages ending with an AI message and the subsequent user response, if any.\n *\n * @param {BaseMessage[]} chatHistory - The chat history to be chunked.\n *\n * @returns {MessageChunkResult[]} An array of message chunks. Each chunk includes a sequence of messages and the subsequent user response.\n *\n * @description\n * The method iterates over the chat history and pushes each message into a temporary array.\n * When it encounters an AI message, it checks for a subsequent user message.\n * If a user message is found, it is considered as the user response to the AI message.\n * If no user message is found after the AI message, the user response is undefined.\n * The method then pushes the chunk (sequence of messages and user response) into the result array.\n * This process continues until all messages in the chat history have been processed.\n */\n chunkMessagesByAIResponse(chatHistory: BaseMessage[]): MessageChunkResult[] {\n const newArray: MessageChunkResult[] = [];\n const tempArray: BaseMessage[] = [];\n\n chatHistory.forEach((item, index) => {\n tempArray.push(item);\n if (item._getType() === \"ai\") {\n let userResponse: BaseMessage | undefined = chatHistory[index + 1];\n if (!userResponse || userResponse._getType() !== \"human\") {\n userResponse = undefined;\n }\n\n newArray.push({\n chunkedMessages: tempArray,\n userResponse: userResponse\n ? new HumanMessage(userResponse)\n : undefined,\n });\n }\n });\n\n return newArray;\n }\n\n /**\n * This method processes a chat history to generate insights about the user.\n *\n * @param {ChainValues} values - The input values for the chain. It should contain a key for chat history.\n * @param {CallbackManagerForChainRun} [runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<ChainValues>} A promise that resolves to a list of insights about the user.\n *\n * @throws {Error} If the chat history key is not found in the input values or if the chat history is not an array of BaseMessages.\n *\n * @description\n * The method performs the following steps:\n * 1. Checks if the chat history key is present in the input values and if the chat history is an array of BaseMessages.\n * 2. Breaks the chat history into chunks of messages.\n * 3. For each chunk, it generates an initial prediction for the user's next message.\n * 4. For each prediction, it generates insights and prediction violations, and regenerates the prediction based on the violations.\n * 5. For each set of messages, it generates a fact/insight about the user.\n * The method returns a list of these insights.\n */\n async _call(\n values: ChainValues,\n runManager?: CallbackManagerForChainRun\n ): Promise<ChainValues> {\n if (!(this.chatHistoryKey in values)) {\n throw new Error(`Chat history key ${this.chatHistoryKey} not found`);\n }\n\n const chatHistory: unknown[] = values[this.chatHistoryKey];\n\n const isEveryMessageBaseMessage = chatHistory.every((message) =>\n isBaseMessage(message)\n );\n if (!isEveryMessageBaseMessage) {\n throw new Error(\"Chat history must be an array of BaseMessages\");\n }\n\n const messageChunks = this.chunkMessagesByAIResponse(\n chatHistory as BaseMessage[]\n );\n\n // Generate the initial prediction for every user message.\n const userPredictions = await Promise.all(\n messageChunks.map(async (chatHistoryChunk) => ({\n userPredictions: await this.predictNextUserMessage(\n chatHistoryChunk.chunkedMessages\n ),\n userResponse: chatHistoryChunk.userResponse,\n runManager,\n }))\n );\n\n // Generate insights, and prediction violations for every user message.\n // This call also regenerates the prediction based on the violations.\n const predictionViolations = await Promise.all(\n userPredictions.map((prediction) =>\n this.getPredictionViolations({\n userPredictions: prediction.userPredictions,\n userResponse: prediction.userResponse,\n runManager,\n })\n )\n );\n\n // Generate a fact/insight about the user for every set of messages.\n const insights = await Promise.all(\n predictionViolations.map((violation) =>\n this.generateFacts({\n userResponse: violation.userResponse,\n predictions: {\n revisedPrediction: violation.revisedPrediction,\n explainedPredictionErrors: violation.explainedPredictionErrors,\n },\n })\n )\n );\n\n return {\n insights,\n };\n }\n\n /**\n * This method predicts the next user message based on the chat history.\n *\n * @param {BaseMessage[]} chatHistory - The chat history based on which the next user message is predicted.\n * @param {CallbackManagerForChainRun} [runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<PredictNextUserMessageResponse>} A promise that resolves to the predicted next user message, the user state, and any insights.\n *\n * @throws {Error} If the response from the language model does not contain the expected keys: 'userState', 'predictedUserMessage', and 'insights'.\n */\n private async predictNextUserMessage(\n chatHistory: BaseMessage[],\n runManager?: CallbackManagerForChainRun\n ): Promise<PredictNextUserMessageResponse> {\n const messageString = this.getChatHistoryString(chatHistory);\n\n const llmWithFunctions = this.llm\n .bindTools([PREDICT_NEXT_USER_MESSAGE_FUNCTION])\n .withConfig({\n function_call: { name: PREDICT_NEXT_USER_MESSAGE_FUNCTION.name },\n });\n\n const chain = PREDICT_NEXT_USER_MESSAGE_PROMPT.pipe(llmWithFunctions).pipe(\n this.jsonOutputParser\n );\n\n const res = await chain.invoke(\n {\n chat_history: messageString,\n },\n runManager?.getChild(\"prediction\")\n );\n\n if (\n !(\n \"userState\" in res &&\n \"predictedUserMessage\" in res &&\n \"insights\" in res\n )\n ) {\n throw new Error(`Invalid response from LLM: ${JSON.stringify(res)}`);\n }\n\n const predictionResponse = res as PredictNextUserMessageResponse;\n\n // Query the retriever for relevant insights. Use the generates insights as a query.\n const retrievedDocs = await this.retrieveRelevantInsights(\n predictionResponse.insights\n );\n const relevantDocs = this.removeDuplicateStrings([\n ...predictionResponse.insights,\n ...retrievedDocs,\n ]);\n\n return {\n ...predictionResponse,\n insights: relevantDocs,\n };\n }\n\n /**\n * Retrieves relevant insights based on the provided insights.\n *\n * @param {Array<string>} insights - An array of insights to be used for retrieving relevant documents.\n *\n * @returns {Promise<Array<string>>} A promise that resolves to an array of relevant insights content.\n */\n private async retrieveRelevantInsights(\n insights: Array<string>\n ): Promise<Array<string>> {\n // Only extract the first relevant doc from the retriever. We don't need more than one.\n const relevantInsightsDocuments = await Promise.all(\n insights.map(async (insight) => {\n const relevantInsight = await this.retriever.invoke(insight);\n return relevantInsight[0];\n })\n );\n\n const relevantInsightsContent = relevantInsightsDocuments.map(\n (document) => document.pageContent\n );\n\n return relevantInsightsContent;\n }\n\n /**\n * This method generates prediction violations based on the predicted and actual user responses.\n * It also generates a revised prediction based on the identified violations.\n *\n * @param {Object} params - The parameters for the method.\n * @param {PredictNextUserMessageResponse} params.userPredictions - The predicted user message, user state, and insights.\n * @param {BaseMessage} [params.userResponse] - The actual user response.\n * @param {CallbackManagerForChainRun} [params.runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<{ userResponse: BaseMessage | undefined; revisedPrediction: string; explainedPredictionErrors: Array<string>; }>} A promise that resolves to an object containing the actual user response, the revised prediction, and the explained prediction errors.\n *\n * @throws {Error} If the response from the language model does not contain the expected keys: 'violationExplanation', 'explainedPredictionErrors', and 'accuratePrediction'.\n */\n private async getPredictionViolations({\n userPredictions,\n userResponse,\n runManager,\n }: {\n userPredictions: PredictNextUserMessageResponse;\n userResponse?: BaseMessage;\n runManager?: CallbackManagerForChainRun;\n }): Promise<GetPredictionViolationsResponse> {\n const llmWithFunctions = this.llm\n .bindTools([PREDICTION_VIOLATIONS_FUNCTION])\n .withConfig({\n function_call: { name: PREDICTION_VIOLATIONS_FUNCTION.name },\n });\n\n const chain = PREDICTION_VIOLATIONS_PROMPT.pipe(llmWithFunctions).pipe(\n this.jsonOutputParser\n );\n\n if (typeof userResponse?.content !== \"string\") {\n throw new Error(\"This chain does not support non-string model output.\");\n }\n const res = (await chain.invoke(\n {\n predicted_output: userPredictions.predictedUserMessage,\n actual_output: userResponse?.content ?? \"\",\n user_insights: userPredictions.insights.join(\"\\n\"),\n },\n runManager?.getChild(\"prediction_violations\")\n )) as Awaited<{\n violationExplanation: string;\n explainedPredictionErrors: Array<string>;\n accuratePrediction: boolean;\n }>;\n\n // Generate a revised prediction based on violations.\n const revisedPrediction = await this.generateRevisedPrediction({\n originalPrediction: userPredictions.predictedUserMessage,\n explainedPredictionErrors: res.explainedPredictionErrors,\n userInsights: userPredictions.insights,\n runManager,\n });\n\n return {\n userResponse,\n revisedPrediction,\n explainedPredictionErrors: res.explainedPredictionErrors,\n };\n }\n\n /**\n * This method generates a revised prediction based on the original prediction, explained prediction errors, and user insights.\n *\n * @param {Object} params - The parameters for the method.\n * @param {string} params.originalPrediction - The original prediction made by the model.\n * @param {Array<string>} params.explainedPredictionErrors - An array of explained prediction errors.\n * @param {Array<string>} params.userInsights - An array of insights about the user.\n * @param {CallbackManagerForChainRun} [params.runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<string>} A promise that resolves to a revised prediction.\n */\n private async generateRevisedPrediction({\n originalPrediction,\n explainedPredictionErrors,\n userInsights,\n runManager,\n }: {\n originalPrediction: string;\n explainedPredictionErrors: Array<string>;\n userInsights: Array<string>;\n runManager?: CallbackManagerForChainRun;\n }): Promise<string> {\n const revisedPredictionChain = GENERATE_REVISED_PREDICTION_PROMPT.pipe(\n this.llm\n ).pipe(this.stringOutputParser);\n\n const revisedPredictionRes = await revisedPredictionChain.invoke(\n {\n prediction: originalPrediction,\n explained_prediction_errors: explainedPredictionErrors.join(\"\\n\"),\n user_insights: userInsights.join(\"\\n\"),\n },\n runManager?.getChild(\"prediction_revision\")\n );\n\n return revisedPredictionRes;\n }\n\n /**\n * This method generates facts or insights about the user based on the revised prediction, explained prediction errors, and the user's response.\n *\n * @param {Object} params - The parameters for the method.\n * @param {BaseMessage} [params.userResponse] - The actual user response.\n * @param {Object} params.predictions - The revised prediction and explained prediction errors.\n * @param {string} params.predictions.revisedPrediction - The revised prediction made by the model.\n * @param {Array<string>} params.predictions.explainedPredictionErrors - An array of explained prediction errors.\n * @param {CallbackManagerForChainRun} [params.runManager] - Optional callback manager for the chain run.\n *\n * @returns {Promise<string>} A promise that resolves to a string containing the generated facts or insights about the user.\n */\n private async generateFacts({\n userResponse,\n predictions,\n runManager,\n }: {\n userResponse?: BaseMessage;\n /**\n * Optional if the prediction was accurate.\n */\n predictions: {\n revisedPrediction: string;\n explainedPredictionErrors: Array<string>;\n };\n runManager?: CallbackManagerForChainRun;\n }): Promise<string> {\n const chain = GENERATE_FACTS_PROMPT.pipe(this.llm).pipe(\n this.stringOutputParser\n );\n\n if (typeof userResponse?.content !== \"string\") {\n throw new Error(\"This chain does not support non-string model output.\");\n }\n const res = await chain.invoke(\n {\n prediction_violations: predictions.explainedPredictionErrors.join(\"\\n\"),\n prediction: predictions.revisedPrediction,\n user_message: userResponse?.content ?? \"\",\n },\n runManager?.getChild(\"generate_facts\")\n );\n\n return res;\n }\n\n /**\n * Static method that creates a ViolationOfExpectationsChain instance from a\n * ChatOpenAI and retriever. It also accepts optional options\n * to customize the chain.\n *\n * @param llm The ChatOpenAI instance.\n * @param retriever The retriever used for similarity search.\n * @param options Optional options to customize the chain.\n *\n * @returns A new instance of ViolationOfExpectationsChain.\n */\n static fromLLM(\n llm: ChatOpenAI,\n retriever: BaseRetrieverInterface,\n options?: Partial<\n Omit<ViolationOfExpectationsChainInput, \"llm\" | \"retriever\">\n >\n ): ViolationOfExpectationsChain {\n return new this({\n retriever,\n llm,\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;AA6CA,IAAa,+BAAb,cACU,UAEV;CACE,OAAO,UAAU;AACf,SAAO;CACR;CAED,aAAqB;AACnB,SAAO;CACR;CAED,iBAAiB;CAEjB,cAAc;CAEd,IAAI,YAAY;AACd,SAAO,CAAC,KAAK,cAAe;CAC7B;CAED,IAAI,aAAa;AACf,SAAO,CAAC,KAAK,WAAY;CAC1B;CAED;CAEA;CAEA;CAEA;CAEA,YAAYA,QAA2C;EACrD,MAAM,OAAO;EACb,KAAK,YAAY,OAAO;EACxB,KAAK,MAAM,OAAO;EAClB,KAAK,mBAAmB,IAAI;EAC5B,KAAK,qBAAqB,IAAI;CAC/B;CAED,qBAAqBC,aAAoC;AACvD,SAAO,YACJ,IAAI,CAAC,gBAAgB;AACpB,OAAI,YAAY,UAAU,KAAK,QAC7B,QAAO,CAAC,OAAO,EAAE,YAAY,SAAS;YAC7B,YAAY,UAAU,KAAK,KACpC,QAAO,CAAC,IAAI,EAAE,YAAY,SAAS;OAEnC,QAAO,GAAG,YAAY,SAAS;EAElC,EAAC,CACD,KAAK,KAAK;CACd;CAED,uBAAuBC,SAAuC;AAC5D,SAAO,CAAC,GAAG,IAAI,IAAI,QAAS;CAC7B;;;;;;;;;;;;;;;;;CAkBD,0BAA0BD,aAAkD;EAC1E,MAAME,WAAiC,CAAE;EACzC,MAAMC,YAA2B,CAAE;EAEnC,YAAY,QAAQ,CAAC,MAAM,UAAU;GACnC,UAAU,KAAK,KAAK;AACpB,OAAI,KAAK,UAAU,KAAK,MAAM;IAC5B,IAAIC,eAAwC,YAAY,QAAQ;AAChE,QAAI,CAAC,gBAAgB,aAAa,UAAU,KAAK,SAC/C,eAAe;IAGjB,SAAS,KAAK;KACZ,iBAAiB;KACjB,cAAc,eACV,IAAI,aAAa,gBACjB;IACL,EAAC;GACH;EACF,EAAC;AAEF,SAAO;CACR;;;;;;;;;;;;;;;;;;;;CAqBD,MAAM,MACJC,QACAC,YACsB;AACtB,MAAI,EAAE,KAAK,kBAAkB,QAC3B,OAAM,IAAI,MAAM,CAAC,iBAAiB,EAAE,KAAK,eAAe,UAAU,CAAC;EAGrE,MAAMC,cAAyB,OAAO,KAAK;EAE3C,MAAM,4BAA4B,YAAY,MAAM,CAAC,YACnD,cAAc,QAAQ,CACvB;AACD,MAAI,CAAC,0BACH,OAAM,IAAI,MAAM;EAGlB,MAAM,gBAAgB,KAAK,0BACzB,YACD;EAGD,MAAM,kBAAkB,MAAM,QAAQ,IACpC,cAAc,IAAI,OAAO,sBAAsB;GAC7C,iBAAiB,MAAM,KAAK,uBAC1B,iBAAiB,gBAClB;GACD,cAAc,iBAAiB;GAC/B;EACD,GAAE,CACJ;EAID,MAAM,uBAAuB,MAAM,QAAQ,IACzC,gBAAgB,IAAI,CAAC,eACnB,KAAK,wBAAwB;GAC3B,iBAAiB,WAAW;GAC5B,cAAc,WAAW;GACzB;EACD,EAAC,CACH,CACF;EAGD,MAAM,WAAW,MAAM,QAAQ,IAC7B,qBAAqB,IAAI,CAAC,cACxB,KAAK,cAAc;GACjB,cAAc,UAAU;GACxB,aAAa;IACX,mBAAmB,UAAU;IAC7B,2BAA2B,UAAU;GACtC;EACF,EAAC,CACH,CACF;AAED,SAAO,EACL,SACD;CACF;;;;;;;;;;;CAYD,MAAc,uBACZP,aACAM,YACyC;EACzC,MAAM,gBAAgB,KAAK,qBAAqB,YAAY;EAE5D,MAAM,mBAAmB,KAAK,IAC3B,UAAU,CAAC,kCAAmC,EAAC,CAC/C,WAAW,EACV,eAAe,EAAE,MAAM,mCAAmC,KAAM,EACjE,EAAC;EAEJ,MAAM,QAAQ,iCAAiC,KAAK,iBAAiB,CAAC,KACpE,KAAK,iBACN;EAED,MAAM,MAAM,MAAM,MAAM,OACtB,EACE,cAAc,cACf,GACD,YAAY,SAAS,aAAa,CACnC;AAED,MACE,EACE,eAAe,OACf,0BAA0B,OAC1B,cAAc,KAGhB,OAAM,IAAI,MAAM,CAAC,2BAA2B,EAAE,KAAK,UAAU,IAAI,EAAE;EAGrE,MAAM,qBAAqB;EAG3B,MAAM,gBAAgB,MAAM,KAAK,yBAC/B,mBAAmB,SACpB;EACD,MAAM,eAAe,KAAK,uBAAuB,CAC/C,GAAG,mBAAmB,UACtB,GAAG,aACJ,EAAC;AAEF,SAAO;GACL,GAAG;GACH,UAAU;EACX;CACF;;;;;;;;CASD,MAAc,yBACZE,UACwB;EAExB,MAAM,4BAA4B,MAAM,QAAQ,IAC9C,SAAS,IAAI,OAAO,YAAY;GAC9B,MAAM,kBAAkB,MAAM,KAAK,UAAU,OAAO,QAAQ;AAC5D,UAAO,gBAAgB;EACxB,EAAC,CACH;EAED,MAAM,0BAA0B,0BAA0B,IACxD,CAAC,aAAa,SAAS,YACxB;AAED,SAAO;CACR;;;;;;;;;;;;;;CAeD,MAAc,wBAAwB,EACpC,iBACA,cACA,YAKD,EAA4C;EAC3C,MAAM,mBAAmB,KAAK,IAC3B,UAAU,CAAC,8BAA+B,EAAC,CAC3C,WAAW,EACV,eAAe,EAAE,MAAM,+BAA+B,KAAM,EAC7D,EAAC;EAEJ,MAAM,QAAQ,6BAA6B,KAAK,iBAAiB,CAAC,KAChE,KAAK,iBACN;AAED,MAAI,OAAO,cAAc,YAAY,SACnC,OAAM,IAAI,MAAM;EAElB,MAAM,MAAO,MAAM,MAAM,OACvB;GACE,kBAAkB,gBAAgB;GAClC,eAAe,cAAc,WAAW;GACxC,eAAe,gBAAgB,SAAS,KAAK,KAAK;EACnD,GACD,YAAY,SAAS,wBAAwB,CAC9C;EAOD,MAAM,oBAAoB,MAAM,KAAK,0BAA0B;GAC7D,oBAAoB,gBAAgB;GACpC,2BAA2B,IAAI;GAC/B,cAAc,gBAAgB;GAC9B;EACD,EAAC;AAEF,SAAO;GACL;GACA;GACA,2BAA2B,IAAI;EAChC;CACF;;;;;;;;;;;;CAaD,MAAc,0BAA0B,EACtC,oBACA,2BACA,cACA,YAMD,EAAmB;EAClB,MAAM,yBAAyB,mCAAmC,KAChE,KAAK,IACN,CAAC,KAAK,KAAK,mBAAmB;EAE/B,MAAM,uBAAuB,MAAM,uBAAuB,OACxD;GACE,YAAY;GACZ,6BAA6B,0BAA0B,KAAK,KAAK;GACjE,eAAe,aAAa,KAAK,KAAK;EACvC,GACD,YAAY,SAAS,sBAAsB,CAC5C;AAED,SAAO;CACR;;;;;;;;;;;;;CAcD,MAAc,cAAc,EAC1B,cACA,aACA,YAWD,EAAmB;EAClB,MAAM,QAAQ,sBAAsB,KAAK,KAAK,IAAI,CAAC,KACjD,KAAK,mBACN;AAED,MAAI,OAAO,cAAc,YAAY,SACnC,OAAM,IAAI,MAAM;EAElB,MAAM,MAAM,MAAM,MAAM,OACtB;GACE,uBAAuB,YAAY,0BAA0B,KAAK,KAAK;GACvE,YAAY,YAAY;GACxB,cAAc,cAAc,WAAW;EACxC,GACD,YAAY,SAAS,iBAAiB,CACvC;AAED,SAAO;CACR;;;;;;;;;;;;CAaD,OAAO,QACLC,KACAC,WACAC,SAG8B;AAC9B,SAAO,IAAI,KAAK;GACd;GACA;GACA,GAAG;EACJ;CACF;AACF"}