@langchain/classic 1.0.56 → 1.0.58

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 (1344) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/_virtual/_rolldown/runtime.cjs +1 -2
  3. package/dist/_virtual/_rolldown/runtime.js +1 -2
  4. package/dist/agents/agent.cjs +1 -2
  5. package/dist/agents/agent.d.cts +0 -2
  6. package/dist/agents/agent.d.cts.map +1 -1
  7. package/dist/agents/agent.d.ts +0 -2
  8. package/dist/agents/agent.d.ts.map +1 -1
  9. package/dist/agents/agent.js +1 -2
  10. package/dist/agents/chat/index.cjs +3 -4
  11. package/dist/agents/chat/index.d.cts +2 -4
  12. package/dist/agents/chat/index.d.cts.map +1 -1
  13. package/dist/agents/chat/index.d.ts +2 -4
  14. package/dist/agents/chat/index.d.ts.map +1 -1
  15. package/dist/agents/chat/index.js +3 -4
  16. package/dist/agents/chat/outputParser.cjs +1 -2
  17. package/dist/agents/chat/outputParser.d.cts +0 -2
  18. package/dist/agents/chat/outputParser.d.cts.map +1 -1
  19. package/dist/agents/chat/outputParser.d.ts +0 -2
  20. package/dist/agents/chat/outputParser.d.ts.map +1 -1
  21. package/dist/agents/chat/outputParser.js +1 -2
  22. package/dist/agents/chat/prompt.cjs +1 -2
  23. package/dist/agents/chat/prompt.js +1 -2
  24. package/dist/agents/chat_convo/index.cjs +5 -6
  25. package/dist/agents/chat_convo/index.cjs.map +1 -1
  26. package/dist/agents/chat_convo/index.d.cts +2 -4
  27. package/dist/agents/chat_convo/index.d.cts.map +1 -1
  28. package/dist/agents/chat_convo/index.d.ts +2 -4
  29. package/dist/agents/chat_convo/index.d.ts.map +1 -1
  30. package/dist/agents/chat_convo/index.js +5 -6
  31. package/dist/agents/chat_convo/index.js.map +1 -1
  32. package/dist/agents/chat_convo/outputParser.cjs +2 -3
  33. package/dist/agents/chat_convo/outputParser.d.cts +0 -2
  34. package/dist/agents/chat_convo/outputParser.d.cts.map +1 -1
  35. package/dist/agents/chat_convo/outputParser.d.ts +0 -2
  36. package/dist/agents/chat_convo/outputParser.d.ts.map +1 -1
  37. package/dist/agents/chat_convo/outputParser.js +2 -3
  38. package/dist/agents/chat_convo/prompt.cjs +1 -2
  39. package/dist/agents/chat_convo/prompt.js +1 -2
  40. package/dist/agents/executor.cjs +1 -2
  41. package/dist/agents/executor.d.cts +2 -3
  42. package/dist/agents/executor.d.cts.map +1 -1
  43. package/dist/agents/executor.d.ts +2 -3
  44. package/dist/agents/executor.d.ts.map +1 -1
  45. package/dist/agents/executor.js +1 -2
  46. package/dist/agents/format_scratchpad/log.cjs +1 -2
  47. package/dist/agents/format_scratchpad/log.d.cts +0 -2
  48. package/dist/agents/format_scratchpad/log.d.cts.map +1 -1
  49. package/dist/agents/format_scratchpad/log.d.ts +0 -2
  50. package/dist/agents/format_scratchpad/log.d.ts.map +1 -1
  51. package/dist/agents/format_scratchpad/log.js +1 -2
  52. package/dist/agents/format_scratchpad/log_to_message.cjs +1 -2
  53. package/dist/agents/format_scratchpad/log_to_message.d.cts +0 -2
  54. package/dist/agents/format_scratchpad/log_to_message.d.cts.map +1 -1
  55. package/dist/agents/format_scratchpad/log_to_message.d.ts +0 -2
  56. package/dist/agents/format_scratchpad/log_to_message.d.ts.map +1 -1
  57. package/dist/agents/format_scratchpad/log_to_message.js +1 -2
  58. package/dist/agents/format_scratchpad/openai_functions.cjs +1 -2
  59. package/dist/agents/format_scratchpad/openai_functions.d.cts +0 -2
  60. package/dist/agents/format_scratchpad/openai_functions.d.cts.map +1 -1
  61. package/dist/agents/format_scratchpad/openai_functions.d.ts +0 -2
  62. package/dist/agents/format_scratchpad/openai_functions.d.ts.map +1 -1
  63. package/dist/agents/format_scratchpad/openai_functions.js +1 -2
  64. package/dist/agents/format_scratchpad/openai_tools.cjs +1 -2
  65. package/dist/agents/format_scratchpad/openai_tools.js +1 -2
  66. package/dist/agents/format_scratchpad/tool_calling.cjs +1 -2
  67. package/dist/agents/format_scratchpad/tool_calling.d.cts +0 -2
  68. package/dist/agents/format_scratchpad/tool_calling.d.cts.map +1 -1
  69. package/dist/agents/format_scratchpad/tool_calling.d.ts +0 -2
  70. package/dist/agents/format_scratchpad/tool_calling.d.ts.map +1 -1
  71. package/dist/agents/format_scratchpad/tool_calling.js +1 -2
  72. package/dist/agents/format_scratchpad/xml.cjs +1 -2
  73. package/dist/agents/format_scratchpad/xml.d.cts +0 -2
  74. package/dist/agents/format_scratchpad/xml.d.cts.map +1 -1
  75. package/dist/agents/format_scratchpad/xml.d.ts +0 -2
  76. package/dist/agents/format_scratchpad/xml.d.ts.map +1 -1
  77. package/dist/agents/format_scratchpad/xml.js +1 -2
  78. package/dist/agents/helpers.cjs +1 -2
  79. package/dist/agents/helpers.js +1 -2
  80. package/dist/agents/index.cjs +38 -39
  81. package/dist/agents/index.d.cts +11 -11
  82. package/dist/agents/index.d.ts +11 -11
  83. package/dist/agents/index.js +13 -14
  84. package/dist/agents/initialize.cjs +13 -14
  85. package/dist/agents/initialize.cjs.map +1 -1
  86. package/dist/agents/initialize.d.cts +3 -4
  87. package/dist/agents/initialize.d.cts.map +1 -1
  88. package/dist/agents/initialize.d.ts +3 -4
  89. package/dist/agents/initialize.d.ts.map +1 -1
  90. package/dist/agents/initialize.js +3 -4
  91. package/dist/agents/load.cjs +1 -2
  92. package/dist/agents/load.d.cts +0 -2
  93. package/dist/agents/load.d.cts.map +1 -1
  94. package/dist/agents/load.d.ts +0 -2
  95. package/dist/agents/load.d.ts.map +1 -1
  96. package/dist/agents/load.js +1 -2
  97. package/dist/agents/mrkl/index.cjs +3 -4
  98. package/dist/agents/mrkl/index.d.cts +2 -4
  99. package/dist/agents/mrkl/index.d.cts.map +1 -1
  100. package/dist/agents/mrkl/index.d.ts +2 -4
  101. package/dist/agents/mrkl/index.d.ts.map +1 -1
  102. package/dist/agents/mrkl/index.js +3 -4
  103. package/dist/agents/mrkl/outputParser.cjs +1 -2
  104. package/dist/agents/mrkl/outputParser.d.cts +2 -4
  105. package/dist/agents/mrkl/outputParser.d.cts.map +1 -1
  106. package/dist/agents/mrkl/outputParser.d.ts +1 -3
  107. package/dist/agents/mrkl/outputParser.d.ts.map +1 -1
  108. package/dist/agents/mrkl/outputParser.js +1 -2
  109. package/dist/agents/mrkl/prompt.cjs +1 -2
  110. package/dist/agents/mrkl/prompt.js +1 -2
  111. package/dist/agents/openai/output_parser.cjs +1 -2
  112. package/dist/agents/openai/output_parser.js +1 -2
  113. package/dist/agents/openai_functions/index.cjs +4 -5
  114. package/dist/agents/openai_functions/index.d.cts +1 -3
  115. package/dist/agents/openai_functions/index.d.cts.map +1 -1
  116. package/dist/agents/openai_functions/index.d.ts +1 -3
  117. package/dist/agents/openai_functions/index.d.ts.map +1 -1
  118. package/dist/agents/openai_functions/index.js +4 -5
  119. package/dist/agents/openai_functions/output_parser.cjs +1 -2
  120. package/dist/agents/openai_functions/output_parser.d.cts +0 -2
  121. package/dist/agents/openai_functions/output_parser.d.cts.map +1 -1
  122. package/dist/agents/openai_functions/output_parser.d.ts +0 -2
  123. package/dist/agents/openai_functions/output_parser.d.ts.map +1 -1
  124. package/dist/agents/openai_functions/output_parser.js +1 -2
  125. package/dist/agents/openai_functions/prompt.cjs +1 -2
  126. package/dist/agents/openai_functions/prompt.js +1 -2
  127. package/dist/agents/openai_tools/index.cjs +2 -3
  128. package/dist/agents/openai_tools/index.d.cts +1 -3
  129. package/dist/agents/openai_tools/index.d.cts.map +1 -1
  130. package/dist/agents/openai_tools/index.d.ts +1 -3
  131. package/dist/agents/openai_tools/index.d.ts.map +1 -1
  132. package/dist/agents/openai_tools/index.js +2 -3
  133. package/dist/agents/openai_tools/output_parser.cjs +1 -2
  134. package/dist/agents/openai_tools/output_parser.d.cts +0 -2
  135. package/dist/agents/openai_tools/output_parser.d.cts.map +1 -1
  136. package/dist/agents/openai_tools/output_parser.d.ts +0 -2
  137. package/dist/agents/openai_tools/output_parser.d.ts.map +1 -1
  138. package/dist/agents/openai_tools/output_parser.js +1 -2
  139. package/dist/agents/react/index.cjs +3 -4
  140. package/dist/agents/react/index.d.cts +0 -2
  141. package/dist/agents/react/index.d.cts.map +1 -1
  142. package/dist/agents/react/index.d.ts +0 -2
  143. package/dist/agents/react/index.d.ts.map +1 -1
  144. package/dist/agents/react/index.js +3 -4
  145. package/dist/agents/react/output_parser.cjs +1 -2
  146. package/dist/agents/react/output_parser.d.cts +0 -2
  147. package/dist/agents/react/output_parser.d.cts.map +1 -1
  148. package/dist/agents/react/output_parser.d.ts +0 -2
  149. package/dist/agents/react/output_parser.d.ts.map +1 -1
  150. package/dist/agents/react/output_parser.js +1 -2
  151. package/dist/agents/react/prompt.cjs +1 -2
  152. package/dist/agents/react/prompt.js +1 -2
  153. package/dist/agents/structured_chat/index.cjs +4 -5
  154. package/dist/agents/structured_chat/index.d.cts +2 -4
  155. package/dist/agents/structured_chat/index.d.cts.map +1 -1
  156. package/dist/agents/structured_chat/index.d.ts +2 -4
  157. package/dist/agents/structured_chat/index.d.ts.map +1 -1
  158. package/dist/agents/structured_chat/index.js +4 -5
  159. package/dist/agents/structured_chat/outputParser.cjs +2 -3
  160. package/dist/agents/structured_chat/outputParser.d.cts +0 -2
  161. package/dist/agents/structured_chat/outputParser.d.cts.map +1 -1
  162. package/dist/agents/structured_chat/outputParser.d.ts +0 -2
  163. package/dist/agents/structured_chat/outputParser.d.ts.map +1 -1
  164. package/dist/agents/structured_chat/outputParser.js +2 -3
  165. package/dist/agents/structured_chat/prompt.cjs +1 -2
  166. package/dist/agents/structured_chat/prompt.js +1 -2
  167. package/dist/agents/tool_calling/index.cjs +2 -3
  168. package/dist/agents/tool_calling/index.d.cts +1 -3
  169. package/dist/agents/tool_calling/index.d.cts.map +1 -1
  170. package/dist/agents/tool_calling/index.d.ts +1 -3
  171. package/dist/agents/tool_calling/index.d.ts.map +1 -1
  172. package/dist/agents/tool_calling/index.js +2 -3
  173. package/dist/agents/tool_calling/output_parser.cjs +1 -2
  174. package/dist/agents/tool_calling/output_parser.d.cts +0 -2
  175. package/dist/agents/tool_calling/output_parser.d.cts.map +1 -1
  176. package/dist/agents/tool_calling/output_parser.d.ts +0 -2
  177. package/dist/agents/tool_calling/output_parser.d.ts.map +1 -1
  178. package/dist/agents/tool_calling/output_parser.js +1 -2
  179. package/dist/agents/toolkits/base.js +1 -2
  180. package/dist/agents/toolkits/conversational_retrieval/openai_functions.cjs +1 -2
  181. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.cts +0 -2
  182. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.cts.map +1 -1
  183. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.ts +0 -2
  184. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.ts.map +1 -1
  185. package/dist/agents/toolkits/conversational_retrieval/openai_functions.js +1 -2
  186. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.cjs +1 -2
  187. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts +0 -2
  188. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts.map +1 -1
  189. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts +0 -2
  190. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts.map +1 -1
  191. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.js +1 -2
  192. package/dist/agents/toolkits/conversational_retrieval/tool.cjs +1 -2
  193. package/dist/agents/toolkits/conversational_retrieval/tool.d.cts +0 -2
  194. package/dist/agents/toolkits/conversational_retrieval/tool.d.cts.map +1 -1
  195. package/dist/agents/toolkits/conversational_retrieval/tool.d.ts +0 -2
  196. package/dist/agents/toolkits/conversational_retrieval/tool.d.ts.map +1 -1
  197. package/dist/agents/toolkits/conversational_retrieval/tool.js +1 -2
  198. package/dist/agents/toolkits/index.cjs +2 -3
  199. package/dist/agents/toolkits/index.js +2 -3
  200. package/dist/agents/toolkits/json/json.cjs +1 -2
  201. package/dist/agents/toolkits/json/json.d.cts +0 -2
  202. package/dist/agents/toolkits/json/json.d.cts.map +1 -1
  203. package/dist/agents/toolkits/json/json.d.ts +0 -2
  204. package/dist/agents/toolkits/json/json.d.ts.map +1 -1
  205. package/dist/agents/toolkits/json/json.js +1 -2
  206. package/dist/agents/toolkits/json/prompt.cjs +1 -2
  207. package/dist/agents/toolkits/json/prompt.js +1 -2
  208. package/dist/agents/toolkits/openapi/openapi.cjs +4 -5
  209. package/dist/agents/toolkits/openapi/openapi.d.cts +1 -3
  210. package/dist/agents/toolkits/openapi/openapi.d.cts.map +1 -1
  211. package/dist/agents/toolkits/openapi/openapi.d.ts +1 -3
  212. package/dist/agents/toolkits/openapi/openapi.d.ts.map +1 -1
  213. package/dist/agents/toolkits/openapi/openapi.js +4 -5
  214. package/dist/agents/toolkits/openapi/prompt.cjs +1 -2
  215. package/dist/agents/toolkits/openapi/prompt.js +1 -2
  216. package/dist/agents/toolkits/sql/index.cjs +2 -3
  217. package/dist/agents/toolkits/sql/index.js +2 -3
  218. package/dist/agents/toolkits/sql/prompt.cjs +1 -2
  219. package/dist/agents/toolkits/sql/prompt.d.cts +0 -2
  220. package/dist/agents/toolkits/sql/prompt.d.cts.map +1 -1
  221. package/dist/agents/toolkits/sql/prompt.d.ts +0 -2
  222. package/dist/agents/toolkits/sql/prompt.d.ts.map +1 -1
  223. package/dist/agents/toolkits/sql/prompt.js +1 -2
  224. package/dist/agents/toolkits/sql/sql.cjs +3 -4
  225. package/dist/agents/toolkits/sql/sql.d.cts +0 -2
  226. package/dist/agents/toolkits/sql/sql.d.cts.map +1 -1
  227. package/dist/agents/toolkits/sql/sql.d.ts +0 -2
  228. package/dist/agents/toolkits/sql/sql.d.ts.map +1 -1
  229. package/dist/agents/toolkits/sql/sql.js +3 -4
  230. package/dist/agents/toolkits/vectorstore/prompt.cjs +1 -2
  231. package/dist/agents/toolkits/vectorstore/prompt.js +1 -2
  232. package/dist/agents/toolkits/vectorstore/vectorstore.cjs +7 -8
  233. package/dist/agents/toolkits/vectorstore/vectorstore.cjs.map +1 -1
  234. package/dist/agents/toolkits/vectorstore/vectorstore.d.cts +0 -2
  235. package/dist/agents/toolkits/vectorstore/vectorstore.d.cts.map +1 -1
  236. package/dist/agents/toolkits/vectorstore/vectorstore.d.ts +0 -2
  237. package/dist/agents/toolkits/vectorstore/vectorstore.d.ts.map +1 -1
  238. package/dist/agents/toolkits/vectorstore/vectorstore.js +5 -6
  239. package/dist/agents/types.cjs +1 -2
  240. package/dist/agents/types.d.cts +0 -2
  241. package/dist/agents/types.d.cts.map +1 -1
  242. package/dist/agents/types.d.ts +0 -2
  243. package/dist/agents/types.d.ts.map +1 -1
  244. package/dist/agents/types.js +1 -2
  245. package/dist/agents/xml/index.cjs +4 -5
  246. package/dist/agents/xml/index.d.cts +0 -2
  247. package/dist/agents/xml/index.d.cts.map +1 -1
  248. package/dist/agents/xml/index.d.ts +0 -2
  249. package/dist/agents/xml/index.d.ts.map +1 -1
  250. package/dist/agents/xml/index.js +4 -5
  251. package/dist/agents/xml/output_parser.cjs +1 -2
  252. package/dist/agents/xml/output_parser.d.cts +0 -2
  253. package/dist/agents/xml/output_parser.d.cts.map +1 -1
  254. package/dist/agents/xml/output_parser.d.ts +0 -2
  255. package/dist/agents/xml/output_parser.d.ts.map +1 -1
  256. package/dist/agents/xml/output_parser.js +1 -2
  257. package/dist/agents/xml/prompt.cjs +1 -2
  258. package/dist/agents/xml/prompt.js +1 -2
  259. package/dist/cache/file_system.cjs +1 -2
  260. package/dist/cache/file_system.d.cts +0 -2
  261. package/dist/cache/file_system.d.cts.map +1 -1
  262. package/dist/cache/file_system.d.ts +0 -2
  263. package/dist/cache/file_system.d.ts.map +1 -1
  264. package/dist/cache/file_system.js +1 -2
  265. package/dist/callbacks/handlers/console.cjs +1 -2
  266. package/dist/callbacks/handlers/console.d.cts +0 -1
  267. package/dist/callbacks/handlers/console.d.ts +0 -1
  268. package/dist/callbacks/handlers/console.js +1 -2
  269. package/dist/callbacks/handlers/run_collector.cjs +1 -2
  270. package/dist/callbacks/handlers/run_collector.d.cts +0 -1
  271. package/dist/callbacks/handlers/run_collector.d.ts +0 -1
  272. package/dist/callbacks/handlers/run_collector.js +1 -2
  273. package/dist/callbacks/handlers/tracer.cjs +1 -2
  274. package/dist/callbacks/handlers/tracer.d.cts +0 -1
  275. package/dist/callbacks/handlers/tracer.d.ts +0 -1
  276. package/dist/callbacks/handlers/tracer.js +1 -2
  277. package/dist/callbacks/handlers/tracer_langchain.cjs +1 -2
  278. package/dist/callbacks/handlers/tracer_langchain.d.cts +0 -1
  279. package/dist/callbacks/handlers/tracer_langchain.d.ts +0 -1
  280. package/dist/callbacks/handlers/tracer_langchain.js +1 -2
  281. package/dist/callbacks/index.cjs +1 -2
  282. package/dist/callbacks/index.js +1 -2
  283. package/dist/callbacks/promises.cjs +1 -2
  284. package/dist/callbacks/promises.d.cts +0 -1
  285. package/dist/callbacks/promises.d.ts +0 -1
  286. package/dist/callbacks/promises.js +1 -2
  287. package/dist/chains/analyze_documents_chain.cjs +1 -2
  288. package/dist/chains/analyze_documents_chain.d.cts +1 -3
  289. package/dist/chains/analyze_documents_chain.d.cts.map +1 -1
  290. package/dist/chains/analyze_documents_chain.d.ts +1 -3
  291. package/dist/chains/analyze_documents_chain.d.ts.map +1 -1
  292. package/dist/chains/analyze_documents_chain.js +1 -2
  293. package/dist/chains/api/api_chain.cjs +1 -2
  294. package/dist/chains/api/api_chain.d.cts +1 -3
  295. package/dist/chains/api/api_chain.d.cts.map +1 -1
  296. package/dist/chains/api/api_chain.d.ts +1 -3
  297. package/dist/chains/api/api_chain.d.ts.map +1 -1
  298. package/dist/chains/api/api_chain.js +1 -2
  299. package/dist/chains/api/prompts.cjs +1 -2
  300. package/dist/chains/api/prompts.js +1 -2
  301. package/dist/chains/base.cjs +1 -2
  302. package/dist/chains/base.d.cts +0 -2
  303. package/dist/chains/base.d.cts.map +1 -1
  304. package/dist/chains/base.d.ts +0 -2
  305. package/dist/chains/base.d.ts.map +1 -1
  306. package/dist/chains/base.js +1 -2
  307. package/dist/chains/chat_vector_db_chain.cjs +1 -2
  308. package/dist/chains/chat_vector_db_chain.d.cts +0 -2
  309. package/dist/chains/chat_vector_db_chain.d.cts.map +1 -1
  310. package/dist/chains/chat_vector_db_chain.d.ts +0 -2
  311. package/dist/chains/chat_vector_db_chain.d.ts.map +1 -1
  312. package/dist/chains/chat_vector_db_chain.js +1 -2
  313. package/dist/chains/combine_docs_chain.cjs +1 -2
  314. package/dist/chains/combine_docs_chain.d.cts +0 -2
  315. package/dist/chains/combine_docs_chain.d.cts.map +1 -1
  316. package/dist/chains/combine_docs_chain.d.ts +0 -2
  317. package/dist/chains/combine_docs_chain.d.ts.map +1 -1
  318. package/dist/chains/combine_docs_chain.js +1 -2
  319. package/dist/chains/combine_documents/base.cjs +1 -2
  320. package/dist/chains/combine_documents/base.js +1 -2
  321. package/dist/chains/combine_documents/index.cjs +1 -2
  322. package/dist/chains/combine_documents/index.js +1 -2
  323. package/dist/chains/combine_documents/reduce.cjs +1 -2
  324. package/dist/chains/combine_documents/reduce.d.cts +0 -2
  325. package/dist/chains/combine_documents/reduce.d.cts.map +1 -1
  326. package/dist/chains/combine_documents/reduce.d.ts +0 -2
  327. package/dist/chains/combine_documents/reduce.d.ts.map +1 -1
  328. package/dist/chains/combine_documents/reduce.js +1 -2
  329. package/dist/chains/combine_documents/stuff.cjs +1 -2
  330. package/dist/chains/combine_documents/stuff.d.cts +0 -2
  331. package/dist/chains/combine_documents/stuff.d.cts.map +1 -1
  332. package/dist/chains/combine_documents/stuff.d.ts +0 -2
  333. package/dist/chains/combine_documents/stuff.d.ts.map +1 -1
  334. package/dist/chains/combine_documents/stuff.js +1 -2
  335. package/dist/chains/constitutional_ai/constitutional_chain.cjs +1 -2
  336. package/dist/chains/constitutional_ai/constitutional_chain.d.cts +1 -3
  337. package/dist/chains/constitutional_ai/constitutional_chain.d.cts.map +1 -1
  338. package/dist/chains/constitutional_ai/constitutional_chain.d.ts +1 -3
  339. package/dist/chains/constitutional_ai/constitutional_chain.d.ts.map +1 -1
  340. package/dist/chains/constitutional_ai/constitutional_chain.js +1 -2
  341. package/dist/chains/constitutional_ai/constitutional_principle.cjs +1 -2
  342. package/dist/chains/constitutional_ai/constitutional_principle.d.cts +0 -2
  343. package/dist/chains/constitutional_ai/constitutional_principle.d.cts.map +1 -1
  344. package/dist/chains/constitutional_ai/constitutional_principle.d.ts +0 -2
  345. package/dist/chains/constitutional_ai/constitutional_principle.d.ts.map +1 -1
  346. package/dist/chains/constitutional_ai/constitutional_principle.js +1 -2
  347. package/dist/chains/constitutional_ai/constitutional_prompts.cjs +0 -1
  348. package/dist/chains/constitutional_ai/constitutional_prompts.js +0 -1
  349. package/dist/chains/conversation.cjs +2 -3
  350. package/dist/chains/conversation.cjs.map +1 -1
  351. package/dist/chains/conversation.d.cts +0 -2
  352. package/dist/chains/conversation.d.cts.map +1 -1
  353. package/dist/chains/conversation.d.ts +0 -2
  354. package/dist/chains/conversation.d.ts.map +1 -1
  355. package/dist/chains/conversation.js +2 -3
  356. package/dist/chains/conversation.js.map +1 -1
  357. package/dist/chains/conversational_retrieval_chain.cjs +1 -2
  358. package/dist/chains/conversational_retrieval_chain.d.cts +0 -2
  359. package/dist/chains/conversational_retrieval_chain.d.cts.map +1 -1
  360. package/dist/chains/conversational_retrieval_chain.d.ts +0 -2
  361. package/dist/chains/conversational_retrieval_chain.d.ts.map +1 -1
  362. package/dist/chains/conversational_retrieval_chain.js +1 -2
  363. package/dist/chains/graph_qa/cypher.cjs +2 -3
  364. package/dist/chains/graph_qa/cypher.d.cts +1 -3
  365. package/dist/chains/graph_qa/cypher.d.cts.map +1 -1
  366. package/dist/chains/graph_qa/cypher.d.ts +1 -3
  367. package/dist/chains/graph_qa/cypher.d.ts.map +1 -1
  368. package/dist/chains/graph_qa/cypher.js +2 -3
  369. package/dist/chains/graph_qa/prompts.cjs +0 -1
  370. package/dist/chains/graph_qa/prompts.js +0 -1
  371. package/dist/chains/history_aware_retriever.cjs +1 -2
  372. package/dist/chains/history_aware_retriever.d.cts +0 -2
  373. package/dist/chains/history_aware_retriever.d.cts.map +1 -1
  374. package/dist/chains/history_aware_retriever.d.ts +0 -2
  375. package/dist/chains/history_aware_retriever.d.ts.map +1 -1
  376. package/dist/chains/history_aware_retriever.js +1 -2
  377. package/dist/chains/index.cjs +5 -6
  378. package/dist/chains/index.d.cts +2 -2
  379. package/dist/chains/index.d.ts +2 -2
  380. package/dist/chains/index.js +5 -6
  381. package/dist/chains/llm_chain.cjs +1 -2
  382. package/dist/chains/llm_chain.d.cts +2 -3
  383. package/dist/chains/llm_chain.d.cts.map +1 -1
  384. package/dist/chains/llm_chain.d.ts +2 -3
  385. package/dist/chains/llm_chain.d.ts.map +1 -1
  386. package/dist/chains/llm_chain.js +1 -2
  387. package/dist/chains/load.cjs +1 -2
  388. package/dist/chains/load.d.cts +0 -2
  389. package/dist/chains/load.d.cts.map +1 -1
  390. package/dist/chains/load.d.ts +0 -2
  391. package/dist/chains/load.d.ts.map +1 -1
  392. package/dist/chains/load.js +1 -2
  393. package/dist/chains/openai_functions/base.cjs +1 -2
  394. package/dist/chains/openai_functions/base.d.cts +0 -2
  395. package/dist/chains/openai_functions/base.d.cts.map +1 -1
  396. package/dist/chains/openai_functions/base.d.ts +0 -2
  397. package/dist/chains/openai_functions/base.d.ts.map +1 -1
  398. package/dist/chains/openai_functions/base.js +1 -2
  399. package/dist/chains/openai_functions/extraction.cjs +2 -3
  400. package/dist/chains/openai_functions/extraction.d.cts +1 -3
  401. package/dist/chains/openai_functions/extraction.d.cts.map +1 -1
  402. package/dist/chains/openai_functions/extraction.d.ts +1 -3
  403. package/dist/chains/openai_functions/extraction.d.ts.map +1 -1
  404. package/dist/chains/openai_functions/extraction.js +2 -3
  405. package/dist/chains/openai_functions/index.cjs +1 -2
  406. package/dist/chains/openai_functions/index.js +1 -2
  407. package/dist/chains/openai_functions/openapi.cjs +2 -3
  408. package/dist/chains/openai_functions/openapi.d.cts +2 -3
  409. package/dist/chains/openai_functions/openapi.d.cts.map +1 -1
  410. package/dist/chains/openai_functions/openapi.d.ts +2 -3
  411. package/dist/chains/openai_functions/openapi.d.ts.map +1 -1
  412. package/dist/chains/openai_functions/openapi.js +2 -3
  413. package/dist/chains/openai_functions/tagging.cjs +2 -3
  414. package/dist/chains/openai_functions/tagging.d.cts +1 -3
  415. package/dist/chains/openai_functions/tagging.d.cts.map +1 -1
  416. package/dist/chains/openai_functions/tagging.d.ts +1 -3
  417. package/dist/chains/openai_functions/tagging.d.ts.map +1 -1
  418. package/dist/chains/openai_functions/tagging.js +2 -3
  419. package/dist/chains/openai_moderation.cjs +1 -2
  420. package/dist/chains/openai_moderation.d.cts +0 -2
  421. package/dist/chains/openai_moderation.d.cts.map +1 -1
  422. package/dist/chains/openai_moderation.d.ts +0 -2
  423. package/dist/chains/openai_moderation.d.ts.map +1 -1
  424. package/dist/chains/openai_moderation.js +1 -2
  425. package/dist/chains/query_constructor/index.cjs +2 -3
  426. package/dist/chains/query_constructor/index.d.cts +0 -2
  427. package/dist/chains/query_constructor/index.d.cts.map +1 -1
  428. package/dist/chains/query_constructor/index.d.ts +0 -2
  429. package/dist/chains/query_constructor/index.d.ts.map +1 -1
  430. package/dist/chains/query_constructor/index.js +2 -3
  431. package/dist/chains/query_constructor/ir.cjs +1 -2
  432. package/dist/chains/query_constructor/ir.js +1 -2
  433. package/dist/chains/query_constructor/parser.cjs +1 -2
  434. package/dist/chains/query_constructor/parser.d.cts +0 -2
  435. package/dist/chains/query_constructor/parser.d.cts.map +1 -1
  436. package/dist/chains/query_constructor/parser.d.ts +0 -2
  437. package/dist/chains/query_constructor/parser.d.ts.map +1 -1
  438. package/dist/chains/query_constructor/parser.js +1 -2
  439. package/dist/chains/query_constructor/prompt.cjs +1 -2
  440. package/dist/chains/query_constructor/prompt.d.cts +0 -2
  441. package/dist/chains/query_constructor/prompt.d.cts.map +1 -1
  442. package/dist/chains/query_constructor/prompt.d.ts +0 -2
  443. package/dist/chains/query_constructor/prompt.d.ts.map +1 -1
  444. package/dist/chains/query_constructor/prompt.js +1 -2
  445. package/dist/chains/question_answering/load.cjs +1 -2
  446. package/dist/chains/question_answering/load.d.cts +0 -2
  447. package/dist/chains/question_answering/load.d.cts.map +1 -1
  448. package/dist/chains/question_answering/load.d.ts +0 -2
  449. package/dist/chains/question_answering/load.d.ts.map +1 -1
  450. package/dist/chains/question_answering/load.js +1 -2
  451. package/dist/chains/question_answering/map_reduce_prompts.cjs +0 -1
  452. package/dist/chains/question_answering/map_reduce_prompts.js +0 -1
  453. package/dist/chains/question_answering/refine_prompts.cjs +1 -2
  454. package/dist/chains/question_answering/refine_prompts.js +1 -2
  455. package/dist/chains/question_answering/stuff_prompts.cjs +1 -2
  456. package/dist/chains/question_answering/stuff_prompts.js +1 -2
  457. package/dist/chains/retrieval.cjs +1 -2
  458. package/dist/chains/retrieval.d.cts +0 -2
  459. package/dist/chains/retrieval.d.cts.map +1 -1
  460. package/dist/chains/retrieval.d.ts +0 -2
  461. package/dist/chains/retrieval.d.ts.map +1 -1
  462. package/dist/chains/retrieval.js +1 -2
  463. package/dist/chains/retrieval_qa.cjs +1 -2
  464. package/dist/chains/retrieval_qa.d.cts +1 -3
  465. package/dist/chains/retrieval_qa.d.cts.map +1 -1
  466. package/dist/chains/retrieval_qa.d.ts +1 -3
  467. package/dist/chains/retrieval_qa.d.ts.map +1 -1
  468. package/dist/chains/retrieval_qa.js +1 -2
  469. package/dist/chains/router/llm_router.cjs +1 -2
  470. package/dist/chains/router/llm_router.d.cts +1 -3
  471. package/dist/chains/router/llm_router.d.cts.map +1 -1
  472. package/dist/chains/router/llm_router.d.ts +1 -3
  473. package/dist/chains/router/llm_router.d.ts.map +1 -1
  474. package/dist/chains/router/llm_router.js +1 -2
  475. package/dist/chains/router/multi_prompt.cjs +4 -5
  476. package/dist/chains/router/multi_prompt.d.cts +1 -3
  477. package/dist/chains/router/multi_prompt.d.cts.map +1 -1
  478. package/dist/chains/router/multi_prompt.d.ts +1 -3
  479. package/dist/chains/router/multi_prompt.d.ts.map +1 -1
  480. package/dist/chains/router/multi_prompt.js +4 -5
  481. package/dist/chains/router/multi_prompt_prompt.cjs +1 -2
  482. package/dist/chains/router/multi_prompt_prompt.js +1 -2
  483. package/dist/chains/router/multi_retrieval_prompt.cjs +1 -2
  484. package/dist/chains/router/multi_retrieval_prompt.js +1 -2
  485. package/dist/chains/router/multi_retrieval_qa.cjs +4 -5
  486. package/dist/chains/router/multi_retrieval_qa.d.cts +1 -3
  487. package/dist/chains/router/multi_retrieval_qa.d.cts.map +1 -1
  488. package/dist/chains/router/multi_retrieval_qa.d.ts +1 -3
  489. package/dist/chains/router/multi_retrieval_qa.d.ts.map +1 -1
  490. package/dist/chains/router/multi_retrieval_qa.js +4 -5
  491. package/dist/chains/router/multi_route.cjs +1 -2
  492. package/dist/chains/router/multi_route.d.cts +1 -2
  493. package/dist/chains/router/multi_route.d.cts.map +1 -1
  494. package/dist/chains/router/multi_route.d.ts +1 -2
  495. package/dist/chains/router/multi_route.d.ts.map +1 -1
  496. package/dist/chains/router/multi_route.js +1 -2
  497. package/dist/chains/router/utils.cjs +1 -2
  498. package/dist/chains/router/utils.js +1 -2
  499. package/dist/chains/sequential_chain.cjs +1 -2
  500. package/dist/chains/sequential_chain.d.cts +4 -3
  501. package/dist/chains/sequential_chain.d.cts.map +1 -1
  502. package/dist/chains/sequential_chain.d.ts +4 -3
  503. package/dist/chains/sequential_chain.d.ts.map +1 -1
  504. package/dist/chains/sequential_chain.js +1 -2
  505. package/dist/chains/serde.d.cts +0 -2
  506. package/dist/chains/serde.d.cts.map +1 -1
  507. package/dist/chains/serde.d.ts +0 -2
  508. package/dist/chains/serde.d.ts.map +1 -1
  509. package/dist/chains/sql_db/index.cjs +2 -3
  510. package/dist/chains/sql_db/index.d.cts +1 -1
  511. package/dist/chains/sql_db/index.d.ts +1 -1
  512. package/dist/chains/sql_db/index.js +2 -3
  513. package/dist/chains/sql_db/sql_db_chain.cjs +2 -3
  514. package/dist/chains/sql_db/sql_db_chain.d.cts +1 -3
  515. package/dist/chains/sql_db/sql_db_chain.d.cts.map +1 -1
  516. package/dist/chains/sql_db/sql_db_chain.d.ts +1 -3
  517. package/dist/chains/sql_db/sql_db_chain.d.ts.map +1 -1
  518. package/dist/chains/sql_db/sql_db_chain.js +2 -3
  519. package/dist/chains/sql_db/sql_db_prompt.cjs +1 -2
  520. package/dist/chains/sql_db/sql_db_prompt.d.cts +0 -2
  521. package/dist/chains/sql_db/sql_db_prompt.d.cts.map +1 -1
  522. package/dist/chains/sql_db/sql_db_prompt.d.ts +0 -2
  523. package/dist/chains/sql_db/sql_db_prompt.d.ts.map +1 -1
  524. package/dist/chains/sql_db/sql_db_prompt.js +1 -2
  525. package/dist/chains/summarization/load.cjs +1 -2
  526. package/dist/chains/summarization/load.d.cts +1 -2
  527. package/dist/chains/summarization/load.d.cts.map +1 -1
  528. package/dist/chains/summarization/load.d.ts +1 -2
  529. package/dist/chains/summarization/load.d.ts.map +1 -1
  530. package/dist/chains/summarization/load.js +1 -2
  531. package/dist/chains/summarization/refine_prompts.cjs +0 -1
  532. package/dist/chains/summarization/refine_prompts.cjs.map +1 -1
  533. package/dist/chains/summarization/refine_prompts.js +0 -1
  534. package/dist/chains/summarization/stuff_prompts.cjs +0 -1
  535. package/dist/chains/summarization/stuff_prompts.cjs.map +1 -1
  536. package/dist/chains/summarization/stuff_prompts.js +0 -1
  537. package/dist/chains/transform.cjs +1 -2
  538. package/dist/chains/transform.d.cts +0 -2
  539. package/dist/chains/transform.d.cts.map +1 -1
  540. package/dist/chains/transform.d.ts +0 -2
  541. package/dist/chains/transform.d.ts.map +1 -1
  542. package/dist/chains/transform.js +1 -2
  543. package/dist/chains/vector_db_qa.cjs +1 -2
  544. package/dist/chains/vector_db_qa.d.cts +1 -3
  545. package/dist/chains/vector_db_qa.d.cts.map +1 -1
  546. package/dist/chains/vector_db_qa.d.ts +1 -3
  547. package/dist/chains/vector_db_qa.d.ts.map +1 -1
  548. package/dist/chains/vector_db_qa.js +1 -2
  549. package/dist/chat_models/universal.cjs +1 -2
  550. package/dist/chat_models/universal.d.cts +1 -2
  551. package/dist/chat_models/universal.d.cts.map +1 -1
  552. package/dist/chat_models/universal.d.ts +1 -2
  553. package/dist/chat_models/universal.d.ts.map +1 -1
  554. package/dist/chat_models/universal.js +1 -2
  555. package/dist/document.cjs +1 -2
  556. package/dist/document.js +1 -2
  557. package/dist/document_loaders/base.cjs +1 -2
  558. package/dist/document_loaders/base.js +1 -2
  559. package/dist/document_loaders/fs/buffer.cjs +1 -2
  560. package/dist/document_loaders/fs/buffer.d.cts +0 -2
  561. package/dist/document_loaders/fs/buffer.d.cts.map +1 -1
  562. package/dist/document_loaders/fs/buffer.d.ts +0 -2
  563. package/dist/document_loaders/fs/buffer.d.ts.map +1 -1
  564. package/dist/document_loaders/fs/buffer.js +1 -2
  565. package/dist/document_loaders/fs/directory.cjs +1 -2
  566. package/dist/document_loaders/fs/directory.d.cts +0 -2
  567. package/dist/document_loaders/fs/directory.d.cts.map +1 -1
  568. package/dist/document_loaders/fs/directory.d.ts +0 -2
  569. package/dist/document_loaders/fs/directory.d.ts.map +1 -1
  570. package/dist/document_loaders/fs/directory.js +1 -2
  571. package/dist/document_loaders/fs/json.cjs +1 -2
  572. package/dist/document_loaders/fs/json.d.cts +0 -2
  573. package/dist/document_loaders/fs/json.d.cts.map +1 -1
  574. package/dist/document_loaders/fs/json.d.ts +0 -2
  575. package/dist/document_loaders/fs/json.d.ts.map +1 -1
  576. package/dist/document_loaders/fs/json.js +1 -2
  577. package/dist/document_loaders/fs/multi_file.cjs +1 -2
  578. package/dist/document_loaders/fs/multi_file.d.cts +0 -2
  579. package/dist/document_loaders/fs/multi_file.d.cts.map +1 -1
  580. package/dist/document_loaders/fs/multi_file.d.ts +0 -2
  581. package/dist/document_loaders/fs/multi_file.d.ts.map +1 -1
  582. package/dist/document_loaders/fs/multi_file.js +1 -2
  583. package/dist/document_loaders/fs/text.cjs +1 -2
  584. package/dist/document_loaders/fs/text.d.cts +0 -2
  585. package/dist/document_loaders/fs/text.d.cts.map +1 -1
  586. package/dist/document_loaders/fs/text.d.ts +0 -2
  587. package/dist/document_loaders/fs/text.d.ts.map +1 -1
  588. package/dist/document_loaders/fs/text.js +1 -2
  589. package/dist/document_transformers/openai_functions.cjs +1 -2
  590. package/dist/document_transformers/openai_functions.d.cts +0 -2
  591. package/dist/document_transformers/openai_functions.d.cts.map +1 -1
  592. package/dist/document_transformers/openai_functions.d.ts +0 -2
  593. package/dist/document_transformers/openai_functions.d.ts.map +1 -1
  594. package/dist/document_transformers/openai_functions.js +1 -2
  595. package/dist/embeddings/cache_backed.cjs +1 -2
  596. package/dist/embeddings/cache_backed.d.cts +0 -2
  597. package/dist/embeddings/cache_backed.d.cts.map +1 -1
  598. package/dist/embeddings/cache_backed.d.ts +0 -2
  599. package/dist/embeddings/cache_backed.d.ts.map +1 -1
  600. package/dist/embeddings/cache_backed.js +1 -2
  601. package/dist/embeddings/fake.cjs +1 -2
  602. package/dist/embeddings/fake.js +1 -2
  603. package/dist/evaluation/agents/index.js +1 -2
  604. package/dist/evaluation/agents/prompt.cjs +1 -2
  605. package/dist/evaluation/agents/prompt.js +1 -2
  606. package/dist/evaluation/agents/trajectory.cjs +1 -2
  607. package/dist/evaluation/agents/trajectory.d.cts +0 -2
  608. package/dist/evaluation/agents/trajectory.d.cts.map +1 -1
  609. package/dist/evaluation/agents/trajectory.d.ts +0 -2
  610. package/dist/evaluation/agents/trajectory.d.ts.map +1 -1
  611. package/dist/evaluation/agents/trajectory.js +1 -2
  612. package/dist/evaluation/base.cjs +1 -2
  613. package/dist/evaluation/base.d.cts +0 -2
  614. package/dist/evaluation/base.d.cts.map +1 -1
  615. package/dist/evaluation/base.d.ts +0 -2
  616. package/dist/evaluation/base.d.ts.map +1 -1
  617. package/dist/evaluation/base.js +1 -2
  618. package/dist/evaluation/comparison/index.js +1 -2
  619. package/dist/evaluation/comparison/pairwise.cjs +2 -3
  620. package/dist/evaluation/comparison/pairwise.d.cts +0 -2
  621. package/dist/evaluation/comparison/pairwise.d.cts.map +1 -1
  622. package/dist/evaluation/comparison/pairwise.d.ts +0 -2
  623. package/dist/evaluation/comparison/pairwise.d.ts.map +1 -1
  624. package/dist/evaluation/comparison/pairwise.js +2 -3
  625. package/dist/evaluation/comparison/prompt.cjs +0 -1
  626. package/dist/evaluation/comparison/prompt.js +0 -1
  627. package/dist/evaluation/criteria/criteria.cjs +2 -3
  628. package/dist/evaluation/criteria/criteria.d.cts +1 -3
  629. package/dist/evaluation/criteria/criteria.d.cts.map +1 -1
  630. package/dist/evaluation/criteria/criteria.d.ts +1 -3
  631. package/dist/evaluation/criteria/criteria.d.ts.map +1 -1
  632. package/dist/evaluation/criteria/criteria.js +2 -3
  633. package/dist/evaluation/criteria/index.js +1 -2
  634. package/dist/evaluation/criteria/prompt.cjs +0 -1
  635. package/dist/evaluation/criteria/prompt.js +0 -1
  636. package/dist/evaluation/embedding_distance/base.cjs +1 -2
  637. package/dist/evaluation/embedding_distance/base.d.cts +1 -2
  638. package/dist/evaluation/embedding_distance/base.d.cts.map +1 -1
  639. package/dist/evaluation/embedding_distance/base.d.ts +1 -2
  640. package/dist/evaluation/embedding_distance/base.d.ts.map +1 -1
  641. package/dist/evaluation/embedding_distance/base.js +1 -2
  642. package/dist/evaluation/embedding_distance/index.js +1 -2
  643. package/dist/evaluation/index.cjs +1 -2
  644. package/dist/evaluation/index.js +1 -2
  645. package/dist/evaluation/loader.cjs +3 -4
  646. package/dist/evaluation/loader.d.cts +3 -5
  647. package/dist/evaluation/loader.d.cts.map +1 -1
  648. package/dist/evaluation/loader.d.ts +3 -5
  649. package/dist/evaluation/loader.d.ts.map +1 -1
  650. package/dist/evaluation/loader.js +3 -4
  651. package/dist/evaluation/qa/eval_chain.cjs +2 -3
  652. package/dist/evaluation/qa/eval_chain.d.cts +0 -2
  653. package/dist/evaluation/qa/eval_chain.d.cts.map +1 -1
  654. package/dist/evaluation/qa/eval_chain.d.ts +0 -2
  655. package/dist/evaluation/qa/eval_chain.d.ts.map +1 -1
  656. package/dist/evaluation/qa/eval_chain.js +2 -3
  657. package/dist/evaluation/qa/index.js +1 -2
  658. package/dist/evaluation/qa/prompt.cjs +0 -1
  659. package/dist/evaluation/qa/prompt.cjs.map +1 -1
  660. package/dist/evaluation/qa/prompt.js +0 -1
  661. package/dist/evaluation/types.d.cts +0 -2
  662. package/dist/evaluation/types.d.cts.map +1 -1
  663. package/dist/evaluation/types.d.ts +0 -2
  664. package/dist/evaluation/types.d.ts.map +1 -1
  665. package/dist/experimental/autogpt/agent.cjs +3 -4
  666. package/dist/experimental/autogpt/agent.d.cts +1 -3
  667. package/dist/experimental/autogpt/agent.d.cts.map +1 -1
  668. package/dist/experimental/autogpt/agent.d.ts +1 -3
  669. package/dist/experimental/autogpt/agent.d.ts.map +1 -1
  670. package/dist/experimental/autogpt/agent.js +3 -4
  671. package/dist/experimental/autogpt/index.cjs +1 -2
  672. package/dist/experimental/autogpt/index.d.cts +1 -1
  673. package/dist/experimental/autogpt/index.d.ts +1 -1
  674. package/dist/experimental/autogpt/index.js +1 -2
  675. package/dist/experimental/autogpt/output_parser.cjs +1 -2
  676. package/dist/experimental/autogpt/output_parser.d.cts +0 -2
  677. package/dist/experimental/autogpt/output_parser.d.cts.map +1 -1
  678. package/dist/experimental/autogpt/output_parser.d.ts +0 -2
  679. package/dist/experimental/autogpt/output_parser.d.ts.map +1 -1
  680. package/dist/experimental/autogpt/output_parser.js +1 -2
  681. package/dist/experimental/autogpt/prompt.cjs +1 -2
  682. package/dist/experimental/autogpt/prompt.d.cts +0 -2
  683. package/dist/experimental/autogpt/prompt.d.cts.map +1 -1
  684. package/dist/experimental/autogpt/prompt.d.ts +0 -2
  685. package/dist/experimental/autogpt/prompt.d.ts.map +1 -1
  686. package/dist/experimental/autogpt/prompt.js +1 -2
  687. package/dist/experimental/autogpt/prompt_generator.cjs +1 -2
  688. package/dist/experimental/autogpt/prompt_generator.js +1 -2
  689. package/dist/experimental/autogpt/schema.cjs +1 -2
  690. package/dist/experimental/autogpt/schema.d.cts +0 -2
  691. package/dist/experimental/autogpt/schema.d.cts.map +1 -1
  692. package/dist/experimental/autogpt/schema.d.ts +0 -2
  693. package/dist/experimental/autogpt/schema.d.ts.map +1 -1
  694. package/dist/experimental/autogpt/schema.js +1 -2
  695. package/dist/experimental/babyagi/agent.cjs +1 -2
  696. package/dist/experimental/babyagi/agent.d.cts +1 -3
  697. package/dist/experimental/babyagi/agent.d.cts.map +1 -1
  698. package/dist/experimental/babyagi/agent.d.ts +1 -3
  699. package/dist/experimental/babyagi/agent.d.ts.map +1 -1
  700. package/dist/experimental/babyagi/agent.js +1 -2
  701. package/dist/experimental/babyagi/index.cjs +1 -2
  702. package/dist/experimental/babyagi/index.js +1 -2
  703. package/dist/experimental/babyagi/task_creation.cjs +1 -2
  704. package/dist/experimental/babyagi/task_creation.d.cts +0 -2
  705. package/dist/experimental/babyagi/task_creation.d.cts.map +1 -1
  706. package/dist/experimental/babyagi/task_creation.d.ts +0 -2
  707. package/dist/experimental/babyagi/task_creation.d.ts.map +1 -1
  708. package/dist/experimental/babyagi/task_creation.js +1 -2
  709. package/dist/experimental/babyagi/task_execution.cjs +1 -2
  710. package/dist/experimental/babyagi/task_execution.d.cts +0 -2
  711. package/dist/experimental/babyagi/task_execution.d.cts.map +1 -1
  712. package/dist/experimental/babyagi/task_execution.d.ts +0 -2
  713. package/dist/experimental/babyagi/task_execution.d.ts.map +1 -1
  714. package/dist/experimental/babyagi/task_execution.js +1 -2
  715. package/dist/experimental/babyagi/task_prioritization.cjs +1 -2
  716. package/dist/experimental/babyagi/task_prioritization.d.cts +0 -2
  717. package/dist/experimental/babyagi/task_prioritization.d.cts.map +1 -1
  718. package/dist/experimental/babyagi/task_prioritization.d.ts +0 -2
  719. package/dist/experimental/babyagi/task_prioritization.d.ts.map +1 -1
  720. package/dist/experimental/babyagi/task_prioritization.js +1 -2
  721. package/dist/experimental/chains/violation_of_expectations/index.cjs +1 -2
  722. package/dist/experimental/chains/violation_of_expectations/index.js +1 -2
  723. package/dist/experimental/chains/violation_of_expectations/types.cjs +1 -2
  724. package/dist/experimental/chains/violation_of_expectations/types.d.cts +0 -2
  725. package/dist/experimental/chains/violation_of_expectations/types.d.cts.map +1 -1
  726. package/dist/experimental/chains/violation_of_expectations/types.d.ts +0 -2
  727. package/dist/experimental/chains/violation_of_expectations/types.d.ts.map +1 -1
  728. package/dist/experimental/chains/violation_of_expectations/types.js +1 -2
  729. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.cjs +2 -3
  730. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.cts +1 -3
  731. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.cts.map +1 -1
  732. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts +1 -3
  733. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts.map +1 -1
  734. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.js +2 -3
  735. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.cjs +1 -2
  736. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_prompt.js +1 -2
  737. package/dist/experimental/generative_agents/generative_agent.cjs +2 -3
  738. package/dist/experimental/generative_agents/generative_agent.d.cts +1 -3
  739. package/dist/experimental/generative_agents/generative_agent.d.cts.map +1 -1
  740. package/dist/experimental/generative_agents/generative_agent.d.ts +1 -3
  741. package/dist/experimental/generative_agents/generative_agent.d.ts.map +1 -1
  742. package/dist/experimental/generative_agents/generative_agent.js +2 -3
  743. package/dist/experimental/generative_agents/generative_agent_memory.cjs +1 -2
  744. package/dist/experimental/generative_agents/generative_agent_memory.d.cts +2 -3
  745. package/dist/experimental/generative_agents/generative_agent_memory.d.cts.map +1 -1
  746. package/dist/experimental/generative_agents/generative_agent_memory.d.ts +2 -3
  747. package/dist/experimental/generative_agents/generative_agent_memory.d.ts.map +1 -1
  748. package/dist/experimental/generative_agents/generative_agent_memory.js +1 -2
  749. package/dist/experimental/generative_agents/index.cjs +1 -2
  750. package/dist/experimental/generative_agents/index.js +1 -2
  751. package/dist/experimental/masking/index.cjs +2 -3
  752. package/dist/experimental/masking/index.d.cts +2 -2
  753. package/dist/experimental/masking/index.d.ts +2 -2
  754. package/dist/experimental/masking/index.js +2 -3
  755. package/dist/experimental/masking/parser.cjs +1 -2
  756. package/dist/experimental/masking/parser.d.cts +0 -2
  757. package/dist/experimental/masking/parser.d.cts.map +1 -1
  758. package/dist/experimental/masking/parser.d.ts +0 -2
  759. package/dist/experimental/masking/parser.d.ts.map +1 -1
  760. package/dist/experimental/masking/parser.js +1 -2
  761. package/dist/experimental/masking/regex_masking_transformer.cjs +1 -2
  762. package/dist/experimental/masking/regex_masking_transformer.d.cts +0 -2
  763. package/dist/experimental/masking/regex_masking_transformer.d.cts.map +1 -1
  764. package/dist/experimental/masking/regex_masking_transformer.d.ts +0 -2
  765. package/dist/experimental/masking/regex_masking_transformer.d.ts.map +1 -1
  766. package/dist/experimental/masking/regex_masking_transformer.js +1 -2
  767. package/dist/experimental/masking/transformer.cjs +1 -2
  768. package/dist/experimental/masking/transformer.d.cts +0 -2
  769. package/dist/experimental/masking/transformer.d.cts.map +1 -1
  770. package/dist/experimental/masking/transformer.d.ts +0 -2
  771. package/dist/experimental/masking/transformer.d.ts.map +1 -1
  772. package/dist/experimental/masking/transformer.js +1 -2
  773. package/dist/experimental/masking/types.d.cts +0 -2
  774. package/dist/experimental/masking/types.d.cts.map +1 -1
  775. package/dist/experimental/masking/types.d.ts +0 -2
  776. package/dist/experimental/masking/types.d.ts.map +1 -1
  777. package/dist/experimental/openai_assistant/index.cjs +1 -2
  778. package/dist/experimental/openai_assistant/index.d.cts +1 -2
  779. package/dist/experimental/openai_assistant/index.d.cts.map +1 -1
  780. package/dist/experimental/openai_assistant/index.d.ts +1 -2
  781. package/dist/experimental/openai_assistant/index.d.ts.map +1 -1
  782. package/dist/experimental/openai_assistant/index.js +1 -2
  783. package/dist/experimental/openai_assistant/schema.d.cts +0 -2
  784. package/dist/experimental/openai_assistant/schema.d.cts.map +1 -1
  785. package/dist/experimental/openai_assistant/schema.d.ts +0 -2
  786. package/dist/experimental/openai_assistant/schema.d.ts.map +1 -1
  787. package/dist/experimental/openai_files/index.cjs +1 -2
  788. package/dist/experimental/openai_files/index.d.cts +0 -2
  789. package/dist/experimental/openai_files/index.d.cts.map +1 -1
  790. package/dist/experimental/openai_files/index.d.ts +0 -2
  791. package/dist/experimental/openai_files/index.d.ts.map +1 -1
  792. package/dist/experimental/openai_files/index.js +1 -2
  793. package/dist/experimental/plan_and_execute/agent_executor.cjs +8 -9
  794. package/dist/experimental/plan_and_execute/agent_executor.cjs.map +1 -1
  795. package/dist/experimental/plan_and_execute/agent_executor.d.cts +1 -3
  796. package/dist/experimental/plan_and_execute/agent_executor.d.cts.map +1 -1
  797. package/dist/experimental/plan_and_execute/agent_executor.d.ts +1 -3
  798. package/dist/experimental/plan_and_execute/agent_executor.d.ts.map +1 -1
  799. package/dist/experimental/plan_and_execute/agent_executor.js +6 -7
  800. package/dist/experimental/plan_and_execute/base.cjs +1 -2
  801. package/dist/experimental/plan_and_execute/base.d.cts +0 -2
  802. package/dist/experimental/plan_and_execute/base.d.cts.map +1 -1
  803. package/dist/experimental/plan_and_execute/base.d.ts +0 -2
  804. package/dist/experimental/plan_and_execute/base.d.ts.map +1 -1
  805. package/dist/experimental/plan_and_execute/base.js +1 -2
  806. package/dist/experimental/plan_and_execute/index.cjs +2 -3
  807. package/dist/experimental/plan_and_execute/index.d.cts +1 -1
  808. package/dist/experimental/plan_and_execute/index.d.ts +1 -1
  809. package/dist/experimental/plan_and_execute/index.js +2 -3
  810. package/dist/experimental/plan_and_execute/outputParser.cjs +1 -2
  811. package/dist/experimental/plan_and_execute/outputParser.d.cts +0 -2
  812. package/dist/experimental/plan_and_execute/outputParser.d.cts.map +1 -1
  813. package/dist/experimental/plan_and_execute/outputParser.d.ts +0 -2
  814. package/dist/experimental/plan_and_execute/outputParser.d.ts.map +1 -1
  815. package/dist/experimental/plan_and_execute/outputParser.js +1 -2
  816. package/dist/experimental/plan_and_execute/prompt.cjs +1 -2
  817. package/dist/experimental/plan_and_execute/prompt.js +1 -2
  818. package/dist/experimental/prompts/custom_format.cjs +1 -2
  819. package/dist/experimental/prompts/custom_format.d.cts +0 -2
  820. package/dist/experimental/prompts/custom_format.d.cts.map +1 -1
  821. package/dist/experimental/prompts/custom_format.d.ts +0 -2
  822. package/dist/experimental/prompts/custom_format.d.ts.map +1 -1
  823. package/dist/experimental/prompts/custom_format.js +1 -2
  824. package/dist/experimental/prompts/handlebars.cjs +1 -2
  825. package/dist/experimental/prompts/handlebars.d.cts +0 -2
  826. package/dist/experimental/prompts/handlebars.d.cts.map +1 -1
  827. package/dist/experimental/prompts/handlebars.d.ts +0 -2
  828. package/dist/experimental/prompts/handlebars.d.ts.map +1 -1
  829. package/dist/experimental/prompts/handlebars.js +1 -2
  830. package/dist/hub/base.cjs +1 -2
  831. package/dist/hub/base.d.cts +0 -2
  832. package/dist/hub/base.d.cts.map +1 -1
  833. package/dist/hub/base.d.ts +0 -2
  834. package/dist/hub/base.d.ts.map +1 -1
  835. package/dist/hub/base.js +1 -2
  836. package/dist/hub/index.cjs +1 -2
  837. package/dist/hub/index.d.cts +0 -2
  838. package/dist/hub/index.d.cts.map +1 -1
  839. package/dist/hub/index.d.ts +0 -2
  840. package/dist/hub/index.d.ts.map +1 -1
  841. package/dist/hub/index.js +1 -2
  842. package/dist/hub/node.cjs +3 -4
  843. package/dist/hub/node.d.cts +0 -2
  844. package/dist/hub/node.d.cts.map +1 -1
  845. package/dist/hub/node.d.ts +0 -2
  846. package/dist/hub/node.d.ts.map +1 -1
  847. package/dist/hub/node.js +3 -4
  848. package/dist/index.cjs +1 -2
  849. package/dist/index.js +1 -2
  850. package/dist/indexes/index.cjs +37 -8
  851. package/dist/indexes/index.js +1 -2
  852. package/dist/load/import_constants.cjs +1 -2
  853. package/dist/load/import_constants.js +1 -2
  854. package/dist/load/import_map.cjs +17 -18
  855. package/dist/load/import_map.js +26 -27
  856. package/dist/load/import_type.d.cts +0 -2
  857. package/dist/load/import_type.d.cts.map +1 -1
  858. package/dist/load/import_type.d.ts +0 -2
  859. package/dist/load/import_type.d.ts.map +1 -1
  860. package/dist/load/index.cjs +1 -2
  861. package/dist/load/index.d.cts +0 -2
  862. package/dist/load/index.d.cts.map +1 -1
  863. package/dist/load/index.d.ts +0 -2
  864. package/dist/load/index.d.ts.map +1 -1
  865. package/dist/load/index.js +1 -2
  866. package/dist/load/map_keys.d.cts +0 -2
  867. package/dist/load/map_keys.d.cts.map +1 -1
  868. package/dist/load/map_keys.d.ts +0 -2
  869. package/dist/load/map_keys.d.ts.map +1 -1
  870. package/dist/load/serializable.cjs +1 -2
  871. package/dist/load/serializable.js +1 -2
  872. package/dist/memory/buffer_memory.cjs +1 -2
  873. package/dist/memory/buffer_memory.d.cts +0 -2
  874. package/dist/memory/buffer_memory.d.cts.map +1 -1
  875. package/dist/memory/buffer_memory.d.ts +0 -2
  876. package/dist/memory/buffer_memory.d.ts.map +1 -1
  877. package/dist/memory/buffer_memory.js +1 -2
  878. package/dist/memory/buffer_token_memory.cjs +1 -2
  879. package/dist/memory/buffer_token_memory.d.cts +0 -2
  880. package/dist/memory/buffer_token_memory.d.cts.map +1 -1
  881. package/dist/memory/buffer_token_memory.d.ts +0 -2
  882. package/dist/memory/buffer_token_memory.d.ts.map +1 -1
  883. package/dist/memory/buffer_token_memory.js +1 -2
  884. package/dist/memory/buffer_window_memory.cjs +1 -2
  885. package/dist/memory/buffer_window_memory.d.cts +0 -2
  886. package/dist/memory/buffer_window_memory.d.cts.map +1 -1
  887. package/dist/memory/buffer_window_memory.d.ts +0 -2
  888. package/dist/memory/buffer_window_memory.d.ts.map +1 -1
  889. package/dist/memory/buffer_window_memory.js +1 -2
  890. package/dist/memory/chat_memory.cjs +1 -2
  891. package/dist/memory/chat_memory.d.cts +0 -2
  892. package/dist/memory/chat_memory.d.cts.map +1 -1
  893. package/dist/memory/chat_memory.d.ts +0 -2
  894. package/dist/memory/chat_memory.d.ts.map +1 -1
  895. package/dist/memory/chat_memory.js +1 -2
  896. package/dist/memory/combined_memory.cjs +1 -2
  897. package/dist/memory/combined_memory.d.cts +0 -2
  898. package/dist/memory/combined_memory.d.cts.map +1 -1
  899. package/dist/memory/combined_memory.d.ts +0 -2
  900. package/dist/memory/combined_memory.d.ts.map +1 -1
  901. package/dist/memory/combined_memory.js +1 -2
  902. package/dist/memory/entity_memory.cjs +2 -3
  903. package/dist/memory/entity_memory.d.cts +1 -3
  904. package/dist/memory/entity_memory.d.cts.map +1 -1
  905. package/dist/memory/entity_memory.d.ts +1 -3
  906. package/dist/memory/entity_memory.d.ts.map +1 -1
  907. package/dist/memory/entity_memory.js +2 -3
  908. package/dist/memory/index.cjs +5 -6
  909. package/dist/memory/index.d.cts +1 -1
  910. package/dist/memory/index.d.ts +1 -1
  911. package/dist/memory/index.js +5 -6
  912. package/dist/memory/prompt.cjs +0 -1
  913. package/dist/memory/prompt.d.cts +0 -2
  914. package/dist/memory/prompt.d.cts.map +1 -1
  915. package/dist/memory/prompt.d.ts +0 -2
  916. package/dist/memory/prompt.d.ts.map +1 -1
  917. package/dist/memory/prompt.js +0 -1
  918. package/dist/memory/stores/entity/base.cjs +1 -2
  919. package/dist/memory/stores/entity/base.d.cts +0 -2
  920. package/dist/memory/stores/entity/base.d.cts.map +1 -1
  921. package/dist/memory/stores/entity/base.d.ts +0 -2
  922. package/dist/memory/stores/entity/base.d.ts.map +1 -1
  923. package/dist/memory/stores/entity/base.js +1 -2
  924. package/dist/memory/stores/entity/in_memory.cjs +1 -2
  925. package/dist/memory/stores/entity/in_memory.js +1 -2
  926. package/dist/memory/summary.cjs +1 -2
  927. package/dist/memory/summary.d.cts +0 -2
  928. package/dist/memory/summary.d.cts.map +1 -1
  929. package/dist/memory/summary.d.ts +0 -2
  930. package/dist/memory/summary.d.ts.map +1 -1
  931. package/dist/memory/summary.js +1 -2
  932. package/dist/memory/summary_buffer.cjs +1 -2
  933. package/dist/memory/summary_buffer.d.cts +0 -2
  934. package/dist/memory/summary_buffer.d.cts.map +1 -1
  935. package/dist/memory/summary_buffer.d.ts +0 -2
  936. package/dist/memory/summary_buffer.d.ts.map +1 -1
  937. package/dist/memory/summary_buffer.js +1 -2
  938. package/dist/memory/vector_store.cjs +1 -2
  939. package/dist/memory/vector_store.d.cts +1 -2
  940. package/dist/memory/vector_store.d.cts.map +1 -1
  941. package/dist/memory/vector_store.d.ts +1 -2
  942. package/dist/memory/vector_store.d.ts.map +1 -1
  943. package/dist/memory/vector_store.js +1 -2
  944. package/dist/output_parsers/combining.cjs +1 -2
  945. package/dist/output_parsers/combining.d.cts +0 -2
  946. package/dist/output_parsers/combining.d.cts.map +1 -1
  947. package/dist/output_parsers/combining.d.ts +0 -2
  948. package/dist/output_parsers/combining.d.ts.map +1 -1
  949. package/dist/output_parsers/combining.js +1 -2
  950. package/dist/output_parsers/datetime.cjs +1 -2
  951. package/dist/output_parsers/datetime.d.cts +0 -2
  952. package/dist/output_parsers/datetime.d.cts.map +1 -1
  953. package/dist/output_parsers/datetime.d.ts +0 -2
  954. package/dist/output_parsers/datetime.d.ts.map +1 -1
  955. package/dist/output_parsers/datetime.js +1 -2
  956. package/dist/output_parsers/expression.cjs +2 -3
  957. package/dist/output_parsers/expression.d.cts +0 -2
  958. package/dist/output_parsers/expression.d.cts.map +1 -1
  959. package/dist/output_parsers/expression.d.ts +0 -2
  960. package/dist/output_parsers/expression.d.ts.map +1 -1
  961. package/dist/output_parsers/expression.js +2 -3
  962. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs +1 -2
  963. package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js +1 -2
  964. package/dist/output_parsers/expression_type_handlers/base.cjs +1 -2
  965. package/dist/output_parsers/expression_type_handlers/base.d.cts +0 -2
  966. package/dist/output_parsers/expression_type_handlers/base.d.cts.map +1 -1
  967. package/dist/output_parsers/expression_type_handlers/base.d.ts +0 -2
  968. package/dist/output_parsers/expression_type_handlers/base.d.ts.map +1 -1
  969. package/dist/output_parsers/expression_type_handlers/base.js +1 -2
  970. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs +1 -2
  971. package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js +1 -2
  972. package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs +1 -2
  973. package/dist/output_parsers/expression_type_handlers/call_expression_handler.js +1 -2
  974. package/dist/output_parsers/expression_type_handlers/factory.cjs +2 -3
  975. package/dist/output_parsers/expression_type_handlers/factory.d.cts +1 -3
  976. package/dist/output_parsers/expression_type_handlers/factory.d.cts.map +1 -1
  977. package/dist/output_parsers/expression_type_handlers/factory.d.ts +1 -3
  978. package/dist/output_parsers/expression_type_handlers/factory.d.ts.map +1 -1
  979. package/dist/output_parsers/expression_type_handlers/factory.js +2 -3
  980. package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs +1 -2
  981. package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js +1 -2
  982. package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs +1 -2
  983. package/dist/output_parsers/expression_type_handlers/identifier_handler.js +1 -2
  984. package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs +1 -2
  985. package/dist/output_parsers/expression_type_handlers/member_expression_handler.js +1 -2
  986. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs +1 -2
  987. package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js +1 -2
  988. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs +1 -2
  989. package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js +1 -2
  990. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs +1 -2
  991. package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js +1 -2
  992. package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs +1 -2
  993. package/dist/output_parsers/expression_type_handlers/string_literal_handler.js +1 -2
  994. package/dist/output_parsers/expression_type_handlers/types.d.cts +0 -2
  995. package/dist/output_parsers/expression_type_handlers/types.d.cts.map +1 -1
  996. package/dist/output_parsers/expression_type_handlers/types.d.ts +0 -2
  997. package/dist/output_parsers/expression_type_handlers/types.d.ts.map +1 -1
  998. package/dist/output_parsers/fix.cjs +1 -2
  999. package/dist/output_parsers/fix.d.cts +1 -2
  1000. package/dist/output_parsers/fix.d.cts.map +1 -1
  1001. package/dist/output_parsers/fix.d.ts +1 -2
  1002. package/dist/output_parsers/fix.d.ts.map +1 -1
  1003. package/dist/output_parsers/fix.js +1 -2
  1004. package/dist/output_parsers/http_response.cjs +1 -2
  1005. package/dist/output_parsers/http_response.d.cts +0 -2
  1006. package/dist/output_parsers/http_response.d.cts.map +1 -1
  1007. package/dist/output_parsers/http_response.d.ts +0 -2
  1008. package/dist/output_parsers/http_response.d.ts.map +1 -1
  1009. package/dist/output_parsers/http_response.js +1 -2
  1010. package/dist/output_parsers/index.cjs +4 -5
  1011. package/dist/output_parsers/index.d.cts +3 -3
  1012. package/dist/output_parsers/index.d.ts +3 -3
  1013. package/dist/output_parsers/index.js +4 -5
  1014. package/dist/output_parsers/noop.cjs +1 -2
  1015. package/dist/output_parsers/noop.js +1 -2
  1016. package/dist/output_parsers/openai_functions.cjs +1 -2
  1017. package/dist/output_parsers/openai_functions.d.cts +0 -2
  1018. package/dist/output_parsers/openai_functions.d.cts.map +1 -1
  1019. package/dist/output_parsers/openai_functions.d.ts +0 -2
  1020. package/dist/output_parsers/openai_functions.d.ts.map +1 -1
  1021. package/dist/output_parsers/openai_functions.js +1 -2
  1022. package/dist/output_parsers/openai_tools.cjs +1 -2
  1023. package/dist/output_parsers/openai_tools.d.cts +0 -2
  1024. package/dist/output_parsers/openai_tools.d.cts.map +1 -1
  1025. package/dist/output_parsers/openai_tools.d.ts +0 -2
  1026. package/dist/output_parsers/openai_tools.d.ts.map +1 -1
  1027. package/dist/output_parsers/openai_tools.js +1 -2
  1028. package/dist/output_parsers/prompts.cjs +1 -2
  1029. package/dist/output_parsers/prompts.js +1 -2
  1030. package/dist/output_parsers/regex.cjs +1 -2
  1031. package/dist/output_parsers/regex.d.cts +0 -2
  1032. package/dist/output_parsers/regex.d.cts.map +1 -1
  1033. package/dist/output_parsers/regex.d.ts +0 -2
  1034. package/dist/output_parsers/regex.d.ts.map +1 -1
  1035. package/dist/output_parsers/regex.js +1 -2
  1036. package/dist/output_parsers/router.cjs +1 -2
  1037. package/dist/output_parsers/router.d.cts +0 -2
  1038. package/dist/output_parsers/router.d.cts.map +1 -1
  1039. package/dist/output_parsers/router.d.ts +0 -2
  1040. package/dist/output_parsers/router.d.ts.map +1 -1
  1041. package/dist/output_parsers/router.js +1 -2
  1042. package/dist/output_parsers/structured.cjs +1 -2
  1043. package/dist/output_parsers/structured.d.cts +0 -2
  1044. package/dist/output_parsers/structured.d.cts.map +1 -1
  1045. package/dist/output_parsers/structured.d.ts +0 -2
  1046. package/dist/output_parsers/structured.d.ts.map +1 -1
  1047. package/dist/output_parsers/structured.js +1 -2
  1048. package/dist/retrievers/contextual_compression.cjs +1 -2
  1049. package/dist/retrievers/contextual_compression.d.cts +0 -2
  1050. package/dist/retrievers/contextual_compression.d.cts.map +1 -1
  1051. package/dist/retrievers/contextual_compression.d.ts +0 -2
  1052. package/dist/retrievers/contextual_compression.d.ts.map +1 -1
  1053. package/dist/retrievers/contextual_compression.js +1 -2
  1054. package/dist/retrievers/document_compressors/chain_extract.cjs +1 -2
  1055. package/dist/retrievers/document_compressors/chain_extract.d.cts +0 -2
  1056. package/dist/retrievers/document_compressors/chain_extract.d.cts.map +1 -1
  1057. package/dist/retrievers/document_compressors/chain_extract.d.ts +0 -2
  1058. package/dist/retrievers/document_compressors/chain_extract.d.ts.map +1 -1
  1059. package/dist/retrievers/document_compressors/chain_extract.js +1 -2
  1060. package/dist/retrievers/document_compressors/chain_extract_prompt.cjs +1 -2
  1061. package/dist/retrievers/document_compressors/chain_extract_prompt.js +1 -2
  1062. package/dist/retrievers/document_compressors/embeddings_filter.cjs +1 -2
  1063. package/dist/retrievers/document_compressors/embeddings_filter.d.cts +0 -2
  1064. package/dist/retrievers/document_compressors/embeddings_filter.d.cts.map +1 -1
  1065. package/dist/retrievers/document_compressors/embeddings_filter.d.ts +0 -2
  1066. package/dist/retrievers/document_compressors/embeddings_filter.d.ts.map +1 -1
  1067. package/dist/retrievers/document_compressors/embeddings_filter.js +1 -2
  1068. package/dist/retrievers/document_compressors/index.cjs +1 -2
  1069. package/dist/retrievers/document_compressors/index.d.cts +0 -2
  1070. package/dist/retrievers/document_compressors/index.d.cts.map +1 -1
  1071. package/dist/retrievers/document_compressors/index.d.ts +0 -2
  1072. package/dist/retrievers/document_compressors/index.d.ts.map +1 -1
  1073. package/dist/retrievers/document_compressors/index.js +1 -2
  1074. package/dist/retrievers/ensemble.cjs +1 -2
  1075. package/dist/retrievers/ensemble.d.cts +0 -2
  1076. package/dist/retrievers/ensemble.d.cts.map +1 -1
  1077. package/dist/retrievers/ensemble.d.ts +0 -2
  1078. package/dist/retrievers/ensemble.d.ts.map +1 -1
  1079. package/dist/retrievers/ensemble.js +1 -2
  1080. package/dist/retrievers/hyde.cjs +1 -2
  1081. package/dist/retrievers/hyde.d.cts +0 -2
  1082. package/dist/retrievers/hyde.d.cts.map +1 -1
  1083. package/dist/retrievers/hyde.d.ts +0 -2
  1084. package/dist/retrievers/hyde.d.ts.map +1 -1
  1085. package/dist/retrievers/hyde.js +1 -2
  1086. package/dist/retrievers/matryoshka_retriever.cjs +1 -2
  1087. package/dist/retrievers/matryoshka_retriever.d.cts +1 -2
  1088. package/dist/retrievers/matryoshka_retriever.d.cts.map +1 -1
  1089. package/dist/retrievers/matryoshka_retriever.d.ts +1 -2
  1090. package/dist/retrievers/matryoshka_retriever.d.ts.map +1 -1
  1091. package/dist/retrievers/matryoshka_retriever.js +1 -2
  1092. package/dist/retrievers/multi_query.cjs +1 -2
  1093. package/dist/retrievers/multi_query.d.cts +1 -2
  1094. package/dist/retrievers/multi_query.d.cts.map +1 -1
  1095. package/dist/retrievers/multi_query.d.ts +1 -2
  1096. package/dist/retrievers/multi_query.d.ts.map +1 -1
  1097. package/dist/retrievers/multi_query.js +1 -2
  1098. package/dist/retrievers/multi_vector.cjs +1 -2
  1099. package/dist/retrievers/multi_vector.d.cts +0 -2
  1100. package/dist/retrievers/multi_vector.d.cts.map +1 -1
  1101. package/dist/retrievers/multi_vector.d.ts +0 -2
  1102. package/dist/retrievers/multi_vector.d.ts.map +1 -1
  1103. package/dist/retrievers/multi_vector.js +1 -2
  1104. package/dist/retrievers/parent_document.cjs +1 -2
  1105. package/dist/retrievers/parent_document.d.cts +0 -2
  1106. package/dist/retrievers/parent_document.d.cts.map +1 -1
  1107. package/dist/retrievers/parent_document.d.ts +0 -2
  1108. package/dist/retrievers/parent_document.d.ts.map +1 -1
  1109. package/dist/retrievers/parent_document.js +1 -2
  1110. package/dist/retrievers/score_threshold.cjs +1 -2
  1111. package/dist/retrievers/score_threshold.d.cts +0 -2
  1112. package/dist/retrievers/score_threshold.d.cts.map +1 -1
  1113. package/dist/retrievers/score_threshold.d.ts +0 -2
  1114. package/dist/retrievers/score_threshold.d.ts.map +1 -1
  1115. package/dist/retrievers/score_threshold.js +1 -2
  1116. package/dist/retrievers/self_query/functional.cjs +1 -2
  1117. package/dist/retrievers/self_query/functional.js +1 -2
  1118. package/dist/retrievers/self_query/index.cjs +1 -2
  1119. package/dist/retrievers/self_query/index.d.cts +0 -2
  1120. package/dist/retrievers/self_query/index.d.cts.map +1 -1
  1121. package/dist/retrievers/self_query/index.d.ts +0 -2
  1122. package/dist/retrievers/self_query/index.d.ts.map +1 -1
  1123. package/dist/retrievers/self_query/index.js +1 -2
  1124. package/dist/retrievers/time_weighted.cjs +1 -2
  1125. package/dist/retrievers/time_weighted.d.cts +0 -2
  1126. package/dist/retrievers/time_weighted.d.cts.map +1 -1
  1127. package/dist/retrievers/time_weighted.d.ts +0 -2
  1128. package/dist/retrievers/time_weighted.d.ts.map +1 -1
  1129. package/dist/retrievers/time_weighted.js +1 -2
  1130. package/dist/schema/prompt_template.cjs +1 -2
  1131. package/dist/schema/prompt_template.d.cts +0 -2
  1132. package/dist/schema/prompt_template.d.cts.map +1 -1
  1133. package/dist/schema/prompt_template.d.ts +0 -2
  1134. package/dist/schema/prompt_template.d.ts.map +1 -1
  1135. package/dist/schema/prompt_template.js +1 -2
  1136. package/dist/schema/query_constructor.cjs +1 -2
  1137. package/dist/schema/query_constructor.d.cts +0 -2
  1138. package/dist/schema/query_constructor.d.cts.map +1 -1
  1139. package/dist/schema/query_constructor.d.ts +0 -2
  1140. package/dist/schema/query_constructor.d.ts.map +1 -1
  1141. package/dist/schema/query_constructor.js +1 -2
  1142. package/dist/smith/config.cjs +1 -2
  1143. package/dist/smith/config.d.cts +2 -4
  1144. package/dist/smith/config.d.cts.map +1 -1
  1145. package/dist/smith/config.d.ts +2 -4
  1146. package/dist/smith/config.d.ts.map +1 -1
  1147. package/dist/smith/config.js +1 -2
  1148. package/dist/smith/index.cjs +2 -3
  1149. package/dist/smith/index.d.cts +1 -1
  1150. package/dist/smith/index.d.ts +1 -1
  1151. package/dist/smith/index.js +2 -3
  1152. package/dist/smith/name_generation.cjs +1 -2
  1153. package/dist/smith/name_generation.js +1 -2
  1154. package/dist/smith/progress.cjs +1 -2
  1155. package/dist/smith/progress.js +1 -2
  1156. package/dist/smith/runner_utils.cjs +1 -2
  1157. package/dist/smith/runner_utils.d.cts +1 -2
  1158. package/dist/smith/runner_utils.d.cts.map +1 -1
  1159. package/dist/smith/runner_utils.d.ts +1 -2
  1160. package/dist/smith/runner_utils.d.ts.map +1 -1
  1161. package/dist/smith/runner_utils.js +1 -2
  1162. package/dist/sql_db.cjs +1 -2
  1163. package/dist/sql_db.d.cts +0 -2
  1164. package/dist/sql_db.d.cts.map +1 -1
  1165. package/dist/sql_db.d.ts +0 -2
  1166. package/dist/sql_db.d.ts.map +1 -1
  1167. package/dist/sql_db.js +1 -2
  1168. package/dist/storage/encoder_backed.cjs +1 -2
  1169. package/dist/storage/encoder_backed.d.cts +0 -2
  1170. package/dist/storage/encoder_backed.d.cts.map +1 -1
  1171. package/dist/storage/encoder_backed.d.ts +0 -2
  1172. package/dist/storage/encoder_backed.d.ts.map +1 -1
  1173. package/dist/storage/encoder_backed.js +1 -2
  1174. package/dist/storage/file_system.cjs +1 -2
  1175. package/dist/storage/file_system.d.cts +0 -2
  1176. package/dist/storage/file_system.d.cts.map +1 -1
  1177. package/dist/storage/file_system.d.ts +0 -2
  1178. package/dist/storage/file_system.d.ts.map +1 -1
  1179. package/dist/storage/file_system.js +1 -2
  1180. package/dist/storage/in_memory.cjs +1 -2
  1181. package/dist/storage/in_memory.js +1 -2
  1182. package/dist/stores/doc/base.cjs +1 -2
  1183. package/dist/stores/doc/base.d.cts +0 -2
  1184. package/dist/stores/doc/base.d.cts.map +1 -1
  1185. package/dist/stores/doc/base.d.ts +0 -2
  1186. package/dist/stores/doc/base.d.ts.map +1 -1
  1187. package/dist/stores/doc/base.js +1 -2
  1188. package/dist/stores/doc/in_memory.cjs +1 -2
  1189. package/dist/stores/doc/in_memory.d.cts +0 -2
  1190. package/dist/stores/doc/in_memory.d.cts.map +1 -1
  1191. package/dist/stores/doc/in_memory.d.ts +0 -2
  1192. package/dist/stores/doc/in_memory.d.ts.map +1 -1
  1193. package/dist/stores/doc/in_memory.js +1 -2
  1194. package/dist/stores/file/base.cjs +1 -2
  1195. package/dist/stores/file/base.d.cts +0 -2
  1196. package/dist/stores/file/base.d.cts.map +1 -1
  1197. package/dist/stores/file/base.d.ts +0 -2
  1198. package/dist/stores/file/base.d.ts.map +1 -1
  1199. package/dist/stores/file/base.js +1 -2
  1200. package/dist/stores/file/in_memory.cjs +1 -2
  1201. package/dist/stores/file/in_memory.d.cts +0 -2
  1202. package/dist/stores/file/in_memory.d.cts.map +1 -1
  1203. package/dist/stores/file/in_memory.d.ts +0 -2
  1204. package/dist/stores/file/in_memory.d.ts.map +1 -1
  1205. package/dist/stores/file/in_memory.js +1 -2
  1206. package/dist/stores/file/node.cjs +1 -2
  1207. package/dist/stores/file/node.d.cts +0 -2
  1208. package/dist/stores/file/node.d.cts.map +1 -1
  1209. package/dist/stores/file/node.d.ts +0 -2
  1210. package/dist/stores/file/node.d.ts.map +1 -1
  1211. package/dist/stores/file/node.js +1 -2
  1212. package/dist/stores/message/in_memory.cjs +1 -2
  1213. package/dist/stores/message/in_memory.js +1 -2
  1214. package/dist/text_splitter.cjs +1 -2
  1215. package/dist/text_splitter.d.cts +0 -1
  1216. package/dist/text_splitter.d.ts +0 -1
  1217. package/dist/text_splitter.js +1 -2
  1218. package/dist/tools/chain.cjs +1 -2
  1219. package/dist/tools/chain.d.cts +0 -2
  1220. package/dist/tools/chain.d.cts.map +1 -1
  1221. package/dist/tools/chain.d.ts +0 -2
  1222. package/dist/tools/chain.d.ts.map +1 -1
  1223. package/dist/tools/chain.js +1 -2
  1224. package/dist/tools/fs.cjs +1 -2
  1225. package/dist/tools/fs.d.cts +1 -2
  1226. package/dist/tools/fs.d.cts.map +1 -1
  1227. package/dist/tools/fs.d.ts +1 -2
  1228. package/dist/tools/fs.d.ts.map +1 -1
  1229. package/dist/tools/fs.js +1 -2
  1230. package/dist/tools/index.cjs +2 -3
  1231. package/dist/tools/index.d.cts +1 -1
  1232. package/dist/tools/index.d.ts +1 -1
  1233. package/dist/tools/index.js +2 -3
  1234. package/dist/tools/json.cjs +1 -2
  1235. package/dist/tools/json.d.cts +0 -2
  1236. package/dist/tools/json.d.cts.map +1 -1
  1237. package/dist/tools/json.d.ts +0 -2
  1238. package/dist/tools/json.d.ts.map +1 -1
  1239. package/dist/tools/json.js +1 -2
  1240. package/dist/tools/render.cjs +1 -2
  1241. package/dist/tools/render.d.cts +0 -2
  1242. package/dist/tools/render.d.cts.map +1 -1
  1243. package/dist/tools/render.d.ts +0 -2
  1244. package/dist/tools/render.d.ts.map +1 -1
  1245. package/dist/tools/render.js +1 -2
  1246. package/dist/tools/requests.cjs +1 -2
  1247. package/dist/tools/requests.d.cts +0 -2
  1248. package/dist/tools/requests.d.cts.map +1 -1
  1249. package/dist/tools/requests.d.ts +0 -2
  1250. package/dist/tools/requests.d.ts.map +1 -1
  1251. package/dist/tools/requests.js +1 -2
  1252. package/dist/tools/retriever.cjs +1 -2
  1253. package/dist/tools/retriever.d.cts +0 -2
  1254. package/dist/tools/retriever.d.cts.map +1 -1
  1255. package/dist/tools/retriever.d.ts +0 -2
  1256. package/dist/tools/retriever.d.ts.map +1 -1
  1257. package/dist/tools/retriever.js +1 -2
  1258. package/dist/tools/sql.cjs +1 -2
  1259. package/dist/tools/sql.d.cts +1 -2
  1260. package/dist/tools/sql.d.cts.map +1 -1
  1261. package/dist/tools/sql.d.ts +1 -2
  1262. package/dist/tools/sql.d.ts.map +1 -1
  1263. package/dist/tools/sql.js +1 -2
  1264. package/dist/tools/vectorstore.cjs +1 -2
  1265. package/dist/tools/vectorstore.d.cts +1 -2
  1266. package/dist/tools/vectorstore.d.cts.map +1 -1
  1267. package/dist/tools/vectorstore.d.ts +1 -2
  1268. package/dist/tools/vectorstore.d.ts.map +1 -1
  1269. package/dist/tools/vectorstore.js +1 -2
  1270. package/dist/tools/webbrowser.cjs +2 -3
  1271. package/dist/tools/webbrowser.d.cts +1 -2
  1272. package/dist/tools/webbrowser.d.cts.map +1 -1
  1273. package/dist/tools/webbrowser.d.ts +1 -2
  1274. package/dist/tools/webbrowser.d.ts.map +1 -1
  1275. package/dist/tools/webbrowser.js +2 -3
  1276. package/dist/types/expression-parser.d.cts +0 -2
  1277. package/dist/types/expression-parser.d.cts.map +1 -1
  1278. package/dist/types/expression-parser.d.ts +0 -2
  1279. package/dist/types/expression-parser.d.ts.map +1 -1
  1280. package/dist/types/type-utils.d.cts +0 -2
  1281. package/dist/types/type-utils.d.cts.map +1 -1
  1282. package/dist/types/type-utils.d.ts +0 -2
  1283. package/dist/types/type-utils.d.ts.map +1 -1
  1284. package/dist/util/document.cjs +1 -2
  1285. package/dist/util/document.d.cts +0 -2
  1286. package/dist/util/document.d.cts.map +1 -1
  1287. package/dist/util/document.d.ts +0 -2
  1288. package/dist/util/document.d.ts.map +1 -1
  1289. package/dist/util/document.js +1 -2
  1290. package/dist/util/extname.cjs +1 -2
  1291. package/dist/util/extname.js +1 -2
  1292. package/dist/util/hub.cjs +1 -2
  1293. package/dist/util/hub.js +1 -2
  1294. package/dist/util/is-network-error/index.cjs +1 -2
  1295. package/dist/util/is-network-error/index.js +1 -2
  1296. package/dist/util/load.cjs +1 -2
  1297. package/dist/util/load.d.cts +0 -2
  1298. package/dist/util/load.d.cts.map +1 -1
  1299. package/dist/util/load.d.ts +0 -2
  1300. package/dist/util/load.d.ts.map +1 -1
  1301. package/dist/util/load.js +1 -2
  1302. package/dist/util/math.cjs +1 -2
  1303. package/dist/util/math.js +1 -2
  1304. package/dist/util/ml-distance/distances.cjs +1 -2
  1305. package/dist/util/ml-distance/distances.js +1 -2
  1306. package/dist/util/ml-distance/similarities.cjs +1 -2
  1307. package/dist/util/ml-distance/similarities.d.cts +0 -2
  1308. package/dist/util/ml-distance/similarities.d.cts.map +1 -1
  1309. package/dist/util/ml-distance/similarities.d.ts +0 -2
  1310. package/dist/util/ml-distance/similarities.d.ts.map +1 -1
  1311. package/dist/util/ml-distance/similarities.js +1 -2
  1312. package/dist/util/ml-distance-euclidean/euclidean.cjs +1 -2
  1313. package/dist/util/ml-distance-euclidean/euclidean.js +1 -2
  1314. package/dist/util/openapi.cjs +1 -2
  1315. package/dist/util/openapi.d.cts +0 -2
  1316. package/dist/util/openapi.d.cts.map +1 -1
  1317. package/dist/util/openapi.d.ts +0 -2
  1318. package/dist/util/openapi.d.ts.map +1 -1
  1319. package/dist/util/openapi.js +1 -2
  1320. package/dist/util/p-retry/index.cjs +1 -2
  1321. package/dist/util/p-retry/index.js +1 -2
  1322. package/dist/util/parse.cjs +1 -2
  1323. package/dist/util/parse.js +1 -2
  1324. package/dist/util/set.cjs +1 -2
  1325. package/dist/util/set.js +1 -2
  1326. package/dist/util/sql_utils.cjs +1 -2
  1327. package/dist/util/sql_utils.d.cts +0 -2
  1328. package/dist/util/sql_utils.d.cts.map +1 -1
  1329. package/dist/util/sql_utils.d.ts +0 -2
  1330. package/dist/util/sql_utils.d.ts.map +1 -1
  1331. package/dist/util/sql_utils.js +1 -2
  1332. package/dist/util/time.cjs +1 -2
  1333. package/dist/util/time.d.cts +0 -2
  1334. package/dist/util/time.d.cts.map +1 -1
  1335. package/dist/util/time.d.ts +0 -2
  1336. package/dist/util/time.d.ts.map +1 -1
  1337. package/dist/util/time.js +1 -2
  1338. package/dist/vectorstores/memory.cjs +1 -2
  1339. package/dist/vectorstores/memory.d.cts +1 -2
  1340. package/dist/vectorstores/memory.d.cts.map +1 -1
  1341. package/dist/vectorstores/memory.d.ts +1 -2
  1342. package/dist/vectorstores/memory.d.ts.map +1 -1
  1343. package/dist/vectorstores/memory.js +1 -2
  1344. package/package.json +43 -43
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @langchain/classic
2
2
 
3
+ ## 1.0.58
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`0c268f5`](https://github.com/langchain-ai/langchainjs/commit/0c268f53cadcddf6884162ed608333224c05868d), [`8103487`](https://github.com/langchain-ai/langchainjs/commit/8103487c55784c5befd84c1bc803546f720f806e)]:
8
+ - @langchain/openai@1.8.1
9
+
10
+ ## 1.0.57
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`b5135cc`](https://github.com/langchain-ai/langchainjs/commit/b5135cc189adbf313f4e92c1527f96a40a546977)]:
15
+ - @langchain/openai@1.8.0
16
+
3
17
  ## 1.0.56
4
18
 
5
19
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- //#region \0rolldown/runtime.js
1
+ // \0rolldown/runtime.js
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -29,7 +29,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  value: mod,
30
30
  enumerable: true
31
31
  }) : target, mod));
32
- //#endregion
33
32
  exports.__exportAll = __exportAll;
34
33
  exports.__reExport = __reExport;
35
34
  exports.__toESM = __toESM;
@@ -1,4 +1,4 @@
1
- //#region \0rolldown/runtime.js
1
+ // \0rolldown/runtime.js
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -23,5 +23,4 @@ var __copyProps = (to, from, except, desc) => {
23
23
  return to;
24
24
  };
25
25
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
26
- //#endregion
27
26
  export { __exportAll, __reExport };
@@ -1,6 +1,6 @@
1
1
  let _langchain_core_load_serializable = require("@langchain/core/load/serializable");
2
2
  let _langchain_core_runnables = require("@langchain/core/runnables");
3
- //#region src/agents/agent.ts
3
+ // src/agents/agent.ts
4
4
  /**
5
5
  * Error class for parse errors in LangChain. Contains information about
6
6
  * the error message and the output that caused the error.
@@ -372,7 +372,6 @@ var Agent = class extends BaseSingleActionAgent {
372
372
  }
373
373
  }
374
374
  };
375
- //#endregion
376
375
  exports.Agent = Agent;
377
376
  exports.AgentRunnableSequence = AgentRunnableSequence;
378
377
  exports.BaseAgent = BaseAgent;
@@ -9,7 +9,6 @@ import { BaseLanguageModelInterface } from "@langchain/core/language_models/base
9
9
  import { CallbackManager, Callbacks } from "@langchain/core/callbacks/manager";
10
10
  import { StructuredToolInterface, ToolInterface } from "@langchain/core/tools";
11
11
  import { Serializable } from "@langchain/core/load/serializable";
12
- //#region src/agents/agent.d.ts
13
12
  /**
14
13
  * Record type for arguments passed to output parsers.
15
14
  */
@@ -247,5 +246,4 @@ export declare abstract class Agent extends BaseSingleActionAgent {
247
246
  tools?: ToolInterface[];
248
247
  }): Promise<Agent>;
249
248
  }
250
- //#endregion
251
249
  //# sourceMappingURL=agent.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.cts","names":[],"sources":["../../src/agents/agent.ts"],"mappings":";;;;;;;;;;;;;;;YAgCY,mBAAmB;;;;;8BAmBT,kBAAkB;EAC9B,UAAU;eAEL;MAET;MAIA;;;;EAOJ;;;;WAOS;;;;EAKT,sBACE,qBAAqB,gBACrB,QAAQ,aACR,SAAS,aACT,mBAAmB,kBAClB,QAAQ;;;;EAcL,iBACJ,eAAe,6BACf,QAAQ,cACP,QAAQ;;;;;;;8BAUS,8BAA8B;EAClD;;;;;;;;;;WAaS,KACP,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,cAAc;;;;;;;8BAQL,6BAA6B;EACjD;;;;;;;;;;WAaS,KACP,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,gBAAgB;;qBAiBhB,sBAEX,gBAEA,yBACQ,iBAAiB,UAAU;EACnC;EAEA;SAGO,cAAc,gBAAgB,kBAClC,UAAU,aACT,aAAa,cACV,gBAEH,kBAAkB,aAEpB;IAAU;IAAuB;IAA0B;MAC1D,sBAAsB,UAAU,QAAQ,WAAW;SAU/C,wBAAwB,GAAG,WAAW,KAAK;;;;;;;qBA2FvC,iCAAiC;EAC5C;EAGA,UAAU,SACR;IAAgB,OAAO;KACvB,gBAAgB,cAAc;EAGhC;EAEA;EAEA;MAEI;EAIJ,YAAY,QAAQ;EASd,KACJ,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,gBAAgB;;qBA2ChB,sBAAsB;;;;iBAKlB;EACf,UAAU;EACV,cAAc;EACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCW,6BAA6B;EACxC;EAEA,UAAU;EAEV,cAAc;EAEd;EAEA,YAAY,OAAO;MAOf;;;;;;;;;;EAaE,KACJ,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ,cAAc;;;;;iBAmBV;EACf,eAAe;EAEf,YAAY;;;;EAKZ,kBAAkB;;;;;;;;;8BAUE,cAAc;EAClC,UAAU;EAEV,cAAc;UAEN;MAEJ;MAIA;EAIJ,YAAY,OAAO;;;;WAWV;;;;WAKA;;;;WAKA;;;;SAKF,uBACL,UAAU,mBACT;;;;;;;;;SAYI,aACL,QAAQ,2BAER,UAAU,sBACT;;SAKI,gBACL,MAAM,4BACN,QAAQ,2BAER,QAAQ,YACP;;;;SAOI,cAAc,QAAQ;EAE7B;;;;EAOA;;;;EAOM,oBACJ,OAAO,cACN,iBAAiB;UAaN;;;;;;;;;;EAgCd,KACE,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ,cAAc;;;;EAOnB,sBACJ,qBAAqB,gBACrB,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ;;;;SAqCE,YACX,MAAM;IACJ,MAAM;IACN,QAAQ;MAET,QAAQ"}
1
+ {"version":3,"file":"agent.d.cts","names":[],"sources":["../../src/agents/agent.ts"],"mappings":";;;;;;;;;;;;;;YAgCY,mBAAmB;;;;;8BAmBT,kBAAkB;EAC9B,UAAU;eAEL;MAET;MAIA;;;;EAOJ;;;;WAOS;;;;EAKT,sBACE,qBAAqB,gBACrB,QAAQ,aACR,SAAS,aACT,mBAAmB,kBAClB,QAAQ;;;;EAcL,iBACJ,eAAe,6BACf,QAAQ,cACP,QAAQ;;;;;;;8BAUS,8BAA8B;EAClD;;;;;;;;;;WAaS,KACP,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,cAAc;;;;;;;8BAQL,6BAA6B;EACjD;;;;;;;;;;WAaS,KACP,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,gBAAgB;;qBAiBhB,sBAEX,gBAEA,yBACQ,iBAAiB,UAAU;EACnC;EAEA;SAGO,cAAc,gBAAgB,kBAClC,UAAU,aACT,aAAa,cACV,gBAEH,kBAAkB,aAEpB;IAAU;IAAuB;IAA0B;MAC1D,sBAAsB,UAAU,QAAQ,WAAW;SAU/C,wBAAwB,GAAG,WAAW,KAAK;;;;;;;qBA2FvC,iCAAiC;EAC5C;EAGA,UAAU,SACR;IAAgB,OAAO;KACvB,gBAAgB,cAAc;EAGhC;EAEA;EAEA;MAEI;EAIJ,YAAY,QAAQ;EASd,KACJ,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,gBAAgB;;qBA2ChB,sBAAsB;;;;iBAKlB;EACf,UAAU;EACV,cAAc;EACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCW,6BAA6B;EACxC;EAEA,UAAU;EAEV,cAAc;EAEd;EAEA,YAAY,OAAO;MAOf;;;;;;;;;;EAaE,KACJ,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ,cAAc;;;;;iBAmBV;EACf,eAAe;EAEf,YAAY;;;;EAKZ,kBAAkB;;;;;;;;;8BAUE,cAAc;EAClC,UAAU;EAEV,cAAc;UAEN;MAEJ;MAIA;EAIJ,YAAY,OAAO;;;;WAWV;;;;WAKA;;;;WAKA;;;;SAKF,uBACL,UAAU,mBACT;;;;;;;;;SAYI,aACL,QAAQ,2BAER,UAAU,sBACT;;SAKI,gBACL,MAAM,4BACN,QAAQ,2BAER,QAAQ,YACP;;;;SAOI,cAAc,QAAQ;EAE7B;;;;EAOA;;;;EAOM,oBACJ,OAAO,cACN,iBAAiB;UAaN;;;;;;;;;;EAgCd,KACE,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ,cAAc;;;;EAOnB,sBACJ,qBAAqB,gBACrB,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ;;;;SAqCE,YACX,MAAM;IACJ,MAAM;IACN,QAAQ;MAET,QAAQ"}
@@ -9,7 +9,6 @@ import { BaseLanguageModelInterface } from "@langchain/core/language_models/base
9
9
  import { CallbackManager, Callbacks } from "@langchain/core/callbacks/manager";
10
10
  import { ChainValues } from "@langchain/core/utils/types";
11
11
  import { AgentAction, AgentFinish, AgentStep } from "@langchain/core/agents";
12
- //#region src/agents/agent.d.ts
13
12
  /**
14
13
  * Record type for arguments passed to output parsers.
15
14
  */
@@ -247,5 +246,4 @@ export declare abstract class Agent extends BaseSingleActionAgent {
247
246
  tools?: ToolInterface[];
248
247
  }): Promise<Agent>;
249
248
  }
250
- //#endregion
251
249
  //# sourceMappingURL=agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","names":[],"sources":["../../src/agents/agent.ts"],"mappings":";;;;;;;;;;;;;;;YAgCY,mBAAmB;;;;;8BAmBT,kBAAkB;EAC9B,UAAU;eAEL;MAET;MAIA;;;;EAOJ;;;;WAOS;;;;EAKT,sBACE,qBAAqB,gBACrB,QAAQ,aACR,SAAS,aACT,mBAAmB,kBAClB,QAAQ;;;;EAcL,iBACJ,eAAe,6BACf,QAAQ,cACP,QAAQ;;;;;;;8BAUS,8BAA8B;EAClD;;;;;;;;;;WAaS,KACP,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,cAAc;;;;;;;8BAQL,6BAA6B;EACjD;;;;;;;;;;WAaS,KACP,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,gBAAgB;;qBAiBhB,sBAEX,gBAEA,yBACQ,iBAAiB,UAAU;EACnC;EAEA;SAGO,cAAc,gBAAgB,kBAClC,UAAU,aACT,aAAa,cACV,gBAEH,kBAAkB,aAEpB;IAAU;IAAuB;IAA0B;MAC1D,sBAAsB,UAAU,QAAQ,WAAW;SAU/C,wBAAwB,GAAG,WAAW,KAAK;;;;;;;qBA2FvC,iCAAiC;EAC5C;EAGA,UAAU,SACR;IAAgB,OAAO;KACvB,gBAAgB,cAAc;EAGhC;EAEA;EAEA;MAEI;EAIJ,YAAY,QAAQ;EASd,KACJ,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,gBAAgB;;qBA2ChB,sBAAsB;;;;iBAKlB;EACf,UAAU;EACV,cAAc;EACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCW,6BAA6B;EACxC;EAEA,UAAU;EAEV,cAAc;EAEd;EAEA,YAAY,OAAO;MAOf;;;;;;;;;;EAaE,KACJ,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ,cAAc;;;;;iBAmBV;EACf,eAAe;EAEf,YAAY;;;;EAKZ,kBAAkB;;;;;;;;;8BAUE,cAAc;EAClC,UAAU;EAEV,cAAc;UAEN;MAEJ;MAIA;EAIJ,YAAY,OAAO;;;;WAWV;;;;WAKA;;;;WAKA;;;;SAKF,uBACL,UAAU,mBACT;;;;;;;;;SAYI,aACL,QAAQ,2BAER,UAAU,sBACT;;SAKI,gBACL,MAAM,4BACN,QAAQ,2BAER,QAAQ,YACP;;;;SAOI,cAAc,QAAQ;EAE7B;;;;EAOA;;;;EAOM,oBACJ,OAAO,cACN,iBAAiB;UAaN;;;;;;;;;;EAgCd,KACE,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ,cAAc;;;;EAOnB,sBACJ,qBAAqB,gBACrB,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ;;;;SAqCE,YACX,MAAM;IACJ,MAAM;IACN,QAAQ;MAET,QAAQ"}
1
+ {"version":3,"file":"agent.d.ts","names":[],"sources":["../../src/agents/agent.ts"],"mappings":";;;;;;;;;;;;;;YAgCY,mBAAmB;;;;;8BAmBT,kBAAkB;EAC9B,UAAU;eAEL;MAET;MAIA;;;;EAOJ;;;;WAOS;;;;EAKT,sBACE,qBAAqB,gBACrB,QAAQ,aACR,SAAS,aACT,mBAAmB,kBAClB,QAAQ;;;;EAcL,iBACJ,eAAe,6BACf,QAAQ,cACP,QAAQ;;;;;;;8BAUS,8BAA8B;EAClD;;;;;;;;;;WAaS,KACP,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,cAAc;;;;;;;8BAQL,6BAA6B;EACjD;;;;;;;;;;WAaS,KACP,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,gBAAgB;;qBAiBhB,sBAEX,gBAEA,yBACQ,iBAAiB,UAAU;EACnC;EAEA;SAGO,cAAc,gBAAgB,kBAClC,UAAU,aACT,aAAa,cACV,gBAEH,kBAAkB,aAEpB;IAAU;IAAuB;IAA0B;MAC1D,sBAAsB,UAAU,QAAQ,WAAW;SAU/C,wBAAwB,GAAG,WAAW,KAAK;;;;;;;qBA2FvC,iCAAiC;EAC5C;EAGA,UAAU,SACR;IAAgB,OAAO;KACvB,gBAAgB,cAAc;EAGhC;EAEA;EAEA;MAEI;EAIJ,YAAY,QAAQ;EASd,KACJ,OAAO,aACP,QAAQ,aACR,kBAAkB,iBAClB,SAAS,iBACR,QAAQ,gBAAgB;;qBA2ChB,sBAAsB;;;;iBAKlB;EACf,UAAU;EACV,cAAc;EACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCW,6BAA6B;EACxC;EAEA,UAAU;EAEV,cAAc;EAEd;EAEA,YAAY,OAAO;MAOf;;;;;;;;;;EAaE,KACJ,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ,cAAc;;;;;iBAmBV;EACf,eAAe;EAEf,YAAY;;;;EAKZ,kBAAkB;;;;;;;;;8BAUE,cAAc;EAClC,UAAU;EAEV,cAAc;UAEN;MAEJ;MAIA;EAIJ,YAAY,OAAO;;;;WAWV;;;;WAKA;;;;WAKA;;;;SAKF,uBACL,UAAU,mBACT;;;;;;;;;SAYI,aACL,QAAQ,2BAER,UAAU,sBACT;;SAKI,gBACL,MAAM,4BACN,QAAQ,2BAER,QAAQ,YACP;;;;SAOI,cAAc,QAAQ;EAE7B;;;;EAOA;;;;EAOM,oBACJ,OAAO,cACN,iBAAiB;UAaN;;;;;;;;;;EAgCd,KACE,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ,cAAc;;;;EAOnB,sBACJ,qBAAqB,gBACrB,OAAO,aACP,QAAQ,aACR,kBAAkB,kBACjB,QAAQ;;;;SAqCE,YACX,MAAM;IACJ,MAAM;IACN,QAAQ;MAET,QAAQ"}
@@ -1,6 +1,6 @@
1
1
  import { Serializable } from "@langchain/core/load/serializable";
2
2
  import { RunnableSequence, patchConfig } from "@langchain/core/runnables";
3
- //#region src/agents/agent.ts
3
+ // src/agents/agent.ts
4
4
  /**
5
5
  * Error class for parse errors in LangChain. Contains information about
6
6
  * the error message and the output that caused the error.
@@ -372,7 +372,6 @@ var Agent = class extends BaseSingleActionAgent {
372
372
  }
373
373
  }
374
374
  };
375
- //#endregion
376
375
  export { Agent, AgentRunnableSequence, BaseAgent, BaseMultiActionAgent, BaseSingleActionAgent, LLMSingleActionAgent, RunnableAgent, RunnableMultiActionAgent, RunnableSingleActionAgent, isRunnableAgent };
377
376
 
378
377
  //# sourceMappingURL=agent.js.map
@@ -1,9 +1,9 @@
1
- const require_agent = require("../agent.cjs");
2
1
  const require_llm_chain = require("../../chains/llm_chain.cjs");
3
- const require_prompt = require("./prompt.cjs");
2
+ const require_agent = require("../agent.cjs");
4
3
  const require_outputParser = require("./outputParser.cjs");
4
+ const require_prompt = require("./prompt.cjs");
5
5
  let _langchain_core_prompts = require("@langchain/core/prompts");
6
- //#region src/agents/chat/index.ts
6
+ // src/agents/chat/index.ts
7
7
  const DEFAULT_HUMAN_MESSAGE_TEMPLATE = "{input}\n\n{agent_scratchpad}";
8
8
  /**
9
9
  * Agent for the MRKL chain.
@@ -114,7 +114,6 @@ var ChatAgent = class ChatAgent extends require_agent.Agent {
114
114
  });
115
115
  }
116
116
  };
117
- //#endregion
118
117
  exports.ChatAgent = ChatAgent;
119
118
 
120
119
  //# sourceMappingURL=index.cjs.map
@@ -1,12 +1,11 @@
1
- import { AgentInput } from "../types.cjs";
2
- import { Agent, AgentArgs, OutputParserArgs } from "../agent.cjs";
3
1
  import { Optional } from "../../types/type-utils.cjs";
2
+ import { Agent, AgentArgs, OutputParserArgs } from "../agent.cjs";
3
+ import { AgentInput } from "../types.cjs";
4
4
  import { ChatAgentOutputParser } from "./outputParser.cjs";
5
5
  import { AgentStep } from "@langchain/core/agents";
6
6
  import { ChatPromptTemplate } from "@langchain/core/prompts";
7
7
  import { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
8
8
  import { ToolInterface } from "@langchain/core/tools";
9
- //#region src/agents/chat/index.d.ts
10
9
  /**
11
10
  * Interface for arguments used to create a chat prompt.
12
11
  */
@@ -81,5 +80,4 @@ export declare class ChatAgent extends Agent {
81
80
  */
82
81
  static fromLLMAndTools(llm: BaseLanguageModelInterface, tools: ToolInterface[], args?: ChatCreatePromptArgs & AgentArgs): ChatAgent;
83
82
  }
84
- //#endregion
85
83
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/agents/chat/index.ts"],"mappings":";;;;;;;;;;;;iBAoBiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;YAOU,iBAAiB,SAAS;;;;;qBAMzB,kBAAkB;SACtB;EAIP;EAEQ,UAAU;EAElB,YAAY,OAAO;EAMnB;EAIA;EAIA;EAIA;;;;;;;SAUO,cAAc,OAAO;;;;;;SAerB,uBAAuB,UAAU,mBAAgB;;;;;;;EAUlD,oBAAoB,OAAO,cAAc;;;;;;;;;;;SAkBxC,aAAa,OAAO,iBAAiB,OAAO,uBAAoB;;;;;;;;;SA4BhE,gBACL,KAAK,4BACL,OAAO,iBACP,OAAO,uBAAuB,YAAS"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/agents/chat/index.ts"],"mappings":";;;;;;;;;;;iBAoBiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;YAOU,iBAAiB,SAAS;;;;;qBAMzB,kBAAkB;SACtB;EAIP;EAEQ,UAAU;EAElB,YAAY,OAAO;EAMnB;EAIA;EAIA;EAIA;;;;;;;SAUO,cAAc,OAAO;;;;;;SAerB,uBAAuB,UAAU,mBAAgB;;;;;;;EAUlD,oBAAoB,OAAO,cAAc;;;;;;;;;;;SAkBxC,aAAa,OAAO,iBAAiB,OAAO,uBAAoB;;;;;;;;;SA4BhE,gBACL,KAAK,4BACL,OAAO,iBACP,OAAO,uBAAuB,YAAS"}
@@ -1,12 +1,11 @@
1
- import { AgentInput } from "../types.js";
2
- import { Agent, AgentArgs, OutputParserArgs } from "../agent.js";
3
1
  import { Optional } from "../../types/type-utils.js";
2
+ import { Agent, AgentArgs, OutputParserArgs } from "../agent.js";
3
+ import { AgentInput } from "../types.js";
4
4
  import { ChatAgentOutputParser } from "./outputParser.js";
5
5
  import { ChatPromptTemplate } from "@langchain/core/prompts";
6
6
  import { ToolInterface } from "@langchain/core/tools";
7
7
  import { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
8
8
  import { AgentStep } from "@langchain/core/agents";
9
- //#region src/agents/chat/index.d.ts
10
9
  /**
11
10
  * Interface for arguments used to create a chat prompt.
12
11
  */
@@ -81,5 +80,4 @@ export declare class ChatAgent extends Agent {
81
80
  */
82
81
  static fromLLMAndTools(llm: BaseLanguageModelInterface, tools: ToolInterface[], args?: ChatCreatePromptArgs & AgentArgs): ChatAgent;
83
82
  }
84
- //#endregion
85
83
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/agents/chat/index.ts"],"mappings":";;;;;;;;;;;;iBAoBiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;YAOU,iBAAiB,SAAS;;;;;qBAMzB,kBAAkB;SACtB;EAIP;EAEQ,UAAU;EAElB,YAAY,OAAO;EAMnB;EAIA;EAIA;EAIA;;;;;;;SAUO,cAAc,OAAO;;;;;;SAerB,uBAAuB,UAAU,mBAAgB;;;;;;;EAUlD,oBAAoB,OAAO,cAAc;;;;;;;;;;;SAkBxC,aAAa,OAAO,iBAAiB,OAAO,uBAAoB;;;;;;;;;SA4BhE,gBACL,KAAK,4BACL,OAAO,iBACP,OAAO,uBAAuB,YAAS"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/agents/chat/index.ts"],"mappings":";;;;;;;;;;;iBAoBiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;YAOU,iBAAiB,SAAS;;;;;qBAMzB,kBAAkB;SACtB;EAIP;EAEQ,UAAU;EAElB,YAAY,OAAO;EAMnB;EAIA;EAIA;EAIA;;;;;;;SAUO,cAAc,OAAO;;;;;;SAerB,uBAAuB,UAAU,mBAAgB;;;;;;;EAUlD,oBAAoB,OAAO,cAAc;;;;;;;;;;;SAkBxC,aAAa,OAAO,iBAAiB,OAAO,uBAAoB;;;;;;;;;SA4BhE,gBACL,KAAK,4BACL,OAAO,iBACP,OAAO,uBAAuB,YAAS"}
@@ -1,9 +1,9 @@
1
- import { Agent } from "../agent.js";
2
1
  import { LLMChain } from "../../chains/llm_chain.js";
3
- import { FORMAT_INSTRUCTIONS, PREFIX, SUFFIX } from "./prompt.js";
2
+ import { Agent } from "../agent.js";
4
3
  import { ChatAgentOutputParser } from "./outputParser.js";
4
+ import { FORMAT_INSTRUCTIONS, PREFIX, SUFFIX } from "./prompt.js";
5
5
  import { ChatPromptTemplate, HumanMessagePromptTemplate, SystemMessagePromptTemplate } from "@langchain/core/prompts";
6
- //#region src/agents/chat/index.ts
6
+ // src/agents/chat/index.ts
7
7
  const DEFAULT_HUMAN_MESSAGE_TEMPLATE = "{input}\n\n{agent_scratchpad}";
8
8
  /**
9
9
  * Agent for the MRKL chain.
@@ -114,7 +114,6 @@ var ChatAgent = class ChatAgent extends Agent {
114
114
  });
115
115
  }
116
116
  };
117
- //#endregion
118
117
  export { ChatAgent };
119
118
 
120
119
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  const require_types = require("../types.cjs");
2
2
  const require_prompt = require("./prompt.cjs");
3
3
  let _langchain_core_output_parsers = require("@langchain/core/output_parsers");
4
- //#region src/agents/chat/outputParser.ts
4
+ // src/agents/chat/outputParser.ts
5
5
  const FINAL_ANSWER_ACTION = "Final Answer:";
6
6
  /**
7
7
  * A class that extends the AgentActionOutputParser to parse the output of
@@ -84,7 +84,6 @@ var ChatAgentOutputParser = class extends require_types.AgentActionOutputParser
84
84
  return require_prompt.FORMAT_INSTRUCTIONS;
85
85
  }
86
86
  };
87
- //#endregion
88
87
  exports.ChatAgentOutputParser = ChatAgentOutputParser;
89
88
  exports.FINAL_ANSWER_ACTION = FINAL_ANSWER_ACTION;
90
89
 
@@ -1,5 +1,4 @@
1
1
  import { AgentActionOutputParser } from "../types.cjs";
2
- //#region src/agents/chat/outputParser.d.ts
3
2
  /**
4
3
  * A class that extends the AgentActionOutputParser to parse the output of
5
4
  * the ChatAgent in LangChain. It checks if the output text contains the
@@ -68,5 +67,4 @@ export declare class ChatAgentOutputParser extends AgentActionOutputParser {
68
67
  */
69
68
  getFormatInstructions(): string;
70
69
  }
71
- //#endregion
72
70
  //# sourceMappingURL=outputParser.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"outputParser.d.cts","names":[],"sources":["../../../src/agents/chat/outputParser.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2Ca,8BAA8B;EACzC;;;;;;;;;;EAWM,MAAM,eAAY;;;;;;;;;;;;;;;;;;EA6BxB"}
1
+ {"version":3,"file":"outputParser.d.cts","names":[],"sources":["../../../src/agents/chat/outputParser.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2Ca,8BAA8B;EACzC;;;;;;;;;;EAWM,MAAM,eAAY;;;;;;;;;;;;;;;;;;EA6BxB"}
@@ -1,5 +1,4 @@
1
1
  import { AgentActionOutputParser } from "../types.js";
2
- //#region src/agents/chat/outputParser.d.ts
3
2
  /**
4
3
  * A class that extends the AgentActionOutputParser to parse the output of
5
4
  * the ChatAgent in LangChain. It checks if the output text contains the
@@ -68,5 +67,4 @@ export declare class ChatAgentOutputParser extends AgentActionOutputParser {
68
67
  */
69
68
  getFormatInstructions(): string;
70
69
  }
71
- //#endregion
72
70
  //# sourceMappingURL=outputParser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"outputParser.d.ts","names":[],"sources":["../../../src/agents/chat/outputParser.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2Ca,8BAA8B;EACzC;;;;;;;;;;EAWM,MAAM,eAAY;;;;;;;;;;;;;;;;;;EA6BxB"}
1
+ {"version":3,"file":"outputParser.d.ts","names":[],"sources":["../../../src/agents/chat/outputParser.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2Ca,8BAA8B;EACzC;;;;;;;;;;EAWM,MAAM,eAAY;;;;;;;;;;;;;;;;;;EA6BxB"}
@@ -1,7 +1,7 @@
1
1
  import { AgentActionOutputParser } from "../types.js";
2
2
  import { FORMAT_INSTRUCTIONS } from "./prompt.js";
3
3
  import { OutputParserException } from "@langchain/core/output_parsers";
4
- //#region src/agents/chat/outputParser.ts
4
+ // src/agents/chat/outputParser.ts
5
5
  const FINAL_ANSWER_ACTION = "Final Answer:";
6
6
  /**
7
7
  * A class that extends the AgentActionOutputParser to parse the output of
@@ -84,7 +84,6 @@ var ChatAgentOutputParser = class extends AgentActionOutputParser {
84
84
  return FORMAT_INSTRUCTIONS;
85
85
  }
86
86
  };
87
- //#endregion
88
87
  export { ChatAgentOutputParser, FINAL_ANSWER_ACTION };
89
88
 
90
89
  //# sourceMappingURL=outputParser.js.map
@@ -1,4 +1,4 @@
1
- //#region src/agents/chat/prompt.ts
1
+ // src/agents/chat/prompt.ts
2
2
  const PREFIX = `Answer the following questions as best you can. You have access to the following tools:`;
3
3
  const FORMAT_INSTRUCTIONS = `The way you use the tools is by specifying a json blob, denoted below by $JSON_BLOB
4
4
  Specifically, this $JSON_BLOB should have a "action" key (with the name of the tool to use) and a "action_input" key (with the input to the tool going here).
@@ -24,7 +24,6 @@ Observation: the result of the action
24
24
  Thought: I now know the final answer
25
25
  Final Answer: the final answer to the original input question`;
26
26
  const SUFFIX = `Begin! Reminder to always use the exact characters \`Final Answer\` when responding.`;
27
- //#endregion
28
27
  exports.FORMAT_INSTRUCTIONS = FORMAT_INSTRUCTIONS;
29
28
  exports.PREFIX = PREFIX;
30
29
  exports.SUFFIX = SUFFIX;
@@ -1,4 +1,4 @@
1
- //#region src/agents/chat/prompt.ts
1
+ // src/agents/chat/prompt.ts
2
2
  const PREFIX = `Answer the following questions as best you can. You have access to the following tools:`;
3
3
  const FORMAT_INSTRUCTIONS = `The way you use the tools is by specifying a json blob, denoted below by $JSON_BLOB
4
4
  Specifically, this $JSON_BLOB should have a "action" key (with the name of the tool to use) and a "action_input" key (with the input to the tool going here).
@@ -24,7 +24,6 @@ Observation: the result of the action
24
24
  Thought: I now know the final answer
25
25
  Final Answer: the final answer to the original input question`;
26
26
  const SUFFIX = `Begin! Reminder to always use the exact characters \`Final Answer\` when responding.`;
27
- //#endregion
28
27
  export { FORMAT_INSTRUCTIONS, PREFIX, SUFFIX };
29
28
 
30
29
  //# sourceMappingURL=prompt.js.map
@@ -1,10 +1,10 @@
1
- const require_prompt = require("./prompt.cjs");
2
- const require_agent = require("../agent.cjs");
3
1
  const require_llm_chain = require("../../chains/llm_chain.cjs");
2
+ const require_agent = require("../agent.cjs");
4
3
  const require_outputParser = require("./outputParser.cjs");
4
+ const require_prompt = require("./prompt.cjs");
5
5
  let _langchain_core_messages = require("@langchain/core/messages");
6
6
  let _langchain_core_prompts = require("@langchain/core/prompts");
7
- //#region src/agents/chat_convo/index.ts
7
+ // src/agents/chat_convo/index.ts
8
8
  /**
9
9
  * Agent for the MRKL chain.
10
10
  * @augments Agent
@@ -79,8 +79,8 @@ var ChatConversationalAgent = class ChatConversationalAgent extends require_agen
79
79
  * @param args.outputParser - Output parser to use for formatting.
80
80
  */
81
81
  static createPrompt(tools, args) {
82
- const systemMessage = (args?.systemMessage ?? require_prompt.DEFAULT_PREFIX) + require_prompt.PREFIX_END;
83
- const humanMessage = args?.humanMessage ?? require_prompt.DEFAULT_SUFFIX;
82
+ const systemMessage = (args?.systemMessage ?? "Assistant is a large language model trained by OpenAI.\n\nAssistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nAssistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.") + require_prompt.PREFIX_END;
83
+ const humanMessage = args?.humanMessage ?? "TOOLS\n------\nAssistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:\n\n{tools}\n\n{format_instructions}\n\nUSER'S INPUT\n--------------------\nHere is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):\n\n{{input}}";
84
84
  const toolStrings = tools.map((tool) => `${tool.name}: ${tool.description}`).join("\n");
85
85
  const toolNames = tools.map((tool) => tool.name);
86
86
  const formatInstructions = (args?.outputParser ?? ChatConversationalAgent.getDefaultOutputParser({ toolNames })).getFormatInstructions({ toolNames });
@@ -127,7 +127,6 @@ var ChatConversationalAgent = class ChatConversationalAgent extends require_agen
127
127
  });
128
128
  }
129
129
  };
130
- //#endregion
131
130
  exports.ChatConversationalAgent = ChatConversationalAgent;
132
131
 
133
132
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["Agent","AIMessage","HumanMessage","renderTemplate","TEMPLATE_TOOL_RESPONSE","ChatConversationalAgentOutputParserWithRetries","DEFAULT_PREFIX","PREFIX_END","DEFAULT_SUFFIX","SystemMessagePromptTemplate","MessagesPlaceholder","HumanMessagePromptTemplate","ChatPromptTemplate","LLMChain"],"sources":["../../../src/agents/chat_convo/index.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport type { ToolInterface } from \"@langchain/core/tools\";\nimport {\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n MessagesPlaceholder,\n SystemMessagePromptTemplate,\n renderTemplate,\n} from \"@langchain/core/prompts\";\nimport type { AgentStep } from \"@langchain/core/agents\";\nimport {\n type BaseMessage,\n HumanMessage,\n AIMessage,\n} from \"@langchain/core/messages\";\nimport { LLMChain } from \"../../chains/llm_chain.js\";\nimport { Optional } from \"../../types/type-utils.js\";\nimport { Agent, AgentArgs, OutputParserArgs } from \"../agent.js\";\nimport { AgentActionOutputParser, AgentInput } from \"../types.js\";\nimport { ChatConversationalAgentOutputParserWithRetries } from \"./outputParser.js\";\nimport {\n PREFIX_END,\n DEFAULT_PREFIX,\n DEFAULT_SUFFIX,\n TEMPLATE_TOOL_RESPONSE,\n} from \"./prompt.js\";\n\n/**\n * Interface defining the structure of arguments used to create a prompt\n * for the ChatConversationalAgent class.\n */\nexport interface ChatConversationalCreatePromptArgs {\n /** String to put after the list of tools. */\n systemMessage?: string;\n /** String to put before the list of tools. */\n humanMessage?: string;\n /** List of input variables the final prompt will expect. */\n inputVariables?: string[];\n /** Output parser to use for formatting. */\n outputParser?: AgentActionOutputParser;\n}\n\n/**\n * Type that extends the AgentInput interface for the\n * ChatConversationalAgent class, making the outputParser property\n * optional.\n */\nexport type ChatConversationalAgentInput = Optional<AgentInput, \"outputParser\">;\n\n/**\n * Agent for the MRKL chain.\n * @augments Agent\n */\nexport class ChatConversationalAgent extends Agent {\n static lc_name() {\n return \"ChatConversationalAgent\";\n }\n\n lc_namespace = [\"langchain\", \"agents\", \"chat_convo\"];\n\n declare ToolType: ToolInterface;\n\n constructor(input: ChatConversationalAgentInput) {\n const outputParser =\n input.outputParser ?? ChatConversationalAgent.getDefaultOutputParser();\n super({ ...input, outputParser });\n }\n\n _agentType() {\n return \"chat-conversational-react-description\" as const;\n }\n\n observationPrefix() {\n return \"Observation: \";\n }\n\n llmPrefix() {\n return \"Thought:\";\n }\n\n _stop(): string[] {\n return [\"Observation:\"];\n }\n\n static validateTools(tools: ToolInterface[]) {\n const descriptionlessTool = tools.find((tool) => !tool.description);\n if (descriptionlessTool) {\n const msg =\n `Got a tool ${descriptionlessTool.name} without a description.` +\n ` This agent requires descriptions for all tools.`;\n throw new Error(msg);\n }\n }\n\n /**\n * Constructs the agent scratchpad based on the agent steps. It returns an\n * array of base messages representing the thoughts of the agent.\n * @param steps The agent steps to construct the scratchpad from.\n * @returns An array of base messages representing the thoughts of the agent.\n */\n async constructScratchPad(steps: AgentStep[]): Promise<BaseMessage[]> {\n const thoughts: BaseMessage[] = [];\n for (const step of steps) {\n thoughts.push(new AIMessage(step.action.log));\n thoughts.push(\n new HumanMessage(\n renderTemplate(TEMPLATE_TOOL_RESPONSE, \"f-string\", {\n observation: step.observation,\n })\n )\n );\n }\n return thoughts;\n }\n\n /**\n * Returns the default output parser for the ChatConversationalAgent\n * class. It takes optional fields as arguments to customize the output\n * parser.\n * @param fields Optional fields to customize the output parser.\n * @returns The default output parser for the ChatConversationalAgent class.\n */\n static getDefaultOutputParser(\n fields?: OutputParserArgs & {\n toolNames: string[];\n }\n ): AgentActionOutputParser {\n if (fields?.llm) {\n return ChatConversationalAgentOutputParserWithRetries.fromLLM(\n fields.llm,\n {\n toolNames: fields.toolNames,\n }\n );\n }\n return new ChatConversationalAgentOutputParserWithRetries({\n toolNames: fields?.toolNames,\n });\n }\n\n /**\n * Create prompt in the style of the ChatConversationAgent.\n *\n * @param tools - List of tools the agent will have access to, used to format the prompt.\n * @param args - Arguments to create the prompt with.\n * @param args.systemMessage - String to put before the list of tools.\n * @param args.humanMessage - String to put after the list of tools.\n * @param args.outputParser - Output parser to use for formatting.\n */\n static createPrompt(\n tools: ToolInterface[],\n args?: ChatConversationalCreatePromptArgs\n ) {\n const systemMessage = (args?.systemMessage ?? DEFAULT_PREFIX) + PREFIX_END;\n const humanMessage = args?.humanMessage ?? DEFAULT_SUFFIX;\n const toolStrings = tools\n .map((tool) => `${tool.name}: ${tool.description}`)\n .join(\"\\n\");\n const toolNames = tools.map((tool) => tool.name);\n const outputParser =\n args?.outputParser ??\n ChatConversationalAgent.getDefaultOutputParser({ toolNames });\n const formatInstructions = outputParser.getFormatInstructions({\n toolNames,\n });\n const renderedHumanMessage = renderTemplate(humanMessage, \"f-string\", {\n format_instructions: formatInstructions,\n tools: toolStrings,\n });\n const messages = [\n SystemMessagePromptTemplate.fromTemplate(systemMessage),\n new MessagesPlaceholder(\"chat_history\"),\n HumanMessagePromptTemplate.fromTemplate(renderedHumanMessage),\n new MessagesPlaceholder(\"agent_scratchpad\"),\n ];\n return ChatPromptTemplate.fromMessages(messages);\n }\n\n /**\n * Creates an instance of the ChatConversationalAgent class from a\n * BaseLanguageModel and a set of tools. It takes optional arguments to\n * customize the agent.\n * @param llm The BaseLanguageModel to create the agent from.\n * @param tools The set of tools to create the agent from.\n * @param args Optional arguments to customize the agent.\n * @returns An instance of the ChatConversationalAgent class.\n */\n static fromLLMAndTools(\n llm: BaseLanguageModelInterface,\n tools: ToolInterface[],\n args?: ChatConversationalCreatePromptArgs & AgentArgs\n ) {\n ChatConversationalAgent.validateTools(tools);\n const outputParser =\n args?.outputParser ??\n ChatConversationalAgent.getDefaultOutputParser({\n llm,\n toolNames: tools.map((tool) => tool.name),\n });\n const prompt = ChatConversationalAgent.createPrompt(tools, {\n ...args,\n outputParser,\n });\n const chain = new LLMChain({\n prompt,\n llm,\n callbacks: args?.callbacks ?? args?.callbackManager,\n });\n return new ChatConversationalAgent({\n llmChain: chain,\n outputParser,\n allowedTools: tools.map((t) => t.name),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;AAqDA,IAAa,0BAAb,MAAa,gCAAgCA,cAAAA,MAAM;CACjD,OAAO,UAAU;EACf,OAAO;CACT;CAEA,eAAe;EAAC;EAAa;EAAU;CAAY;CAInD,YAAY,OAAqC;EAC/C,MAAM,eACJ,MAAM,gBAAgB,wBAAwB,uBAAuB;EACvE,MAAM;GAAE,GAAG;GAAO;EAAa,CAAC;CAClC;CAEA,aAAa;EACX,OAAO;CACT;CAEA,oBAAoB;EAClB,OAAO;CACT;CAEA,YAAY;EACV,OAAO;CACT;CAEA,QAAkB;EAChB,OAAO,CAAC,cAAc;CACxB;CAEA,OAAO,cAAc,OAAwB;EAC3C,MAAM,sBAAsB,MAAM,MAAM,SAAS,CAAC,KAAK,WAAW;EAClE,IAAI,qBAAqB;GACvB,MAAM,MACJ,cAAc,oBAAoB,KAAK;GAEzC,MAAM,IAAI,MAAM,GAAG;EACrB;CACF;;;;;;;CAQA,MAAM,oBAAoB,OAA4C;EACpE,MAAM,WAA0B,CAAC;EACjC,KAAK,MAAM,QAAQ,OAAO;GACxB,SAAS,KAAK,IAAIC,yBAAAA,UAAU,KAAK,OAAO,GAAG,CAAC;GAC5C,SAAS,KACP,IAAIC,yBAAAA,cAAAA,GACFC,wBAAAA,eAAAA,CAAeC,eAAAA,wBAAwB,YAAY,EACjD,aAAa,KAAK,YACpB,CAAC,CACH,CACF;EACF;EACA,OAAO;CACT;;;;;;;;CASA,OAAO,uBACL,QAGyB;EACzB,IAAI,QAAQ,KACV,OAAOC,qBAAAA,+CAA+C,QACpD,OAAO,KACP,EACE,WAAW,OAAO,UACpB,CACF;EAEF,OAAO,IAAIA,qBAAAA,+CAA+C,EACxD,WAAW,QAAQ,UACrB,CAAC;CACH;;;;;;;;;;CAWA,OAAO,aACL,OACA,MACA;EACA,MAAM,iBAAiB,MAAM,iBAAiBC,eAAAA,kBAAkBC,eAAAA;EAChE,MAAM,eAAe,MAAM,gBAAgBC,eAAAA;EAC3C,MAAM,cAAc,MACjB,KAAK,SAAS,GAAG,KAAK,KAAK,IAAI,KAAK,aAAa,CAAC,CAClD,KAAK,IAAI;EACZ,MAAM,YAAY,MAAM,KAAK,SAAS,KAAK,IAAI;EAI/C,MAAM,sBAFJ,MAAM,gBACN,wBAAwB,uBAAuB,EAAE,UAAU,CAAC,EAAA,CACtB,sBAAsB,EAC5D,UACF,CAAC;EACD,MAAM,wBAAA,GAAuBL,wBAAAA,eAAAA,CAAe,cAAc,YAAY;GACpE,qBAAqB;GACrB,OAAO;EACT,CAAC;EACD,MAAM,WAAW;GACfM,wBAAAA,4BAA4B,aAAa,aAAa;GACtD,IAAIC,wBAAAA,oBAAoB,cAAc;GACtCC,wBAAAA,2BAA2B,aAAa,oBAAoB;GAC5D,IAAID,wBAAAA,oBAAoB,kBAAkB;EAC5C;EACA,OAAOE,wBAAAA,mBAAmB,aAAa,QAAQ;CACjD;;;;;;;;;;CAWA,OAAO,gBACL,KACA,OACA,MACA;EACA,wBAAwB,cAAc,KAAK;EAC3C,MAAM,eACJ,MAAM,gBACN,wBAAwB,uBAAuB;GAC7C;GACA,WAAW,MAAM,KAAK,SAAS,KAAK,IAAI;EAC1C,CAAC;EACH,MAAM,SAAS,wBAAwB,aAAa,OAAO;GACzD,GAAG;GACH;EACF,CAAC;EACD,MAAM,QAAQ,IAAIC,kBAAAA,SAAS;GACzB;GACA;GACA,WAAW,MAAM,aAAa,MAAM;EACtC,CAAC;EACD,OAAO,IAAI,wBAAwB;GACjC,UAAU;GACV;GACA,cAAc,MAAM,KAAK,MAAM,EAAE,IAAI;EACvC,CAAC;CACH;AACF"}
1
+ {"version":3,"file":"index.cjs","names":["Agent","AIMessage","HumanMessage","renderTemplate","TEMPLATE_TOOL_RESPONSE","ChatConversationalAgentOutputParserWithRetries","PREFIX_END","SystemMessagePromptTemplate","MessagesPlaceholder","HumanMessagePromptTemplate","ChatPromptTemplate","LLMChain"],"sources":["../../../src/agents/chat_convo/index.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport type { ToolInterface } from \"@langchain/core/tools\";\nimport {\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n MessagesPlaceholder,\n SystemMessagePromptTemplate,\n renderTemplate,\n} from \"@langchain/core/prompts\";\nimport type { AgentStep } from \"@langchain/core/agents\";\nimport {\n type BaseMessage,\n HumanMessage,\n AIMessage,\n} from \"@langchain/core/messages\";\nimport { LLMChain } from \"../../chains/llm_chain.js\";\nimport { Optional } from \"../../types/type-utils.js\";\nimport { Agent, AgentArgs, OutputParserArgs } from \"../agent.js\";\nimport { AgentActionOutputParser, AgentInput } from \"../types.js\";\nimport { ChatConversationalAgentOutputParserWithRetries } from \"./outputParser.js\";\nimport {\n PREFIX_END,\n DEFAULT_PREFIX,\n DEFAULT_SUFFIX,\n TEMPLATE_TOOL_RESPONSE,\n} from \"./prompt.js\";\n\n/**\n * Interface defining the structure of arguments used to create a prompt\n * for the ChatConversationalAgent class.\n */\nexport interface ChatConversationalCreatePromptArgs {\n /** String to put after the list of tools. */\n systemMessage?: string;\n /** String to put before the list of tools. */\n humanMessage?: string;\n /** List of input variables the final prompt will expect. */\n inputVariables?: string[];\n /** Output parser to use for formatting. */\n outputParser?: AgentActionOutputParser;\n}\n\n/**\n * Type that extends the AgentInput interface for the\n * ChatConversationalAgent class, making the outputParser property\n * optional.\n */\nexport type ChatConversationalAgentInput = Optional<AgentInput, \"outputParser\">;\n\n/**\n * Agent for the MRKL chain.\n * @augments Agent\n */\nexport class ChatConversationalAgent extends Agent {\n static lc_name() {\n return \"ChatConversationalAgent\";\n }\n\n lc_namespace = [\"langchain\", \"agents\", \"chat_convo\"];\n\n declare ToolType: ToolInterface;\n\n constructor(input: ChatConversationalAgentInput) {\n const outputParser =\n input.outputParser ?? ChatConversationalAgent.getDefaultOutputParser();\n super({ ...input, outputParser });\n }\n\n _agentType() {\n return \"chat-conversational-react-description\" as const;\n }\n\n observationPrefix() {\n return \"Observation: \";\n }\n\n llmPrefix() {\n return \"Thought:\";\n }\n\n _stop(): string[] {\n return [\"Observation:\"];\n }\n\n static validateTools(tools: ToolInterface[]) {\n const descriptionlessTool = tools.find((tool) => !tool.description);\n if (descriptionlessTool) {\n const msg =\n `Got a tool ${descriptionlessTool.name} without a description.` +\n ` This agent requires descriptions for all tools.`;\n throw new Error(msg);\n }\n }\n\n /**\n * Constructs the agent scratchpad based on the agent steps. It returns an\n * array of base messages representing the thoughts of the agent.\n * @param steps The agent steps to construct the scratchpad from.\n * @returns An array of base messages representing the thoughts of the agent.\n */\n async constructScratchPad(steps: AgentStep[]): Promise<BaseMessage[]> {\n const thoughts: BaseMessage[] = [];\n for (const step of steps) {\n thoughts.push(new AIMessage(step.action.log));\n thoughts.push(\n new HumanMessage(\n renderTemplate(TEMPLATE_TOOL_RESPONSE, \"f-string\", {\n observation: step.observation,\n })\n )\n );\n }\n return thoughts;\n }\n\n /**\n * Returns the default output parser for the ChatConversationalAgent\n * class. It takes optional fields as arguments to customize the output\n * parser.\n * @param fields Optional fields to customize the output parser.\n * @returns The default output parser for the ChatConversationalAgent class.\n */\n static getDefaultOutputParser(\n fields?: OutputParserArgs & {\n toolNames: string[];\n }\n ): AgentActionOutputParser {\n if (fields?.llm) {\n return ChatConversationalAgentOutputParserWithRetries.fromLLM(\n fields.llm,\n {\n toolNames: fields.toolNames,\n }\n );\n }\n return new ChatConversationalAgentOutputParserWithRetries({\n toolNames: fields?.toolNames,\n });\n }\n\n /**\n * Create prompt in the style of the ChatConversationAgent.\n *\n * @param tools - List of tools the agent will have access to, used to format the prompt.\n * @param args - Arguments to create the prompt with.\n * @param args.systemMessage - String to put before the list of tools.\n * @param args.humanMessage - String to put after the list of tools.\n * @param args.outputParser - Output parser to use for formatting.\n */\n static createPrompt(\n tools: ToolInterface[],\n args?: ChatConversationalCreatePromptArgs\n ) {\n const systemMessage = (args?.systemMessage ?? DEFAULT_PREFIX) + PREFIX_END;\n const humanMessage = args?.humanMessage ?? DEFAULT_SUFFIX;\n const toolStrings = tools\n .map((tool) => `${tool.name}: ${tool.description}`)\n .join(\"\\n\");\n const toolNames = tools.map((tool) => tool.name);\n const outputParser =\n args?.outputParser ??\n ChatConversationalAgent.getDefaultOutputParser({ toolNames });\n const formatInstructions = outputParser.getFormatInstructions({\n toolNames,\n });\n const renderedHumanMessage = renderTemplate(humanMessage, \"f-string\", {\n format_instructions: formatInstructions,\n tools: toolStrings,\n });\n const messages = [\n SystemMessagePromptTemplate.fromTemplate(systemMessage),\n new MessagesPlaceholder(\"chat_history\"),\n HumanMessagePromptTemplate.fromTemplate(renderedHumanMessage),\n new MessagesPlaceholder(\"agent_scratchpad\"),\n ];\n return ChatPromptTemplate.fromMessages(messages);\n }\n\n /**\n * Creates an instance of the ChatConversationalAgent class from a\n * BaseLanguageModel and a set of tools. It takes optional arguments to\n * customize the agent.\n * @param llm The BaseLanguageModel to create the agent from.\n * @param tools The set of tools to create the agent from.\n * @param args Optional arguments to customize the agent.\n * @returns An instance of the ChatConversationalAgent class.\n */\n static fromLLMAndTools(\n llm: BaseLanguageModelInterface,\n tools: ToolInterface[],\n args?: ChatConversationalCreatePromptArgs & AgentArgs\n ) {\n ChatConversationalAgent.validateTools(tools);\n const outputParser =\n args?.outputParser ??\n ChatConversationalAgent.getDefaultOutputParser({\n llm,\n toolNames: tools.map((tool) => tool.name),\n });\n const prompt = ChatConversationalAgent.createPrompt(tools, {\n ...args,\n outputParser,\n });\n const chain = new LLMChain({\n prompt,\n llm,\n callbacks: args?.callbacks ?? args?.callbackManager,\n });\n return new ChatConversationalAgent({\n llmChain: chain,\n outputParser,\n allowedTools: tools.map((t) => t.name),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;AAqDA,IAAa,0BAAb,MAAa,gCAAgCA,cAAAA,MAAM;CACjD,OAAO,UAAU;EACf,OAAO;CACT;CAEA,eAAe;EAAC;EAAa;EAAU;CAAY;CAInD,YAAY,OAAqC;EAC/C,MAAM,eACJ,MAAM,gBAAgB,wBAAwB,uBAAuB;EACvE,MAAM;GAAE,GAAG;GAAO;EAAa,CAAC;CAClC;CAEA,aAAa;EACX,OAAO;CACT;CAEA,oBAAoB;EAClB,OAAO;CACT;CAEA,YAAY;EACV,OAAO;CACT;CAEA,QAAkB;EAChB,OAAO,CAAC,cAAc;CACxB;CAEA,OAAO,cAAc,OAAwB;EAC3C,MAAM,sBAAsB,MAAM,MAAM,SAAS,CAAC,KAAK,WAAW;EAClE,IAAI,qBAAqB;GACvB,MAAM,MACJ,cAAc,oBAAoB,KAAK;GAEzC,MAAM,IAAI,MAAM,GAAG;EACrB;CACF;;;;;;;CAQA,MAAM,oBAAoB,OAA4C;EACpE,MAAM,WAA0B,CAAC;EACjC,KAAK,MAAM,QAAQ,OAAO;GACxB,SAAS,KAAK,IAAIC,yBAAAA,UAAU,KAAK,OAAO,GAAG,CAAC;GAC5C,SAAS,KACP,IAAIC,yBAAAA,cAAAA,GACFC,wBAAAA,eAAAA,CAAeC,eAAAA,wBAAwB,YAAY,EACjD,aAAa,KAAK,YACpB,CAAC,CACH,CACF;EACF;EACA,OAAO;CACT;;;;;;;;CASA,OAAO,uBACL,QAGyB;EACzB,IAAI,QAAQ,KACV,OAAOC,qBAAAA,+CAA+C,QACpD,OAAO,KACP,EACE,WAAW,OAAO,UACpB,CACF;EAEF,OAAO,IAAIA,qBAAAA,+CAA+C,EACxD,WAAW,QAAQ,UACrB,CAAC;CACH;;;;;;;;;;CAWA,OAAO,aACL,OACA,MACA;EACA,MAAM,iBAAiB,MAAM,iBAAA,wsCAAmCC,eAAAA;EAChE,MAAM,eAAe,MAAM,gBAAA;EAC3B,MAAM,cAAc,MACjB,KAAK,SAAS,GAAG,KAAK,KAAK,IAAI,KAAK,aAAa,CAAC,CAClD,KAAK,IAAI;EACZ,MAAM,YAAY,MAAM,KAAK,SAAS,KAAK,IAAI;EAI/C,MAAM,sBAFJ,MAAM,gBACN,wBAAwB,uBAAuB,EAAE,UAAU,CAAC,EAAA,CACtB,sBAAsB,EAC5D,UACF,CAAC;EACD,MAAM,wBAAA,GAAuBH,wBAAAA,eAAAA,CAAe,cAAc,YAAY;GACpE,qBAAqB;GACrB,OAAO;EACT,CAAC;EACD,MAAM,WAAW;GACfI,wBAAAA,4BAA4B,aAAa,aAAa;GACtD,IAAIC,wBAAAA,oBAAoB,cAAc;GACtCC,wBAAAA,2BAA2B,aAAa,oBAAoB;GAC5D,IAAID,wBAAAA,oBAAoB,kBAAkB;EAC5C;EACA,OAAOE,wBAAAA,mBAAmB,aAAa,QAAQ;CACjD;;;;;;;;;;CAWA,OAAO,gBACL,KACA,OACA,MACA;EACA,wBAAwB,cAAc,KAAK;EAC3C,MAAM,eACJ,MAAM,gBACN,wBAAwB,uBAAuB;GAC7C;GACA,WAAW,MAAM,KAAK,SAAS,KAAK,IAAI;EAC1C,CAAC;EACH,MAAM,SAAS,wBAAwB,aAAa,OAAO;GACzD,GAAG;GACH;EACF,CAAC;EACD,MAAM,QAAQ,IAAIC,kBAAAA,SAAS;GACzB;GACA;GACA,WAAW,MAAM,aAAa,MAAM;EACtC,CAAC;EACD,OAAO,IAAI,wBAAwB;GACjC,UAAU;GACV;GACA,cAAc,MAAM,KAAK,MAAM,EAAE,IAAI;EACvC,CAAC;CACH;AACF"}
@@ -1,12 +1,11 @@
1
- import { AgentActionOutputParser, AgentInput } from "../types.cjs";
2
- import { Agent, AgentArgs, OutputParserArgs } from "../agent.cjs";
3
1
  import { Optional } from "../../types/type-utils.cjs";
2
+ import { Agent, AgentArgs, OutputParserArgs } from "../agent.cjs";
3
+ import { AgentActionOutputParser, AgentInput } from "../types.cjs";
4
4
  import { AgentStep } from "@langchain/core/agents";
5
5
  import { BaseMessage } from "@langchain/core/messages";
6
6
  import { ChatPromptTemplate } from "@langchain/core/prompts";
7
7
  import { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
8
8
  import { ToolInterface } from "@langchain/core/tools";
9
- //#region src/agents/chat_convo/index.d.ts
10
9
  /**
11
10
  * Interface defining the structure of arguments used to create a prompt
12
11
  * for the ChatConversationalAgent class.
@@ -79,5 +78,4 @@ export declare class ChatConversationalAgent extends Agent {
79
78
  */
80
79
  static fromLLMAndTools(llm: BaseLanguageModelInterface, tools: ToolInterface[], args?: ChatConversationalCreatePromptArgs & AgentArgs): ChatConversationalAgent;
81
80
  }
82
- //#endregion
83
81
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/agents/chat_convo/index.ts"],"mappings":";;;;;;;;;;;;;iBA+BiB;;EAEf;;EAEA;;EAEA;;EAEA,eAAe;;;;;;;YAQL,+BAA+B,SAAS;;;;;qBAMvC,gCAAgC;SACpC;EAIP;EAEQ,UAAU;EAElB,YAAY,OAAO;EAMnB;EAIA;EAIA;EAIA;SAIO,cAAc,OAAO;;;;;;;EAgBtB,oBAAoB,OAAO,cAAc,QAAQ;;;;;;;;SAsBhD,uBACL,SAAS;IACP;MAED;;;;;;;;;;SAuBI,aACL,OAAO,iBACP,OAAO,qCAAkC;;;;;;;;;;SAoCpC,gBACL,KAAK,4BACL,OAAO,iBACP,OAAO,qCAAqC,YAAS"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/agents/chat_convo/index.ts"],"mappings":";;;;;;;;;;;;iBA+BiB;;EAEf;;EAEA;;EAEA;;EAEA,eAAe;;;;;;;YAQL,+BAA+B,SAAS;;;;;qBAMvC,gCAAgC;SACpC;EAIP;EAEQ,UAAU;EAElB,YAAY,OAAO;EAMnB;EAIA;EAIA;EAIA;SAIO,cAAc,OAAO;;;;;;;EAgBtB,oBAAoB,OAAO,cAAc,QAAQ;;;;;;;;SAsBhD,uBACL,SAAS;IACP;MAED;;;;;;;;;;SAuBI,aACL,OAAO,iBACP,OAAO,qCAAkC;;;;;;;;;;SAoCpC,gBACL,KAAK,4BACL,OAAO,iBACP,OAAO,qCAAqC,YAAS"}
@@ -1,12 +1,11 @@
1
- import { AgentActionOutputParser, AgentInput } from "../types.js";
2
- import { Agent, AgentArgs, OutputParserArgs } from "../agent.js";
3
1
  import { Optional } from "../../types/type-utils.js";
2
+ import { Agent, AgentArgs, OutputParserArgs } from "../agent.js";
3
+ import { AgentActionOutputParser, AgentInput } from "../types.js";
4
4
  import { BaseMessage } from "@langchain/core/messages";
5
5
  import { ChatPromptTemplate } from "@langchain/core/prompts";
6
6
  import { ToolInterface } from "@langchain/core/tools";
7
7
  import { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
8
8
  import { AgentStep } from "@langchain/core/agents";
9
- //#region src/agents/chat_convo/index.d.ts
10
9
  /**
11
10
  * Interface defining the structure of arguments used to create a prompt
12
11
  * for the ChatConversationalAgent class.
@@ -79,5 +78,4 @@ export declare class ChatConversationalAgent extends Agent {
79
78
  */
80
79
  static fromLLMAndTools(llm: BaseLanguageModelInterface, tools: ToolInterface[], args?: ChatConversationalCreatePromptArgs & AgentArgs): ChatConversationalAgent;
81
80
  }
82
- //#endregion
83
81
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/agents/chat_convo/index.ts"],"mappings":";;;;;;;;;;;;;iBA+BiB;;EAEf;;EAEA;;EAEA;;EAEA,eAAe;;;;;;;YAQL,+BAA+B,SAAS;;;;;qBAMvC,gCAAgC;SACpC;EAIP;EAEQ,UAAU;EAElB,YAAY,OAAO;EAMnB;EAIA;EAIA;EAIA;SAIO,cAAc,OAAO;;;;;;;EAgBtB,oBAAoB,OAAO,cAAc,QAAQ;;;;;;;;SAsBhD,uBACL,SAAS;IACP;MAED;;;;;;;;;;SAuBI,aACL,OAAO,iBACP,OAAO,qCAAkC;;;;;;;;;;SAoCpC,gBACL,KAAK,4BACL,OAAO,iBACP,OAAO,qCAAqC,YAAS"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/agents/chat_convo/index.ts"],"mappings":";;;;;;;;;;;;iBA+BiB;;EAEf;;EAEA;;EAEA;;EAEA,eAAe;;;;;;;YAQL,+BAA+B,SAAS;;;;;qBAMvC,gCAAgC;SACpC;EAIP;EAEQ,UAAU;EAElB,YAAY,OAAO;EAMnB;EAIA;EAIA;EAIA;SAIO,cAAc,OAAO;;;;;;;EAgBtB,oBAAoB,OAAO,cAAc,QAAQ;;;;;;;;SAsBhD,uBACL,SAAS;IACP;MAED;;;;;;;;;;SAuBI,aACL,OAAO,iBACP,OAAO,qCAAkC;;;;;;;;;;SAoCpC,gBACL,KAAK,4BACL,OAAO,iBACP,OAAO,qCAAqC,YAAS"}
@@ -1,10 +1,10 @@
1
- import { DEFAULT_PREFIX, DEFAULT_SUFFIX, PREFIX_END, TEMPLATE_TOOL_RESPONSE } from "./prompt.js";
2
- import { Agent } from "../agent.js";
3
1
  import { LLMChain } from "../../chains/llm_chain.js";
2
+ import { Agent } from "../agent.js";
4
3
  import { ChatConversationalAgentOutputParserWithRetries } from "./outputParser.js";
4
+ import { PREFIX_END, TEMPLATE_TOOL_RESPONSE } from "./prompt.js";
5
5
  import { AIMessage, HumanMessage } from "@langchain/core/messages";
6
6
  import { ChatPromptTemplate, HumanMessagePromptTemplate, MessagesPlaceholder, SystemMessagePromptTemplate, renderTemplate } from "@langchain/core/prompts";
7
- //#region src/agents/chat_convo/index.ts
7
+ // src/agents/chat_convo/index.ts
8
8
  /**
9
9
  * Agent for the MRKL chain.
10
10
  * @augments Agent
@@ -79,8 +79,8 @@ var ChatConversationalAgent = class ChatConversationalAgent extends Agent {
79
79
  * @param args.outputParser - Output parser to use for formatting.
80
80
  */
81
81
  static createPrompt(tools, args) {
82
- const systemMessage = (args?.systemMessage ?? DEFAULT_PREFIX) + PREFIX_END;
83
- const humanMessage = args?.humanMessage ?? DEFAULT_SUFFIX;
82
+ const systemMessage = (args?.systemMessage ?? "Assistant is a large language model trained by OpenAI.\n\nAssistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nAssistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.") + PREFIX_END;
83
+ const humanMessage = args?.humanMessage ?? "TOOLS\n------\nAssistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:\n\n{tools}\n\n{format_instructions}\n\nUSER'S INPUT\n--------------------\nHere is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):\n\n{{input}}";
84
84
  const toolStrings = tools.map((tool) => `${tool.name}: ${tool.description}`).join("\n");
85
85
  const toolNames = tools.map((tool) => tool.name);
86
86
  const formatInstructions = (args?.outputParser ?? ChatConversationalAgent.getDefaultOutputParser({ toolNames })).getFormatInstructions({ toolNames });
@@ -127,7 +127,6 @@ var ChatConversationalAgent = class ChatConversationalAgent extends Agent {
127
127
  });
128
128
  }
129
129
  };
130
- //#endregion
131
130
  export { ChatConversationalAgent };
132
131
 
133
132
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/agents/chat_convo/index.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport type { ToolInterface } from \"@langchain/core/tools\";\nimport {\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n MessagesPlaceholder,\n SystemMessagePromptTemplate,\n renderTemplate,\n} from \"@langchain/core/prompts\";\nimport type { AgentStep } from \"@langchain/core/agents\";\nimport {\n type BaseMessage,\n HumanMessage,\n AIMessage,\n} from \"@langchain/core/messages\";\nimport { LLMChain } from \"../../chains/llm_chain.js\";\nimport { Optional } from \"../../types/type-utils.js\";\nimport { Agent, AgentArgs, OutputParserArgs } from \"../agent.js\";\nimport { AgentActionOutputParser, AgentInput } from \"../types.js\";\nimport { ChatConversationalAgentOutputParserWithRetries } from \"./outputParser.js\";\nimport {\n PREFIX_END,\n DEFAULT_PREFIX,\n DEFAULT_SUFFIX,\n TEMPLATE_TOOL_RESPONSE,\n} from \"./prompt.js\";\n\n/**\n * Interface defining the structure of arguments used to create a prompt\n * for the ChatConversationalAgent class.\n */\nexport interface ChatConversationalCreatePromptArgs {\n /** String to put after the list of tools. */\n systemMessage?: string;\n /** String to put before the list of tools. */\n humanMessage?: string;\n /** List of input variables the final prompt will expect. */\n inputVariables?: string[];\n /** Output parser to use for formatting. */\n outputParser?: AgentActionOutputParser;\n}\n\n/**\n * Type that extends the AgentInput interface for the\n * ChatConversationalAgent class, making the outputParser property\n * optional.\n */\nexport type ChatConversationalAgentInput = Optional<AgentInput, \"outputParser\">;\n\n/**\n * Agent for the MRKL chain.\n * @augments Agent\n */\nexport class ChatConversationalAgent extends Agent {\n static lc_name() {\n return \"ChatConversationalAgent\";\n }\n\n lc_namespace = [\"langchain\", \"agents\", \"chat_convo\"];\n\n declare ToolType: ToolInterface;\n\n constructor(input: ChatConversationalAgentInput) {\n const outputParser =\n input.outputParser ?? ChatConversationalAgent.getDefaultOutputParser();\n super({ ...input, outputParser });\n }\n\n _agentType() {\n return \"chat-conversational-react-description\" as const;\n }\n\n observationPrefix() {\n return \"Observation: \";\n }\n\n llmPrefix() {\n return \"Thought:\";\n }\n\n _stop(): string[] {\n return [\"Observation:\"];\n }\n\n static validateTools(tools: ToolInterface[]) {\n const descriptionlessTool = tools.find((tool) => !tool.description);\n if (descriptionlessTool) {\n const msg =\n `Got a tool ${descriptionlessTool.name} without a description.` +\n ` This agent requires descriptions for all tools.`;\n throw new Error(msg);\n }\n }\n\n /**\n * Constructs the agent scratchpad based on the agent steps. It returns an\n * array of base messages representing the thoughts of the agent.\n * @param steps The agent steps to construct the scratchpad from.\n * @returns An array of base messages representing the thoughts of the agent.\n */\n async constructScratchPad(steps: AgentStep[]): Promise<BaseMessage[]> {\n const thoughts: BaseMessage[] = [];\n for (const step of steps) {\n thoughts.push(new AIMessage(step.action.log));\n thoughts.push(\n new HumanMessage(\n renderTemplate(TEMPLATE_TOOL_RESPONSE, \"f-string\", {\n observation: step.observation,\n })\n )\n );\n }\n return thoughts;\n }\n\n /**\n * Returns the default output parser for the ChatConversationalAgent\n * class. It takes optional fields as arguments to customize the output\n * parser.\n * @param fields Optional fields to customize the output parser.\n * @returns The default output parser for the ChatConversationalAgent class.\n */\n static getDefaultOutputParser(\n fields?: OutputParserArgs & {\n toolNames: string[];\n }\n ): AgentActionOutputParser {\n if (fields?.llm) {\n return ChatConversationalAgentOutputParserWithRetries.fromLLM(\n fields.llm,\n {\n toolNames: fields.toolNames,\n }\n );\n }\n return new ChatConversationalAgentOutputParserWithRetries({\n toolNames: fields?.toolNames,\n });\n }\n\n /**\n * Create prompt in the style of the ChatConversationAgent.\n *\n * @param tools - List of tools the agent will have access to, used to format the prompt.\n * @param args - Arguments to create the prompt with.\n * @param args.systemMessage - String to put before the list of tools.\n * @param args.humanMessage - String to put after the list of tools.\n * @param args.outputParser - Output parser to use for formatting.\n */\n static createPrompt(\n tools: ToolInterface[],\n args?: ChatConversationalCreatePromptArgs\n ) {\n const systemMessage = (args?.systemMessage ?? DEFAULT_PREFIX) + PREFIX_END;\n const humanMessage = args?.humanMessage ?? DEFAULT_SUFFIX;\n const toolStrings = tools\n .map((tool) => `${tool.name}: ${tool.description}`)\n .join(\"\\n\");\n const toolNames = tools.map((tool) => tool.name);\n const outputParser =\n args?.outputParser ??\n ChatConversationalAgent.getDefaultOutputParser({ toolNames });\n const formatInstructions = outputParser.getFormatInstructions({\n toolNames,\n });\n const renderedHumanMessage = renderTemplate(humanMessage, \"f-string\", {\n format_instructions: formatInstructions,\n tools: toolStrings,\n });\n const messages = [\n SystemMessagePromptTemplate.fromTemplate(systemMessage),\n new MessagesPlaceholder(\"chat_history\"),\n HumanMessagePromptTemplate.fromTemplate(renderedHumanMessage),\n new MessagesPlaceholder(\"agent_scratchpad\"),\n ];\n return ChatPromptTemplate.fromMessages(messages);\n }\n\n /**\n * Creates an instance of the ChatConversationalAgent class from a\n * BaseLanguageModel and a set of tools. It takes optional arguments to\n * customize the agent.\n * @param llm The BaseLanguageModel to create the agent from.\n * @param tools The set of tools to create the agent from.\n * @param args Optional arguments to customize the agent.\n * @returns An instance of the ChatConversationalAgent class.\n */\n static fromLLMAndTools(\n llm: BaseLanguageModelInterface,\n tools: ToolInterface[],\n args?: ChatConversationalCreatePromptArgs & AgentArgs\n ) {\n ChatConversationalAgent.validateTools(tools);\n const outputParser =\n args?.outputParser ??\n ChatConversationalAgent.getDefaultOutputParser({\n llm,\n toolNames: tools.map((tool) => tool.name),\n });\n const prompt = ChatConversationalAgent.createPrompt(tools, {\n ...args,\n outputParser,\n });\n const chain = new LLMChain({\n prompt,\n llm,\n callbacks: args?.callbacks ?? args?.callbackManager,\n });\n return new ChatConversationalAgent({\n llmChain: chain,\n outputParser,\n allowedTools: tools.map((t) => t.name),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;AAqDA,IAAa,0BAAb,MAAa,gCAAgC,MAAM;CACjD,OAAO,UAAU;EACf,OAAO;CACT;CAEA,eAAe;EAAC;EAAa;EAAU;CAAY;CAInD,YAAY,OAAqC;EAC/C,MAAM,eACJ,MAAM,gBAAgB,wBAAwB,uBAAuB;EACvE,MAAM;GAAE,GAAG;GAAO;EAAa,CAAC;CAClC;CAEA,aAAa;EACX,OAAO;CACT;CAEA,oBAAoB;EAClB,OAAO;CACT;CAEA,YAAY;EACV,OAAO;CACT;CAEA,QAAkB;EAChB,OAAO,CAAC,cAAc;CACxB;CAEA,OAAO,cAAc,OAAwB;EAC3C,MAAM,sBAAsB,MAAM,MAAM,SAAS,CAAC,KAAK,WAAW;EAClE,IAAI,qBAAqB;GACvB,MAAM,MACJ,cAAc,oBAAoB,KAAK;GAEzC,MAAM,IAAI,MAAM,GAAG;EACrB;CACF;;;;;;;CAQA,MAAM,oBAAoB,OAA4C;EACpE,MAAM,WAA0B,CAAC;EACjC,KAAK,MAAM,QAAQ,OAAO;GACxB,SAAS,KAAK,IAAI,UAAU,KAAK,OAAO,GAAG,CAAC;GAC5C,SAAS,KACP,IAAI,aACF,eAAe,wBAAwB,YAAY,EACjD,aAAa,KAAK,YACpB,CAAC,CACH,CACF;EACF;EACA,OAAO;CACT;;;;;;;;CASA,OAAO,uBACL,QAGyB;EACzB,IAAI,QAAQ,KACV,OAAO,+CAA+C,QACpD,OAAO,KACP,EACE,WAAW,OAAO,UACpB,CACF;EAEF,OAAO,IAAI,+CAA+C,EACxD,WAAW,QAAQ,UACrB,CAAC;CACH;;;;;;;;;;CAWA,OAAO,aACL,OACA,MACA;EACA,MAAM,iBAAiB,MAAM,iBAAiB,kBAAkB;EAChE,MAAM,eAAe,MAAM,gBAAgB;EAC3C,MAAM,cAAc,MACjB,KAAK,SAAS,GAAG,KAAK,KAAK,IAAI,KAAK,aAAa,CAAC,CAClD,KAAK,IAAI;EACZ,MAAM,YAAY,MAAM,KAAK,SAAS,KAAK,IAAI;EAI/C,MAAM,sBAFJ,MAAM,gBACN,wBAAwB,uBAAuB,EAAE,UAAU,CAAC,EAAA,CACtB,sBAAsB,EAC5D,UACF,CAAC;EACD,MAAM,uBAAuB,eAAe,cAAc,YAAY;GACpE,qBAAqB;GACrB,OAAO;EACT,CAAC;EACD,MAAM,WAAW;GACf,4BAA4B,aAAa,aAAa;GACtD,IAAI,oBAAoB,cAAc;GACtC,2BAA2B,aAAa,oBAAoB;GAC5D,IAAI,oBAAoB,kBAAkB;EAC5C;EACA,OAAO,mBAAmB,aAAa,QAAQ;CACjD;;;;;;;;;;CAWA,OAAO,gBACL,KACA,OACA,MACA;EACA,wBAAwB,cAAc,KAAK;EAC3C,MAAM,eACJ,MAAM,gBACN,wBAAwB,uBAAuB;GAC7C;GACA,WAAW,MAAM,KAAK,SAAS,KAAK,IAAI;EAC1C,CAAC;EACH,MAAM,SAAS,wBAAwB,aAAa,OAAO;GACzD,GAAG;GACH;EACF,CAAC;EACD,MAAM,QAAQ,IAAI,SAAS;GACzB;GACA;GACA,WAAW,MAAM,aAAa,MAAM;EACtC,CAAC;EACD,OAAO,IAAI,wBAAwB;GACjC,UAAU;GACV;GACA,cAAc,MAAM,KAAK,MAAM,EAAE,IAAI;EACvC,CAAC;CACH;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/agents/chat_convo/index.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport type { ToolInterface } from \"@langchain/core/tools\";\nimport {\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n MessagesPlaceholder,\n SystemMessagePromptTemplate,\n renderTemplate,\n} from \"@langchain/core/prompts\";\nimport type { AgentStep } from \"@langchain/core/agents\";\nimport {\n type BaseMessage,\n HumanMessage,\n AIMessage,\n} from \"@langchain/core/messages\";\nimport { LLMChain } from \"../../chains/llm_chain.js\";\nimport { Optional } from \"../../types/type-utils.js\";\nimport { Agent, AgentArgs, OutputParserArgs } from \"../agent.js\";\nimport { AgentActionOutputParser, AgentInput } from \"../types.js\";\nimport { ChatConversationalAgentOutputParserWithRetries } from \"./outputParser.js\";\nimport {\n PREFIX_END,\n DEFAULT_PREFIX,\n DEFAULT_SUFFIX,\n TEMPLATE_TOOL_RESPONSE,\n} from \"./prompt.js\";\n\n/**\n * Interface defining the structure of arguments used to create a prompt\n * for the ChatConversationalAgent class.\n */\nexport interface ChatConversationalCreatePromptArgs {\n /** String to put after the list of tools. */\n systemMessage?: string;\n /** String to put before the list of tools. */\n humanMessage?: string;\n /** List of input variables the final prompt will expect. */\n inputVariables?: string[];\n /** Output parser to use for formatting. */\n outputParser?: AgentActionOutputParser;\n}\n\n/**\n * Type that extends the AgentInput interface for the\n * ChatConversationalAgent class, making the outputParser property\n * optional.\n */\nexport type ChatConversationalAgentInput = Optional<AgentInput, \"outputParser\">;\n\n/**\n * Agent for the MRKL chain.\n * @augments Agent\n */\nexport class ChatConversationalAgent extends Agent {\n static lc_name() {\n return \"ChatConversationalAgent\";\n }\n\n lc_namespace = [\"langchain\", \"agents\", \"chat_convo\"];\n\n declare ToolType: ToolInterface;\n\n constructor(input: ChatConversationalAgentInput) {\n const outputParser =\n input.outputParser ?? ChatConversationalAgent.getDefaultOutputParser();\n super({ ...input, outputParser });\n }\n\n _agentType() {\n return \"chat-conversational-react-description\" as const;\n }\n\n observationPrefix() {\n return \"Observation: \";\n }\n\n llmPrefix() {\n return \"Thought:\";\n }\n\n _stop(): string[] {\n return [\"Observation:\"];\n }\n\n static validateTools(tools: ToolInterface[]) {\n const descriptionlessTool = tools.find((tool) => !tool.description);\n if (descriptionlessTool) {\n const msg =\n `Got a tool ${descriptionlessTool.name} without a description.` +\n ` This agent requires descriptions for all tools.`;\n throw new Error(msg);\n }\n }\n\n /**\n * Constructs the agent scratchpad based on the agent steps. It returns an\n * array of base messages representing the thoughts of the agent.\n * @param steps The agent steps to construct the scratchpad from.\n * @returns An array of base messages representing the thoughts of the agent.\n */\n async constructScratchPad(steps: AgentStep[]): Promise<BaseMessage[]> {\n const thoughts: BaseMessage[] = [];\n for (const step of steps) {\n thoughts.push(new AIMessage(step.action.log));\n thoughts.push(\n new HumanMessage(\n renderTemplate(TEMPLATE_TOOL_RESPONSE, \"f-string\", {\n observation: step.observation,\n })\n )\n );\n }\n return thoughts;\n }\n\n /**\n * Returns the default output parser for the ChatConversationalAgent\n * class. It takes optional fields as arguments to customize the output\n * parser.\n * @param fields Optional fields to customize the output parser.\n * @returns The default output parser for the ChatConversationalAgent class.\n */\n static getDefaultOutputParser(\n fields?: OutputParserArgs & {\n toolNames: string[];\n }\n ): AgentActionOutputParser {\n if (fields?.llm) {\n return ChatConversationalAgentOutputParserWithRetries.fromLLM(\n fields.llm,\n {\n toolNames: fields.toolNames,\n }\n );\n }\n return new ChatConversationalAgentOutputParserWithRetries({\n toolNames: fields?.toolNames,\n });\n }\n\n /**\n * Create prompt in the style of the ChatConversationAgent.\n *\n * @param tools - List of tools the agent will have access to, used to format the prompt.\n * @param args - Arguments to create the prompt with.\n * @param args.systemMessage - String to put before the list of tools.\n * @param args.humanMessage - String to put after the list of tools.\n * @param args.outputParser - Output parser to use for formatting.\n */\n static createPrompt(\n tools: ToolInterface[],\n args?: ChatConversationalCreatePromptArgs\n ) {\n const systemMessage = (args?.systemMessage ?? DEFAULT_PREFIX) + PREFIX_END;\n const humanMessage = args?.humanMessage ?? DEFAULT_SUFFIX;\n const toolStrings = tools\n .map((tool) => `${tool.name}: ${tool.description}`)\n .join(\"\\n\");\n const toolNames = tools.map((tool) => tool.name);\n const outputParser =\n args?.outputParser ??\n ChatConversationalAgent.getDefaultOutputParser({ toolNames });\n const formatInstructions = outputParser.getFormatInstructions({\n toolNames,\n });\n const renderedHumanMessage = renderTemplate(humanMessage, \"f-string\", {\n format_instructions: formatInstructions,\n tools: toolStrings,\n });\n const messages = [\n SystemMessagePromptTemplate.fromTemplate(systemMessage),\n new MessagesPlaceholder(\"chat_history\"),\n HumanMessagePromptTemplate.fromTemplate(renderedHumanMessage),\n new MessagesPlaceholder(\"agent_scratchpad\"),\n ];\n return ChatPromptTemplate.fromMessages(messages);\n }\n\n /**\n * Creates an instance of the ChatConversationalAgent class from a\n * BaseLanguageModel and a set of tools. It takes optional arguments to\n * customize the agent.\n * @param llm The BaseLanguageModel to create the agent from.\n * @param tools The set of tools to create the agent from.\n * @param args Optional arguments to customize the agent.\n * @returns An instance of the ChatConversationalAgent class.\n */\n static fromLLMAndTools(\n llm: BaseLanguageModelInterface,\n tools: ToolInterface[],\n args?: ChatConversationalCreatePromptArgs & AgentArgs\n ) {\n ChatConversationalAgent.validateTools(tools);\n const outputParser =\n args?.outputParser ??\n ChatConversationalAgent.getDefaultOutputParser({\n llm,\n toolNames: tools.map((tool) => tool.name),\n });\n const prompt = ChatConversationalAgent.createPrompt(tools, {\n ...args,\n outputParser,\n });\n const chain = new LLMChain({\n prompt,\n llm,\n callbacks: args?.callbacks ?? args?.callbackManager,\n });\n return new ChatConversationalAgent({\n llmChain: chain,\n outputParser,\n allowedTools: tools.map((t) => t.name),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;AAqDA,IAAa,0BAAb,MAAa,gCAAgC,MAAM;CACjD,OAAO,UAAU;EACf,OAAO;CACT;CAEA,eAAe;EAAC;EAAa;EAAU;CAAY;CAInD,YAAY,OAAqC;EAC/C,MAAM,eACJ,MAAM,gBAAgB,wBAAwB,uBAAuB;EACvE,MAAM;GAAE,GAAG;GAAO;EAAa,CAAC;CAClC;CAEA,aAAa;EACX,OAAO;CACT;CAEA,oBAAoB;EAClB,OAAO;CACT;CAEA,YAAY;EACV,OAAO;CACT;CAEA,QAAkB;EAChB,OAAO,CAAC,cAAc;CACxB;CAEA,OAAO,cAAc,OAAwB;EAC3C,MAAM,sBAAsB,MAAM,MAAM,SAAS,CAAC,KAAK,WAAW;EAClE,IAAI,qBAAqB;GACvB,MAAM,MACJ,cAAc,oBAAoB,KAAK;GAEzC,MAAM,IAAI,MAAM,GAAG;EACrB;CACF;;;;;;;CAQA,MAAM,oBAAoB,OAA4C;EACpE,MAAM,WAA0B,CAAC;EACjC,KAAK,MAAM,QAAQ,OAAO;GACxB,SAAS,KAAK,IAAI,UAAU,KAAK,OAAO,GAAG,CAAC;GAC5C,SAAS,KACP,IAAI,aACF,eAAe,wBAAwB,YAAY,EACjD,aAAa,KAAK,YACpB,CAAC,CACH,CACF;EACF;EACA,OAAO;CACT;;;;;;;;CASA,OAAO,uBACL,QAGyB;EACzB,IAAI,QAAQ,KACV,OAAO,+CAA+C,QACpD,OAAO,KACP,EACE,WAAW,OAAO,UACpB,CACF;EAEF,OAAO,IAAI,+CAA+C,EACxD,WAAW,QAAQ,UACrB,CAAC;CACH;;;;;;;;;;CAWA,OAAO,aACL,OACA,MACA;EACA,MAAM,iBAAiB,MAAM,iBAAA,wsCAAmC;EAChE,MAAM,eAAe,MAAM,gBAAA;EAC3B,MAAM,cAAc,MACjB,KAAK,SAAS,GAAG,KAAK,KAAK,IAAI,KAAK,aAAa,CAAC,CAClD,KAAK,IAAI;EACZ,MAAM,YAAY,MAAM,KAAK,SAAS,KAAK,IAAI;EAI/C,MAAM,sBAFJ,MAAM,gBACN,wBAAwB,uBAAuB,EAAE,UAAU,CAAC,EAAA,CACtB,sBAAsB,EAC5D,UACF,CAAC;EACD,MAAM,uBAAuB,eAAe,cAAc,YAAY;GACpE,qBAAqB;GACrB,OAAO;EACT,CAAC;EACD,MAAM,WAAW;GACf,4BAA4B,aAAa,aAAa;GACtD,IAAI,oBAAoB,cAAc;GACtC,2BAA2B,aAAa,oBAAoB;GAC5D,IAAI,oBAAoB,kBAAkB;EAC5C;EACA,OAAO,mBAAmB,aAAa,QAAQ;CACjD;;;;;;;;;;CAWA,OAAO,gBACL,KACA,OACA,MACA;EACA,wBAAwB,cAAc,KAAK;EAC3C,MAAM,eACJ,MAAM,gBACN,wBAAwB,uBAAuB;GAC7C;GACA,WAAW,MAAM,KAAK,SAAS,KAAK,IAAI;EAC1C,CAAC;EACH,MAAM,SAAS,wBAAwB,aAAa,OAAO;GACzD,GAAG;GACH;EACF,CAAC;EACD,MAAM,QAAQ,IAAI,SAAS;GACzB;GACA;GACA,WAAW,MAAM,aAAa,MAAM;EACtC,CAAC;EACD,OAAO,IAAI,wBAAwB;GACjC,UAAU;GACV;GACA,cAAc,MAAM,KAAK,MAAM,EAAE,IAAI;EACvC,CAAC;CACH;AACF"}
@@ -1,9 +1,9 @@
1
- const require_prompt = require("./prompt.cjs");
2
1
  const require_types = require("../types.cjs");
2
+ const require_prompt = require("./prompt.cjs");
3
3
  const require_fix = require("../../output_parsers/fix.cjs");
4
4
  let _langchain_core_prompts = require("@langchain/core/prompts");
5
5
  let _langchain_core_output_parsers = require("@langchain/core/output_parsers");
6
- //#region src/agents/chat_convo/outputParser.ts
6
+ // src/agents/chat_convo/outputParser.ts
7
7
  /**
8
8
  * Class that represents an output parser for the ChatConversationalAgent
9
9
  * class. It extends the AgentActionOutputParser class and provides
@@ -120,7 +120,6 @@ var ChatConversationalAgentOutputParserWithRetries = class ChatConversationalAge
120
120
  });
121
121
  }
122
122
  };
123
- //#endregion
124
123
  exports.ChatConversationalAgentOutputParser = ChatConversationalAgentOutputParser;
125
124
  exports.ChatConversationalAgentOutputParserWithRetries = ChatConversationalAgentOutputParserWithRetries;
126
125
 
@@ -3,7 +3,6 @@ import { OutputFixingParser } from "../../output_parsers/fix.cjs";
3
3
  import { AgentAction, AgentFinish } from "@langchain/core/agents";
4
4
  import { FormatInstructionsOptions } from "@langchain/core/output_parsers";
5
5
  import { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
6
- //#region src/agents/chat_convo/outputParser.d.ts
7
6
  export type ChatConversationalAgentOutputParserFormatInstructionsOptions = FormatInstructionsOptions & {
8
7
  toolNames: string[];
9
8
  raw?: boolean;
@@ -74,5 +73,4 @@ export declare class ChatConversationalAgentOutputParserWithRetries extends Agen
74
73
  */
75
74
  static fromLLM(llm: BaseLanguageModelInterface, options: Omit<ChatConversationalAgentOutputParserArgs, "outputFixingParser">): ChatConversationalAgentOutputParserWithRetries;
76
75
  }
77
- //#endregion
78
76
  //# sourceMappingURL=outputParser.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"outputParser.d.cts","names":[],"sources":["../../../src/agents/chat_convo/outputParser.ts"],"mappings":";;;;;;YAWY,+DACV;EACE;EACA;;;;;;;qBAQS,4CAA4C;EACvD;UAEQ;EAER,YAAY;IAAU;;;;;;;;EAWhB,MAAM,eAAe,QAAQ,cAAc;;;;;;;EAuCjD;;YAOU;EACV,aAAa;EACb,qBAAqB,mBAAmB,cAAc;EACtD;;;;;;;;qBASW,uDAAuD;EAClE;UAEQ;UAEA;UAEA;EAER,YAAY,QAAQ;;;;;EAapB,sBACE,SAAS;;;;;;EAeL,MAAM,eAAe,QAAQ,cAAc;;;;;;;;;;;SAiB1C,QACL,KAAK,4BACL,SAAS,KAAK,iEACb"}
1
+ {"version":3,"file":"outputParser.d.cts","names":[],"sources":["../../../src/agents/chat_convo/outputParser.ts"],"mappings":";;;;;YAWY,+DACV;EACE;EACA;;;;;;;qBAQS,4CAA4C;EACvD;UAEQ;EAER,YAAY;IAAU;;;;;;;;EAWhB,MAAM,eAAe,QAAQ,cAAc;;;;;;;EAuCjD;;YAOU;EACV,aAAa;EACb,qBAAqB,mBAAmB,cAAc;EACtD;;;;;;;;qBASW,uDAAuD;EAClE;UAEQ;UAEA;UAEA;EAER,YAAY,QAAQ;;;;;EAapB,sBACE,SAAS;;;;;;EAeL,MAAM,eAAe,QAAQ,cAAc;;;;;;;;;;;SAiB1C,QACL,KAAK,4BACL,SAAS,KAAK,iEACb"}
@@ -3,7 +3,6 @@ import { OutputFixingParser } from "../../output_parsers/fix.js";
3
3
  import { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
4
4
  import { FormatInstructionsOptions } from "@langchain/core/output_parsers";
5
5
  import { AgentAction, AgentFinish } from "@langchain/core/agents";
6
- //#region src/agents/chat_convo/outputParser.d.ts
7
6
  export type ChatConversationalAgentOutputParserFormatInstructionsOptions = FormatInstructionsOptions & {
8
7
  toolNames: string[];
9
8
  raw?: boolean;
@@ -74,5 +73,4 @@ export declare class ChatConversationalAgentOutputParserWithRetries extends Agen
74
73
  */
75
74
  static fromLLM(llm: BaseLanguageModelInterface, options: Omit<ChatConversationalAgentOutputParserArgs, "outputFixingParser">): ChatConversationalAgentOutputParserWithRetries;
76
75
  }
77
- //#endregion
78
76
  //# sourceMappingURL=outputParser.d.ts.map