@langchain/classic 1.0.4 → 1.0.5

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 (895) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/agents/format_scratchpad/log.cjs +1 -0
  3. package/agents/format_scratchpad/log.d.cts +1 -0
  4. package/agents/format_scratchpad/log.d.ts +1 -0
  5. package/agents/format_scratchpad/log.js +1 -0
  6. package/agents/format_scratchpad/log_to_message.cjs +1 -0
  7. package/agents/format_scratchpad/log_to_message.d.cts +1 -0
  8. package/agents/format_scratchpad/log_to_message.d.ts +1 -0
  9. package/agents/format_scratchpad/log_to_message.js +1 -0
  10. package/agents/format_scratchpad/openai_functions.cjs +1 -0
  11. package/agents/format_scratchpad/openai_functions.d.cts +1 -0
  12. package/agents/format_scratchpad/openai_functions.d.ts +1 -0
  13. package/agents/format_scratchpad/openai_functions.js +1 -0
  14. package/agents/format_scratchpad/openai_tools.cjs +1 -0
  15. package/agents/format_scratchpad/openai_tools.d.cts +1 -0
  16. package/agents/format_scratchpad/openai_tools.d.ts +1 -0
  17. package/agents/format_scratchpad/openai_tools.js +1 -0
  18. package/agents/format_scratchpad/xml.cjs +1 -0
  19. package/agents/format_scratchpad/xml.d.cts +1 -0
  20. package/agents/format_scratchpad/xml.d.ts +1 -0
  21. package/agents/format_scratchpad/xml.js +1 -0
  22. package/agents/load.cjs +1 -0
  23. package/agents/load.d.cts +1 -0
  24. package/agents/load.d.ts +1 -0
  25. package/agents/load.js +1 -0
  26. package/agents/openai/output_parser.cjs +1 -0
  27. package/agents/openai/output_parser.d.cts +1 -0
  28. package/agents/openai/output_parser.d.ts +1 -0
  29. package/agents/openai/output_parser.js +1 -0
  30. package/agents/react/output_parser.cjs +1 -0
  31. package/agents/react/output_parser.d.cts +1 -0
  32. package/agents/react/output_parser.d.ts +1 -0
  33. package/agents/react/output_parser.js +1 -0
  34. package/agents/toolkits/sql.cjs +1 -0
  35. package/agents/toolkits/sql.d.cts +1 -0
  36. package/agents/toolkits/sql.d.ts +1 -0
  37. package/agents/toolkits/sql.js +1 -0
  38. package/agents/toolkits.cjs +1 -0
  39. package/agents/toolkits.d.cts +1 -0
  40. package/agents/toolkits.d.ts +1 -0
  41. package/agents/toolkits.js +1 -0
  42. package/agents/xml/output_parser.cjs +1 -0
  43. package/agents/xml/output_parser.d.cts +1 -0
  44. package/agents/xml/output_parser.d.ts +1 -0
  45. package/agents/xml/output_parser.js +1 -0
  46. package/agents.cjs +1 -0
  47. package/agents.d.cts +1 -0
  48. package/agents.d.ts +1 -0
  49. package/agents.js +1 -0
  50. package/cache/file_system.cjs +1 -0
  51. package/cache/file_system.d.cts +1 -0
  52. package/cache/file_system.d.ts +1 -0
  53. package/cache/file_system.js +1 -0
  54. package/callbacks.cjs +1 -0
  55. package/callbacks.d.cts +1 -0
  56. package/callbacks.d.ts +1 -0
  57. package/callbacks.js +1 -0
  58. package/chains/combine_documents/reduce.cjs +1 -0
  59. package/chains/combine_documents/reduce.d.cts +1 -0
  60. package/chains/combine_documents/reduce.d.ts +1 -0
  61. package/chains/combine_documents/reduce.js +1 -0
  62. package/chains/combine_documents.cjs +1 -0
  63. package/chains/combine_documents.d.cts +1 -0
  64. package/chains/combine_documents.d.ts +1 -0
  65. package/chains/combine_documents.js +1 -0
  66. package/chains/graph_qa/cypher.cjs +1 -0
  67. package/chains/graph_qa/cypher.d.cts +1 -0
  68. package/chains/graph_qa/cypher.d.ts +1 -0
  69. package/chains/graph_qa/cypher.js +1 -0
  70. package/chains/history_aware_retriever.cjs +1 -0
  71. package/chains/history_aware_retriever.d.cts +1 -0
  72. package/chains/history_aware_retriever.d.ts +1 -0
  73. package/chains/history_aware_retriever.js +1 -0
  74. package/chains/load.cjs +1 -0
  75. package/chains/load.d.cts +1 -0
  76. package/chains/load.d.ts +1 -0
  77. package/chains/load.js +1 -0
  78. package/chains/openai_functions.cjs +1 -0
  79. package/chains/openai_functions.d.cts +1 -0
  80. package/chains/openai_functions.d.ts +1 -0
  81. package/chains/openai_functions.js +1 -0
  82. package/chains/query_constructor/ir.cjs +1 -0
  83. package/chains/query_constructor/ir.d.cts +1 -0
  84. package/chains/query_constructor/ir.d.ts +1 -0
  85. package/chains/query_constructor/ir.js +1 -0
  86. package/chains/query_constructor.cjs +1 -0
  87. package/chains/query_constructor.d.cts +1 -0
  88. package/chains/query_constructor.d.ts +1 -0
  89. package/chains/query_constructor.js +1 -0
  90. package/chains/retrieval.cjs +1 -0
  91. package/chains/retrieval.d.cts +1 -0
  92. package/chains/retrieval.d.ts +1 -0
  93. package/chains/retrieval.js +1 -0
  94. package/chains/sql_db.cjs +1 -0
  95. package/chains/sql_db.d.cts +1 -0
  96. package/chains/sql_db.d.ts +1 -0
  97. package/chains/sql_db.js +1 -0
  98. package/chains.cjs +1 -0
  99. package/chains.d.cts +1 -0
  100. package/chains.d.ts +1 -0
  101. package/chains.js +1 -0
  102. package/chat_models/universal.cjs +1 -0
  103. package/chat_models/universal.d.cts +1 -0
  104. package/chat_models/universal.d.ts +1 -0
  105. package/chat_models/universal.js +1 -0
  106. package/dist/agents/agent.d.cts +0 -6
  107. package/dist/agents/agent.d.ts +0 -6
  108. package/dist/agents/chat/outputParser.d.cts +2 -2
  109. package/dist/agents/chat/outputParser.d.ts +2 -2
  110. package/dist/agents/executor.d.cts +0 -5
  111. package/dist/agents/executor.d.ts +0 -5
  112. package/dist/agents/index.d.ts +1 -0
  113. package/dist/agents/initialize.d.cts +2 -2
  114. package/dist/agents/mrkl/outputParser.d.ts +1 -1
  115. package/dist/agents/openai_functions/index.d.ts +1 -0
  116. package/dist/agents/tool_calling/output_parser.d.ts +1 -0
  117. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts +2 -2
  118. package/dist/agents/types.d.cts +0 -7
  119. package/dist/agents/types.d.ts +0 -7
  120. package/dist/callbacks/handlers/console.d.cts +1 -3
  121. package/dist/callbacks/handlers/console.d.ts +1 -3
  122. package/dist/callbacks/handlers/run_collector.d.cts +1 -3
  123. package/dist/callbacks/handlers/run_collector.d.ts +1 -3
  124. package/dist/callbacks/handlers/tracer.d.cts +1 -3
  125. package/dist/callbacks/handlers/tracer.d.ts +1 -3
  126. package/dist/callbacks/handlers/tracer_langchain.d.cts +1 -3
  127. package/dist/callbacks/handlers/tracer_langchain.d.ts +1 -3
  128. package/dist/callbacks/index.d.cts +8 -0
  129. package/dist/callbacks/index.d.ts +8 -0
  130. package/dist/callbacks/promises.d.cts +1 -3
  131. package/dist/callbacks/promises.d.ts +1 -3
  132. package/dist/chains/question_answering/load.d.ts +2 -2
  133. package/dist/chains/summarization/load.d.cts +2 -2
  134. package/dist/chains/summarization/load.d.ts +2 -2
  135. package/dist/document_transformers/openai_functions.d.ts +1 -1
  136. package/dist/evaluation/agents/index.d.ts +1 -0
  137. package/dist/evaluation/base.d.cts +0 -7
  138. package/dist/evaluation/base.d.ts +1 -7
  139. package/dist/evaluation/comparison/index.d.ts +1 -0
  140. package/dist/evaluation/criteria/index.d.ts +1 -0
  141. package/dist/evaluation/embedding_distance/index.d.ts +1 -0
  142. package/dist/evaluation/index.d.ts +5 -0
  143. package/dist/evaluation/loader.d.ts +2 -0
  144. package/dist/evaluation/qa/index.d.ts +1 -0
  145. package/dist/experimental/autogpt/prompt.d.ts +2 -2
  146. package/dist/langchain-core/dist/messages/message.d.cts +1 -1
  147. package/dist/langchain-core/dist/messages/utils.d.cts +5 -5
  148. package/dist/langchain-core/dist/tools/types.d.cts +0 -13
  149. package/dist/libs/langchain-core/dist/language_models/base.d.ts +2 -0
  150. package/dist/libs/langchain-core/dist/messages/message.d.ts +1 -1
  151. package/dist/libs/langchain-core/dist/messages/utils.d.ts +5 -5
  152. package/dist/libs/langchain-core/dist/runnables/config.d.ts +2 -0
  153. package/dist/libs/langchain-core/dist/tools/types.d.ts +2 -13
  154. package/dist/libs/langchain-core/dist/tracers/event_stream.d.ts +2 -1
  155. package/dist/libs/langchain-core/dist/utils/json_schema.d.ts +8 -0
  156. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/Options.d.ts +3 -0
  157. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/Refs.d.ts +3 -0
  158. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/errorMessages.d.ts +2 -0
  159. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/index.d.ts +13 -0
  160. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parseDef.d.ts +3 -0
  161. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parseTypes.d.ts +6 -1
  162. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/any.d.ts +1 -0
  163. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/array.d.ts +2 -0
  164. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/bigint.d.ts +2 -0
  165. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/branded.d.ts +3 -0
  166. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/catch.d.ts +3 -0
  167. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/date.d.ts +3 -0
  168. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/default.d.ts +3 -0
  169. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/effects.d.ts +3 -0
  170. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/intersection.d.ts +1 -0
  171. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/literal.d.ts +1 -0
  172. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/map.d.ts +2 -0
  173. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/never.d.ts +2 -0
  174. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/null.d.ts +1 -0
  175. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/nullable.d.ts +2 -0
  176. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/number.d.ts +2 -0
  177. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/object.d.ts +1 -0
  178. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/optional.d.ts +3 -0
  179. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/pipeline.d.ts +4 -0
  180. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/promise.d.ts +3 -0
  181. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/readonly.d.ts +3 -0
  182. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/record.d.ts +1 -0
  183. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/set.d.ts +2 -0
  184. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/string.d.ts +2 -0
  185. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/tuple.d.ts +1 -0
  186. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/undefined.d.ts +2 -0
  187. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/union.d.ts +1 -0
  188. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/parsers/unknown.d.ts +2 -0
  189. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/selectParser.d.ts +2 -0
  190. package/dist/libs/langchain-core/dist/utils/zod-to-json-schema/zodToJsonSchema.d.ts +3 -0
  191. package/dist/load/import_constants.cjs +25 -24
  192. package/dist/load/import_constants.cjs.map +1 -1
  193. package/dist/load/import_constants.js +25 -24
  194. package/dist/load/import_constants.js.map +1 -1
  195. package/dist/load/import_map.cjs +48 -48
  196. package/dist/load/import_map.cjs.map +1 -1
  197. package/dist/load/import_map.js +55 -55
  198. package/dist/load/import_map.js.map +1 -1
  199. package/dist/load/serializable.d.cts +1 -3
  200. package/dist/load/serializable.d.ts +1 -3
  201. package/dist/retrievers/multi_vector.d.ts +1 -1
  202. package/dist/retrievers/self_query/index.cjs +1 -1
  203. package/dist/retrievers/self_query/index.d.ts +1 -1
  204. package/dist/retrievers/self_query/index.js +1 -1
  205. package/dist/retrievers/time_weighted.d.ts +1 -1
  206. package/dist/smith/config.d.ts +1 -0
  207. package/dist/text_splitter.d.cts +1 -3
  208. package/dist/text_splitter.d.ts +1 -3
  209. package/document.cjs +1 -0
  210. package/document.d.cts +1 -0
  211. package/document.d.ts +1 -0
  212. package/document.js +1 -0
  213. package/document_loaders/base.cjs +1 -0
  214. package/document_loaders/base.d.cts +1 -0
  215. package/document_loaders/base.d.ts +1 -0
  216. package/document_loaders/base.js +1 -0
  217. package/document_loaders/fs/buffer.cjs +1 -0
  218. package/document_loaders/fs/buffer.d.cts +1 -0
  219. package/document_loaders/fs/buffer.d.ts +1 -0
  220. package/document_loaders/fs/buffer.js +1 -0
  221. package/document_loaders/fs/directory.cjs +1 -0
  222. package/document_loaders/fs/directory.d.cts +1 -0
  223. package/document_loaders/fs/directory.d.ts +1 -0
  224. package/document_loaders/fs/directory.js +1 -0
  225. package/document_loaders/fs/json.cjs +1 -0
  226. package/document_loaders/fs/json.d.cts +1 -0
  227. package/document_loaders/fs/json.d.ts +1 -0
  228. package/document_loaders/fs/json.js +1 -0
  229. package/document_loaders/fs/multi_file.cjs +1 -0
  230. package/document_loaders/fs/multi_file.d.cts +1 -0
  231. package/document_loaders/fs/multi_file.d.ts +1 -0
  232. package/document_loaders/fs/multi_file.js +1 -0
  233. package/document_loaders/fs/text.cjs +1 -0
  234. package/document_loaders/fs/text.d.cts +1 -0
  235. package/document_loaders/fs/text.d.ts +1 -0
  236. package/document_loaders/fs/text.js +1 -0
  237. package/document_transformers/openai_functions.cjs +1 -0
  238. package/document_transformers/openai_functions.d.cts +1 -0
  239. package/document_transformers/openai_functions.d.ts +1 -0
  240. package/document_transformers/openai_functions.js +1 -0
  241. package/embeddings/cache_backed.cjs +1 -0
  242. package/embeddings/cache_backed.d.cts +1 -0
  243. package/embeddings/cache_backed.d.ts +1 -0
  244. package/embeddings/cache_backed.js +1 -0
  245. package/embeddings/fake.cjs +1 -0
  246. package/embeddings/fake.d.cts +1 -0
  247. package/embeddings/fake.d.ts +1 -0
  248. package/embeddings/fake.js +1 -0
  249. package/evaluation.cjs +1 -0
  250. package/evaluation.d.cts +1 -0
  251. package/evaluation.d.ts +1 -0
  252. package/evaluation.js +1 -0
  253. package/experimental/autogpt.cjs +1 -0
  254. package/experimental/autogpt.d.cts +1 -0
  255. package/experimental/autogpt.d.ts +1 -0
  256. package/experimental/autogpt.js +1 -0
  257. package/experimental/babyagi.cjs +1 -0
  258. package/experimental/babyagi.d.cts +1 -0
  259. package/experimental/babyagi.d.ts +1 -0
  260. package/experimental/babyagi.js +1 -0
  261. package/experimental/chains/violation_of_expectations.cjs +1 -0
  262. package/experimental/chains/violation_of_expectations.d.cts +1 -0
  263. package/experimental/chains/violation_of_expectations.d.ts +1 -0
  264. package/experimental/chains/violation_of_expectations.js +1 -0
  265. package/experimental/generative_agents.cjs +1 -0
  266. package/experimental/generative_agents.d.cts +1 -0
  267. package/experimental/generative_agents.d.ts +1 -0
  268. package/experimental/generative_agents.js +1 -0
  269. package/experimental/masking.cjs +1 -0
  270. package/experimental/masking.d.cts +1 -0
  271. package/experimental/masking.d.ts +1 -0
  272. package/experimental/masking.js +1 -0
  273. package/experimental/openai_assistant.cjs +1 -0
  274. package/experimental/openai_assistant.d.cts +1 -0
  275. package/experimental/openai_assistant.d.ts +1 -0
  276. package/experimental/openai_assistant.js +1 -0
  277. package/experimental/openai_files.cjs +1 -0
  278. package/experimental/openai_files.d.cts +1 -0
  279. package/experimental/openai_files.d.ts +1 -0
  280. package/experimental/openai_files.js +1 -0
  281. package/experimental/plan_and_execute.cjs +1 -0
  282. package/experimental/plan_and_execute.d.cts +1 -0
  283. package/experimental/plan_and_execute.d.ts +1 -0
  284. package/experimental/plan_and_execute.js +1 -0
  285. package/experimental/prompts/custom_format.cjs +1 -0
  286. package/experimental/prompts/custom_format.d.cts +1 -0
  287. package/experimental/prompts/custom_format.d.ts +1 -0
  288. package/experimental/prompts/custom_format.js +1 -0
  289. package/experimental/prompts/handlebars.cjs +1 -0
  290. package/experimental/prompts/handlebars.d.cts +1 -0
  291. package/experimental/prompts/handlebars.d.ts +1 -0
  292. package/experimental/prompts/handlebars.js +1 -0
  293. package/hub/node.cjs +1 -0
  294. package/hub/node.d.cts +1 -0
  295. package/hub/node.d.ts +1 -0
  296. package/hub/node.js +1 -0
  297. package/hub.cjs +1 -0
  298. package/hub.d.cts +1 -0
  299. package/hub.d.ts +1 -0
  300. package/hub.js +1 -0
  301. package/indexes.cjs +1 -0
  302. package/indexes.d.cts +1 -0
  303. package/indexes.d.ts +1 -0
  304. package/indexes.js +1 -0
  305. package/load/serializable.cjs +1 -0
  306. package/load/serializable.d.cts +1 -0
  307. package/load/serializable.d.ts +1 -0
  308. package/load/serializable.js +1 -0
  309. package/load.cjs +1 -0
  310. package/load.d.cts +1 -0
  311. package/load.d.ts +1 -0
  312. package/load.js +1 -0
  313. package/memory/chat_memory.cjs +1 -0
  314. package/memory/chat_memory.d.cts +1 -0
  315. package/memory/chat_memory.d.ts +1 -0
  316. package/memory/chat_memory.js +1 -0
  317. package/memory.cjs +1 -0
  318. package/memory.d.cts +1 -0
  319. package/memory.d.ts +1 -0
  320. package/memory.js +1 -0
  321. package/output_parsers/expression.cjs +1 -0
  322. package/output_parsers/expression.d.cts +1 -0
  323. package/output_parsers/expression.d.ts +1 -0
  324. package/output_parsers/expression.js +1 -0
  325. package/output_parsers.cjs +1 -0
  326. package/output_parsers.d.cts +1 -0
  327. package/output_parsers.d.ts +1 -0
  328. package/output_parsers.js +1 -0
  329. package/package.json +763 -687
  330. package/retrievers/contextual_compression.cjs +1 -0
  331. package/retrievers/contextual_compression.d.cts +1 -0
  332. package/retrievers/contextual_compression.d.ts +1 -0
  333. package/retrievers/contextual_compression.js +1 -0
  334. package/retrievers/document_compressors/chain_extract.cjs +1 -0
  335. package/retrievers/document_compressors/chain_extract.d.cts +1 -0
  336. package/retrievers/document_compressors/chain_extract.d.ts +1 -0
  337. package/retrievers/document_compressors/chain_extract.js +1 -0
  338. package/retrievers/document_compressors/embeddings_filter.cjs +1 -0
  339. package/retrievers/document_compressors/embeddings_filter.d.cts +1 -0
  340. package/retrievers/document_compressors/embeddings_filter.d.ts +1 -0
  341. package/retrievers/document_compressors/embeddings_filter.js +1 -0
  342. package/retrievers/document_compressors.cjs +1 -0
  343. package/retrievers/document_compressors.d.cts +1 -0
  344. package/retrievers/document_compressors.d.ts +1 -0
  345. package/retrievers/document_compressors.js +1 -0
  346. package/retrievers/ensemble.cjs +1 -0
  347. package/retrievers/ensemble.d.cts +1 -0
  348. package/retrievers/ensemble.d.ts +1 -0
  349. package/retrievers/ensemble.js +1 -0
  350. package/retrievers/hyde.cjs +1 -0
  351. package/retrievers/hyde.d.cts +1 -0
  352. package/retrievers/hyde.d.ts +1 -0
  353. package/retrievers/hyde.js +1 -0
  354. package/retrievers/matryoshka_retriever.cjs +1 -0
  355. package/retrievers/matryoshka_retriever.d.cts +1 -0
  356. package/retrievers/matryoshka_retriever.d.ts +1 -0
  357. package/retrievers/matryoshka_retriever.js +1 -0
  358. package/retrievers/multi_query.cjs +1 -0
  359. package/retrievers/multi_query.d.cts +1 -0
  360. package/retrievers/multi_query.d.ts +1 -0
  361. package/retrievers/multi_query.js +1 -0
  362. package/retrievers/multi_vector.cjs +1 -0
  363. package/retrievers/multi_vector.d.cts +1 -0
  364. package/retrievers/multi_vector.d.ts +1 -0
  365. package/retrievers/multi_vector.js +1 -0
  366. package/retrievers/parent_document.cjs +1 -0
  367. package/retrievers/parent_document.d.cts +1 -0
  368. package/retrievers/parent_document.d.ts +1 -0
  369. package/retrievers/parent_document.js +1 -0
  370. package/retrievers/score_threshold.cjs +1 -0
  371. package/retrievers/score_threshold.d.cts +1 -0
  372. package/retrievers/score_threshold.d.ts +1 -0
  373. package/retrievers/score_threshold.js +1 -0
  374. package/retrievers/self_query/functional.cjs +1 -0
  375. package/retrievers/self_query/functional.d.cts +1 -0
  376. package/retrievers/self_query/functional.d.ts +1 -0
  377. package/retrievers/self_query/functional.js +1 -0
  378. package/retrievers/self_query.cjs +1 -0
  379. package/retrievers/self_query.d.cts +1 -0
  380. package/retrievers/self_query.d.ts +1 -0
  381. package/retrievers/self_query.js +1 -0
  382. package/retrievers/time_weighted.cjs +1 -0
  383. package/retrievers/time_weighted.d.cts +1 -0
  384. package/retrievers/time_weighted.d.ts +1 -0
  385. package/retrievers/time_weighted.js +1 -0
  386. package/schema/prompt_template.cjs +1 -0
  387. package/schema/prompt_template.d.cts +1 -0
  388. package/schema/prompt_template.d.ts +1 -0
  389. package/schema/prompt_template.js +1 -0
  390. package/schema/query_constructor.cjs +1 -0
  391. package/schema/query_constructor.d.cts +1 -0
  392. package/schema/query_constructor.d.ts +1 -0
  393. package/schema/query_constructor.js +1 -0
  394. package/smith.cjs +1 -0
  395. package/smith.d.cts +1 -0
  396. package/smith.d.ts +1 -0
  397. package/smith.js +1 -0
  398. package/sql_db.cjs +1 -0
  399. package/sql_db.d.cts +1 -0
  400. package/sql_db.d.ts +1 -0
  401. package/sql_db.js +1 -0
  402. package/storage/encoder_backed.cjs +1 -0
  403. package/storage/encoder_backed.d.cts +1 -0
  404. package/storage/encoder_backed.d.ts +1 -0
  405. package/storage/encoder_backed.js +1 -0
  406. package/storage/file_system.cjs +1 -0
  407. package/storage/file_system.d.cts +1 -0
  408. package/storage/file_system.d.ts +1 -0
  409. package/storage/file_system.js +1 -0
  410. package/storage/in_memory.cjs +1 -0
  411. package/storage/in_memory.d.cts +1 -0
  412. package/storage/in_memory.d.ts +1 -0
  413. package/storage/in_memory.js +1 -0
  414. package/stores/doc/base.cjs +1 -0
  415. package/stores/doc/base.d.cts +1 -0
  416. package/stores/doc/base.d.ts +1 -0
  417. package/stores/doc/base.js +1 -0
  418. package/stores/doc/in_memory.cjs +1 -0
  419. package/stores/doc/in_memory.d.cts +1 -0
  420. package/stores/doc/in_memory.d.ts +1 -0
  421. package/stores/doc/in_memory.js +1 -0
  422. package/stores/file/in_memory.cjs +1 -0
  423. package/stores/file/in_memory.d.cts +1 -0
  424. package/stores/file/in_memory.d.ts +1 -0
  425. package/stores/file/in_memory.js +1 -0
  426. package/stores/file/node.cjs +1 -0
  427. package/stores/file/node.d.cts +1 -0
  428. package/stores/file/node.d.ts +1 -0
  429. package/stores/file/node.js +1 -0
  430. package/stores/message/in_memory.cjs +1 -0
  431. package/stores/message/in_memory.d.cts +1 -0
  432. package/stores/message/in_memory.d.ts +1 -0
  433. package/stores/message/in_memory.js +1 -0
  434. package/text_splitter.cjs +1 -0
  435. package/text_splitter.d.cts +1 -0
  436. package/text_splitter.d.ts +1 -0
  437. package/text_splitter.js +1 -0
  438. package/tools/chain.cjs +1 -0
  439. package/tools/chain.d.cts +1 -0
  440. package/tools/chain.d.ts +1 -0
  441. package/tools/chain.js +1 -0
  442. package/tools/render.cjs +1 -0
  443. package/tools/render.d.cts +1 -0
  444. package/tools/render.d.ts +1 -0
  445. package/tools/render.js +1 -0
  446. package/tools/retriever.cjs +1 -0
  447. package/tools/retriever.d.cts +1 -0
  448. package/tools/retriever.d.ts +1 -0
  449. package/tools/retriever.js +1 -0
  450. package/tools/sql.cjs +1 -0
  451. package/tools/sql.d.cts +1 -0
  452. package/tools/sql.d.ts +1 -0
  453. package/tools/sql.js +1 -0
  454. package/tools/webbrowser.cjs +1 -0
  455. package/tools/webbrowser.d.cts +1 -0
  456. package/tools/webbrowser.d.ts +1 -0
  457. package/tools/webbrowser.js +1 -0
  458. package/tools.cjs +1 -0
  459. package/tools.d.cts +1 -0
  460. package/tools.d.ts +1 -0
  461. package/tools.js +1 -0
  462. package/util/document.cjs +1 -0
  463. package/util/document.d.cts +1 -0
  464. package/util/document.d.ts +1 -0
  465. package/util/document.js +1 -0
  466. package/util/math.cjs +1 -0
  467. package/util/math.d.cts +1 -0
  468. package/util/math.d.ts +1 -0
  469. package/util/math.js +1 -0
  470. package/util/time.cjs +1 -0
  471. package/util/time.d.cts +1 -0
  472. package/util/time.d.ts +1 -0
  473. package/util/time.js +1 -0
  474. package/vectorstores/memory.cjs +1 -0
  475. package/vectorstores/memory.d.cts +1 -0
  476. package/vectorstores/memory.d.ts +1 -0
  477. package/vectorstores/memory.js +1 -0
  478. package/dist/agents/agent.d.cts.map +0 -1
  479. package/dist/agents/agent.d.ts.map +0 -1
  480. package/dist/agents/chat/index.d.cts.map +0 -1
  481. package/dist/agents/chat/index.d.ts.map +0 -1
  482. package/dist/agents/chat/outputParser.d.cts.map +0 -1
  483. package/dist/agents/chat/outputParser.d.ts.map +0 -1
  484. package/dist/agents/chat_convo/index.d.cts.map +0 -1
  485. package/dist/agents/chat_convo/index.d.ts.map +0 -1
  486. package/dist/agents/chat_convo/outputParser.d.cts.map +0 -1
  487. package/dist/agents/chat_convo/outputParser.d.ts.map +0 -1
  488. package/dist/agents/executor.d.cts.map +0 -1
  489. package/dist/agents/executor.d.ts.map +0 -1
  490. package/dist/agents/format_scratchpad/log.d.cts.map +0 -1
  491. package/dist/agents/format_scratchpad/log.d.ts.map +0 -1
  492. package/dist/agents/format_scratchpad/log_to_message.d.cts.map +0 -1
  493. package/dist/agents/format_scratchpad/log_to_message.d.ts.map +0 -1
  494. package/dist/agents/format_scratchpad/openai_functions.d.cts.map +0 -1
  495. package/dist/agents/format_scratchpad/openai_functions.d.ts.map +0 -1
  496. package/dist/agents/format_scratchpad/tool_calling.d.cts.map +0 -1
  497. package/dist/agents/format_scratchpad/tool_calling.d.ts.map +0 -1
  498. package/dist/agents/format_scratchpad/xml.d.cts.map +0 -1
  499. package/dist/agents/format_scratchpad/xml.d.ts.map +0 -1
  500. package/dist/agents/initialize.d.cts.map +0 -1
  501. package/dist/agents/initialize.d.ts.map +0 -1
  502. package/dist/agents/load.d.cts.map +0 -1
  503. package/dist/agents/load.d.ts.map +0 -1
  504. package/dist/agents/mrkl/index.d.cts.map +0 -1
  505. package/dist/agents/mrkl/index.d.ts.map +0 -1
  506. package/dist/agents/mrkl/outputParser.d.cts.map +0 -1
  507. package/dist/agents/mrkl/outputParser.d.ts.map +0 -1
  508. package/dist/agents/openai_functions/index.d.cts.map +0 -1
  509. package/dist/agents/openai_functions/index.d.ts.map +0 -1
  510. package/dist/agents/openai_functions/output_parser.d.cts.map +0 -1
  511. package/dist/agents/openai_functions/output_parser.d.ts.map +0 -1
  512. package/dist/agents/openai_tools/index.d.cts.map +0 -1
  513. package/dist/agents/openai_tools/index.d.ts.map +0 -1
  514. package/dist/agents/openai_tools/output_parser.d.cts.map +0 -1
  515. package/dist/agents/openai_tools/output_parser.d.ts.map +0 -1
  516. package/dist/agents/react/index.d.cts.map +0 -1
  517. package/dist/agents/react/index.d.ts.map +0 -1
  518. package/dist/agents/react/output_parser.d.cts.map +0 -1
  519. package/dist/agents/react/output_parser.d.ts.map +0 -1
  520. package/dist/agents/structured_chat/index.d.cts.map +0 -1
  521. package/dist/agents/structured_chat/index.d.ts.map +0 -1
  522. package/dist/agents/structured_chat/outputParser.d.cts.map +0 -1
  523. package/dist/agents/structured_chat/outputParser.d.ts.map +0 -1
  524. package/dist/agents/tool_calling/index.d.cts.map +0 -1
  525. package/dist/agents/tool_calling/index.d.ts.map +0 -1
  526. package/dist/agents/tool_calling/output_parser.d.cts.map +0 -1
  527. package/dist/agents/tool_calling/output_parser.d.ts.map +0 -1
  528. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.cts.map +0 -1
  529. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.ts.map +0 -1
  530. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts.map +0 -1
  531. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts.map +0 -1
  532. package/dist/agents/toolkits/conversational_retrieval/tool.d.cts.map +0 -1
  533. package/dist/agents/toolkits/conversational_retrieval/tool.d.ts.map +0 -1
  534. package/dist/agents/toolkits/json/json.d.cts.map +0 -1
  535. package/dist/agents/toolkits/json/json.d.ts.map +0 -1
  536. package/dist/agents/toolkits/openapi/openapi.d.cts.map +0 -1
  537. package/dist/agents/toolkits/openapi/openapi.d.ts.map +0 -1
  538. package/dist/agents/toolkits/sql/prompt.d.cts.map +0 -1
  539. package/dist/agents/toolkits/sql/prompt.d.ts.map +0 -1
  540. package/dist/agents/toolkits/sql/sql.d.cts.map +0 -1
  541. package/dist/agents/toolkits/sql/sql.d.ts.map +0 -1
  542. package/dist/agents/toolkits/vectorstore/vectorstore.d.cts.map +0 -1
  543. package/dist/agents/toolkits/vectorstore/vectorstore.d.ts.map +0 -1
  544. package/dist/agents/types.d.cts.map +0 -1
  545. package/dist/agents/types.d.ts.map +0 -1
  546. package/dist/agents/xml/index.d.cts.map +0 -1
  547. package/dist/agents/xml/index.d.ts.map +0 -1
  548. package/dist/agents/xml/output_parser.d.cts.map +0 -1
  549. package/dist/agents/xml/output_parser.d.ts.map +0 -1
  550. package/dist/cache/file_system.d.cts.map +0 -1
  551. package/dist/cache/file_system.d.ts.map +0 -1
  552. package/dist/callbacks/handlers/console.d.cts.map +0 -1
  553. package/dist/callbacks/handlers/console.d.ts.map +0 -1
  554. package/dist/callbacks/handlers/run_collector.d.cts.map +0 -1
  555. package/dist/callbacks/handlers/run_collector.d.ts.map +0 -1
  556. package/dist/callbacks/handlers/tracer.d.cts.map +0 -1
  557. package/dist/callbacks/handlers/tracer.d.ts.map +0 -1
  558. package/dist/callbacks/handlers/tracer_langchain.d.cts.map +0 -1
  559. package/dist/callbacks/handlers/tracer_langchain.d.ts.map +0 -1
  560. package/dist/callbacks/promises.d.cts.map +0 -1
  561. package/dist/callbacks/promises.d.ts.map +0 -1
  562. package/dist/chains/analyze_documents_chain.d.cts.map +0 -1
  563. package/dist/chains/analyze_documents_chain.d.ts.map +0 -1
  564. package/dist/chains/api/api_chain.d.cts.map +0 -1
  565. package/dist/chains/api/api_chain.d.ts.map +0 -1
  566. package/dist/chains/base.d.cts.map +0 -1
  567. package/dist/chains/base.d.ts.map +0 -1
  568. package/dist/chains/chat_vector_db_chain.d.cts.map +0 -1
  569. package/dist/chains/chat_vector_db_chain.d.ts.map +0 -1
  570. package/dist/chains/combine_docs_chain.d.cts.map +0 -1
  571. package/dist/chains/combine_docs_chain.d.ts.map +0 -1
  572. package/dist/chains/combine_documents/reduce.d.cts.map +0 -1
  573. package/dist/chains/combine_documents/reduce.d.ts.map +0 -1
  574. package/dist/chains/combine_documents/stuff.d.cts.map +0 -1
  575. package/dist/chains/combine_documents/stuff.d.ts.map +0 -1
  576. package/dist/chains/constitutional_ai/constitutional_chain.d.cts.map +0 -1
  577. package/dist/chains/constitutional_ai/constitutional_chain.d.ts.map +0 -1
  578. package/dist/chains/constitutional_ai/constitutional_principle.d.cts.map +0 -1
  579. package/dist/chains/constitutional_ai/constitutional_principle.d.ts.map +0 -1
  580. package/dist/chains/conversation.d.cts.map +0 -1
  581. package/dist/chains/conversation.d.ts.map +0 -1
  582. package/dist/chains/conversational_retrieval_chain.d.cts.map +0 -1
  583. package/dist/chains/conversational_retrieval_chain.d.ts.map +0 -1
  584. package/dist/chains/graph_qa/cypher.d.cts.map +0 -1
  585. package/dist/chains/graph_qa/cypher.d.ts.map +0 -1
  586. package/dist/chains/history_aware_retriever.d.cts.map +0 -1
  587. package/dist/chains/history_aware_retriever.d.ts.map +0 -1
  588. package/dist/chains/llm_chain.d.cts.map +0 -1
  589. package/dist/chains/llm_chain.d.ts.map +0 -1
  590. package/dist/chains/load.d.cts.map +0 -1
  591. package/dist/chains/load.d.ts.map +0 -1
  592. package/dist/chains/openai_functions/base.d.cts.map +0 -1
  593. package/dist/chains/openai_functions/base.d.ts.map +0 -1
  594. package/dist/chains/openai_functions/extraction.d.cts.map +0 -1
  595. package/dist/chains/openai_functions/extraction.d.ts.map +0 -1
  596. package/dist/chains/openai_functions/openapi.d.cts.map +0 -1
  597. package/dist/chains/openai_functions/openapi.d.ts.map +0 -1
  598. package/dist/chains/openai_functions/tagging.d.cts.map +0 -1
  599. package/dist/chains/openai_functions/tagging.d.ts.map +0 -1
  600. package/dist/chains/openai_moderation.d.cts.map +0 -1
  601. package/dist/chains/openai_moderation.d.ts.map +0 -1
  602. package/dist/chains/query_constructor/index.d.cts.map +0 -1
  603. package/dist/chains/query_constructor/index.d.ts.map +0 -1
  604. package/dist/chains/query_constructor/parser.d.cts.map +0 -1
  605. package/dist/chains/query_constructor/parser.d.ts.map +0 -1
  606. package/dist/chains/query_constructor/prompt.d.cts.map +0 -1
  607. package/dist/chains/query_constructor/prompt.d.ts.map +0 -1
  608. package/dist/chains/question_answering/load.d.cts.map +0 -1
  609. package/dist/chains/question_answering/load.d.ts.map +0 -1
  610. package/dist/chains/retrieval.d.cts.map +0 -1
  611. package/dist/chains/retrieval.d.ts.map +0 -1
  612. package/dist/chains/retrieval_qa.d.cts.map +0 -1
  613. package/dist/chains/retrieval_qa.d.ts.map +0 -1
  614. package/dist/chains/router/llm_router.d.cts.map +0 -1
  615. package/dist/chains/router/llm_router.d.ts.map +0 -1
  616. package/dist/chains/router/multi_prompt.d.cts.map +0 -1
  617. package/dist/chains/router/multi_prompt.d.ts.map +0 -1
  618. package/dist/chains/router/multi_retrieval_qa.d.cts.map +0 -1
  619. package/dist/chains/router/multi_retrieval_qa.d.ts.map +0 -1
  620. package/dist/chains/router/multi_route.d.cts.map +0 -1
  621. package/dist/chains/router/multi_route.d.ts.map +0 -1
  622. package/dist/chains/sequential_chain.d.cts.map +0 -1
  623. package/dist/chains/sequential_chain.d.ts.map +0 -1
  624. package/dist/chains/serde.d.cts.map +0 -1
  625. package/dist/chains/serde.d.ts.map +0 -1
  626. package/dist/chains/sql_db/sql_db_chain.d.cts.map +0 -1
  627. package/dist/chains/sql_db/sql_db_chain.d.ts.map +0 -1
  628. package/dist/chains/sql_db/sql_db_prompt.d.cts.map +0 -1
  629. package/dist/chains/sql_db/sql_db_prompt.d.ts.map +0 -1
  630. package/dist/chains/summarization/load.d.cts.map +0 -1
  631. package/dist/chains/summarization/load.d.ts.map +0 -1
  632. package/dist/chains/transform.d.cts.map +0 -1
  633. package/dist/chains/transform.d.ts.map +0 -1
  634. package/dist/chains/vector_db_qa.d.cts.map +0 -1
  635. package/dist/chains/vector_db_qa.d.ts.map +0 -1
  636. package/dist/chat_models/universal.d.cts.map +0 -1
  637. package/dist/chat_models/universal.d.ts.map +0 -1
  638. package/dist/document_loaders/fs/buffer.d.cts.map +0 -1
  639. package/dist/document_loaders/fs/buffer.d.ts.map +0 -1
  640. package/dist/document_loaders/fs/directory.d.cts.map +0 -1
  641. package/dist/document_loaders/fs/directory.d.ts.map +0 -1
  642. package/dist/document_loaders/fs/json.d.cts.map +0 -1
  643. package/dist/document_loaders/fs/json.d.ts.map +0 -1
  644. package/dist/document_loaders/fs/multi_file.d.cts.map +0 -1
  645. package/dist/document_loaders/fs/multi_file.d.ts.map +0 -1
  646. package/dist/document_loaders/fs/text.d.cts.map +0 -1
  647. package/dist/document_loaders/fs/text.d.ts.map +0 -1
  648. package/dist/document_transformers/openai_functions.d.cts.map +0 -1
  649. package/dist/document_transformers/openai_functions.d.ts.map +0 -1
  650. package/dist/embeddings/cache_backed.d.cts.map +0 -1
  651. package/dist/embeddings/cache_backed.d.ts.map +0 -1
  652. package/dist/evaluation/agents/trajectory.d.cts.map +0 -1
  653. package/dist/evaluation/agents/trajectory.d.ts.map +0 -1
  654. package/dist/evaluation/base.d.cts.map +0 -1
  655. package/dist/evaluation/base.d.ts.map +0 -1
  656. package/dist/evaluation/comparison/pairwise.d.cts.map +0 -1
  657. package/dist/evaluation/comparison/pairwise.d.ts.map +0 -1
  658. package/dist/evaluation/criteria/criteria.d.cts.map +0 -1
  659. package/dist/evaluation/criteria/criteria.d.ts.map +0 -1
  660. package/dist/evaluation/embedding_distance/base.d.cts.map +0 -1
  661. package/dist/evaluation/embedding_distance/base.d.ts.map +0 -1
  662. package/dist/evaluation/loader.d.cts.map +0 -1
  663. package/dist/evaluation/loader.d.ts.map +0 -1
  664. package/dist/evaluation/qa/eval_chain.d.cts.map +0 -1
  665. package/dist/evaluation/qa/eval_chain.d.ts.map +0 -1
  666. package/dist/evaluation/types.d.cts.map +0 -1
  667. package/dist/evaluation/types.d.ts.map +0 -1
  668. package/dist/experimental/autogpt/agent.d.cts.map +0 -1
  669. package/dist/experimental/autogpt/agent.d.ts.map +0 -1
  670. package/dist/experimental/autogpt/output_parser.d.cts.map +0 -1
  671. package/dist/experimental/autogpt/output_parser.d.ts.map +0 -1
  672. package/dist/experimental/autogpt/prompt.d.cts.map +0 -1
  673. package/dist/experimental/autogpt/prompt.d.ts.map +0 -1
  674. package/dist/experimental/autogpt/schema.d.cts.map +0 -1
  675. package/dist/experimental/autogpt/schema.d.ts.map +0 -1
  676. package/dist/experimental/babyagi/agent.d.cts.map +0 -1
  677. package/dist/experimental/babyagi/agent.d.ts.map +0 -1
  678. package/dist/experimental/babyagi/task_creation.d.cts.map +0 -1
  679. package/dist/experimental/babyagi/task_creation.d.ts.map +0 -1
  680. package/dist/experimental/babyagi/task_execution.d.cts.map +0 -1
  681. package/dist/experimental/babyagi/task_execution.d.ts.map +0 -1
  682. package/dist/experimental/babyagi/task_prioritization.d.cts.map +0 -1
  683. package/dist/experimental/babyagi/task_prioritization.d.ts.map +0 -1
  684. package/dist/experimental/chains/violation_of_expectations/types.d.cts.map +0 -1
  685. package/dist/experimental/chains/violation_of_expectations/types.d.ts.map +0 -1
  686. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.cts.map +0 -1
  687. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts.map +0 -1
  688. package/dist/experimental/generative_agents/generative_agent.d.cts.map +0 -1
  689. package/dist/experimental/generative_agents/generative_agent.d.ts.map +0 -1
  690. package/dist/experimental/generative_agents/generative_agent_memory.d.cts.map +0 -1
  691. package/dist/experimental/generative_agents/generative_agent_memory.d.ts.map +0 -1
  692. package/dist/experimental/masking/parser.d.cts.map +0 -1
  693. package/dist/experimental/masking/parser.d.ts.map +0 -1
  694. package/dist/experimental/masking/regex_masking_transformer.d.cts.map +0 -1
  695. package/dist/experimental/masking/regex_masking_transformer.d.ts.map +0 -1
  696. package/dist/experimental/masking/transformer.d.cts.map +0 -1
  697. package/dist/experimental/masking/transformer.d.ts.map +0 -1
  698. package/dist/experimental/masking/types.d.cts.map +0 -1
  699. package/dist/experimental/masking/types.d.ts.map +0 -1
  700. package/dist/experimental/openai_assistant/index.d.cts.map +0 -1
  701. package/dist/experimental/openai_assistant/index.d.ts.map +0 -1
  702. package/dist/experimental/openai_assistant/schema.d.cts.map +0 -1
  703. package/dist/experimental/openai_assistant/schema.d.ts.map +0 -1
  704. package/dist/experimental/openai_files/index.d.cts.map +0 -1
  705. package/dist/experimental/openai_files/index.d.ts.map +0 -1
  706. package/dist/experimental/plan_and_execute/agent_executor.d.cts.map +0 -1
  707. package/dist/experimental/plan_and_execute/agent_executor.d.ts.map +0 -1
  708. package/dist/experimental/plan_and_execute/base.d.cts.map +0 -1
  709. package/dist/experimental/plan_and_execute/base.d.ts.map +0 -1
  710. package/dist/experimental/plan_and_execute/outputParser.d.cts.map +0 -1
  711. package/dist/experimental/plan_and_execute/outputParser.d.ts.map +0 -1
  712. package/dist/experimental/prompts/custom_format.d.cts.map +0 -1
  713. package/dist/experimental/prompts/custom_format.d.ts.map +0 -1
  714. package/dist/experimental/prompts/handlebars.d.cts.map +0 -1
  715. package/dist/experimental/prompts/handlebars.d.ts.map +0 -1
  716. package/dist/hub/base.d.cts.map +0 -1
  717. package/dist/hub/base.d.ts.map +0 -1
  718. package/dist/hub/index.d.cts.map +0 -1
  719. package/dist/hub/index.d.ts.map +0 -1
  720. package/dist/hub/node.d.cts.map +0 -1
  721. package/dist/hub/node.d.ts.map +0 -1
  722. package/dist/langchain-core/dist/load/map_keys.d.cts.map +0 -1
  723. package/dist/langchain-core/dist/load/serializable.d.cts.map +0 -1
  724. package/dist/langchain-core/dist/messages/base.d.cts.map +0 -1
  725. package/dist/langchain-core/dist/messages/content/base.d.cts.map +0 -1
  726. package/dist/langchain-core/dist/messages/content/data.d.cts.map +0 -1
  727. package/dist/langchain-core/dist/messages/content/index.d.cts.map +0 -1
  728. package/dist/langchain-core/dist/messages/content/multimodal.d.cts.map +0 -1
  729. package/dist/langchain-core/dist/messages/content/tools.d.cts.map +0 -1
  730. package/dist/langchain-core/dist/messages/format.d.cts.map +0 -1
  731. package/dist/langchain-core/dist/messages/message.d.cts.map +0 -1
  732. package/dist/langchain-core/dist/messages/metadata.d.cts.map +0 -1
  733. package/dist/langchain-core/dist/messages/utils.d.cts.map +0 -1
  734. package/dist/langchain-core/dist/prompt_values.d.cts.map +0 -1
  735. package/dist/langchain-core/dist/tools/types.d.cts.map +0 -1
  736. package/dist/langchain-core/dist/utils/types/index.d.cts.map +0 -1
  737. package/dist/libs/langchain-core/dist/load/map_keys.d.ts.map +0 -1
  738. package/dist/libs/langchain-core/dist/load/serializable.d.ts.map +0 -1
  739. package/dist/libs/langchain-core/dist/messages/base.d.ts.map +0 -1
  740. package/dist/libs/langchain-core/dist/messages/content/base.d.ts.map +0 -1
  741. package/dist/libs/langchain-core/dist/messages/content/data.d.ts.map +0 -1
  742. package/dist/libs/langchain-core/dist/messages/content/index.d.ts.map +0 -1
  743. package/dist/libs/langchain-core/dist/messages/content/multimodal.d.ts.map +0 -1
  744. package/dist/libs/langchain-core/dist/messages/content/tools.d.ts.map +0 -1
  745. package/dist/libs/langchain-core/dist/messages/format.d.ts.map +0 -1
  746. package/dist/libs/langchain-core/dist/messages/message.d.ts.map +0 -1
  747. package/dist/libs/langchain-core/dist/messages/metadata.d.ts.map +0 -1
  748. package/dist/libs/langchain-core/dist/messages/utils.d.ts.map +0 -1
  749. package/dist/libs/langchain-core/dist/prompt_values.d.ts.map +0 -1
  750. package/dist/libs/langchain-core/dist/tools/types.d.ts.map +0 -1
  751. package/dist/libs/langchain-core/dist/utils/types/index.d.ts.map +0 -1
  752. package/dist/load/import_type.d.cts.map +0 -1
  753. package/dist/load/import_type.d.ts.map +0 -1
  754. package/dist/load/index.d.cts.map +0 -1
  755. package/dist/load/index.d.ts.map +0 -1
  756. package/dist/load/map_keys.d.cts.map +0 -1
  757. package/dist/load/map_keys.d.ts.map +0 -1
  758. package/dist/load/serializable.d.cts.map +0 -1
  759. package/dist/load/serializable.d.ts.map +0 -1
  760. package/dist/memory/buffer_memory.d.cts.map +0 -1
  761. package/dist/memory/buffer_memory.d.ts.map +0 -1
  762. package/dist/memory/buffer_token_memory.d.cts.map +0 -1
  763. package/dist/memory/buffer_token_memory.d.ts.map +0 -1
  764. package/dist/memory/buffer_window_memory.d.cts.map +0 -1
  765. package/dist/memory/buffer_window_memory.d.ts.map +0 -1
  766. package/dist/memory/chat_memory.d.cts.map +0 -1
  767. package/dist/memory/chat_memory.d.ts.map +0 -1
  768. package/dist/memory/combined_memory.d.cts.map +0 -1
  769. package/dist/memory/combined_memory.d.ts.map +0 -1
  770. package/dist/memory/entity_memory.d.cts.map +0 -1
  771. package/dist/memory/entity_memory.d.ts.map +0 -1
  772. package/dist/memory/prompt.d.cts.map +0 -1
  773. package/dist/memory/prompt.d.ts.map +0 -1
  774. package/dist/memory/stores/entity/base.d.cts.map +0 -1
  775. package/dist/memory/stores/entity/base.d.ts.map +0 -1
  776. package/dist/memory/summary.d.cts.map +0 -1
  777. package/dist/memory/summary.d.ts.map +0 -1
  778. package/dist/memory/summary_buffer.d.cts.map +0 -1
  779. package/dist/memory/summary_buffer.d.ts.map +0 -1
  780. package/dist/memory/vector_store.d.cts.map +0 -1
  781. package/dist/memory/vector_store.d.ts.map +0 -1
  782. package/dist/output_parsers/combining.d.cts.map +0 -1
  783. package/dist/output_parsers/combining.d.ts.map +0 -1
  784. package/dist/output_parsers/datetime.d.cts.map +0 -1
  785. package/dist/output_parsers/datetime.d.ts.map +0 -1
  786. package/dist/output_parsers/expression.d.cts.map +0 -1
  787. package/dist/output_parsers/expression.d.ts.map +0 -1
  788. package/dist/output_parsers/expression_type_handlers/base.d.cts.map +0 -1
  789. package/dist/output_parsers/expression_type_handlers/base.d.ts.map +0 -1
  790. package/dist/output_parsers/expression_type_handlers/factory.d.cts.map +0 -1
  791. package/dist/output_parsers/expression_type_handlers/factory.d.ts.map +0 -1
  792. package/dist/output_parsers/expression_type_handlers/types.d.cts.map +0 -1
  793. package/dist/output_parsers/expression_type_handlers/types.d.ts.map +0 -1
  794. package/dist/output_parsers/fix.d.cts.map +0 -1
  795. package/dist/output_parsers/fix.d.ts.map +0 -1
  796. package/dist/output_parsers/http_response.d.cts.map +0 -1
  797. package/dist/output_parsers/http_response.d.ts.map +0 -1
  798. package/dist/output_parsers/openai_functions.d.cts.map +0 -1
  799. package/dist/output_parsers/openai_functions.d.ts.map +0 -1
  800. package/dist/output_parsers/openai_tools.d.cts.map +0 -1
  801. package/dist/output_parsers/openai_tools.d.ts.map +0 -1
  802. package/dist/output_parsers/regex.d.cts.map +0 -1
  803. package/dist/output_parsers/regex.d.ts.map +0 -1
  804. package/dist/output_parsers/router.d.cts.map +0 -1
  805. package/dist/output_parsers/router.d.ts.map +0 -1
  806. package/dist/output_parsers/structured.d.cts.map +0 -1
  807. package/dist/output_parsers/structured.d.ts.map +0 -1
  808. package/dist/retrievers/contextual_compression.d.cts.map +0 -1
  809. package/dist/retrievers/contextual_compression.d.ts.map +0 -1
  810. package/dist/retrievers/document_compressors/chain_extract.d.cts.map +0 -1
  811. package/dist/retrievers/document_compressors/chain_extract.d.ts.map +0 -1
  812. package/dist/retrievers/document_compressors/embeddings_filter.d.cts.map +0 -1
  813. package/dist/retrievers/document_compressors/embeddings_filter.d.ts.map +0 -1
  814. package/dist/retrievers/document_compressors/index.d.cts.map +0 -1
  815. package/dist/retrievers/document_compressors/index.d.ts.map +0 -1
  816. package/dist/retrievers/ensemble.d.cts.map +0 -1
  817. package/dist/retrievers/ensemble.d.ts.map +0 -1
  818. package/dist/retrievers/hyde.d.cts.map +0 -1
  819. package/dist/retrievers/hyde.d.ts.map +0 -1
  820. package/dist/retrievers/matryoshka_retriever.d.cts.map +0 -1
  821. package/dist/retrievers/matryoshka_retriever.d.ts.map +0 -1
  822. package/dist/retrievers/multi_query.d.cts.map +0 -1
  823. package/dist/retrievers/multi_query.d.ts.map +0 -1
  824. package/dist/retrievers/multi_vector.d.cts.map +0 -1
  825. package/dist/retrievers/multi_vector.d.ts.map +0 -1
  826. package/dist/retrievers/parent_document.d.cts.map +0 -1
  827. package/dist/retrievers/parent_document.d.ts.map +0 -1
  828. package/dist/retrievers/score_threshold.d.cts.map +0 -1
  829. package/dist/retrievers/score_threshold.d.ts.map +0 -1
  830. package/dist/retrievers/self_query/index.d.cts.map +0 -1
  831. package/dist/retrievers/self_query/index.d.ts.map +0 -1
  832. package/dist/retrievers/time_weighted.d.cts.map +0 -1
  833. package/dist/retrievers/time_weighted.d.ts.map +0 -1
  834. package/dist/schema/prompt_template.d.cts.map +0 -1
  835. package/dist/schema/prompt_template.d.ts.map +0 -1
  836. package/dist/schema/query_constructor.d.cts.map +0 -1
  837. package/dist/schema/query_constructor.d.ts.map +0 -1
  838. package/dist/smith/config.d.cts.map +0 -1
  839. package/dist/smith/config.d.ts.map +0 -1
  840. package/dist/smith/runner_utils.d.cts.map +0 -1
  841. package/dist/smith/runner_utils.d.ts.map +0 -1
  842. package/dist/sql_db.d.cts.map +0 -1
  843. package/dist/sql_db.d.ts.map +0 -1
  844. package/dist/storage/encoder_backed.d.cts.map +0 -1
  845. package/dist/storage/encoder_backed.d.ts.map +0 -1
  846. package/dist/storage/file_system.d.cts.map +0 -1
  847. package/dist/storage/file_system.d.ts.map +0 -1
  848. package/dist/stores/doc/base.d.cts.map +0 -1
  849. package/dist/stores/doc/base.d.ts.map +0 -1
  850. package/dist/stores/doc/in_memory.d.cts.map +0 -1
  851. package/dist/stores/doc/in_memory.d.ts.map +0 -1
  852. package/dist/stores/file/base.d.cts.map +0 -1
  853. package/dist/stores/file/base.d.ts.map +0 -1
  854. package/dist/stores/file/in_memory.d.cts.map +0 -1
  855. package/dist/stores/file/in_memory.d.ts.map +0 -1
  856. package/dist/stores/file/node.d.cts.map +0 -1
  857. package/dist/stores/file/node.d.ts.map +0 -1
  858. package/dist/text_splitter.d.cts.map +0 -1
  859. package/dist/text_splitter.d.ts.map +0 -1
  860. package/dist/tools/chain.d.cts.map +0 -1
  861. package/dist/tools/chain.d.ts.map +0 -1
  862. package/dist/tools/fs.d.cts.map +0 -1
  863. package/dist/tools/fs.d.ts.map +0 -1
  864. package/dist/tools/json.d.cts.map +0 -1
  865. package/dist/tools/json.d.ts.map +0 -1
  866. package/dist/tools/render.d.cts.map +0 -1
  867. package/dist/tools/render.d.ts.map +0 -1
  868. package/dist/tools/requests.d.cts.map +0 -1
  869. package/dist/tools/requests.d.ts.map +0 -1
  870. package/dist/tools/retriever.d.cts.map +0 -1
  871. package/dist/tools/retriever.d.ts.map +0 -1
  872. package/dist/tools/sql.d.cts.map +0 -1
  873. package/dist/tools/sql.d.ts.map +0 -1
  874. package/dist/tools/vectorstore.d.cts.map +0 -1
  875. package/dist/tools/vectorstore.d.ts.map +0 -1
  876. package/dist/tools/webbrowser.d.cts.map +0 -1
  877. package/dist/tools/webbrowser.d.ts.map +0 -1
  878. package/dist/types/expression-parser.d.cts.map +0 -1
  879. package/dist/types/expression-parser.d.ts.map +0 -1
  880. package/dist/types/type-utils.d.cts.map +0 -1
  881. package/dist/types/type-utils.d.ts.map +0 -1
  882. package/dist/util/document.d.cts.map +0 -1
  883. package/dist/util/document.d.ts.map +0 -1
  884. package/dist/util/load.d.cts.map +0 -1
  885. package/dist/util/load.d.ts.map +0 -1
  886. package/dist/util/ml-distance/similarities.d.cts.map +0 -1
  887. package/dist/util/ml-distance/similarities.d.ts.map +0 -1
  888. package/dist/util/openapi.d.cts.map +0 -1
  889. package/dist/util/openapi.d.ts.map +0 -1
  890. package/dist/util/sql_utils.d.cts.map +0 -1
  891. package/dist/util/sql_utils.d.ts.map +0 -1
  892. package/dist/util/time.d.cts.map +0 -1
  893. package/dist/util/time.d.ts.map +0 -1
  894. package/dist/vectorstores/memory.d.cts.map +0 -1
  895. package/dist/vectorstores/memory.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","names":["ContentBlock","Serializable","SerializedConstructor","MessageStringFormat","$InferMessageContent","$InferResponseMetadata","Message","MessageStructure","MessageType","MESSAGE_SYMBOL","StoredMessageData","Record","StoredMessage","StoredGeneration","StoredMessageV1","MessageContent","Array","FunctionCall","BaseMessageFields","TStructure","TRole","Standard","OpenAIToolCall","Partial","mergeContent","_mergeStatus","BaseMessage","NonNullable","Symbol","toStringTag","isOpenAIToolCallArray","_mergeDicts","_mergeLists","Content","_mergeObj","T","BaseMessageChunk","MessageFieldWithRole","_isMessageFieldWithRole","BaseMessageLike","isBaseMessage","isBaseMessageChunk"],"sources":["../../../../../../langchain-core/dist/messages/base.d.ts"],"sourcesContent":["import { ContentBlock } from \"./content/index.js\";\nimport { Serializable, SerializedConstructor } from \"../load/serializable.js\";\nimport { MessageStringFormat } from \"./format.js\";\nimport { $InferMessageContent, $InferResponseMetadata, Message, MessageStructure, MessageType } from \"./message.js\";\n\n//#region src/messages/base.d.ts\n/** @internal */\ndeclare const MESSAGE_SYMBOL: unique symbol;\ninterface StoredMessageData {\n content: string;\n role: string | undefined;\n name: string | undefined;\n tool_call_id: string | undefined;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n additional_kwargs?: Record<string, any>;\n /** Response metadata. For example: response headers, logprobs, token counts, model name. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n response_metadata?: Record<string, any>;\n id?: string;\n}\ninterface StoredMessage {\n type: string;\n data: StoredMessageData;\n}\ninterface StoredGeneration {\n text: string;\n message?: StoredMessage;\n}\ninterface StoredMessageV1 {\n type: string;\n role: string | undefined;\n text: string;\n}\ntype MessageContent = string | Array<ContentBlock>;\ninterface FunctionCall {\n /**\n * The arguments to call the function with, as generated by the model in JSON\n * format. Note that the model does not always generate valid JSON, and may\n * hallucinate parameters not defined by your function schema. Validate the\n * arguments in your code before calling your function.\n */\n arguments: string;\n /**\n * The name of the function to call.\n */\n name: string;\n}\ntype BaseMessageFields<TStructure extends MessageStructure = MessageStructure, TRole extends MessageType = MessageType> = {\n id?: string;\n name?: string;\n content?: $InferMessageContent<TStructure, TRole>;\n contentBlocks?: Array<ContentBlock.Standard>;\n /** @deprecated */\n additional_kwargs?: {\n /**\n * @deprecated Use \"tool_calls\" field on AIMessages instead\n */\n function_call?: FunctionCall;\n /**\n * @deprecated Use \"tool_calls\" field on AIMessages instead\n */\n tool_calls?: OpenAIToolCall[];\n [key: string]: unknown;\n };\n response_metadata?: Partial<$InferResponseMetadata<TStructure, TRole>>;\n};\ndeclare function mergeContent(firstContent: MessageContent, secondContent: MessageContent): MessageContent;\n/**\n * 'Merge' two statuses. If either value passed is 'error', it will return 'error'. Else\n * it will return 'success'.\n *\n * @param {\"success\" | \"error\" | undefined} left The existing value to 'merge' with the new value.\n * @param {\"success\" | \"error\" | undefined} right The new value to 'merge' with the existing value\n * @returns {\"success\" | \"error\"} The 'merged' value.\n */\ndeclare function _mergeStatus(left?: \"success\" | \"error\", right?: \"success\" | \"error\"): \"success\" | \"error\" | undefined;\n/**\n * Base class for all types of messages in a conversation. It includes\n * properties like `content`, `name`, and `additional_kwargs`. It also\n * includes methods like `toDict()` and `_getType()`.\n */\ndeclare abstract class BaseMessage<TStructure extends MessageStructure = MessageStructure, TRole extends MessageType = MessageType> extends Serializable implements Message<TStructure, TRole> {\n lc_namespace: string[];\n lc_serializable: boolean;\n get lc_aliases(): Record<string, string>;\n readonly [MESSAGE_SYMBOL]: true;\n abstract readonly type: TRole;\n id?: string;\n name?: string;\n content: $InferMessageContent<TStructure, TRole>;\n additional_kwargs: NonNullable<BaseMessageFields<TStructure, TRole>[\"additional_kwargs\"]>;\n response_metadata: NonNullable<BaseMessageFields<TStructure, TRole>[\"response_metadata\"]>;\n /**\n * @deprecated Use .getType() instead or import the proper typeguard.\n * For example:\n *\n * ```ts\n * import { isAIMessage } from \"@langchain/core/messages\";\n *\n * const message = new AIMessage(\"Hello!\");\n * isAIMessage(message); // true\n * ```\n */\n _getType(): MessageType;\n /**\n * @deprecated Use .type instead\n * The type of the message.\n */\n getType(): MessageType;\n constructor(arg: $InferMessageContent<TStructure, TRole> | BaseMessageFields<TStructure, TRole>);\n /** Get text content of the message. */\n get text(): string;\n get contentBlocks(): Array<ContentBlock.Standard>;\n toDict(): StoredMessage;\n static lc_name(): string;\n // Can't be protected for silly reasons\n get _printableFields(): Record<string, unknown>;\n static isInstance(obj: unknown): obj is BaseMessage;\n // this private method is used to update the ID for the runtime\n // value as well as in lc_kwargs for serialisation\n _updateId(value: string | undefined): void;\n get [Symbol.toStringTag](): any;\n toFormattedString(format?: MessageStringFormat): string;\n}\n/**\n * @deprecated Use \"tool_calls\" field on AIMessages instead\n */\ntype OpenAIToolCall = {\n /**\n * The ID of the tool call.\n */\n id: string;\n /**\n * The function that the model called.\n */\n function: FunctionCall;\n /**\n * The type of the tool. Currently, only `function` is supported.\n */\n type: \"function\";\n index?: number;\n};\ndeclare function isOpenAIToolCallArray(value?: unknown): value is OpenAIToolCall[];\ndeclare function _mergeDicts(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nleft?: Record<string, any>,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nright?: Record<string, any>\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n): Record<string, any>;\ndeclare function _mergeLists<Content extends ContentBlock>(left?: Content[], right?: Content[]): Content[] | undefined;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare function _mergeObj<T = any>(left: T | undefined, right: T | undefined): T;\n/**\n * Represents a chunk of a message, which can be concatenated with other\n * message chunks. It includes a method `_merge_kwargs_dict()` for merging\n * additional keyword arguments from another `BaseMessageChunk` into this\n * one. It also overrides the `__add__()` method to support concatenation\n * of `BaseMessageChunk` instances.\n */\ndeclare abstract class BaseMessageChunk<TStructure extends MessageStructure = MessageStructure, TRole extends MessageType = MessageType> extends BaseMessage<TStructure, TRole> {\n abstract concat(chunk: BaseMessageChunk): BaseMessageChunk<TStructure, TRole>;\n static isInstance(obj: unknown): obj is BaseMessageChunk;\n}\ntype MessageFieldWithRole = {\n role: MessageType;\n content: MessageContent;\n name?: string;\n} & Record<string, unknown>;\ndeclare function _isMessageFieldWithRole(x: BaseMessageLike): x is MessageFieldWithRole;\ntype BaseMessageLike = BaseMessage | MessageFieldWithRole | [MessageType, MessageContent] | string\n/**\n * @deprecated Specifying \"type\" is deprecated and will be removed in 0.4.0.\n */ | ({\n type: MessageType | \"user\" | \"assistant\" | \"placeholder\";\n} & BaseMessageFields & Record<string, unknown>) | SerializedConstructor;\n/**\n * @deprecated Use {@link BaseMessage.isInstance} instead\n */\ndeclare function isBaseMessage(messageLike?: unknown): messageLike is BaseMessage;\n/**\n * @deprecated Use {@link BaseMessageChunk.isInstance} instead\n */\ndeclare function isBaseMessageChunk(messageLike?: unknown): messageLike is BaseMessageChunk;\n//#endregion\nexport { BaseMessage, BaseMessageChunk, BaseMessageFields, BaseMessageLike, FunctionCall, MessageContent, MessageFieldWithRole, OpenAIToolCall, StoredGeneration, StoredMessage, StoredMessageData, StoredMessageV1, _isMessageFieldWithRole, _mergeDicts, _mergeLists, _mergeObj, _mergeStatus, isBaseMessage, isBaseMessageChunk, isOpenAIToolCallArray, mergeContent };\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;;;AAGoH;AAIzE,cAA7BS,cACa,EAAA,OAAA,MAAA;UAAjBC,iBAAAA,CAAiB;EAAA,OAMLC,EAAAA,MAAAA;EAAM,IAAA,EAGNA,MAAAA,GAAAA,SAAAA;EAAM,IAAA,EAAA,MAAA,GAAA,SAAA;EAAA,YAGlBC,EAAAA,MAAa,GAAA,SAEfF;EAW4B;EACd,iBAajBQ,CAAAA,EAjCiBP,MAiCA,CAAA,MAAA,EAAA,GAAA,CAAA;EAAA;EAAA;EAAoC,iBAAGJ,CAAAA,EA9BvCI,MA8BuCJ,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;EAAgB,EAAA,CAAA,EAAgBC,MAAAA;;UA3BnFI,aAAAA,CA8BuBO;EAAU,IAAA,EAAEC,MAAAA;EAAK,IAAA,EA5B1CV,iBA4BIN;;UAhBFa,YAAAA,CA+C4CV;EAAgB;;;;;;EAG5C,SACdE,EAAAA,MAAAA;EAAc;;;EAIuB,IAAA,EAAtCL,MAAAA;;KA1CNc,iBA2C0DE,CAAAA,mBA3CrBb,gBA2CqBa,GA3CFb,gBA2CEa,EAAAA,cA3C8BZ,WA2C9BY,GA3C4CZ,WA2C5CY,CAAAA,GAAAA;EAAK,EAAA,CAAA,EAAnCF,MAAAA;EAAiB,IAAA,CAA7BS,EAAAA,MAAAA;EAAW,OACmBR,CAAAA,EAzCvCf,oBAyCuCe,CAzClBA,UAyCkBA,EAzCNC,KAyCMD,CAAAA;EAAU,aAAEC,CAAAA,EAxC7CJ,KAwC6CI,CAxCvCpB,YAAAA,CAAaqB,QAwC0BD,CAAAA;EAAK;EAAlB,iBAA7BO,CAAAA,EAAAA;IAAW;;;IAkBkB,aAAEP,CAAAA,EApDhCH,YAoDgCG;IAAK;;;IAAuC,UAAnCF,CAAAA,EAhD5CI,cAgD4CJ,EAAAA;IAAiB,CAAA,GAGjDlB,EAAAA,MAAAA,CAAAA,EAAAA,OAAaqB;EAAQ,CAAA;EAAtB,iBAChBT,CAAAA,EAjDUW,OAiDVX,CAjDkBP,sBAiDlBO,CAjDyCO,UAiDzCP,EAjDqDQ,KAiDrDR,CAAAA,CAAAA;CAAa;;;;;;uBAhCFc,+BAA+BnB,mBAAmBA,gCAAgCC,cAAcA,qBAAqBP,YAAAA,YAAwBK,QAAQa,YAAYC;;;oBAGpKT;YACRF,cAAAA;0BACcW;;;WAGfhB,qBAAqBe,YAAYC;qBACvBO,YAAYT,kBAAkBC,YAAYC;qBAC1CO,YAAYT,kBAAkBC,YAAYC;;;;;;;;;;;;cAYjDZ;;;;;aAKDA;mBACMJ,qBAAqBe,YAAYC,SAASF,kBAAkBC,YAAYC;;;uBAGpEJ,MAAMhB,YAAAA,CAAaqB;YAC9BT;;;0BAGcD;0CACgBe;;;;OAInCE,MAAAA,CAAOC,WAAAA;6BACe1B;;;;;KAKxBmB,cAAAA;;;;;;;;YAQOL"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","names":["BaseContentBlock"],"sources":["../../../../../../../langchain-core/dist/messages/content/base.d.ts"],"sourcesContent":["//#region src/messages/content/base.d.ts\ninterface BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: string;\n /**\n * Content block identifier, which can be either\n * - generated by the provider (e.g., a provider-specific ID)\n * - generated by LangChain upon creation (a uuid prefixed with 'lc-')\n */\n id?: string;\n /**\n * Arbitrary properties\n */\n [key: string]: unknown;\n}\n//#endregion\nexport { BaseContentBlock };\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;UACUA,gBAAAA,CAAgB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"data.d.ts","names":["BaseContentBlock","ImageDetail","MessageContentText","MessageContentImageUrl","MessageContentComplex","Record","Data","BaseDataContentBlock","URLContentBlock","Base64ContentBlock","PlainTextContentBlock","IDContentBlock","DataContentBlock","isDataContentBlock","isURLContentBlock","isBase64ContentBlock","isPlainTextContentBlock","isIDContentBlock","convertToOpenAIImageBlock","parseMimeType","parseBase64DataUrl","dataUrl","asTypedArray","Uint8Array","ProviderFormatTypes","TextFormat","ImageFormat","AudioFormat","FileFormat","VideoFormat","StandardContentBlockConverter","Partial","StandardImageBlock","Formats","StandardAudioBlock","StandardFileBlock","StandardTextBlock","convertToProviderContentBlock"],"sources":["../../../../../../../langchain-core/dist/messages/content/data.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\n\n//#region src/messages/content/data.d.ts\n\n/**\n * @deprecated\n * Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ntype ImageDetail = \"auto\" | \"low\" | \"high\";\n/**\n * @deprecated\n * Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ntype MessageContentText = {\n type: \"text\";\n text: string;\n};\n/**\n * @deprecated\n * Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ntype MessageContentImageUrl = {\n type: \"image_url\";\n image_url: string | {\n url: string;\n detail?: ImageDetail;\n };\n};\n/**\n * @deprecated\n * Use {@link ContentBlock} instead.\n */\ntype MessageContentComplex = MessageContentText | MessageContentImageUrl\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n| (Record<string, any> & {\n type?: \"text\" | \"image_url\" | string;\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n| (Record<string, any> & {\n type?: never;\n});\ntype Data = never;\n// eslint-disable-next-line @typescript-eslint/no-namespace\ndeclare namespace Data {\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n interface BaseDataContentBlock extends BaseContentBlock {\n mime_type?: string;\n metadata?: Record<string, unknown>;\n }\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n interface URLContentBlock extends BaseDataContentBlock {\n type: \"image\" | \"audio\" | \"file\";\n source_type: \"url\";\n url: string;\n }\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n interface Base64ContentBlock extends BaseDataContentBlock {\n type: \"image\" | \"audio\" | \"file\";\n source_type: \"base64\";\n data: string;\n }\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n interface PlainTextContentBlock extends BaseDataContentBlock {\n type: \"file\" | \"text\";\n source_type: \"text\";\n text: string;\n }\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n interface IDContentBlock extends BaseDataContentBlock {\n type: \"image\" | \"audio\" | \"file\";\n source_type: \"id\";\n id: string;\n }\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Standard} instead\n */\n type DataContentBlock = URLContentBlock | Base64ContentBlock | PlainTextContentBlock | IDContentBlock;\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Standard} instead\n */\n type StandardImageBlock = (URLContentBlock | Base64ContentBlock | IDContentBlock) & {\n type: \"image\";\n };\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Standard} instead\n */\n type StandardAudioBlock = (URLContentBlock | Base64ContentBlock | IDContentBlock) & {\n type: \"audio\";\n };\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Standard} instead\n */\n type StandardFileBlock = (URLContentBlock | Base64ContentBlock | IDContentBlock | PlainTextContentBlock) & {\n type: \"file\";\n };\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Standard} instead\n */\n type StandardTextBlock = PlainTextContentBlock & {\n type: \"text\";\n };\n /**\n * @deprecated\n * Use {@link ContentBlock.Multimodal.Data} instead\n */\n type DataContentBlockType = DataContentBlock[\"type\"];\n}\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function isDataContentBlock(content_block: object): content_block is Data.DataContentBlock;\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function isURLContentBlock(content_block: object): content_block is Data.URLContentBlock;\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function isBase64ContentBlock(content_block: object): content_block is Data.Base64ContentBlock;\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function isPlainTextContentBlock(content_block: object): content_block is Data.PlainTextContentBlock;\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function isIDContentBlock(content_block: object): content_block is Data.IDContentBlock;\n/**\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function convertToOpenAIImageBlock(content_block: Data.URLContentBlock | Data.Base64ContentBlock): {\n type: string;\n image_url: {\n url: string;\n };\n};\n/**\n * Utility function for ChatModelProviders. Parses a mime type into a type, subtype, and parameters.\n *\n * @param mime_type - The mime type to parse.\n * @returns An object containing the type, subtype, and parameters.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function parseMimeType(mime_type: string): {\n type: string;\n subtype: string;\n parameters: Record<string, string>;\n};\n/**\n * Utility function for ChatModelProviders. Parses a base64 data URL into a typed array or string.\n *\n * @param dataUrl - The base64 data URL to parse.\n * @param asTypedArray - Whether to return the data as a typed array.\n * @returns An object containing the parsed data and mime type, or undefined if the data URL is invalid.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function parseBase64DataUrl({\n dataUrl,\n asTypedArray\n}: {\n dataUrl: string;\n asTypedArray: true;\n}): {\n data: Uint8Array;\n mime_type: string;\n} | undefined;\n/**\n * Utility function for ChatModelProviders. Parses a base64 data URL into a typed array or string.\n *\n * @param dataUrl - The base64 data URL to parse.\n * @param asTypedArray - Whether to return the data as a typed array.\n * @returns The parsed data and mime type, or undefined if the data URL is invalid.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function parseBase64DataUrl({\n dataUrl,\n asTypedArray\n}: {\n dataUrl: string;\n asTypedArray?: false;\n}): {\n data: string;\n mime_type: string;\n} | undefined;\n/**\n * A bag of provider-specific content block types.\n *\n * Allows implementations of {@link StandardContentBlockConverter} and related to be defined only in\n * terms of the types they support. Also allows for forward compatibility as the set of known\n * standard types grows, as the set of types can be extended without breaking existing\n * implementations of the aforementioned interfaces.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ntype ProviderFormatTypes<TextFormat = unknown, ImageFormat = unknown, AudioFormat = unknown, FileFormat = unknown, VideoFormat = unknown> = {\n text: TextFormat;\n image: ImageFormat;\n audio: AudioFormat;\n file: FileFormat;\n video: VideoFormat;\n};\n/**\n * Utility interface for converting between standard and provider-specific data content blocks, to be\n * used when implementing chat model providers.\n *\n * Meant to be used with {@link convertToProviderContentBlock} and\n * {@link convertToStandardContentBlock} rather than being consumed directly.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ninterface StandardContentBlockConverter<Formats extends Partial<ProviderFormatTypes>> {\n /**\n * The name of the provider type that corresponds to the provider-specific content block types\n * that this converter supports.\n */\n providerName: string;\n /**\n * Convert from a standard image block to a provider's proprietary image block format.\n * @param block - The standard image block to convert.\n * @returns The provider image block.\n */\n fromStandardImageBlock?(block: Data.StandardImageBlock): Formats[\"image\"];\n /**\n * Convert from a standard audio block to a provider's proprietary audio block format.\n * @param block - The standard audio block to convert.\n * @returns The provider audio block.\n */\n fromStandardAudioBlock?(block: Data.StandardAudioBlock): Formats[\"audio\"];\n /**\n * Convert from a standard file block to a provider's proprietary file block format.\n * @param block - The standard file block to convert.\n * @returns The provider file block.\n */\n fromStandardFileBlock?(block: Data.StandardFileBlock): Formats[\"file\"];\n /**\n * Convert from a standard text block to a provider's proprietary text block format.\n * @param block - The standard text block to convert.\n * @returns The provider text block.\n */\n fromStandardTextBlock?(block: Data.StandardTextBlock): Formats[\"text\"];\n}\n/**\n * Convert from a standard data content block to a provider's proprietary data content block format.\n *\n * Don't override this method. Instead, override the more specific conversion methods and use this\n * method unmodified.\n *\n * @param block - The standard data content block to convert.\n * @returns The provider data content block.\n * @throws An error if the standard data content block type is not supported.\n *\n * @deprecated Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\ndeclare function convertToProviderContentBlock<Formats extends Partial<ProviderFormatTypes>>(block: Data.DataContentBlock, converter: StandardContentBlockConverter<Formats>): Formats[keyof Formats];\n//#endregion\nexport { Data, ImageDetail, MessageContentComplex, MessageContentImageUrl, MessageContentText, ProviderFormatTypes, StandardContentBlockConverter, convertToOpenAIImageBlock, convertToProviderContentBlock, isBase64ContentBlock, isDataContentBlock, isIDContentBlock, isPlainTextContentBlock, isURLContentBlock, parseBase64DataUrl, parseMimeType };\n//# sourceMappingURL=data.d.ts.map"],"mappings":";;;;KAyCKM,IAAAA;;kBAEaA,IAAAA;;;;;yCAKuBN;;eAE1BK;;;;;;oCAMqBE;;;;;;;;;uCASGA;;;;;;;;;0CASGA;;;;;;;;;mCASPA;;;;;;;;;0BASTC,kBAAkBC,qBAAqBC,wBAAwBC;;;;;6BAK5DH,kBAAkBC,qBAAqBE;;;;;;;6BAOvCH,kBAAkBC,qBAAqBE;;;;;;;4BAOxCH,kBAAkBC,qBAAqBE,iBAAiBD;;;;;;;2BAOzDA;;;;;;;8BAOGE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","names":["BaseContentBlock","Tools","Multimodal","Data","ContentBlock","KNOWN_BLOCK_TYPES","Citation","Array","Record","TValue","Text","Reasoning","NonStandard","Standard"],"sources":["../../../../../../../langchain-core/dist/messages/content/index.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\nimport { Tools } from \"./tools.js\";\nimport { Multimodal } from \"./multimodal.js\";\nimport { Data } from \"./data.js\";\n\n//#region src/messages/content/index.d.ts\ninterface ContentBlock extends BaseContentBlock {}\ndeclare const KNOWN_BLOCK_TYPES: string[];\n// eslint-disable-next-line @typescript-eslint/no-namespace\ndeclare namespace ContentBlock {\n /**\n * Annotation for citing data from a document.\n */\n export interface Citation {\n /**\n * Type of the content block\n */\n readonly type: \"citation\";\n /**\n * Source type for the citation.\n */\n source?: string;\n /**\n * URL of the document source\n */\n url?: string;\n /**\n * Source document title.\n *\n * For example, the page title for a web page or the title of a paper.\n */\n title?: string;\n /**\n * Start index of the **response text** for which the annotation applies.\n *\n * @see {Text}\n */\n startIndex?: number;\n /**\n * End index of the **response text** for which the annotation applies.\n *\n * @see {Text}\n */\n endIndex?: number;\n /**\n * Excerpt of source text being cited.\n */\n citedText?: string;\n }\n /**\n * Text output from a LLM.\n *\n * This typically represents the main text content of a message, such as the response\n * from a language model or the text of a user message.\n */\n export interface Text extends ContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"text\";\n /**\n * Block text.\n */\n text: string;\n /**\n * Index of block in aggregate response. Used during streaming.\n */\n index?: number;\n /**\n * Citations and other annotations.\n */\n annotations?: Array<Citation | BaseContentBlock>;\n }\n /**\n * Reasoning output from a LLM.\n */\n export interface Reasoning extends ContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"reasoning\";\n /**\n * Reasoning text.\n *\n * Either the thought summary or the raw reasoning text itself.\n * This is often parsed from `<think>` tags in the model's response.\n */\n reasoning: string;\n /**\n * Index of block in aggregate response. Used during streaming.\n */\n index?: number;\n }\n /**\n * Provider-specific content block.\n *\n * This is used to represent content blocks that are not part of the standard LangChain content model.\n * If a provider's non-standard output includes reasoning and tool calls, it should be\n * the adapter's job to parse that payload and emit the corresponding standard reasoning and tool call blocks.\n */\n export interface NonStandard<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TValue extends Record<string, any> = Record<string, any>> extends ContentBlock {\n /**\n * Type of the content block\n */\n type: \"non_standard\";\n /**\n * Provider-specific data\n */\n value: TValue;\n }\n export { Tools };\n export { Multimodal };\n export { Data };\n export type Standard = Text | Reasoning | NonStandard | Tools.Standard | Multimodal.Standard;\n}\n//#endregion\nexport { ContentBlock, KNOWN_BLOCK_TYPES };\n//# sourceMappingURL=index.d.ts.map"],"mappings":";;;;;;;AAGiC,UAGvBI,YAAAA,SAAqBJ,gBAAgB,CAAA,CAAA;;kBAG7BI,YAAAA,CA8DME;EAAQ;;;EAhBY,OAqBPF,UAAAA,QAAAA,CAAAA;IAAY;;;IAkChC,SARmDA,IAAAA,EAAAA,UAAAA;IAAY;;;IAYjE,MACUM,CAAAA,EAAAA,MAAAA;IAAI;;;IAA2C,GAAGR,CAAAA,EAAAA,MAAAA;IAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA5D9DE;;;;;;;;;;;;;;;;kBAgBdG,MAAMD,WAAWN;;;;;qCAKEI;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BpBI,sBAAsBA,6BAA6BJ;;;;;;;;WAQzDK;;WAEAR;WACAC;WACAC;yBACcO,OAAOC,YAAYC,cAAcX,KAAAA,CAAMY,WAAWX,UAAAA,CAAWW"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"multimodal.d.ts","names":["BaseContentBlock","Multimodal","BaseDataRecord","Uint8Array","DataRecordFileId","DataRecordUrl","DataRecordBase64","Record","DataRecord","TMetadata","Data","Image","Video","Audio","PlainText","File"],"sources":["../../../../../../../langchain-core/dist/messages/content/multimodal.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\n\n//#region src/messages/content/multimodal.d.ts\ntype Multimodal = never;\n// eslint-disable-next-line @typescript-eslint/no-namespace\ndeclare namespace Multimodal {\n type BaseDataRecord = {\n /**\n * MIME type of the file.\n *\n * @see https://www.iana.org/assignments/media-types/media-types.xhtml#image\n */\n mimeType?: string | undefined;\n };\n type DataRecordFileId = BaseDataRecord & {\n /**\n * ID of the data file, e.g. from a provider's file api\n */\n fileId: string;\n url?: never;\n data?: never;\n };\n type DataRecordUrl = BaseDataRecord & {\n fileId?: never;\n /**\n * URL of the data file\n */\n url: string;\n data?: never;\n };\n type DataRecordBase64 = BaseDataRecord & {\n fileId?: never;\n url?: never;\n /**\n * MIME type of the file. Required for base64 encoding.\n *\n * @see https://www.iana.org/assignments/media-types/media-types.xhtml#image\n */\n mimeType: string;\n /**\n * Base64 encoded string or binary data of the data\n */\n data: string | Uint8Array;\n };\n type DataRecord = DataRecordFileId | DataRecordUrl | DataRecordBase64;\n /** Content block for multimodal data */\n type Data<TMetadata = Record<string, unknown>> = BaseContentBlock & DataRecord & {\n /**\n * MIME type of the file. Required for base64 encoding.\n */\n mimeType?: string;\n /**\n * Metadata of the file\n */\n metadata?: TMetadata;\n /**\n * Content block identifier for multimodal content, e.g. image, video, audio, file or plain text. This can be either:\n * - generated by the provider (e.g., an OpenAI block ID)\n * - generated by LangChain upon creation\n */\n id?: string;\n };\n /** Content block for image data */\n type Image = Data & {\n /** Type of the content block */\n readonly type: \"image\";\n };\n /** Content block for video data */\n type Video = Data & {\n /** Type of the content block */\n readonly type: \"video\";\n };\n /** Content block for audio data */\n type Audio = Data & {\n /** Type of the content block */\n readonly type: \"audio\";\n };\n /** Content block for plain text data */\n type PlainText = Data & {\n /** Type of the content block */\n readonly type: \"text-plain\";\n /**\n * Plaintext content. This is optional if the data is base64 encoded.\n */\n text?: string;\n /**\n * Title of the file, e.g. the title of a document\n */\n title?: string;\n /**\n * Context for the text, e.g. a description or a summary of the text's content\n */\n context?: string;\n };\n /** Content block for file data */\n type File = Data & {\n /**\n * Non-descript multimodal content block\n *\n * This block is intended for files that aren't covered by existing content block types.\n */\n readonly type: \"file\";\n };\n type Standard = Image | Video | Audio | PlainText | File;\n}\n//#endregion\nexport { Multimodal };\n//# sourceMappingURL=multimodal.d.ts.map"],"mappings":";;;;AAA6C,KAGxCC,UAAAA,GAAU,KAAA;AAAA;kBAEGA,UAAAA,CAAU;EAAA,KASFC,cAAAA,GAAAA;IAAc;;;;;IA8BY,QAAGI,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA;EAAgB,CAAA;EAEzC,KAAqBN,gBAAAA,GAhCzBE,cAgCyBF,GAAAA;IAAgB;;;IAiBhD,MAKJU,EAAAA,MAAAA;IAAI,GAKJA,CAAAA,EAAAA,KAAAA;IAAI,IAKAA,CAAAA,EAAAA,KAAAA;EAAI,CAAA;EAiBL,KAQAC,aAAAA,GAjFKT,cAiFLS,GAAAA;IAAK,MAAGC,CAAAA,EAAAA,KAAAA;IAAK;;;IAA2B,GAAA,EAAA,MAAA;;;0BAzEhCV;;;;;;;;;;;;mBAYPC;;oBAECC,mBAAmBC,gBAAgBC;;wBAE/BC,2BAA2BP,mBAAmBQ;;;;;;;;eAQvDC;;;;;;;;;eASAC;;;;;eAKAA;;;;;eAKAA;;;;;mBAKIA;;;;;;;;;;;;;;;;;cAiBLA;;;;;;;;kBAQIC,QAAQC,QAAQC,QAAQC,YAAYC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.d.ts","names":["BaseContentBlock","Tools","TName","TArgs","Record","TOutput","ToolCall","ToolCallChunk","InvalidToolCall","ServerToolCall","ServerToolCallChunk","ServerToolCallResult"],"sources":["../../../../../../../langchain-core/dist/messages/content/tools.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\n\n//#region src/messages/content/tools.d.ts\ntype Tools = never;\n// eslint-disable-next-line @typescript-eslint/no-namespace\ndeclare namespace Tools {\n /**\n * Represents a request to call a tool.\n *\n * @example\n * ```ts\n * const toolCall: ToolCall = {\n * type: \"tool_call\",\n * name: \"foo\",\n * args: { a: 1 },\n * callId: \"123\"\n * };\n * ```\n * This represents a request to call the tool named \"foo\" with arguments {\"a\": 1}\n * and an identifier of \"123\".\n */\n interface ToolCall<TName extends string = string, TArgs = unknown> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"tool_call\";\n /**\n * The name of the tool being called\n */\n name: TName;\n /**\n * The arguments to the tool call\n */\n args: TArgs;\n }\n /** Content block to represent partial data of a tool call */\n interface ToolCallChunk<TName extends string = string> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"tool_call_chunk\";\n /**\n * The name of the tool being called\n */\n name?: TName;\n /**\n * The arguments to the tool call\n */\n args?: string;\n /**\n * The index of the tool call chunk\n */\n index?: number;\n }\n /** Content block to represent an invalid tool call */\n interface InvalidToolCall<TName extends string = string> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"invalid_tool_call\";\n /**\n * The name of the tool being called\n */\n name?: TName;\n /**\n * The arguments to the tool call\n */\n args?: string;\n /**\n * An error message associated with the tool call\n */\n error?: string;\n /**\n * Index of block in aggregate response\n */\n index?: string | number;\n }\n interface ServerToolCall<TName extends string = string, TArgs = unknown> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"server_tool_call\";\n /**\n * The name of the tool being called\n */\n name: TName;\n /**\n * The arguments to the tool call\n */\n args: TArgs;\n }\n interface ServerToolCallChunk<TName extends string = string> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"server_tool_call_chunk\";\n /**\n * The name of the tool being called\n */\n name?: TName;\n /**\n * The arguments to the tool call\n */\n args?: string;\n }\n interface ServerToolCallResult<TOutput = Record<string, unknown>> extends BaseContentBlock {\n /**\n * Type of the content block\n */\n readonly type: \"server_tool_call_result\";\n /**\n * The unique identifier of the tool call that this result corresponds to\n */\n toolCallId: string;\n /**\n * The status of the server tool call\n */\n status: \"success\" | \"error\";\n /**\n * The output of the server tool call\n */\n output: TOutput;\n }\n type Standard = ToolCall | ToolCallChunk | InvalidToolCall | ServerToolCall | ServerToolCallChunk | ServerToolCallResult;\n}\n//#endregion\nexport { Tools };\n//# sourceMappingURL=tools.d.ts.map"],"mappings":";;;;AAA6C,KAGxCC,KAAAA,GAAK,KAAA;AAAA;kBAEQA,KAAAA,CAAK;EAAA;;;;;;;;;;;;;;;EAoGqE,UAkB1EK,QAAAA,CAAAA,cAAAA,MAAAA,GAAAA,MAAAA,EAAAA,QAAAA,OAAAA,CAAAA,SAtG2DN,gBAsG3DM,CAAAA;IAAQ;;;IAAmD,SAAGI,IAAAA,EAAAA,WAAAA;IAAmB;AAAuB;;UA9FhHR;;;;UAIAC;;;iEAGuDH;;;;;;;;WAQtDE;;;;;;;;;;;mEAWwDF;;;;;;;;WAQxDE;;;;;;;;;;;;;;mFAcwEF;;;;;;;;UAQzEE;;;;UAIAC;;uEAE6DH;;;;;;;;WAQ5DE;;;;;;2CAMgCE,iCAAiCJ;;;;;;;;;;;;;;;;YAgBhEK;;kBAEMC,WAAWC,gBAAgBC,kBAAkBC,iBAAiBC,sBAAsBC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"format.d.ts","names":["MessageStringFormat"],"sources":["../../../../../../langchain-core/dist/messages/format.d.ts"],"sourcesContent":["//#region src/messages/format.d.ts\ntype MessageStringFormat = \"pretty\";\n//#endregion\nexport { MessageStringFormat };\n//# sourceMappingURL=format.d.ts.map"],"mappings":";;KACKA,mBAAAA,GAAmB,QAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"message.d.ts","names":["ContentBlock","ResponseMetadata","UsageMetadata","$MergeDiscriminatedUnion","$MergeObjects","MessageType","NonNullable","MessageOutputVersion","MessageToolDefinition","TInput","TOutput","MessageToolSet","$MessageToolCallBlock","MessageStructure","TStructure","K","Tools","ToolCall","Partial","Record","$NormalizeMessageOutputVersion","T","Extract","$MergeOutputVersion","U","TV","UV","Exclude","$MergeContentDefinition","$MergeMessageStructure","StandardMessageStructure","Text","$NormalizedMessageStructure","$InferMessageContentBlocks","S","C","PropertyKey","TRole","$InferMessageContent","Array","$InferMessageProperties","P","Omit","$InferMessageProperty","$InferResponseMetadata","Message","isMessage"],"sources":["../../../../../../langchain-core/dist/messages/message.d.ts"],"sourcesContent":["import { ContentBlock } from \"./content/index.js\";\nimport { ResponseMetadata, UsageMetadata } from \"./metadata.js\";\nimport { $MergeDiscriminatedUnion, $MergeObjects } from \"./utils.js\";\n\n//#region src/messages/message.d.ts\n\n/**\n * Represents the possible types of messages in the system.\n * Includes standard message types (\"ai\", \"human\", \"tool\", \"system\")\n * and allows for custom string types that are non-null.\n *\n * @example\n * ```ts\n * // Standard message types\n * const messageType1: MessageType = \"ai\";\n * const messageType2: MessageType = \"human\";\n *\n * // Custom message type\n * const messageType3: MessageType = \"custom_type\";\n * ```\n */\ntype MessageType = \"ai\" | \"human\" | \"tool\" | \"system\" | (string & NonNullable<unknown>);\n/**\n * Represents the output version format for message content.\n *\n * This type determines how the content field is structured in a message:\n * - \"v0\": Content is represented as a simple string or array of content blocks\n * - provides backward compatibility with simpler content representations\n * - \"v1\": Content follows the structured ContentBlock format with typed discriminated unions\n * - enables full type safety and structured content block handling\n *\n * @example\n * ```ts\n * // v0 format - simple content representation\n * const v0Message: Message<{ outputVersion: \"v0\", content: ... }> = {\n * type: \"human\",\n * content: \"Hello world\" // string | Array<ContentBlock | ContentBlock.Text>\n * };\n *\n * // v1 format - structured content blocks\n * const v1Message: Message<{ outputVersion: \"v1\", content: ... }> = {\n * type: \"human\",\n * content: [\n * { type: \"text\", text: \"Hello world\" },\n * { type: \"image\", image_url: \"...\" }\n * ] // Array<ContentBlock | ...> (determined by the structure)\n * };\n * ```\n */\ntype MessageOutputVersion = \"v0\" | \"v1\";\n/**\n * Represents the input and output types of a tool that can be used in messages.\n *\n * @template TInput - The type of input the tool accepts.\n * @template TOutput - The type of output the tool produces.\n *\n * @example\n * ```ts\n * // Tool that takes a string input and returns a number\n * interface StringToNumberTool extends MessageToolDefinition<string, number> {\n * input: string;\n * output: number;\n * }\n * ```\n */\ninterface MessageToolDefinition<TInput = unknown, TOutput = unknown> {\n input: TInput;\n output: TOutput;\n}\n/**\n * Represents a structured set of tools by mapping tool names to definitions\n * that can be used in messages.\n *\n * @example\n * ```ts\n * interface MyToolSet extends MessageToolSet {\n * calculator: MessageToolDefinition<\n * { operation: string; numbers: number[] },\n * number\n * >;\n * translator: MessageToolDefinition<\n * { text: string; targetLanguage: string },\n * string\n * >;\n * }\n * ```\n */\ninterface MessageToolSet {\n [key: string]: MessageToolDefinition;\n}\n/**\n * Represents a tool call block within a message structure by mapping tool names to their\n * corresponding tool call formats, including the input arguments and an optional identifier.\n *\n * @template TStructure - A message structure type that may contain tool definitions\n *\n * @example\n * ```ts\n * // Given a message structure with a calculator tool:\n * interface MyStructure extends MessageStructure {\n * tools: {\n * calculator: MessageToolDefinition<{ operation: string, numbers: number[] }, number>\n * }\n * }\n *\n * // The tool call block would be:\n * type CalcToolCall = $MessageToolCallBlock<MyStructure>;\n * // Resolves to:\n * // {\n * // type: \"tool_call\";\n * // name: \"calculator\";\n * // args: { operation: string, numbers: number[] };\n * // id?: string;\n * // }\n * ```\n */\ntype $MessageToolCallBlock<TStructure extends MessageStructure> = TStructure[\"tools\"] extends MessageToolSet ? { [K in keyof TStructure[\"tools\"]]: K extends string ? TStructure[\"tools\"][K] extends MessageToolDefinition ? ContentBlock.Tools.ToolCall<K, TStructure[\"tools\"][K][\"input\"]> : never : never }[keyof TStructure[\"tools\"]] : never;\n/**\n * Core interface that defines the structure of messages.\n *\n * @example\n * ```ts\n * // Basic message structure with just content blocks\n * interface SimpleMessageStructure extends MessageStructure {\n * content: {\n * human: ContentBlock.Text;\n * // allows for text + reasoning blocks in ai messages\n * ai: ContentBlock.Text | ContentBlock.Reasoning;\n * }\n * }\n *\n * // Message structure with tools and properties\n * interface AdvancedMessageStructure extends MessageStructure {\n * tools: {\n * calculator: MessageToolDefinition<\n * { operation: string; numbers: number[] },\n * number\n * >;\n * };\n * content: {\n * // allows for text + image blocks in human messages\n * human: ContentBlock.Text | ContentBlock.Multimodal.Image;\n * // only allows for text blocks in ai messages\n * ai: ContentBlock.Text;\n * };\n * properties: {\n * // pins properties to ai messages\n * ai: {\n * response_metadata: {\n * confidence: number;\n * model: string;\n * };\n * };\n * }\n * }\n *\n * // Using with $MergeMessageStructure to combine structures\n * // The resulting type when passed into BaseMessage will have a calculator tool,\n * // allow for text + image blocks in human messages,\n * // and text + reasoning blocks + additional arbitrary properties in ai messages.\n * type CombinedStructure = $MergeMessageStructure<\n * SimpleMessageStructure,\n * AdvancedMessageStructure\n * >;\n *\n * // Using in a Message object\n * const message: Message<CombinedStructure> = {\n * id: \"msg-123\",\n * type: \"human\",\n * content: [\n * { type: \"text\", text: \"Hello!\" }\n * { type: \"image\", mimeType: \"image/jpeg\", url: \"https://example.com/image.jpg\" }\n * // this block will throw an error because it's not defined in the structure\n * { type: \"reasoning\", reasoning: \"The answer is 42\" }\n * ]\n * };\n * ```\n */\ninterface MessageStructure {\n /**\n * Optional output version for the message structure.\n * If not provided, defaults to \"v0\".\n */\n readonly outputVersion?: MessageOutputVersion;\n /**\n * Optional set of tool definitions that can be used in messages.\n * Each tool is defined with input/output types and can be referenced in tool messages.\n */\n readonly tools?: MessageToolSet;\n /**\n * Optional mapping of message types to their allowed content blocks.\n * Each message type can specify what content block types it supports (text, images, etc).\n */\n readonly content?: Partial<{ [key in MessageType]: ContentBlock }>;\n /**\n * Optional mapping of message types to arbitrary property objects.\n * Allows attaching custom metadata or other information to specific message types.\n */\n readonly properties?: Partial<{ [key in MessageType]: Record<string, unknown> }>;\n}\n/**\n * Normalizes an arbitrary type to a message output version or undefined.\n * Accepts unknown and narrows to a valid MessageOutputVersion if present.\n */\ntype $NormalizeMessageOutputVersion<T> = Extract<T, MessageOutputVersion> | undefined;\n/**\n * Merges two output version types from message structures.\n *\n * This utility type determines the resulting output version when combining two message structures.\n * The merge logic follows these rules:\n *\n * - If both T and U are undefined, defaults to \"v0\" for backwards compatibility\n * - If T is undefined but U is defined, uses U's version\n * - If U is undefined but T is defined, uses T's version\n * - If both T and U are defined, U takes precedence (later structure wins)\n *\n * @template T - The output version from the first message structure\n * @template U - The output version from the second message structure\n *\n * @example\n * ```ts\n * // Both undefined - defaults to \"v0\"\n * type Result1 = $MergeOutputVersion<undefined, undefined>; // \"v0\"\n *\n * // One defined - uses the defined version\n * type Result2 = $MergeOutputVersion<undefined, \"v1\">; // \"v1\"\n * type Result3 = $MergeOutputVersion<\"v0\", undefined>; // \"v0\"\n *\n * // Both defined - second takes precedence\n * type Result4 = $MergeOutputVersion<\"v0\", \"v1\">; // \"v1\"\n * ```\n */\ntype $MergeOutputVersion<T, U> = $NormalizeMessageOutputVersion<T> extends infer TV ? $NormalizeMessageOutputVersion<U> extends infer UV ? [TV, UV] extends [undefined, undefined] ? \"v0\" : [TV] extends [undefined] ? Exclude<UV, undefined> : [UV] extends [undefined] ? Exclude<TV, undefined> : UV : never : never;\n/**\n * Merges two content definition objects from message structures.\n *\n * This utility type combines content definitions from two message structures, handling\n * the merging of content block types for each message type. The merge logic follows\n * these rules:\n *\n * - For keys that exist in both T and U: Merges the content blocks using discriminated\n * union merging based on the \"type\" property. This allows combining different content\n * block types (e.g., text + image) for the same message type.\n * - For keys that exist only in T: Uses T's content definition as-is\n * - For keys that exist only in U: Uses U's content definition as-is\n *\n * @template T - The content definition from the first message structure\n * @template U - The content definition from the second message structure\n *\n * @example\n * ```ts\n * // T allows text content for human messages\n * type ContentA = {\n * human: ContentBlock.Text;\n * };\n *\n * // U allows image content for human messages and text for AI messages\n * type ContentB = {\n * human: ContentBlock.Multimodal.Image;\n * ai: ContentBlock.Text;\n * };\n *\n * // Merged result allows both text and images for human messages, text for AI\n * type Merged = $MergeContentDefinition<ContentA, ContentB>;\n * // Result: {\n * // human: ContentBlock.Text | ContentBlock.Multimodal.Image;\n * // ai: ContentBlock.Text;\n * // }\n * ```\n */\ntype $MergeContentDefinition<T, U> = { [K in keyof T | keyof U as Extract<(K extends keyof T ? T[K] : never) | (K extends keyof U ? U[K] : never), ContentBlock> extends never ? never : K]: K extends keyof T ? K extends keyof U ? $MergeDiscriminatedUnion<Extract<T[K], ContentBlock>, Extract<U[K], ContentBlock>, \"type\"> : Extract<T[K], ContentBlock> : K extends keyof U ? Extract<U[K], ContentBlock> : never };\n/**\n * Merges two message structures A and B into a combined structure.\n * This is a type utility that handles merging of tools, content blocks, and properties\n * from two message structures. The resulting type is usable as its own message structure.\n *\n * @example\n * ```ts\n * // Structure A allows text in human messages and has a confidence property on AI messages\n * interface StructureA extends MessageStructure {\n * content: {\n * human: ContentBlock.Text;\n * };\n * properties: {\n * ai: { confidence: number };\n * }\n * }\n *\n * // Structure B allows images in human messages and has a model property on AI messages\n * interface StructureB extends MessageStructure {\n * content: {\n * human: ContentBlock.Multimodal.Image;\n * };\n * properties: {\n * ai: { model: string };\n * }\n * }\n *\n * // Merged structure allows both text and images in human messages\n * // AI messages have both confidence and model properties\n * type Merged = $MergeMessageStructure<StructureA, StructureB>;\n * ```\n *\n * @template A - First message structure to merge\n * @template B - Second message structure to merge (takes precedence over A)\n */\ntype $MergeMessageStructure<T extends MessageStructure, U extends MessageStructure> = {\n outputVersion: $MergeOutputVersion<T[\"outputVersion\"], U[\"outputVersion\"]>;\n tools: $MergeObjects<T[\"tools\"], U[\"tools\"]>;\n content: $MergeContentDefinition<T[\"content\"], U[\"content\"]>;\n properties: $MergeObjects<T[\"properties\"], U[\"properties\"]>;\n};\n/**\n * Standard message structured used to define the most basic message structure that's\n * used throughout the library.\n *\n * This is also the message structure that's used when a message structure is not provided.\n */\ninterface StandardMessageStructure extends MessageStructure {\n content: {\n /** Text content for AI messages */\n ai: ContentBlock.Text;\n /** Text content for human messages */\n human: ContentBlock.Text;\n /** Text content for system messages */\n system: ContentBlock.Text;\n /** Text content for tool messages */\n tool: ContentBlock.Text;\n };\n properties: {\n /** Properties specific to AI messages */\n ai: {\n /** Metadata about the AI model response */\n response_metadata: ResponseMetadata;\n /** Usage statistics for the AI response */\n usage_metadata: UsageMetadata;\n };\n human: {\n /** Metadata about the human message */\n response_metadata: Record<string, unknown>;\n };\n system: {\n /** Metadata about the system message */\n response_metadata: Record<string, unknown>;\n };\n tool: {\n /** Metadata about the tool message */\n response_metadata: Record<string, unknown>;\n };\n };\n}\n/**\n * Takes a message structure type T and normalizes it by merging it with the standard message structure.\n * If T is already a standard message structure, returns T unchanged.\n *\n * This ensures that any custom message structure includes all the standard message structure fields\n * by default while allowing overrides and extensions.\n *\n * @template T - The message structure type to normalize, must extend MessageStructure\n * @returns Either T if it's already a standard structure, or the merged result of T with standard structure\n */\ntype $NormalizedMessageStructure<T extends MessageStructure> = T extends StandardMessageStructure ? T : $MergeMessageStructure<StandardMessageStructure, T>;\n/**\n * Infers the content blocks for a specific message type in a message structure.\n *\n * This utility type extracts the content block type that corresponds to a given message type\n * from the message structure's content definition.\n *\n * @template TStructure - The message structure to infer content from\n * @template TRole - The message role/type to get content for (e.g., \"ai\", \"human\", \"system\", \"tool\")\n * @returns The content block type for the specified type, or never if its not defined in the structure\n *\n * @example\n * ```ts\n * interface MyStructure extends MessageStructure {\n * content: {\n * human: ContentBlock.Text;\n * ai: ContentBlock.Text | ContentBlock.ToolCall;\n * };\n * }\n *\n * type HumanContent = $InferMessageContentBlocks<MyStructure, \"human\">;\n * // HumanContent = ContentBlock.Text\n *\n * type AIContent = $InferMessageContentBlocks<MyStructure, \"ai\">;\n * // AIContent = ContentBlock.Text | ContentBlock.ToolCall\n * ```\n */\ntype $InferMessageContentBlocks<TStructure extends MessageStructure, TRole extends MessageType> = $NormalizedMessageStructure<TStructure> extends infer S ? S extends MessageStructure ? S[\"content\"] extends infer C ? C extends Record<PropertyKey, ContentBlock> ? TRole extends keyof C ? [$MessageToolCallBlock<TStructure>] extends [never] ? C[TRole] : $MergeDiscriminatedUnion<NonNullable<C[TRole]>, $MessageToolCallBlock<TStructure>, \"type\"> : never : never : never : never : never;\n/**\n * Infers the content type for a specific message type from a message structure.\n *\n * This utility type determines the appropriate content type based on the message structure's\n * output version and the specified message type. The content type varies depending on the\n * output version (see {@link MessageOutputVersion})\n *\n * @template TStructure - The message structure to infer content from\n * @template TRole - The message role/type to get content for (e.g., \"ai\", \"human\", \"system\", \"tool\")\n * @returns The content type for the specified role based on the output version\n *\n * @example\n * ```ts\n * interface MyStructure extends MessageStructure {\n * outputVersion: \"v0\";\n * content: {\n * human: ContentBlock.Text;\n * ai: ContentBlock.Text | ContentBlock.ToolCall;\n * };\n * }\n *\n * type HumanContentV0 = $InferMessageContent<MyStructure, \"human\">;\n * // HumanContentV0 = string | Array<ContentBlock | ContentBlock.Text>\n *\n * interface MyStructureV1 extends MessageStructure {\n * outputVersion: \"v1\";\n * content: {\n * human: ContentBlock.Text;\n * ai: ContentBlock.Text | ContentBlock.Reasoning;\n * };\n * }\n *\n * type HumanContentV1 = $InferMessageContent<MyStructureV1, \"human\">;\n * // HumanContentV1 = ContentBlock.Text\n *\n * type AIContentV1 = $InferMessageContent<MyStructureV1, \"ai\">;\n * // AIContentV1 = ContentBlock.Text | ContentBlock.Reasoning\n * ```\n */\ntype $InferMessageContent<TStructure extends MessageStructure, TRole extends MessageType> = TStructure[\"outputVersion\"] extends \"v1\" ? Array<$InferMessageContentBlocks<TStructure, TRole>> : string | Array<ContentBlock | ContentBlock.Text>;\n/**\n * Infers the properties for a specific message type from a message structure.\n *\n * This utility type extracts the properties object that corresponds to a given message type\n * from the message structure's properties definition, and excludes the reserved\n * \"content\" and \"type\" properties to avoid conflicts with the core message structure.\n *\n * If the specified type is not defined in the message structure's properties, it returns\n * a generic Record<string, unknown> type to allow for arbitrary properties.\n *\n * @template TStructure - The message structure to infer properties from\n * @template TRole - The message type/role to get properties for (e.g., \"ai\", \"human\", \"system\", \"tool\")\n * @returns The properties object type for the specified type, excluding \"content\" and \"type\"\n *\n * @example\n * ```ts\n * interface MyStructure extends MessageStructure {\n * properties: {\n * ai: {\n * response_metadata: { model: string };\n * usage_metadata: { tokens: number };\n * content: string; // This will be omitted\n * type: string; // This will be omitted\n * };\n * human: { metadata: Record<string, unknown> };\n * };\n * }\n *\n * type AIProperties = $InferMessageProperties<MyStructure, \"ai\">;\n * // AIProperties = { response_metadata: { model: string }; usage_metadata: { tokens: number } }\n *\n * type HumanProperties = $InferMessageProperties<MyStructure, \"human\">;\n * // HumanProperties = { metadata: Record<string, unknown> }\n *\n * type SystemProperties = $InferMessageProperties<MyStructure, \"system\">;\n * // SystemProperties = Record<string, unknown> (fallback for undefined role)\n * ```\n */\ntype $InferMessageProperties<TStructure extends MessageStructure, TRole extends MessageType> = $NormalizedMessageStructure<TStructure> extends infer S ? S extends MessageStructure ? S[\"properties\"] extends infer P | undefined ? P extends Record<PropertyKey, unknown> ? TRole extends keyof P ? Omit<P[TRole], \"content\" | \"type\"> : Record<string, unknown> : Record<string, unknown> : Record<string, unknown> : never : never;\n/**\n * Infers the type of a specific property for a message type from a message structure.\n *\n * This utility type extracts the type of a single property by name from the properties\n * object that corresponds to a given message type. If the specified property key does\n * not exist in the type's properties, it returns `never`.\n *\n * @template TStructure - The message structure to infer the property from\n * @template TRole - The message type/role to get the property for (e.g., \"ai\", \"human\", \"system\", \"tool\")\n * @template K - The property key to extract the type for\n * @returns The type of the specified property, or `never` if the property doesn't exist\n *\n * @example\n * ```ts\n * interface MyStructure extends MessageStructure {\n * properties: {\n * ai: {\n * response_metadata: { model: string; temperature: number };\n * usage_metadata: { input_tokens: number; output_tokens: number };\n * };\n * human: { metadata: Record<string, unknown> };\n * };\n * }\n *\n * type ResponseMetadata = $InferMessageProperty<MyStructure, \"ai\", \"response_metadata\">;\n * // ResponseMetadata = { model: string; temperature: number }\n *\n * type UsageMetadata = $InferMessageProperty<MyStructure, \"ai\", \"usage_metadata\">;\n * // UsageMetadata = { input_tokens: number; output_tokens: number }\n *\n * type NonExistentProperty = $InferMessageProperty<MyStructure, \"ai\", \"nonExistent\">;\n * // NonExistentProperty = Record<string, unknown>\n *\n * type HumanMetadata = $InferMessageProperty<MyStructure, \"human\", \"metadata\">;\n * // HumanMetadata = Record<string, unknown>\n * ```\n */\ntype $InferMessageProperty<TStructure extends MessageStructure, TRole extends MessageType, K extends string> = K extends keyof $InferMessageProperties<TStructure, TRole> ? $InferMessageProperties<TStructure, TRole>[K] : never;\n/**\n * Infers the response metadata type for a specific message type from a message structure.\n *\n * This utility type extracts the `response_metadata` property type for a given message type.\n *\n * @template TStructure - The message structure to infer the response metadata from\n * @template TRole - The message type/role to get the response metadata for (e.g., \"ai\", \"human\", \"system\", \"tool\")\n * @returns The type of the response_metadata property, or `Record<string, unknown>` as fallback\n *\n * @example\n * ```ts\n * interface MyStructure extends MessageStructure {\n * properties: {\n * ai: {\n * response_metadata: { model: string; temperature: number; tokens: number };\n * };\n * human: { metadata: Record<string, unknown> };\n * };\n * }\n *\n * type AIResponseMetadata = $InferResponseMetadata<MyStructure, \"ai\">;\n * // AIResponseMetadata = { model: string; temperature: number; tokens: number }\n *\n * type HumanResponseMetadata = $InferResponseMetadata<MyStructure, \"human\">;\n * // HumanResponseMetadata = Record<string, unknown> (fallback since not defined)\n * ```\n */\ntype $InferResponseMetadata<TStructure extends MessageStructure, TRole extends MessageType> = $InferMessageProperty<TStructure, TRole, \"response_metadata\"> extends infer P ? [P] extends [never] ? Record<string, unknown> : P : never;\n/**\n * Represents a message object that organizes context for an LLM.\n *\n * @example\n * ```ts\n * // Basic message with text content\n * const message: Message = {\n * id: \"msg-123\",\n * name: \"user\",\n * type: \"human\",\n * content: [{ type: \"text\", text: \"Hello!\" }]\n * };\n *\n * // Basic ai message interface extension\n * interface MyMessage extends Message<StandardMessageStructure, \"ai\"> {\n * // Additional AI-specific properties can be added here\n * }\n *`\n * // Custom message structure\n * interface CustomStructure extends MessageStructure {\n * content: {\n * ai: ContentBlock.Text | ContentBlock.ToolCall<\"search\", { query: string }>;\n * human: ContentBlock.Text | ContentBlock.Multimodal.Image;\n * };\n * }\n *\n * // Create a message with custom structure\n * const message: Message<CustomStructure> = {\n * id: \"msg-123\",\n * name: \"user\",\n * type: \"ai\",\n * content: [\n * { type: \"text\", text: \"Hello!\" },\n * {\n * type: \"tool_call\",\n * name: \"search\",\n * args: { query: \"What is the capital of France?\" }\n * }\n * ]\n * };\n * ```\n */\ninterface Message<TStructure extends MessageStructure = StandardMessageStructure, TRole extends MessageType = MessageType> {\n /** The message type/role */\n readonly type: TRole;\n /** Unique identifier for this message */\n id?: string;\n /** Optional name/identifier for the entity that created this message */\n name?: string;\n /** Array of content blocks that make up the message content */\n content: $InferMessageContent<TStructure, TRole>;\n /** Metadata about the message */\n response_metadata?: Partial<$InferResponseMetadata<TStructure, TRole>>;\n}\n/**\n * Type guard to check if a value is a valid Message object.\n *\n * @param message - The value to check\n * @returns true if the value is a valid Message object, false otherwise\n */\ndeclare function isMessage(message: unknown): message is Message;\n//#endregion\nexport { $InferMessageContent, $InferMessageContentBlocks, $InferMessageProperties, $InferMessageProperty, $InferResponseMetadata, $MergeContentDefinition, $MergeMessageStructure, $MergeOutputVersion, $MessageToolCallBlock, $NormalizedMessageStructure, Message, MessageOutputVersion, MessageStructure, MessageToolDefinition, MessageToolSet, MessageType, StandardMessageStructure, isMessage };\n//# sourceMappingURL=message.d.ts.map"],"mappings":";;;;;;;AAqB6E;AA4BpD;;;;AAkBR;AAAA;AAqBqB;;;;;;;;KAnEjCK,WAAAA,GA+FqLU,IAAAA,GAAAA,OAAAA,GAAAA,MAAAA,GAAAA,QAAAA,GAAAA,CAAAA,MAAAA,GA/FxHT,WA+FwHS,CAAAA,OAAAA,CAAAA,CAAAA;;;;;;;AAAqI;AAAA;;;;;;;;;;AAkFhS;AAAA;;;;;AAMiB;AAAA;;;KA3J3CR,oBAAAA,GAuL4Ba,IAAAA,GAAAA,IAAAA;;;;;;;;;;;;AAAqQ;AAAA;;;UAvK5RZ,qBA6MmDgB,CAAAA,SAAAA,OAAAA,EAAAA,UAAAA,OAAAA,CAAAA,CAAAA;EAAC,KAAaT,EA5MlEN,MA4MkEM;EAAC,MAAeM,EA3MjFX,OA2MiFW;;;;;;;;;;;;;;;;;;;;UAvLjFV,cAAAA,CAuL+RX;EAAY,CAAA,GAAA,EAA1BsB,MAAAA,CAAAA,EAtL1Qd,qBAsL0Qc;;;;;;;;;;;;AAAgG;AAAA;;;;;;;;;;;;;;;KA1JtXV,qBAkMSR,CAAAA,mBAlMgCS,gBAkMhCT,CAAAA,GAlMoDU,UAkMpDV,CAAAA,OAAAA,CAAAA,SAlMgFO,cAkMhFP,GAAAA,QAAAA,MAlM+GU,UAkM/GV,CAAAA,OAAAA,CAAAA,GAlMqIW,CAkMrIX,SAAAA,MAAAA,GAlMwJU,UAkMxJV,CAAAA,OAAAA,CAAAA,CAlM4KW,CAkM5KX,CAAAA,SAlMuLI,qBAkMvLJ,GAlM+MJ,YAAAA,CAAagB,KAAAA,CAAMC,QAkMlOb,CAlM2OW,CAkM3OX,EAlM8OU,UAkM9OV,CAAAA,OAAAA,CAAAA,CAlMkQW,CAkMlQX,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA,GAAAA,KAAAA,GAAAA,KAAAA,EAAAA,CAAAA,MAlMuSU,UAkMvSV,CAAAA,OAAAA,CAAAA,CAAAA,GAAAA,KAAAA;AAAa;AAAA;;;;;;;;;;;;AAQgC;AAAA;;;;;;;;;AA2CmE;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;AA2ByP;AAAA;;;;;;;;;;;UAlN7WS,gBAAAA,CA0P6L0B;EAAK;AAAA;;;EAuC5I,SAAgBlC,aAAAA,CAAAA,EA5RrDE,oBA4RqDF;EAAW;;;;EAAwF,SAAG6B,KAAAA,CAAAA,EAvRnKvB,cAuRmKuB;EAAC;;;;EAA2F,SAAeO,OAAAA,CAAAA,EAlR5QvB,OAkR4QuB,CAAAA,UAlR1PpC,WAkR0PoC,GAlR5OzC,YAkR4OyC,EAAAA,CAAAA;EAAC;;;;EAA8C,SAAoBtB,UAAAA,CAAAA,EA7Q5UD,OA6Q4UC,CAAAA,UA7Q1Td,WA6Q0Tc,GA7Q5SA,MA6Q4SA,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,EAAAA,CAAAA;;AAAgC;AAAA;;;KAvQ/XC,8BA6SyEf,CAAAA,CAAAA,CAAAA,GA7SrCiB,OA6SqCjB,CA7S7BgB,CA6S6BhB,EA7S1BE,oBA6S0BF,CAAAA,GAAAA,SAAAA;;;;;;;;;AAA0I;AAAA;;;;;;;;;;AA4BO;AAAA;;;;;;;KA7S1NkB,mBAgW2BT,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GAhWCM,8BAgWDN,CAhWgCO,CAgWhCP,CAAAA,SAAAA,KAAAA,GAAAA,GAhWsDM,8BAgWtDN,CAhWqFU,CAgWrFV,CAAAA,SAAAA,KAAAA,GAAAA,GAAAA,CAhW4GW,EAgW5GX,EAhWgHY,EAgWhHZ,CAAAA,SAAAA,CAAAA,SAAAA,EAAAA,SAAAA,CAAAA,GAAAA,IAAAA,GAAAA,CAhW6JW,EAgW7JX,CAAAA,SAAAA,CAAAA,SAAAA,CAAAA,GAhWuLa,OAgWvLb,CAhW+LY,EAgW/LZ,EAAAA,SAAAA,CAAAA,GAAAA,CAhWiNY,EAgWjNZ,CAAAA,SAAAA,CAAAA,SAAAA,CAAAA,GAhW2Oa,OAgW3Ob,CAhWmPW,EAgWnPX,EAAAA,SAAAA,CAAAA,GAhWoQY,EAgWpQZ,GAAAA,KAAAA,GAAAA,KAAAA;;;;;;;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA5TxBc,8CAA8CP,UAAUG,KAAKF,SAASP,gBAAgBM,IAAIA,EAAEN,eAAeA,gBAAgBS,IAAIA,EAAET,aAAaf,sCAAsCe,IAAIA,gBAAgBM,IAAIN,gBAAgBS,IAAIrB,yBAAyBmB,QAAQD,EAAEN,IAAIf,eAAesB,QAAQE,EAAET,IAAIf,yBAAyBsB,QAAQD,EAAEN,IAAIf,gBAAgBe,gBAAgBS,IAAIF,QAAQE,EAAET,IAAIf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoC7X6B,iCAAiChB,4BAA4BA;iBACjDU,oBAAoBF,oBAAoBG;SAChDpB,cAAciB,YAAYG;WACxBI,wBAAwBP,cAAcG;cACnCpB,cAAciB,iBAAiBG;;;;;;;;UAQnCM,wBAAAA,SAAiCjB;;;QAGnCb,YAAAA,CAAa+B;;WAEV/B,YAAAA,CAAa+B;;YAEZ/B,YAAAA,CAAa+B;;UAEf/B,YAAAA,CAAa+B;;;;;;yBAME9B;;sBAEHC;;;;yBAIGiB;;;;yBAIAA;;;;yBAIAA;;;;;;;;;;;;;;KAcpBa,sCAAsCnB,oBAAoBQ,UAAUS,2BAA2BT,IAAIQ,uBAAuBC,0BAA0BT;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BpJY,8CAA8CpB,gCAAgCR,eAAe2B,4BAA4BlB,8BAA8BoB,UAAUrB,mBAAmBqB,+BAA+BC,UAAUhB,OAAOiB,aAAapC,gBAAgBqC,oBAAoBF,KAAKvB,sBAAsBE,+BAA+BqB,EAAEE,SAASlC,yBAAyBG,YAAY6B,EAAEE,SAASzB,sBAAsBE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwChawB,wCAAwCzB,gCAAgCR,eAAeS,2CAA2CyB,MAAMN,2BAA2BnB,YAAYuB,mBAAmBE,MAAMvC,eAAeA,YAAAA,CAAa+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuCpOS,2CAA2C3B,gCAAgCR,eAAe2B,4BAA4BlB,8BAA8BoB,UAAUrB,mBAAmBqB,8CAA8CO,UAAUtB,OAAOiB,wBAAwBC,oBAAoBI,IAAIC,KAAKD,EAAEJ,8BAA8BlB,0BAA0BA,0BAA0BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsCzXwB,yCAAyC9B,gCAAgCR,iCAAiCU,gBAAgByB,wBAAwB1B,YAAYuB,SAASG,wBAAwB1B,YAAYuB,OAAOtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BlN6B,0CAA0C/B,gCAAgCR,eAAesC,sBAAsB7B,YAAYuB,+CAA+CI,qBAAqBtB,0BAA0BsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA2CpNI,2BAA2BhC,mBAAmBiB,wCAAwCzB,cAAcA;;iBAE7FgC;;;;;;WAMNC,qBAAqBxB,YAAYuB;;sBAEtBnB,QAAQ0B,uBAAuB9B,YAAYuB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"metadata.d.ts","names":["MessageOutputVersion","ResponseMetadata","mergeResponseMetadata","ModalitiesTokenDetails","InputTokenDetails","OutputTokenDetails","UsageMetadata","mergeUsageMetadata"],"sources":["../../../../../../langchain-core/dist/messages/metadata.d.ts"],"sourcesContent":["import { MessageOutputVersion } from \"./message.js\";\n\n//#region src/messages/metadata.d.ts\ntype ResponseMetadata = {\n model_provider?: string;\n model_name?: string;\n output_version?: MessageOutputVersion;\n [key: string]: unknown;\n};\ndeclare function mergeResponseMetadata(a?: ResponseMetadata, b?: ResponseMetadata): ResponseMetadata;\ntype ModalitiesTokenDetails = {\n /**\n * Text tokens.\n * Does not need to be reported, but some models will do so.\n */\n text?: number;\n /**\n * Image (non-video) tokens.\n */\n image?: number;\n /**\n * Audio tokens.\n */\n audio?: number;\n /**\n * Video tokens.\n */\n video?: number;\n /**\n * Document tokens.\n * e.g. PDF\n */\n document?: number;\n};\n/**\n * Breakdown of input token counts.\n *\n * Does not *need* to sum to full input token count. Does *not* need to have all keys.\n */\ntype InputTokenDetails = ModalitiesTokenDetails & {\n /**\n * Input tokens that were cached and there was a cache hit.\n *\n * Since there was a cache hit, the tokens were read from the cache.\n * More precisely, the model state given these tokens was read from the cache.\n */\n cache_read?: number;\n /**\n * Input tokens that were cached and there was a cache miss.\n *\n * Since there was a cache miss, the cache was created from these tokens.\n */\n cache_creation?: number;\n};\n/**\n * Breakdown of output token counts.\n *\n * Does *not* need to sum to full output token count. Does *not* need to have all keys.\n */\ntype OutputTokenDetails = ModalitiesTokenDetails & {\n /**\n * Reasoning output tokens.\n *\n * Tokens generated by the model in a chain of thought process (i.e. by\n * OpenAI's o1 models) that are not returned as part of model output.\n */\n reasoning?: number;\n};\n/**\n * Usage metadata for a message, such as token counts.\n */\ntype UsageMetadata = {\n /**\n * Count of input (or prompt) tokens. Sum of all input token types.\n */\n input_tokens: number;\n /**\n * Count of output (or completion) tokens. Sum of all output token types.\n */\n output_tokens: number;\n /**\n * Total token count. Sum of input_tokens + output_tokens.\n */\n total_tokens: number;\n /**\n * Breakdown of input token counts.\n *\n * Does *not* need to sum to full input token count. Does *not* need to have all keys.\n */\n input_token_details?: InputTokenDetails;\n /**\n * Breakdown of output token counts.\n *\n * Does *not* need to sum to full output token count. Does *not* need to have all keys.\n */\n output_token_details?: OutputTokenDetails;\n};\ndeclare function mergeUsageMetadata(a?: UsageMetadata, b?: UsageMetadata): UsageMetadata;\n//#endregion\nexport { InputTokenDetails, ModalitiesTokenDetails, OutputTokenDetails, ResponseMetadata, UsageMetadata, mergeResponseMetadata, mergeUsageMetadata };\n//# sourceMappingURL=metadata.d.ts.map"],"mappings":";;;;AAAoD,KAG/CC,gBAAAA,GAAgB;EAM+E,cAC/FE,CAAAA,EAAAA,MAAAA;EAAsB,UA6BtBC,CAAAA,EAAAA,MAAAA;EAA0C,cAoB1CC,CAAAA,EArDcL,oBAqDOG;EAAsB,CAAA,GAY3CG,EAAAA,MAAAA,CAAAA,EAAAA,OAAa;CAAA;KA7DbH,sBAAAA,GAqFoBE;EAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAxDtCD,iBAAAA,GAAoBD;;;;;;;;;;;;;;;;;;;;KAoBpBE,kBAAAA,GAAqBF;;;;;;;;;;;;KAYrBG,aAAAA;;;;;;;;;;;;;;;;;;wBAkBmBF;;;;;;yBAMCC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","names":["BaseMessage","BaseMessageLike","StoredMessage","ToolMessage","AIMessage","AIMessageChunk","ChatMessage","ChatMessageChunk","FunctionMessage","FunctionMessageChunk","HumanMessage","HumanMessageChunk","SystemMessage","SystemMessageChunk","MessageStructure","$Expand","T","U","K","$KnownKeys","$HasIndexSignature","$OnlyIndexSignatures","$MergeObjects","Record","$MergeDiscriminatedUnion","Key","PropertyKey","A","B","Extract","Constructor","iife","coerceMessageLikeToMessage","getBufferString","mapStoredMessageToChatMessage","mapStoredMessagesToChatMessages","mapChatMessagesToStoredMessages","convertToChunk"],"sources":["../../../../../../langchain-core/dist/messages/utils.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageLike, StoredMessage } from \"./base.js\";\nimport { ToolMessage } from \"./tool.js\";\nimport { AIMessage, AIMessageChunk } from \"./ai.js\";\nimport { ChatMessage, ChatMessageChunk } from \"./chat.js\";\nimport { FunctionMessage, FunctionMessageChunk } from \"./function.js\";\nimport { HumanMessage, HumanMessageChunk } from \"./human.js\";\nimport { SystemMessage, SystemMessageChunk } from \"./system.js\";\nimport { MessageStructure } from \"./message.js\";\n\n//#region src/messages/utils.d.ts\ntype $Expand<T> = T extends infer U ? { [K in keyof U]: U[K] } : never;\n/**\n * Extracts the explicitly declared keys from a type T.\n *\n * @template T - The type to extract keys from\n * @returns A union of keys that are not string, number, or symbol\n */\ntype $KnownKeys<T> = { [K in keyof T]: string extends K ? never : number extends K ? never : symbol extends K ? never : K }[keyof T];\n/**\n * Detects if T has an index signature.\n *\n * @template T - The type to check for index signatures\n * @returns True if T has an index signature, false otherwise\n */\ntype $HasIndexSignature<T> = string extends keyof T ? true : number extends keyof T ? true : symbol extends keyof T ? true : false;\n/**\n * Detects if T has an index signature and no known keys.\n *\n * @template T - The type to check for index signatures and no known keys\n * @returns True if T has an index signature and no known keys, false otherwise\n */\ntype $OnlyIndexSignatures<T> = $HasIndexSignature<T> extends true ? [$KnownKeys<T>] extends [never] ? true : false : false;\n/**\n * Recursively merges two object types T and U, with U taking precedence over T.\n *\n * This utility type performs a deep merge of two object types:\n * - For keys that exist in both T and U:\n * - If both values are objects (Record<string, unknown>), recursively merge them\n * - Otherwise, U's value takes precedence\n * - For keys that exist only in T, use T's value\n * - For keys that exist only in U, use U's value\n *\n * @template T - The first object type to merge\n * @template U - The second object type to merge (takes precedence over T)\n *\n * @example\n * ```ts\n * type ObjectA = {\n * shared: { a: string; b: number };\n * onlyInA: boolean;\n * };\n *\n * type ObjectB = {\n * shared: { b: string; c: Date };\n * onlyInB: symbol;\n * };\n *\n * type Merged = $MergeObjects<ObjectA, ObjectB>;\n * // Result: {\n * // shared: { a: string; b: string; c: Date };\n * // onlyInA: boolean;\n * // onlyInB: symbol;\n * // }\n * ```\n */\ntype $MergeObjects<T, U> =\n// If U is purely index-signature based, prefer U as a whole\n$OnlyIndexSignatures<U> extends true ? U : $OnlyIndexSignatures<T> extends true ? U : { [K in keyof T | keyof U]: K extends keyof T ? K extends keyof U ? T[K] extends Record<string, unknown> ? U[K] extends Record<string, unknown> ? $MergeObjects<T[K], U[K]> : U[K] : U[K] : T[K] : K extends keyof U ? U[K] : never };\n/**\n * Merges two discriminated unions A and B based on a discriminator key (defaults to \"type\").\n * For each possible value of the discriminator across both unions:\n * - If B has a member with that discriminator value, use B's member\n * - Otherwise use A's member with that discriminator value\n * This effectively merges the unions while giving B's members precedence over A's members.\n *\n * @template A - First discriminated union type that extends Record<Key, PropertyKey>\n * @template B - Second discriminated union type that extends Record<Key, PropertyKey>\n * @template Key - The discriminator key property, defaults to \"type\"\n */\ntype $MergeDiscriminatedUnion<A extends Record<Key, PropertyKey>, B extends Record<Key, PropertyKey>, Key extends PropertyKey = \"type\"> = { [T in A[Key] | B[Key]]: [Extract<B, Record<Key, T>>] extends [never] // Check if B has a member with this discriminator value\n? Extract<A, Record<Key, T>> : [Extract<A, Record<Key, T>>] extends [never] ? Extract<B, Record<Key, T>> : $MergeObjects<Extract<A, Record<Key, T>>, Extract<B, Record<Key, T>>> }[A[Key] | B[Key]];\ntype Constructor<T> = new (...args: unknown[]) => T;\n/**\n * Immediately-invoked function expression.\n *\n * @param fn - The function to execute\n * @returns The result of the function\n */\ndeclare const iife: <T>(fn: () => T) => T;\ndeclare function coerceMessageLikeToMessage(messageLike: BaseMessageLike): BaseMessage;\n/**\n * This function is used by memory classes to get a string representation\n * of the chat message history, based on the message content and role.\n */\ndeclare function getBufferString(messages: BaseMessage[], humanPrefix?: string, aiPrefix?: string): string;\ndeclare function mapStoredMessageToChatMessage(message: StoredMessage): AIMessage<MessageStructure> | ChatMessage<MessageStructure> | FunctionMessage<MessageStructure> | HumanMessage<MessageStructure> | SystemMessage<MessageStructure> | ToolMessage<MessageStructure>;\n/**\n * Transforms an array of `StoredMessage` instances into an array of\n * `BaseMessage` instances. It uses the `mapV1MessageToStoredMessage`\n * function to ensure all messages are in the `StoredMessage` format, then\n * creates new instances of the appropriate `BaseMessage` subclass based\n * on the type of each message. This function is used to prepare stored\n * messages for use in a chat context.\n */\ndeclare function mapStoredMessagesToChatMessages(messages: StoredMessage[]): BaseMessage[];\n/**\n * Transforms an array of `BaseMessage` instances into an array of\n * `StoredMessage` instances. It does this by calling the `toDict` method\n * on each `BaseMessage`, which returns a `StoredMessage`. This function\n * is used to prepare chat messages for storage.\n */\ndeclare function mapChatMessagesToStoredMessages(messages: BaseMessage[]): StoredMessage[];\ndeclare function convertToChunk(message: BaseMessage): AIMessageChunk<MessageStructure> | ChatMessageChunk<MessageStructure> | FunctionMessageChunk<MessageStructure> | HumanMessageChunk<MessageStructure> | SystemMessageChunk<MessageStructure>;\n//#endregion\nexport { $Expand, $MergeDiscriminatedUnion, $MergeObjects, Constructor, coerceMessageLikeToMessage, convertToChunk, getBufferString, iife, mapChatMessagesToStoredMessages, mapStoredMessageToChatMessage, mapStoredMessagesToChatMessages };\n//# sourceMappingURL=utils.d.ts.map"],"mappings":";;;;;;AAwBmH;AAAA;KAP9GmB,UAcoB,CAAA,CAAA,CAAA,GAAA,QAAA,MAdUH,CAcV,GAAA,MAAA,SAd6BE,CAc7B,GAAA,KAAA,GAAA,MAAA,SAdwDA,CAcxD,GAAA,KAAA,GAAA,MAAA,SAdmFA,CAcnF,GAAA,KAAA,GAd+FA,CAc/F,EAAA,CAAA,MAdyGF,CAczG,CAAA;;;;;AAAsD;AAAA;KAP1EI,kBAyCa,CAAA,CAAA,CAAA,GAAA,MAAA,SAAA,MAzCgCJ,CAyChC,GAAA,IAAA,GAAA,MAAA,SAAA,MAzCgEA,CAyChE,GAAA,IAAA,GAAA,MAAA,SAAA,MAzCgGA,CAyChG,GAAA,IAAA,GAAA,KAAA;;;;;;;KAlCbK,oBAoC+FL,CAAAA,CAAAA,CAAAA,GApCrEI,kBAoCqEJ,CApClDA,CAoCkDA,CAAAA,SAAAA,IAAAA,GAAAA,CApC/BG,UAoC+BH,CApCpBA,CAoCoBA,CAAAA,CAAAA,SAAAA,CAAAA,KAAAA,CAAAA,GAAAA,IAAAA,GAAAA,KAAAA,GAAAA,KAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4M;AAAA;;;;;;KAF3SM,aAcmFI,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA;;AAZxFL,oBAYkHK,CAZ7FT,CAY6FS,CAAAA,SAAAA,IAAAA,GAZ3ET,CAY2ES,GAZvEL,oBAYuEK,CAZlDV,CAYkDU,CAAAA,SAAAA,IAAAA,GAZhCT,CAYgCS,GAAAA,QAAAA,MAZdV,CAYcU,GAAAA,MAZJT,CAYIS,GAZAR,CAYAQ,SAAAA,MAZgBV,CAYhBU,GAZoBR,CAYpBQ,SAAAA,MAZoCT,CAYpCS,GAZwCV,CAYxCU,CAZ0CR,CAY1CQ,CAAAA,SAZqDH,MAYrDG,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,GAZ+ET,CAY/ES,CAZiFR,CAYjFQ,CAAAA,SAZ4FH,MAY5FG,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,GAZsHJ,aAYtHI,CAZoIV,CAYpIU,CAZsIR,CAYtIQ,CAAAA,EAZ0IT,CAY1IS,CAZ4IR,CAY5IQ,CAAAA,CAAAA,GAZkJT,CAYlJS,CAZoJR,CAYpJQ,CAAAA,GAZyJT,CAYzJS,CAZ2JR,CAY3JQ,CAAAA,GAZgKV,CAYhKU,CAZkKR,CAYlKQ,CAAAA,GAZuKR,CAYvKQ,SAAAA,MAZuLT,CAYvLS,GAZ2LT,CAY3LS,CAZ6LR,CAY7LQ,CAAAA,GAAAA,KAAAA,EAAAA;;;;;;;;;;;;KAA7GF,wBACoBR,CAAAA,UADeO,MACfP,CADsBS,GACtBT,EAD2BU,WAC3BV,CAAAA,EAAAA,UADmDO,MACnDP,CAD0DS,GAC1DT,EAD+DU,WAC/DV,CAAAA,EAAAA,YADyFU,WACzFV,GAAAA,MAAAA,CAAAA,GAAAA,QADyHW,CACzHX,CAD2HS,GAC3HT,CAAAA,GADkIY,CAClIZ,CADoIS,GACpIT,CAAAA,GAAAA,CAD4Ia,OAC5Ib,CADoJY,CACpJZ,EADuJO,MACvJP,CAD8JS,GAC9JT,EADmKA,CACnKA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,KAAAA,CAAAA,CAAAA;AAAAA,EAAvBa,OAAWN,CAAHI,CAAGJ,EAAAA,MAAAA,CAAOE,GAAPF,EAAYP,CAAZO,CAAAA,CAAAA,GAAAA,CAAmBM,OAAnBN,CAA2BI,CAA3BJ,EAA8BA,MAA9BA,CAAqCE,GAArCF,EAA0CP,CAA1CO,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,KAAAA,CAAAA,GAAiEM,OAAjEN,CAAyEK,CAAzEL,EAA4EA,MAA5EA,CAAmFE,GAAnFF,EAAwFP,CAAxFO,CAAAA,CAAAA,GAA8FD,aAA9FC,CAA4GM,OAA5GN,CAAoHI,CAApHJ,EAAuHA,MAAvHA,CAA8HE,GAA9HF,EAAmIP,CAAnIO,CAAAA,CAAAA,EAAwIM,OAAxIN,CAAgJK,CAAhJL,EAAmJA,MAAnJA,CAA0JE,GAA1JF,EAA+JP,CAA/JO,CAAAA,CAAAA,CAAAA,EAAAA,CAAsKI,CAAtKJ,CAAwKE,GAAxKF,CAAAA,GAA+KK,CAA/KL,CAAiLE,GAAjLF,CAAAA,CAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompt_values.d.ts","names":["Serializable","BaseMessage","HumanMessage","MessageStructure","MessageType","BasePromptValueInterface","StringPromptValueInterface","ChatPromptValueInterface","BasePromptValue","StringPromptValue","ChatPromptValueFields","ChatPromptValue","ImageContent","ImagePromptValueFields","ImagePromptValue"],"sources":["../../../../../langchain-core/dist/prompt_values.d.ts"],"sourcesContent":["import { Serializable } from \"./load/serializable.js\";\nimport { BaseMessage } from \"./messages/base.js\";\nimport { HumanMessage } from \"./messages/human.js\";\nimport { MessageStructure, MessageType } from \"./messages/message.js\";\n\n//#region src/prompt_values.d.ts\ninterface BasePromptValueInterface extends Serializable {\n toString(): string;\n toChatMessages(): BaseMessage[];\n}\ninterface StringPromptValueInterface extends BasePromptValueInterface {\n value: string;\n}\ninterface ChatPromptValueInterface extends BasePromptValueInterface {\n messages: BaseMessage[];\n}\n/**\n * Base PromptValue class. All prompt values should extend this class.\n */\ndeclare abstract class BasePromptValue extends Serializable implements BasePromptValueInterface {\n abstract toString(): string;\n abstract toChatMessages(): BaseMessage[];\n}\n/**\n * Represents a prompt value as a string. It extends the BasePromptValue\n * class and overrides the toString and toChatMessages methods.\n */\ndeclare class StringPromptValue extends BasePromptValue implements StringPromptValueInterface {\n static lc_name(): string;\n lc_namespace: string[];\n lc_serializable: boolean;\n value: string;\n constructor(value: string);\n toString(): string;\n toChatMessages(): HumanMessage<MessageStructure>[];\n}\n/**\n * Interface for the fields of a ChatPromptValue.\n */\ninterface ChatPromptValueFields {\n messages: BaseMessage[];\n}\n/**\n * Class that represents a chat prompt value. It extends the\n * BasePromptValue and includes an array of BaseMessage instances.\n */\ndeclare class ChatPromptValue extends BasePromptValue implements ChatPromptValueInterface {\n lc_namespace: string[];\n lc_serializable: boolean;\n static lc_name(): string;\n messages: BaseMessage[];\n constructor(messages: BaseMessage[]);\n constructor(fields: ChatPromptValueFields);\n toString(): string;\n toChatMessages(): BaseMessage<MessageStructure, MessageType>[];\n}\ntype ImageContent = {\n /** Specifies the detail level of the image. */\n detail?: \"auto\" | \"low\" | \"high\";\n /** Either a URL of the image or the base64 encoded image data. */\n url: string;\n};\ninterface ImagePromptValueFields {\n imageUrl: ImageContent;\n}\n/**\n * Class that represents an image prompt value. It extends the\n * BasePromptValue and includes an ImageURL instance.\n */\ndeclare class ImagePromptValue extends BasePromptValue {\n lc_namespace: string[];\n lc_serializable: boolean;\n static lc_name(): string;\n imageUrl: ImageContent;\n /** @ignore */\n value: string;\n constructor(fields: ImagePromptValueFields);\n constructor(fields: ImageContent);\n toString(): string;\n toChatMessages(): HumanMessage<MessageStructure>[];\n}\n//#endregion\nexport { BasePromptValue, BasePromptValueInterface, ChatPromptValue, ChatPromptValueFields, ChatPromptValueInterface, ImageContent, ImagePromptValue, ImagePromptValueFields, StringPromptValue, StringPromptValueInterface };\n//# sourceMappingURL=prompt_values.d.ts.map"],"mappings":";;;;;;UAMUK,wBAAAA,SAAiCL,YAEvBC,CAAAA;EAAW,QAFYD,EAAAA,EAAAA,MAAAA;EAAY,cAAA,EAAA,EAEnCC,WAFmC,EAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","names":["MessageContent","DirectToolOutput","ToolCall","ToolMessage","InferInteropZodInput","InferInteropZodOutput","InteropZodObject","InteropZodType","CallbackManagerForToolRun","RunnableConfig","RunnableInterface","RunnableToolLike","JsonSchema7Type","BaseLangChainParams","ToolDefinition","BaseStore","z","ResponseFormat","ToolOutputType","ContentAndArtifact","ToolReturnType","TOutput","TConfig","TInput","ToolInputSchemaBase","ZodTypeAny","ToolParams","ToolRunnableConfig","Record","ConfigurableFieldType","ContextSchema","StructuredToolParams","StructuredToolInterface","Pick","ToolInputSchemaOutputType","T","ToolInputSchemaInputType","StructuredToolCallInput","SchemaT","SchemaInputT","StringInputToolSchema","ZodTypeDef","ZodType","ToolOutputT","TArg","Promise","ToolInterface","NonNullable","BaseDynamicToolInput","DynamicToolInput","DynamicStructuredToolInput","SchemaOutputT","isStructuredTool","isRunnableToolLike","isStructuredToolParams","isLangChainTool","ToolRuntime","TState","TContext"],"sources":["../../../../../../langchain-core/dist/tools/types.d.ts"],"sourcesContent":["import { MessageContent } from \"../messages/base.js\";\nimport { DirectToolOutput, ToolCall, ToolMessage } from \"../messages/tool.js\";\nimport { InferInteropZodInput, InferInteropZodOutput, InteropZodObject, InteropZodType } from \"../utils/types/zod.js\";\nimport { CallbackManagerForToolRun } from \"../callbacks/manager.js\";\nimport { RunnableConfig, RunnableInterface } from \"../runnables/types.js\";\nimport { RunnableToolLike } from \"../runnables/base.js\";\nimport { JsonSchema7Type } from \"../utils/zod-to-json-schema/parseTypes.js\";\nimport { BaseLangChainParams, ToolDefinition } from \"../language_models/base.js\";\nimport { BaseStore } from \"../stores.js\";\nimport { z } from \"zod/v3\";\n\n//#region src/tools/types.d.ts\ntype ResponseFormat = \"content\" | \"content_and_artifact\" | string;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ToolOutputType = any;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ContentAndArtifact = [MessageContent, any];\n/**\n * Conditional type that determines the return type of the {@link StructuredTool.invoke} method.\n * - If the input is a ToolCall, it returns a ToolMessage\n * - If the config is a runnable config and contains a toolCall property, it returns a ToolMessage\n * - Otherwise, it returns the original output type\n */\ntype ToolReturnType<TInput, TConfig, TOutput> = TOutput extends DirectToolOutput ? TOutput : TConfig extends {\n toolCall: {\n id: string;\n };\n} ? ToolMessage : TConfig extends {\n toolCall: {\n id: undefined;\n };\n} ? TOutput : TConfig extends {\n toolCall: {\n id?: string;\n };\n} ? TOutput | ToolMessage : TInput extends ToolCall ? ToolMessage : TOutput;\n/**\n * Base type that establishes the types of input schemas that can be used for LangChain tool\n * definitions.\n */\ntype ToolInputSchemaBase = z.ZodTypeAny | JsonSchema7Type;\n/**\n * Parameters for the Tool classes.\n */\ninterface ToolParams extends BaseLangChainParams {\n /**\n * The tool response format.\n *\n * If \"content\" then the output of the tool is interpreted as the contents of a\n * ToolMessage. If \"content_and_artifact\" then the output is expected to be a\n * two-tuple corresponding to the (content, artifact) of a ToolMessage.\n *\n * @default \"content\"\n */\n responseFormat?: ResponseFormat;\n /**\n * Default config object for the tool runnable.\n */\n defaultConfig?: ToolRunnableConfig;\n /**\n * Whether to show full details in the thrown parsing errors.\n *\n * @default false\n */\n verboseParsingErrors?: boolean;\n /**\n * Metadata for the tool.\n */\n metadata?: Record<string, unknown>;\n}\ntype ToolRunnableConfig<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nConfigurableFieldType extends Record<string, any> = Record<string, any>,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nContextSchema = any> = RunnableConfig<ConfigurableFieldType> & {\n toolCall?: ToolCall;\n context?: ContextSchema;\n};\n/**\n * Schema for defining tools.\n *\n * @version 0.2.19\n */\ninterface StructuredToolParams extends Pick<StructuredToolInterface, \"name\" | \"schema\"> {\n /**\n * An optional description of the tool to pass to the model.\n */\n description?: string;\n}\n/**\n * Utility type that resolves the output type of a tool input schema.\n *\n * Input & Output types are a concept used with Zod schema, as Zod allows for transforms to occur\n * during parsing. When using JSONSchema, input and output types are the same.\n *\n * The input type for a given schema should match the structure of the arguments that the LLM\n * generates as part of its {@link ToolCall}. The output type will be the type that results from\n * applying any transforms defined in your schema. If there are no transforms, the input and output\n * types will be the same.\n */\ntype ToolInputSchemaOutputType<T> = T extends InteropZodType ? InferInteropZodOutput<T> : T extends JsonSchema7Type ? unknown : never;\n/**\n * Utility type that resolves the input type of a tool input schema.\n *\n * Input & Output types are a concept used with Zod schema, as Zod allows for transforms to occur\n * during parsing. When using JSONSchema, input and output types are the same.\n *\n * The input type for a given schema should match the structure of the arguments that the LLM\n * generates as part of its {@link ToolCall}. The output type will be the type that results from\n * applying any transforms defined in your schema. If there are no transforms, the input and output\n * types will be the same.\n */\ntype ToolInputSchemaInputType<T> = T extends InteropZodType ? InferInteropZodInput<T> : T extends JsonSchema7Type ? unknown : never;\n/**\n * Defines the type that will be passed into a tool handler function as a result of a tool call.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\ntype StructuredToolCallInput<SchemaT = ToolInputSchemaBase, SchemaInputT = ToolInputSchemaInputType<SchemaT>> = (ToolInputSchemaOutputType<SchemaT> extends string ? string : never) | SchemaInputT | ToolCall;\n/**\n * An input schema type for tools that accept a single string input.\n *\n * This schema defines a tool that takes an optional string parameter named \"input\".\n * It uses Zod's effects to transform the input and strip any extra properties.\n *\n * This is primarily used for creating simple string-based tools where the LLM\n * only needs to provide a single text value as input to the tool.\n */\ntype StringInputToolSchema = z.ZodType<string | undefined, z.ZodTypeDef,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nany>;\n/**\n * Defines the type for input to a tool's call method.\n *\n * This type is a convenience alias for StructuredToolCallInput with the input type\n * derived from the schema. It represents the possible inputs that can be passed to a tool,\n * which can be either:\n * - A string (if the tool accepts string input)\n * - A structured input matching the tool's schema\n * - A ToolCall object (typically from an LLM)\n *\n * @param SchemaT - The schema type for the tool input, defaults to StringInputToolSchema\n */\n\n/**\n * Interface that defines the shape of a LangChain structured tool.\n *\n * A structured tool is a tool that uses a schema to define the structure of the arguments that the\n * LLM generates as part of its {@link ToolCall}.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\ninterface StructuredToolInterface<SchemaT = ToolInputSchemaBase, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends RunnableInterface<StructuredToolCallInput<SchemaT, SchemaInputT>, ToolOutputT | ToolMessage> {\n lc_namespace: string[];\n /**\n * A Zod schema representing the parameters of the tool.\n */\n schema: SchemaT;\n /**\n * Invokes the tool with the provided argument and configuration.\n * @param arg The input argument for the tool.\n * @param configArg Optional configuration for the tool call.\n * @returns A Promise that resolves with the tool's output.\n */\n invoke<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig): Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>;\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument, configuration, and tags. It\n * parses the input according to the schema, handles any errors, and\n * manages callbacks.\n * @param arg The input argument for the tool.\n * @param configArg Optional configuration or callbacks for the tool.\n * @param tags Optional tags for the tool.\n * @returns A Promise that resolves with a string.\n */\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(arg: TArg, configArg?: TConfig, /** @deprecated */\n tags?: string[]): Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>;\n /**\n * The name of the tool.\n */\n name: string;\n /**\n * A description of the tool.\n */\n description: string;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect: boolean;\n}\n/**\n * A special interface for tools that accept a string input, usually defined with the {@link Tool} class.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaInputT - The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.\n */\ninterface ToolInterface<SchemaT = StringInputToolSchema, SchemaInputT = ToolInputSchemaInputType<SchemaT>, ToolOutputT = ToolOutputType> extends StructuredToolInterface<SchemaT, SchemaInputT, ToolOutputT> {\n /**\n * @deprecated Use .invoke() instead. Will be removed in 0.3.0.\n *\n * Calls the tool with the provided argument and callbacks. It handles\n * string inputs specifically.\n * @param arg The input argument for the tool, which can be a string, undefined, or an input of the tool's schema.\n * @param callbacks Optional callbacks for the tool.\n * @returns A Promise that resolves with a string.\n */\n call<TArg extends StructuredToolCallInput<SchemaT, SchemaInputT>, TConfig extends ToolRunnableConfig | undefined>(\n // TODO: shouldn't this be narrowed based on SchemaT?\n arg: TArg, callbacks?: TConfig): Promise<ToolReturnType<NonNullable<TArg>, TConfig, ToolOutputT>>;\n}\n/**\n * Base interface for the input parameters of the {@link DynamicTool} and\n * {@link DynamicStructuredTool} classes.\n */\ninterface BaseDynamicToolInput extends ToolParams {\n name: string;\n description: string;\n /**\n * Whether to return the tool's output directly.\n *\n * Setting this to true means that after the tool is called,\n * an agent should stop looping.\n */\n returnDirect?: boolean;\n}\n/**\n * Interface for the input parameters of the DynamicTool class.\n */\ninterface DynamicToolInput<ToolOutputT = ToolOutputType> extends BaseDynamicToolInput {\n func: (input: string, runManager?: CallbackManagerForToolRun, config?: ToolRunnableConfig) => Promise<ToolOutputT>;\n}\n/**\n * Interface for the input parameters of the DynamicStructuredTool class.\n *\n * @param SchemaT - The type of the tool input schema. Usually you don't need to specify this.\n * @param SchemaOutputT - The TypeScript type representing the result of applying the schema to the tool arguments. Useful for type checking tool handler functions when using JSONSchema.\n */\ninterface DynamicStructuredToolInput<SchemaT = ToolInputSchemaBase, SchemaOutputT = ToolInputSchemaOutputType<SchemaT>, ToolOutputT = ToolOutputType> extends BaseDynamicToolInput {\n /**\n * Tool handler function - the function that will be called when the tool is invoked.\n *\n * @param input - The input to the tool.\n * @param runManager - The run manager for the tool.\n * @param config - The configuration for the tool.\n * @returns The result of the tool.\n */\n func: (input: SchemaOutputT, runManager?: CallbackManagerForToolRun, config?: RunnableConfig) => Promise<ToolOutputT>;\n schema: SchemaT;\n}\n/**\n * Confirm whether the inputted tool is an instance of `StructuredToolInterface`.\n *\n * @param {StructuredToolInterface | JSONSchema | undefined} tool The tool to check if it is an instance of `StructuredToolInterface`.\n * @returns {tool is StructuredToolInterface} Whether the inputted tool is an instance of `StructuredToolInterface`.\n */\ndeclare function isStructuredTool(tool?: StructuredToolInterface | ToolDefinition | JsonSchema7Type): tool is StructuredToolInterface;\n/**\n * Confirm whether the inputted tool is an instance of `RunnableToolLike`.\n *\n * @param {unknown | undefined} tool The tool to check if it is an instance of `RunnableToolLike`.\n * @returns {tool is RunnableToolLike} Whether the inputted tool is an instance of `RunnableToolLike`.\n */\ndeclare function isRunnableToolLike(tool?: unknown): tool is RunnableToolLike;\n/**\n * Confirm whether or not the tool contains the necessary properties to be considered a `StructuredToolParams`.\n *\n * @param {unknown | undefined} tool The object to check if it is a `StructuredToolParams`.\n * @returns {tool is StructuredToolParams} Whether the inputted object is a `StructuredToolParams`.\n */\ndeclare function isStructuredToolParams(tool?: unknown): tool is StructuredToolParams;\n/**\n * Whether or not the tool is one of StructuredTool, RunnableTool or StructuredToolParams.\n * It returns `is StructuredToolParams` since that is the most minimal interface of the three,\n * while still containing the necessary properties to be passed to a LLM for tool calling.\n *\n * @param {unknown | undefined} tool The tool to check if it is a LangChain tool.\n * @returns {tool is StructuredToolParams} Whether the inputted tool is a LangChain tool.\n */\ndeclare function isLangChainTool(tool?: unknown): tool is StructuredToolParams;\n/**\n * Runtime context automatically injected into tools.\n *\n * When a tool function has a parameter named `tool_runtime` with type hint\n * `ToolRuntime`, the tool execution system will automatically inject an instance\n * containing:\n *\n * - `state`: The current graph state\n * - `toolCallId`: The ID of the current tool call\n * - `config`: `RunnableConfig` for the current execution\n * - `context`: Runtime context\n * - `store`: `BaseStore` instance for persistent storage\n * - `writer`: Stream writer for streaming output\n *\n * No `Annotated` wrapper is needed - just use `runtime: ToolRuntime`\n * as a parameter.\n *\n * @example\n * ```typescript\n * import { tool, ToolRuntime } from \"@langchain/core/tools\";\n * import { z } from \"zod\";\n *\n * const stateSchema = z.object({\n * messages: z.array(z.any()),\n * userId: z.string().optional(),\n * });\n *\n * const greet = tool(\n * async ({ name }, runtime) => {\n * // Access state\n * const messages = runtime.state.messages;\n *\n * // Access tool_call_id\n * console.log(`Tool call ID: ${runtime.toolCallId}`);\n *\n * // Access config\n * console.log(`Run ID: ${runtime.config.runId}`);\n *\n * // Access runtime context\n * const userId = runtime.context?.userId;\n *\n * // Access store\n * await runtime.store?.mset([[\"key\", \"value\"]]);\n *\n * // Stream output\n * runtime.writer?.(\"Processing...\");\n *\n * return `Hello! User ID: ${runtime.state.userId || \"unknown\"} ${name}`;\n * },\n * {\n * name: \"greet\",\n * description: \"Use this to greet the user once you found their info.\",\n * schema: z.object({ name: z.string() }),\n * stateSchema,\n * }\n * );\n * ```\n *\n * @template StateT - The type of the state schema (inferred from stateSchema)\n * @template ContextT - The type of the context schema (inferred from contextSchema)\n */\ntype ToolRuntime<TState = unknown, TContext = unknown> = RunnableConfig & {\n /**\n * The current graph state.\n */\n state: TState extends InteropZodObject ? InferInteropZodOutput<TState> : TState extends Record<string, unknown> ? TState : unknown;\n /**\n * The ID of the current tool call.\n */\n toolCallId: string;\n /**\n * The current tool call.\n */\n toolCall?: ToolCall;\n /**\n * RunnableConfig for the current execution.\n */\n config: ToolRunnableConfig;\n /**\n * Runtime context (from langgraph `Runtime`).\n */\n context: TContext extends InteropZodObject ? InferInteropZodOutput<TContext> : TContext extends Record<string, unknown> ? TContext : unknown;\n /**\n * BaseStore instance for persistent storage (from langgraph `Runtime`).\n */\n store: BaseStore<string, unknown> | null;\n /**\n * Stream writer for streaming output (from langgraph `Runtime`).\n */\n writer: ((chunk: unknown) => void) | null;\n};\n//#endregion\nexport { BaseDynamicToolInput, ContentAndArtifact, DynamicStructuredToolInput, DynamicToolInput, ResponseFormat, StringInputToolSchema, StructuredToolCallInput, StructuredToolInterface, StructuredToolParams, ToolInputSchemaBase, ToolInputSchemaInputType, ToolInputSchemaOutputType, ToolInterface, ToolOutputType, ToolParams, ToolReturnType, ToolRunnableConfig, ToolRuntime, isLangChainTool, isRunnableToolLike, isStructuredTool, isStructuredToolParams };\n//# sourceMappingURL=types.d.ts.map"],"mappings":";;;;;;;;;;;;;;;;;;;KAiIKwC,qBAAAA,GAAwBxB,CAAAA,CAAE0B,4BAA4B1B,CAAAA,CAAEyB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","names":["InferInteropZodInput","InferInteropZodOutput","InteropZodDefault","InteropZodIssue","InteropZodLiteral","InteropZodObject","InteropZodObjectShape","InteropZodOptional","InteropZodType","Mutable","ZodDefaultV3","ZodDefaultV4","ZodObjectV3","ZodObjectV4","ZodOptionalV3","ZodOptionalV4","ZodStringV3","ZodStringV4","extendInteropZodObject","getInteropZodDefaultGetter","getInteropZodObjectShape","getSchemaDescription","interopParse","interopParseAsync","interopSafeParse","interopSafeParseAsync","interopZodObjectMakeFieldsOptional","interopZodObjectPartial","interopZodObjectPassthrough","interopZodObjectStrict","interopZodTransformInputSchema","isInteropZodLiteral","isInteropZodObject","isInteropZodSchema","isShapelessZodSchema","isSimpleStringZodSchema","isZodArrayV4","isZodLiteralV3","isZodLiteralV4","isZodObjectV3","isZodObjectV4","isZodSchema","isZodSchemaV3","isZodSchemaV4","StringWithAutocomplete","T","Record","InputValues","K","PartialValues","Promise","ChainValues"],"sources":["../../../../../../../langchain-core/dist/utils/types/index.d.ts"],"sourcesContent":["import { InferInteropZodInput, InferInteropZodOutput, InteropZodDefault, InteropZodIssue, InteropZodLiteral, InteropZodObject, InteropZodObjectShape, InteropZodOptional, InteropZodType, Mutable, ZodDefaultV3, ZodDefaultV4, ZodObjectV3, ZodObjectV4, ZodOptionalV3, ZodOptionalV4, ZodStringV3, ZodStringV4, extendInteropZodObject, getInteropZodDefaultGetter, getInteropZodObjectShape, getSchemaDescription, interopParse, interopParseAsync, interopSafeParse, interopSafeParseAsync, interopZodObjectMakeFieldsOptional, interopZodObjectPartial, interopZodObjectPassthrough, interopZodObjectStrict, interopZodTransformInputSchema, isInteropZodLiteral, isInteropZodObject, isInteropZodSchema, isShapelessZodSchema, isSimpleStringZodSchema, isZodArrayV4, isZodLiteralV3, isZodLiteralV4, isZodObjectV3, isZodObjectV4, isZodSchema, isZodSchemaV3, isZodSchemaV4 } from \"./zod.js\";\n\n//#region src/utils/types/index.d.ts\n\n/**\n * Represents a string value with autocompleted, but not required, suggestions.\n */\ntype StringWithAutocomplete<T> = T | (string & Record<never, never>);\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype InputValues<K extends string = string> = Record<K, any>;\ntype PartialValues<K extends string = string> = Record<K, string | (() => Promise<string>) | (() => string)>;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ChainValues = Record<string, any>;\n//#endregion\nexport { ChainValues, InferInteropZodInput, InferInteropZodOutput, InputValues, InteropZodDefault, InteropZodIssue, InteropZodLiteral, InteropZodObject, InteropZodObjectShape, InteropZodOptional, InteropZodType, Mutable, PartialValues, StringWithAutocomplete, ZodDefaultV3, ZodDefaultV4, ZodObjectV3, ZodObjectV4, ZodOptionalV3, ZodOptionalV4, ZodStringV3, ZodStringV4, extendInteropZodObject, getInteropZodDefaultGetter, getInteropZodObjectShape, getSchemaDescription, interopParse, interopParseAsync, interopSafeParse, interopSafeParseAsync, interopZodObjectMakeFieldsOptional, interopZodObjectPartial, interopZodObjectPassthrough, interopZodObjectStrict, interopZodTransformInputSchema, isInteropZodLiteral, isInteropZodObject, isInteropZodSchema, isShapelessZodSchema, isSimpleStringZodSchema, isZodArrayV4, isZodLiteralV3, isZodLiteralV4, isZodObjectV3, isZodObjectV4, isZodSchema, isZodSchemaV3, isZodSchemaV4 };\n//# sourceMappingURL=index.d.ts.map"],"mappings":";;;;;KAYKmD,WAAAA,GAAcL"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"import_type.d.cts","names":["OptionalImportMap","SecretMap"],"sources":["../../src/load/import_type.d.ts"],"sourcesContent":["// Auto-generated by lc-secrets plugin. Do not edit manually.\nexport interface OptionalImportMap {\n}\nexport interface SecretMap {\n OPENAI_API_KEY?: string;\n}\n"],"mappings":";;AACiBA,UAAAA,iBAAAA,CAAiB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"import_type.d.ts","names":["OptionalImportMap","SecretMap"],"sources":["../../src/load/import_type.d.ts"],"sourcesContent":["// Auto-generated by lc-secrets plugin. Do not edit manually.\nexport interface OptionalImportMap {\n}\nexport interface SecretMap {\n OPENAI_API_KEY?: string;\n}\n"],"mappings":";;AACiBA,UAAAA,iBAAAA,CAAiB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":["OptionalImportMap","load","Record","T","Promise"],"sources":["../../src/load/index.d.ts"],"sourcesContent":["import { OptionalImportMap } from \"./import_type.js\";\n/**\n * Load a LangChain module from a serialized text representation.\n * NOTE: This functionality is currently in beta.\n * Loaded classes may change independently of semver.\n * @param text Serialized text representation of the module.\n * @param secretsMap\n * @param optionalImportsMap\n * @returns A loaded instance of a LangChain module.\n */\nexport declare function load<T>(text: string, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nsecretsMap?: Record<string, any>, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\noptionalImportsMap?: OptionalImportMap & Record<string, any>, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nadditionalImportsMap?: Record<string, any>): Promise<T>;\n"],"mappings":";;;;;;AAUA;;;;;;;AAM6CI,iBANrBH,IAMqBG,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,EAAAA,MAAAA;AAAO;aAJvCF;;qBAEQF,oBAAoBE;;uBAElBA,sBAAsBE,QAAQD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","names":["OptionalImportMap","load","Record","T","Promise"],"sources":["../../src/load/index.d.ts"],"sourcesContent":["import { OptionalImportMap } from \"./import_type.js\";\n/**\n * Load a LangChain module from a serialized text representation.\n * NOTE: This functionality is currently in beta.\n * Loaded classes may change independently of semver.\n * @param text Serialized text representation of the module.\n * @param secretsMap\n * @param optionalImportsMap\n * @returns A loaded instance of a LangChain module.\n */\nexport declare function load<T>(text: string, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nsecretsMap?: Record<string, any>, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\noptionalImportsMap?: OptionalImportMap & Record<string, any>, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nadditionalImportsMap?: Record<string, any>): Promise<T>;\n"],"mappings":";;;;;;AAUA;;;;;;;AAM6CI,iBANrBH,IAMqBG,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,EAAAA,MAAAA;AAAO;aAJvCF;;qBAEQF,oBAAoBE;;uBAElBA,sBAAsBE,QAAQD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"map_keys.d.cts","names":["SerializedFields"],"sources":["../../src/load/map_keys.d.ts"],"sourcesContent":["export interface SerializedFields {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n"],"mappings":";UAAiBA,gBAAAA;EAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"map_keys.d.ts","names":["SerializedFields"],"sources":["../../src/load/map_keys.d.ts"],"sourcesContent":["export interface SerializedFields {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n"],"mappings":";UAAiBA,gBAAAA;EAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"serializable.d.cts","names":[],"sources":["../../src/load/serializable.d.ts"],"sourcesContent":["export * from \"@langchain/core/load/serializable\";\n"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"serializable.d.ts","names":[],"sources":["../../src/load/serializable.d.ts"],"sourcesContent":["export * from \"@langchain/core/load/serializable\";\n"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffer_memory.d.cts","names":["InputValues","MemoryVariables","BaseChatMemory","BaseChatMemoryInput","BufferMemoryInput","BufferMemory","Promise"],"sources":["../../src/memory/buffer_memory.d.ts"],"sourcesContent":["import { InputValues, MemoryVariables } from \"@langchain/core/memory\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface for the input parameters of the `BufferMemory` class.\n */\nexport interface BufferMemoryInput extends BaseChatMemoryInput {\n humanPrefix?: string;\n aiPrefix?: string;\n memoryKey?: string;\n}\n/**\n * The `BufferMemory` class is a type of memory component used for storing\n * and managing previous chat messages. It is a wrapper around\n * `ChatMessageHistory` that extracts the messages into an input variable.\n * This class is particularly useful in applications like chatbots where\n * it is essential to remember previous interactions. Note: The memory\n * instance represents the history of a single conversation. Therefore, it\n * is not recommended to share the same history or memory instance between\n * two different chains. If you deploy your LangChain app on a serverless\n * environment, do not store memory instances in a variable, as your\n * hosting provider may reset it by the next time the function is called.\n * @example\n * ```typescript\n * // Initialize the memory to store chat history and set up the language model with a specific temperature.\n * const memory = new BufferMemory({ memoryKey: \"chat_history\" });\n * const model = new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0.9 });\n *\n * // Create a prompt template for a friendly conversation between a human and an AI.\n * const prompt =\n * PromptTemplate.fromTemplate(`The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n *\n * Current conversation:\n * {chat_history}\n * Human: {input}\n * AI:`);\n *\n * // Set up the chain with the language model, prompt, and memory.\n * const chain = new LLMChain({ llm: model, prompt, memory });\n *\n * // Example usage of the chain to continue the conversation.\n * // The `call` method sends the input to the model and returns the AI's response.\n * const res = await chain.call({ input: \"Hi! I'm Jim.\" });\n * console.log({ res });\n *\n * ```\n */\nexport declare class BufferMemory extends BaseChatMemory implements BufferMemoryInput {\n humanPrefix: string;\n aiPrefix: string;\n memoryKey: string;\n constructor(fields?: BufferMemoryInput);\n get memoryKeys(): string[];\n /**\n * Loads the memory variables. It takes an `InputValues` object as a\n * parameter and returns a `Promise` that resolves with a\n * `MemoryVariables` object.\n * @param _values `InputValues` object.\n * @returns A `Promise` that resolves with a `MemoryVariables` object.\n */\n loadMemoryVariables(_values: InputValues): Promise<MemoryVariables>;\n}\n"],"mappings":";;;;;;;AAKA;AAyCqBK,UAzCJD,iBAAAA,SAA0BD,mBAyCV,CAAA;EAAA,WAAA,CAAA,EAAA,MAAA;EAAA,QAIRC,CAAAA,EAAAA,MAAAA;EAAiB,SASTJ,CAAAA,EAAAA,MAAAA;;;;;AAboD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAhEK,YAAAA,SAAqBH,cAAAA,YAA0BE;;;;uBAI3CA;;;;;;;;;+BASQJ,cAAcM,QAAQL"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffer_memory.d.ts","names":["InputValues","MemoryVariables","BaseChatMemory","BaseChatMemoryInput","BufferMemoryInput","BufferMemory","Promise"],"sources":["../../src/memory/buffer_memory.d.ts"],"sourcesContent":["import { InputValues, MemoryVariables } from \"@langchain/core/memory\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface for the input parameters of the `BufferMemory` class.\n */\nexport interface BufferMemoryInput extends BaseChatMemoryInput {\n humanPrefix?: string;\n aiPrefix?: string;\n memoryKey?: string;\n}\n/**\n * The `BufferMemory` class is a type of memory component used for storing\n * and managing previous chat messages. It is a wrapper around\n * `ChatMessageHistory` that extracts the messages into an input variable.\n * This class is particularly useful in applications like chatbots where\n * it is essential to remember previous interactions. Note: The memory\n * instance represents the history of a single conversation. Therefore, it\n * is not recommended to share the same history or memory instance between\n * two different chains. If you deploy your LangChain app on a serverless\n * environment, do not store memory instances in a variable, as your\n * hosting provider may reset it by the next time the function is called.\n * @example\n * ```typescript\n * // Initialize the memory to store chat history and set up the language model with a specific temperature.\n * const memory = new BufferMemory({ memoryKey: \"chat_history\" });\n * const model = new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0.9 });\n *\n * // Create a prompt template for a friendly conversation between a human and an AI.\n * const prompt =\n * PromptTemplate.fromTemplate(`The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n *\n * Current conversation:\n * {chat_history}\n * Human: {input}\n * AI:`);\n *\n * // Set up the chain with the language model, prompt, and memory.\n * const chain = new LLMChain({ llm: model, prompt, memory });\n *\n * // Example usage of the chain to continue the conversation.\n * // The `call` method sends the input to the model and returns the AI's response.\n * const res = await chain.call({ input: \"Hi! I'm Jim.\" });\n * console.log({ res });\n *\n * ```\n */\nexport declare class BufferMemory extends BaseChatMemory implements BufferMemoryInput {\n humanPrefix: string;\n aiPrefix: string;\n memoryKey: string;\n constructor(fields?: BufferMemoryInput);\n get memoryKeys(): string[];\n /**\n * Loads the memory variables. It takes an `InputValues` object as a\n * parameter and returns a `Promise` that resolves with a\n * `MemoryVariables` object.\n * @param _values `InputValues` object.\n * @returns A `Promise` that resolves with a `MemoryVariables` object.\n */\n loadMemoryVariables(_values: InputValues): Promise<MemoryVariables>;\n}\n"],"mappings":";;;;;;;AAKA;AAyCqBK,UAzCJD,iBAAAA,SAA0BD,mBAyCV,CAAA;EAAA,WAAA,CAAA,EAAA,MAAA;EAAA,QAIRC,CAAAA,EAAAA,MAAAA;EAAiB,SASTJ,CAAAA,EAAAA,MAAAA;;;;;AAboD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAhEK,YAAAA,SAAqBH,cAAAA,YAA0BE;;;;uBAI3CA;;;;;;;;;+BASQJ,cAAcM,QAAQL"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffer_token_memory.d.cts","names":["BaseLanguageModelInterface","InputValues","MemoryVariables","OutputValues","BaseChatMemory","BaseChatMemoryInput","ConversationTokenBufferMemoryInput","ConversationTokenBufferMemory","Promise"],"sources":["../../src/memory/buffer_token_memory.d.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { InputValues, MemoryVariables, OutputValues } from \"@langchain/core/memory\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface for the input parameters of the `BufferTokenMemory` class.\n */\nexport interface ConversationTokenBufferMemoryInput extends BaseChatMemoryInput {\n /* Prefix for human messages in the buffer. */\n humanPrefix?: string;\n /* Prefix for AI messages in the buffer. */\n aiPrefix?: string;\n /* The LLM for this instance. */\n llm: BaseLanguageModelInterface;\n /* Memory key for buffer instance. */\n memoryKey?: string;\n /* Maximmum number of tokens allowed in the buffer. */\n maxTokenLimit?: number;\n}\n/**\n * Class that represents a conversation chat memory with a token buffer.\n * It extends the `BaseChatMemory` class and implements the\n * `ConversationTokenBufferMemoryInput` interface.\n * @example\n * ```typescript\n * const memory = new ConversationTokenBufferMemory({\n * llm: new ChatOpenAI({ model: \"gpt-4o-mini\" }),\n * maxTokenLimit: 10,\n * });\n *\n * // Save conversation context\n * await memory.saveContext({ input: \"hi\" }, { output: \"whats up\" });\n * await memory.saveContext({ input: \"not much you\" }, { output: \"not much\" });\n *\n * // Load memory variables\n * const result = await memory.loadMemoryVariables({});\n * console.log(result);\n * ```\n */\nexport declare class ConversationTokenBufferMemory extends BaseChatMemory implements ConversationTokenBufferMemoryInput {\n humanPrefix: string;\n aiPrefix: string;\n memoryKey: string;\n maxTokenLimit: number; // Default max token limit of 2000 which can be overridden\n llm: BaseLanguageModelInterface;\n constructor(fields: ConversationTokenBufferMemoryInput);\n get memoryKeys(): string[];\n /**\n * Loads the memory variables. It takes an `InputValues` object as a\n * parameter and returns a `Promise` that resolves with a\n * `MemoryVariables` object.\n * @param _values `InputValues` object.\n * @returns A `Promise` that resolves with a `MemoryVariables` object.\n */\n loadMemoryVariables(_values: InputValues): Promise<MemoryVariables>;\n /**\n * Saves the context from this conversation to buffer. If the amount\n * of tokens required to save the buffer exceeds MAX_TOKEN_LIMIT,\n * prune it.\n */\n saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n}\n"],"mappings":";;;;;;;;AAMA;AAAmD,UAAlCM,kCAAAA,SAA2CD,mBAAT,CAAA;EAAA;EAMhB,WANyBA,CAAAA,EAAAA,MAAAA;EAAmB;EAgC1DE,QAAAA,CAAAA,EAAAA,MAAAA;EAA6B;EAAA,GAKzCP,EA/BAA,0BA+BAA;EAA0B;EACuB,SASzBC,CAAAA,EAAAA,MAAAA;EAAW;EAA0B,aAAvBO,CAAAA,EAAAA,MAAAA;;;;;;AAfwE;;;;;;;;;;;;;;;;cAAlGD,6BAAAA,SAAsCH,cAAAA,YAA0BE;;;;;OAK5EN;sBACeM;;;;;;;;;+BASSL,cAAcO,QAAQN;;;;;;2BAM1BD,2BAA2BE,eAAeK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffer_token_memory.d.ts","names":["BaseLanguageModelInterface","InputValues","MemoryVariables","OutputValues","BaseChatMemory","BaseChatMemoryInput","ConversationTokenBufferMemoryInput","ConversationTokenBufferMemory","Promise"],"sources":["../../src/memory/buffer_token_memory.d.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { InputValues, MemoryVariables, OutputValues } from \"@langchain/core/memory\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface for the input parameters of the `BufferTokenMemory` class.\n */\nexport interface ConversationTokenBufferMemoryInput extends BaseChatMemoryInput {\n /* Prefix for human messages in the buffer. */\n humanPrefix?: string;\n /* Prefix for AI messages in the buffer. */\n aiPrefix?: string;\n /* The LLM for this instance. */\n llm: BaseLanguageModelInterface;\n /* Memory key for buffer instance. */\n memoryKey?: string;\n /* Maximmum number of tokens allowed in the buffer. */\n maxTokenLimit?: number;\n}\n/**\n * Class that represents a conversation chat memory with a token buffer.\n * It extends the `BaseChatMemory` class and implements the\n * `ConversationTokenBufferMemoryInput` interface.\n * @example\n * ```typescript\n * const memory = new ConversationTokenBufferMemory({\n * llm: new ChatOpenAI({ model: \"gpt-4o-mini\" }),\n * maxTokenLimit: 10,\n * });\n *\n * // Save conversation context\n * await memory.saveContext({ input: \"hi\" }, { output: \"whats up\" });\n * await memory.saveContext({ input: \"not much you\" }, { output: \"not much\" });\n *\n * // Load memory variables\n * const result = await memory.loadMemoryVariables({});\n * console.log(result);\n * ```\n */\nexport declare class ConversationTokenBufferMemory extends BaseChatMemory implements ConversationTokenBufferMemoryInput {\n humanPrefix: string;\n aiPrefix: string;\n memoryKey: string;\n maxTokenLimit: number; // Default max token limit of 2000 which can be overridden\n llm: BaseLanguageModelInterface;\n constructor(fields: ConversationTokenBufferMemoryInput);\n get memoryKeys(): string[];\n /**\n * Loads the memory variables. It takes an `InputValues` object as a\n * parameter and returns a `Promise` that resolves with a\n * `MemoryVariables` object.\n * @param _values `InputValues` object.\n * @returns A `Promise` that resolves with a `MemoryVariables` object.\n */\n loadMemoryVariables(_values: InputValues): Promise<MemoryVariables>;\n /**\n * Saves the context from this conversation to buffer. If the amount\n * of tokens required to save the buffer exceeds MAX_TOKEN_LIMIT,\n * prune it.\n */\n saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n}\n"],"mappings":";;;;;;;;AAMA;AAAmD,UAAlCM,kCAAAA,SAA2CD,mBAAT,CAAA;EAAA;EAMhB,WANyBA,CAAAA,EAAAA,MAAAA;EAAmB;EAgC1DE,QAAAA,CAAAA,EAAAA,MAAAA;EAA6B;EAAA,GAKzCP,EA/BAA,0BA+BAA;EAA0B;EACuB,SASzBC,CAAAA,EAAAA,MAAAA;EAAW;EAA0B,aAAvBO,CAAAA,EAAAA,MAAAA;;;;;;AAfwE;;;;;;;;;;;;;;;;cAAlGD,6BAAAA,SAAsCH,cAAAA,YAA0BE;;;;;OAK5EN;sBACeM;;;;;;;;;+BASSL,cAAcO,QAAQN;;;;;;2BAM1BD,2BAA2BE,eAAeK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffer_window_memory.d.cts","names":["InputValues","MemoryVariables","BaseChatMemory","BaseChatMemoryInput","BufferWindowMemoryInput","BufferWindowMemory","Promise"],"sources":["../../src/memory/buffer_window_memory.d.ts"],"sourcesContent":["import { InputValues, MemoryVariables } from \"@langchain/core/memory\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface for the input parameters of the BufferWindowMemory class.\n */\nexport interface BufferWindowMemoryInput extends BaseChatMemoryInput {\n humanPrefix?: string;\n aiPrefix?: string;\n memoryKey?: string;\n k?: number;\n}\n/**\n * Class for managing and storing previous chat messages. It extends the\n * BaseChatMemory class and implements the BufferWindowMemoryInput\n * interface. This class is stateful and stores messages in a buffer. When\n * called in a chain, it returns all of the messages it has stored.\n * @example\n * ```typescript\n * const prompt =\n * PromptTemplate.fromTemplate(`The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n * Current conversation:\n * {chat_history}\n * Human: {input}\n * AI:`);\n *\n * const chain = new LLMChain({\n * llm: new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0.9 }),\n * prompt,\n * memory: new BufferWindowMemory({ memoryKey: \"chat_history\", k: 1 }),\n * });\n *\n * // Example of initiating a conversation with the AI\n * const res1 = await chain.call({ input: \"Hi! I'm Jim.\" });\n * console.log({ res1 });\n *\n * // Example of following up with another question\n * const res2 = await chain.call({ input: \"What's my name?\" });\n * console.log({ res2 });\n * ```\n */\nexport declare class BufferWindowMemory extends BaseChatMemory implements BufferWindowMemoryInput {\n humanPrefix: string;\n aiPrefix: string;\n memoryKey: string;\n k: number;\n constructor(fields?: BufferWindowMemoryInput);\n get memoryKeys(): string[];\n /**\n * Method to load the memory variables. Retrieves the chat messages from\n * the history, slices the last 'k' messages, and stores them in the\n * memory under the memoryKey. If the returnMessages property is set to\n * true, the method returns the messages as they are. Otherwise, it\n * returns a string representation of the messages.\n * @param _values InputValues object.\n * @returns Promise that resolves to a MemoryVariables object.\n */\n loadMemoryVariables(_values: InputValues): Promise<MemoryVariables>;\n}\n"],"mappings":";;;;;;;AAKA;AAmCqBK,UAnCJD,uBAAAA,SAAgCD,mBAmCV,CAAA;EAAA,WAAA,CAAA,EAAA,MAAA;EAAA,QAKdC,CAAAA,EAAAA,MAAAA;EAAuB,SAWfJ,CAAAA,EAAAA,MAAAA;EAAW,CAAA,CAAA,EAAWC,MAAAA;;;;AAhB0C;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA5EI,kBAAAA,SAA2BH,cAAAA,YAA0BE;;;;;uBAKjDA;;;;;;;;;;;+BAWQJ,cAAcM,QAAQL"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffer_window_memory.d.ts","names":["InputValues","MemoryVariables","BaseChatMemory","BaseChatMemoryInput","BufferWindowMemoryInput","BufferWindowMemory","Promise"],"sources":["../../src/memory/buffer_window_memory.d.ts"],"sourcesContent":["import { InputValues, MemoryVariables } from \"@langchain/core/memory\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface for the input parameters of the BufferWindowMemory class.\n */\nexport interface BufferWindowMemoryInput extends BaseChatMemoryInput {\n humanPrefix?: string;\n aiPrefix?: string;\n memoryKey?: string;\n k?: number;\n}\n/**\n * Class for managing and storing previous chat messages. It extends the\n * BaseChatMemory class and implements the BufferWindowMemoryInput\n * interface. This class is stateful and stores messages in a buffer. When\n * called in a chain, it returns all of the messages it has stored.\n * @example\n * ```typescript\n * const prompt =\n * PromptTemplate.fromTemplate(`The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n * Current conversation:\n * {chat_history}\n * Human: {input}\n * AI:`);\n *\n * const chain = new LLMChain({\n * llm: new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0.9 }),\n * prompt,\n * memory: new BufferWindowMemory({ memoryKey: \"chat_history\", k: 1 }),\n * });\n *\n * // Example of initiating a conversation with the AI\n * const res1 = await chain.call({ input: \"Hi! I'm Jim.\" });\n * console.log({ res1 });\n *\n * // Example of following up with another question\n * const res2 = await chain.call({ input: \"What's my name?\" });\n * console.log({ res2 });\n * ```\n */\nexport declare class BufferWindowMemory extends BaseChatMemory implements BufferWindowMemoryInput {\n humanPrefix: string;\n aiPrefix: string;\n memoryKey: string;\n k: number;\n constructor(fields?: BufferWindowMemoryInput);\n get memoryKeys(): string[];\n /**\n * Method to load the memory variables. Retrieves the chat messages from\n * the history, slices the last 'k' messages, and stores them in the\n * memory under the memoryKey. If the returnMessages property is set to\n * true, the method returns the messages as they are. Otherwise, it\n * returns a string representation of the messages.\n * @param _values InputValues object.\n * @returns Promise that resolves to a MemoryVariables object.\n */\n loadMemoryVariables(_values: InputValues): Promise<MemoryVariables>;\n}\n"],"mappings":";;;;;;;AAKA;AAmCqBK,UAnCJD,uBAAAA,SAAgCD,mBAmCV,CAAA;EAAA,WAAA,CAAA,EAAA,MAAA;EAAA,QAKdC,CAAAA,EAAAA,MAAAA;EAAuB,SAWfJ,CAAAA,EAAAA,MAAAA;EAAW,CAAA,CAAA,EAAWC,MAAAA;;;;AAhB0C;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA5EI,kBAAAA,SAA2BH,cAAAA,YAA0BE;;;;;uBAKjDA;;;;;;;;;;;+BAWQJ,cAAcM,QAAQL"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat_memory.d.cts","names":["BaseChatMessageHistory","BaseMemory","InputValues","OutputValues","BaseChatMemoryInput","BaseChatMemory","Promise"],"sources":["../../src/memory/chat_memory.d.ts"],"sourcesContent":["import { BaseChatMessageHistory } from \"@langchain/core/chat_history\";\nimport { BaseMemory, InputValues, OutputValues } from \"@langchain/core/memory\";\n/**\n * Interface for the input parameters of the BaseChatMemory class.\n */\nexport interface BaseChatMemoryInput {\n chatHistory?: BaseChatMessageHistory;\n returnMessages?: boolean;\n inputKey?: string;\n outputKey?: string;\n}\n/**\n * Abstract class that provides a base for implementing different types of\n * memory systems. It is designed to maintain the state of an application,\n * specifically the history of a conversation. This class is typically\n * extended by other classes to create specific types of memory systems.\n */\nexport declare abstract class BaseChatMemory extends BaseMemory {\n chatHistory: BaseChatMessageHistory;\n returnMessages: boolean;\n inputKey?: string;\n outputKey?: string;\n constructor(fields?: BaseChatMemoryInput);\n /**\n * Method to add user and AI messages to the chat history in sequence.\n * @param inputValues The input values from the user.\n * @param outputValues The output values from the AI.\n * @returns Promise that resolves when the context has been saved.\n */\n saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n /**\n * Method to clear the chat history.\n * @returns Promise that resolves when the chat history has been cleared.\n */\n clear(): Promise<void>;\n}\n"],"mappings":";;;;;;;AAKA;AAY8BK,UAZbD,mBAAAA,CAY2B;EAAA,WAAA,CAAA,EAX1BJ,sBAW0B;EAAA,cAC3BA,CAAAA,EAAAA,OAAAA;EAAsB,QAIdI,CAAAA,EAAAA,MAAAA;EAAmB,SAOfF,CAAAA,EAAAA,MAAAA;;;;;AAZkC;;;uBAAjCG,cAAAA,SAAuBJ,UAAAA;eACpCD;;;;uBAIQI;;;;;;;2BAOIF,2BAA2BC,eAAeG;;;;;WAK1DA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat_memory.d.ts","names":["BaseChatMessageHistory","BaseMemory","InputValues","OutputValues","BaseChatMemoryInput","BaseChatMemory","Promise"],"sources":["../../src/memory/chat_memory.d.ts"],"sourcesContent":["import { BaseChatMessageHistory } from \"@langchain/core/chat_history\";\nimport { BaseMemory, InputValues, OutputValues } from \"@langchain/core/memory\";\n/**\n * Interface for the input parameters of the BaseChatMemory class.\n */\nexport interface BaseChatMemoryInput {\n chatHistory?: BaseChatMessageHistory;\n returnMessages?: boolean;\n inputKey?: string;\n outputKey?: string;\n}\n/**\n * Abstract class that provides a base for implementing different types of\n * memory systems. It is designed to maintain the state of an application,\n * specifically the history of a conversation. This class is typically\n * extended by other classes to create specific types of memory systems.\n */\nexport declare abstract class BaseChatMemory extends BaseMemory {\n chatHistory: BaseChatMessageHistory;\n returnMessages: boolean;\n inputKey?: string;\n outputKey?: string;\n constructor(fields?: BaseChatMemoryInput);\n /**\n * Method to add user and AI messages to the chat history in sequence.\n * @param inputValues The input values from the user.\n * @param outputValues The output values from the AI.\n * @returns Promise that resolves when the context has been saved.\n */\n saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n /**\n * Method to clear the chat history.\n * @returns Promise that resolves when the chat history has been cleared.\n */\n clear(): Promise<void>;\n}\n"],"mappings":";;;;;;;AAKA;AAY8BK,UAZbD,mBAAAA,CAY2B;EAAA,WAAA,CAAA,EAX1BJ,sBAW0B;EAAA,cAC3BA,CAAAA,EAAAA,OAAAA;EAAsB,QAIdI,CAAAA,EAAAA,MAAAA;EAAmB,SAOfF,CAAAA,EAAAA,MAAAA;;;;;AAZkC;;;uBAAjCG,cAAAA,SAAuBJ,UAAAA;eACpCD;;;;uBAIQI;;;;;;;2BAOIF,2BAA2BC,eAAeG;;;;;WAK1DA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"combined_memory.d.cts","names":["InputValues","MemoryVariables","BaseMemory","OutputValues","BaseChatMemory","BaseChatMemoryInput","CombinedMemoryInput","CombinedMemory","Promise"],"sources":["../../src/memory/combined_memory.d.ts"],"sourcesContent":["import { InputValues, MemoryVariables, BaseMemory, OutputValues } from \"@langchain/core/memory\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface that defines the shape of the input object that the\n * CombinedMemory constructor accepts. It extends the BaseChatMemoryInput\n * interface and adds additional properties.\n */\nexport interface CombinedMemoryInput extends BaseChatMemoryInput {\n memories: BaseMemory[];\n humanPrefix?: string;\n aiPrefix?: string;\n memoryKey?: string;\n}\n/**\n * Class that manages and manipulates previous chat messages. It extends\n * from the BaseChatMemory class and implements the CombinedMemoryInput\n * interface.\n */\nexport declare class CombinedMemory extends BaseChatMemory implements CombinedMemoryInput {\n humanPrefix: string;\n aiPrefix: string;\n memoryKey: string;\n memories: BaseMemory[];\n constructor(fields?: CombinedMemoryInput);\n /**\n * Checks for repeated memory variables across all memory objects. Throws\n * an error if any are found.\n */\n checkRepeatedMemoryVariable(): void;\n /**\n * Checks if input keys are set for all memory objects. Logs a warning if\n * any are missing.\n */\n checkInputKey(): void;\n /**\n * Loads memory variables from all memory objects.\n * @param inputValues Input values to load memory variables from.\n * @returns Promise that resolves with an object containing the loaded memory variables.\n */\n loadMemoryVariables(inputValues: InputValues): Promise<MemoryVariables>;\n /**\n * Saves the context to all memory objects.\n * @param inputValues Input values to save.\n * @param outputValues Output values to save.\n * @returns Promise that resolves when the context has been saved to all memory objects.\n */\n saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n /**\n * Clears all memory objects.\n * @returns Promise that resolves when all memory objects have been cleared.\n */\n clear(): Promise<void>;\n get memoryKeys(): string[];\n}\n"],"mappings":";;;;;;;AAOA;;;AAA6CK,UAA5BC,mBAAAA,SAA4BD,mBAAAA,CAAAA;EAAmB,QAAA,EAClDH,UADkD,EAAA;EAW3CK,WAAAA,CAAAA,EAAAA,MAAc;EAAA,QAAA,CAAA,EAAA,MAAA;EAAA,SAIrBL,CAAAA,EAAAA,MAAAA;;;;;;;AAwByDM,cA5BlDD,cAAAA,SAAuBH,cAAAA,YAA0BE,mBA4BCE,CAAAA;EAAO,WAKjEA,EAAAA,MAAAA;EAAO,QAjCwBJ,EAAAA,MAAAA;EAAc,SAAYE,EAAAA,MAAAA;EAAmB,QAAA,EAI3EJ,UAJ2E,EAAA;uBAKhEI;;;;;;;;;;;;;;;;mCAgBYN,cAAcQ,QAAQP;;;;;;;2BAO9BD,2BAA2BG,eAAeK;;;;;WAK1DA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"combined_memory.d.ts","names":["InputValues","MemoryVariables","BaseMemory","OutputValues","BaseChatMemory","BaseChatMemoryInput","CombinedMemoryInput","CombinedMemory","Promise"],"sources":["../../src/memory/combined_memory.d.ts"],"sourcesContent":["import { InputValues, MemoryVariables, BaseMemory, OutputValues } from \"@langchain/core/memory\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface that defines the shape of the input object that the\n * CombinedMemory constructor accepts. It extends the BaseChatMemoryInput\n * interface and adds additional properties.\n */\nexport interface CombinedMemoryInput extends BaseChatMemoryInput {\n memories: BaseMemory[];\n humanPrefix?: string;\n aiPrefix?: string;\n memoryKey?: string;\n}\n/**\n * Class that manages and manipulates previous chat messages. It extends\n * from the BaseChatMemory class and implements the CombinedMemoryInput\n * interface.\n */\nexport declare class CombinedMemory extends BaseChatMemory implements CombinedMemoryInput {\n humanPrefix: string;\n aiPrefix: string;\n memoryKey: string;\n memories: BaseMemory[];\n constructor(fields?: CombinedMemoryInput);\n /**\n * Checks for repeated memory variables across all memory objects. Throws\n * an error if any are found.\n */\n checkRepeatedMemoryVariable(): void;\n /**\n * Checks if input keys are set for all memory objects. Logs a warning if\n * any are missing.\n */\n checkInputKey(): void;\n /**\n * Loads memory variables from all memory objects.\n * @param inputValues Input values to load memory variables from.\n * @returns Promise that resolves with an object containing the loaded memory variables.\n */\n loadMemoryVariables(inputValues: InputValues): Promise<MemoryVariables>;\n /**\n * Saves the context to all memory objects.\n * @param inputValues Input values to save.\n * @param outputValues Output values to save.\n * @returns Promise that resolves when the context has been saved to all memory objects.\n */\n saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n /**\n * Clears all memory objects.\n * @returns Promise that resolves when all memory objects have been cleared.\n */\n clear(): Promise<void>;\n get memoryKeys(): string[];\n}\n"],"mappings":";;;;;;;AAOA;;;AAA6CK,UAA5BC,mBAAAA,SAA4BD,mBAAAA,CAAAA;EAAmB,QAAA,EAClDH,UADkD,EAAA;EAW3CK,WAAAA,CAAAA,EAAAA,MAAc;EAAA,QAAA,CAAA,EAAA,MAAA;EAAA,SAIrBL,CAAAA,EAAAA,MAAAA;;;;;;;AAwByDM,cA5BlDD,cAAAA,SAAuBH,cAAAA,YAA0BE,mBA4BCE,CAAAA;EAAO,WAKjEA,EAAAA,MAAAA;EAAO,QAjCwBJ,EAAAA,MAAAA;EAAc,SAAYE,EAAAA,MAAAA;EAAmB,QAAA,EAI3EJ,UAJ2E,EAAA;uBAKhEI;;;;;;;;;;;;;;;;mCAgBYN,cAAcQ,QAAQP;;;;;;;2BAO9BD,2BAA2BG,eAAeK;;;;;WAK1DA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity_memory.d.cts","names":["BaseLanguageModelInterface","PromptTemplate","InputValues","MemoryVariables","OutputValues","BaseEntityStore","BaseChatMemory","BaseChatMemoryInput","EntityMemoryInput","EntityMemory","Promise"],"sources":["../../src/memory/entity_memory.d.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { PromptTemplate } from \"@langchain/core/prompts\";\nimport { InputValues, MemoryVariables, OutputValues } from \"@langchain/core/memory\";\nimport { BaseEntityStore } from \"./stores/entity/base.js\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface for the input parameters required by the EntityMemory class.\n */\nexport interface EntityMemoryInput extends BaseChatMemoryInput {\n llm: BaseLanguageModelInterface;\n humanPrefix?: string;\n aiPrefix?: string;\n entityExtractionPrompt?: PromptTemplate;\n entitySummarizationPrompt?: PromptTemplate;\n entityCache?: string[];\n k?: number;\n chatHistoryKey?: string;\n entitiesKey?: string;\n entityStore?: BaseEntityStore;\n}\n// Entity extractor & summarizer to memory.\n/**\n * Class for managing entity extraction and summarization to memory in\n * chatbot applications. Extends the BaseChatMemory class and implements\n * the EntityMemoryInput interface.\n * @example\n * ```typescript\n * const memory = new EntityMemory({\n * llm: new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0 }),\n * chatHistoryKey: \"history\",\n * entitiesKey: \"entities\",\n * });\n * const model = new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0.9 });\n * const chain = new LLMChain({\n * llm: model,\n * prompt: ENTITY_MEMORY_CONVERSATION_TEMPLATE,\n * memory,\n * });\n *\n * const res1 = await chain.call({ input: \"Hi! I'm Jim.\" });\n * console.log({\n * res1,\n * memory: await memory.loadMemoryVariables({ input: \"Who is Jim?\" }),\n * });\n *\n * const res2 = await chain.call({\n * input: \"I work in construction. What about you?\",\n * });\n * console.log({\n * res2,\n * memory: await memory.loadMemoryVariables({ input: \"Who is Jim?\" }),\n * });\n *\n * ```\n */\nexport declare class EntityMemory extends BaseChatMemory implements EntityMemoryInput {\n private entityExtractionChain;\n private entitySummarizationChain;\n entityStore: BaseEntityStore;\n entityCache: string[];\n k: number;\n chatHistoryKey: string;\n llm: BaseLanguageModelInterface;\n entitiesKey: string;\n humanPrefix?: string;\n aiPrefix?: string;\n constructor(fields: EntityMemoryInput);\n get memoryKeys(): string[];\n // Will always return list of memory variables.\n get memoryVariables(): string[];\n // Return history buffer.\n /**\n * Method to load memory variables and perform entity extraction.\n * @param inputs Input values for the method.\n * @returns Promise resolving to an object containing memory variables.\n */\n loadMemoryVariables(inputs: InputValues): Promise<MemoryVariables>;\n // Save context from this conversation to buffer.\n /**\n * Method to save the context from a conversation to a buffer and perform\n * entity summarization.\n * @param inputs Input values for the method.\n * @param outputs Output values from the method.\n * @returns Promise resolving to void.\n */\n saveContext(inputs: InputValues, outputs: OutputValues): Promise<void>;\n // Clear memory contents.\n /**\n * Method to clear the memory contents.\n * @returns Promise resolving to void.\n */\n clear(): Promise<void>;\n}\n"],"mappings":";;;;;;;;;;AAQA;AAAkC,UAAjBQ,iBAAAA,SAA0BD,mBAAT,CAAA;EAAA,GACzBP,EAAAA,0BAAAA;EAA0B,WAGNC,CAAAA,EAAAA,MAAAA;EAAc,QACXA,CAAAA,EAAAA,MAAAA;EAAc,sBAK5BI,CAAAA,EANWJ,cAMXI;EAAe,yBAVUE,CAAAA,EAKXN,cALWM;EAAmB,WAAA,CAAA,EAAA,MAAA,EAAA;EA+CzCE,CAAAA,CAAAA,EAAAA,MAAAA;EAAY,cAAA,CAAA,EAAA,MAAA;EAAA,WAGhBJ,CAAAA,EAAAA,MAAAA;EAAe,WAIvBL,CAAAA,EA5CSK,eA4CTL;;;;;;;;;;;AAP4E;;;;;;;;;;;;;;;;;;;;;;;;;;cAAhES,YAAAA,SAAqBH,cAAAA,YAA0BE;;;eAGnDH;;;;OAIRL;;;;sBAIeQ;;;;;;;;;;8BAUQN,cAAcQ,QAAQP;;;;;;;;;sBAS9BD,sBAAsBE,eAAeM;;;;;;WAMhDA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity_memory.d.ts","names":["BaseLanguageModelInterface","PromptTemplate","InputValues","MemoryVariables","OutputValues","BaseEntityStore","BaseChatMemory","BaseChatMemoryInput","EntityMemoryInput","EntityMemory","Promise"],"sources":["../../src/memory/entity_memory.d.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { PromptTemplate } from \"@langchain/core/prompts\";\nimport { InputValues, MemoryVariables, OutputValues } from \"@langchain/core/memory\";\nimport { BaseEntityStore } from \"./stores/entity/base.js\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface for the input parameters required by the EntityMemory class.\n */\nexport interface EntityMemoryInput extends BaseChatMemoryInput {\n llm: BaseLanguageModelInterface;\n humanPrefix?: string;\n aiPrefix?: string;\n entityExtractionPrompt?: PromptTemplate;\n entitySummarizationPrompt?: PromptTemplate;\n entityCache?: string[];\n k?: number;\n chatHistoryKey?: string;\n entitiesKey?: string;\n entityStore?: BaseEntityStore;\n}\n// Entity extractor & summarizer to memory.\n/**\n * Class for managing entity extraction and summarization to memory in\n * chatbot applications. Extends the BaseChatMemory class and implements\n * the EntityMemoryInput interface.\n * @example\n * ```typescript\n * const memory = new EntityMemory({\n * llm: new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0 }),\n * chatHistoryKey: \"history\",\n * entitiesKey: \"entities\",\n * });\n * const model = new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0.9 });\n * const chain = new LLMChain({\n * llm: model,\n * prompt: ENTITY_MEMORY_CONVERSATION_TEMPLATE,\n * memory,\n * });\n *\n * const res1 = await chain.call({ input: \"Hi! I'm Jim.\" });\n * console.log({\n * res1,\n * memory: await memory.loadMemoryVariables({ input: \"Who is Jim?\" }),\n * });\n *\n * const res2 = await chain.call({\n * input: \"I work in construction. What about you?\",\n * });\n * console.log({\n * res2,\n * memory: await memory.loadMemoryVariables({ input: \"Who is Jim?\" }),\n * });\n *\n * ```\n */\nexport declare class EntityMemory extends BaseChatMemory implements EntityMemoryInput {\n private entityExtractionChain;\n private entitySummarizationChain;\n entityStore: BaseEntityStore;\n entityCache: string[];\n k: number;\n chatHistoryKey: string;\n llm: BaseLanguageModelInterface;\n entitiesKey: string;\n humanPrefix?: string;\n aiPrefix?: string;\n constructor(fields: EntityMemoryInput);\n get memoryKeys(): string[];\n // Will always return list of memory variables.\n get memoryVariables(): string[];\n // Return history buffer.\n /**\n * Method to load memory variables and perform entity extraction.\n * @param inputs Input values for the method.\n * @returns Promise resolving to an object containing memory variables.\n */\n loadMemoryVariables(inputs: InputValues): Promise<MemoryVariables>;\n // Save context from this conversation to buffer.\n /**\n * Method to save the context from a conversation to a buffer and perform\n * entity summarization.\n * @param inputs Input values for the method.\n * @param outputs Output values from the method.\n * @returns Promise resolving to void.\n */\n saveContext(inputs: InputValues, outputs: OutputValues): Promise<void>;\n // Clear memory contents.\n /**\n * Method to clear the memory contents.\n * @returns Promise resolving to void.\n */\n clear(): Promise<void>;\n}\n"],"mappings":";;;;;;;;;;AAQA;AAAkC,UAAjBQ,iBAAAA,SAA0BD,mBAAT,CAAA;EAAA,GACzBP,EAAAA,0BAAAA;EAA0B,WAGNC,CAAAA,EAAAA,MAAAA;EAAc,QACXA,CAAAA,EAAAA,MAAAA;EAAc,sBAK5BI,CAAAA,EANWJ,cAMXI;EAAe,yBAVUE,CAAAA,EAKXN,cALWM;EAAmB,WAAA,CAAA,EAAA,MAAA,EAAA;EA+CzCE,CAAAA,CAAAA,EAAAA,MAAAA;EAAY,cAAA,CAAA,EAAA,MAAA;EAAA,WAGhBJ,CAAAA,EAAAA,MAAAA;EAAe,WAIvBL,CAAAA,EA5CSK,eA4CTL;;;;;;;;;;;AAP4E;;;;;;;;;;;;;;;;;;;;;;;;;;cAAhES,YAAAA,SAAqBH,cAAAA,YAA0BE;;;eAGnDH;;;;OAIRL;;;;sBAIeQ;;;;;;;;;;8BAUQN,cAAcQ,QAAQP;;;;;;;;;sBAS9BD,sBAAsBE,eAAeM;;;;;;WAMhDA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompt.d.cts","names":["PromptTemplate","SUMMARY_PROMPT","_DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE","ENTITY_MEMORY_CONVERSATION_TEMPLATE","_DEFAULT_ENTITY_EXTRACTION_TEMPLATE","ENTITY_EXTRACTION_PROMPT","_DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE","ENTITY_SUMMARIZATION_PROMPT"],"sources":["../../src/memory/prompt.d.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\nexport declare const SUMMARY_PROMPT: PromptTemplate<{\n new_lines: any;\n summary: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE = \"You are an assistant to a human, powered by a large language model trained by OpenAI.\\n\\nYou are designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, you are able to generate human-like text based on the input you receive, allowing you to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\\n\\nYou are constantly learning and improving, and your capabilities are constantly evolving. You are able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. You have access to some personalized information provided by the human in the Context section below. Additionally, you are able to generate your own text based on the input you receive, allowing you to engage in discussions and provide explanations and descriptions on a wide range of topics.\\n\\nOverall, you are a powerful tool that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether the human needs help with a specific question or just wants to have a conversation about a particular topic, you are here to assist.\\n\\nContext:\\n{entities}\\n\\nCurrent conversation:\\n{history}\\nLast line:\\nHuman: {input}\\nYou:\";\nexport declare const ENTITY_MEMORY_CONVERSATION_TEMPLATE: PromptTemplate<{\n entities: any;\n history: any;\n input: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_EXTRACTION_TEMPLATE = \"You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last line of conversation. As a guideline, a proper noun is generally capitalized. You should definitely extract all names and places.\\n\\nThe conversation history is provided just in case of a coreference (e.g. \\\"What do you know about him\\\" where \\\"him\\\" is defined in a previous line) -- ignore items mentioned there that are not in the last line.\\n\\nReturn the output as a single comma-separated list, or NONE if there is nothing of note to return (e.g. the user is just issuing a greeting or having a simple conversation).\\n\\nEXAMPLE\\nConversation history:\\nPerson #1: my name is Jacob. how's it going today?\\nAI: \\\"It's going great! How about you?\\\"\\nPerson #1: good! busy working on Langchain. lots to do.\\nAI: \\\"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\\\"\\nLast line:\\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\\nOutput: Jacob,Langchain\\nEND OF EXAMPLE\\n\\nEXAMPLE\\nConversation history:\\nPerson #1: how's it going today?\\nAI: \\\"It's going great! How about you?\\\"\\nPerson #1: good! busy working on Langchain. lots to do.\\nAI: \\\"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\\\"\\nLast line:\\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff. I'm working with Person #2.\\nOutput: Langchain, Person #2\\nEND OF EXAMPLE\\n\\nConversation history (for reference only):\\n{history}\\nLast line of conversation (for extraction):\\nHuman: {input}\\n\\nOutput:\";\nexport declare const ENTITY_EXTRACTION_PROMPT: PromptTemplate<{\n history: any;\n input: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE = \"You are an AI assistant helping a human keep track of facts about relevant people, places, and concepts in their life. Update and add to the summary of the provided entity in the \\\"Entity\\\" section based on the last line of your conversation with the human. If you are writing the summary for the first time, return a single sentence.\\nThe update should only include facts that are relayed in the last line of conversation about the provided entity, and should only contain facts about the provided entity.\\n\\nIf there is no new information about the provided entity or the information is not worth noting (not an important or relevant fact to remember long-term), output the exact string \\\"UNCHANGED\\\" below.\\n\\nFull conversation history (for context):\\n{history}\\n\\nEntity to summarize:\\n{entity}\\n\\nExisting summary of {entity}:\\n{summary}\\n\\nLast line of conversation:\\nHuman: {input}\\nUpdated summary (or the exact string \\\"UNCHANGED\\\" if there is no new information about {entity} above):\";\nexport declare const ENTITY_SUMMARIZATION_PROMPT: PromptTemplate<{\n entity: any;\n history: any;\n input: any;\n summary: any;\n}, any>;\n"],"mappings":";;;;cAMqBG,qCAAqCH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompt.d.ts","names":["PromptTemplate","SUMMARY_PROMPT","_DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE","ENTITY_MEMORY_CONVERSATION_TEMPLATE","_DEFAULT_ENTITY_EXTRACTION_TEMPLATE","ENTITY_EXTRACTION_PROMPT","_DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE","ENTITY_SUMMARIZATION_PROMPT"],"sources":["../../src/memory/prompt.d.ts"],"sourcesContent":["import { PromptTemplate } from \"@langchain/core/prompts\";\nexport declare const SUMMARY_PROMPT: PromptTemplate<{\n new_lines: any;\n summary: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_MEMORY_CONVERSATION_TEMPLATE = \"You are an assistant to a human, powered by a large language model trained by OpenAI.\\n\\nYou are designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, you are able to generate human-like text based on the input you receive, allowing you to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\\n\\nYou are constantly learning and improving, and your capabilities are constantly evolving. You are able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. You have access to some personalized information provided by the human in the Context section below. Additionally, you are able to generate your own text based on the input you receive, allowing you to engage in discussions and provide explanations and descriptions on a wide range of topics.\\n\\nOverall, you are a powerful tool that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether the human needs help with a specific question or just wants to have a conversation about a particular topic, you are here to assist.\\n\\nContext:\\n{entities}\\n\\nCurrent conversation:\\n{history}\\nLast line:\\nHuman: {input}\\nYou:\";\nexport declare const ENTITY_MEMORY_CONVERSATION_TEMPLATE: PromptTemplate<{\n entities: any;\n history: any;\n input: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_EXTRACTION_TEMPLATE = \"You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last line of conversation. As a guideline, a proper noun is generally capitalized. You should definitely extract all names and places.\\n\\nThe conversation history is provided just in case of a coreference (e.g. \\\"What do you know about him\\\" where \\\"him\\\" is defined in a previous line) -- ignore items mentioned there that are not in the last line.\\n\\nReturn the output as a single comma-separated list, or NONE if there is nothing of note to return (e.g. the user is just issuing a greeting or having a simple conversation).\\n\\nEXAMPLE\\nConversation history:\\nPerson #1: my name is Jacob. how's it going today?\\nAI: \\\"It's going great! How about you?\\\"\\nPerson #1: good! busy working on Langchain. lots to do.\\nAI: \\\"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\\\"\\nLast line:\\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\\nOutput: Jacob,Langchain\\nEND OF EXAMPLE\\n\\nEXAMPLE\\nConversation history:\\nPerson #1: how's it going today?\\nAI: \\\"It's going great! How about you?\\\"\\nPerson #1: good! busy working on Langchain. lots to do.\\nAI: \\\"That sounds like a lot of work! What kind of things are you doing to make Langchain better?\\\"\\nLast line:\\nPerson #1: i'm trying to improve Langchain's interfaces, the UX, its integrations with various products the user might want ... a lot of stuff. I'm working with Person #2.\\nOutput: Langchain, Person #2\\nEND OF EXAMPLE\\n\\nConversation history (for reference only):\\n{history}\\nLast line of conversation (for extraction):\\nHuman: {input}\\n\\nOutput:\";\nexport declare const ENTITY_EXTRACTION_PROMPT: PromptTemplate<{\n history: any;\n input: any;\n}, any>;\nexport declare const _DEFAULT_ENTITY_SUMMARIZATION_TEMPLATE = \"You are an AI assistant helping a human keep track of facts about relevant people, places, and concepts in their life. Update and add to the summary of the provided entity in the \\\"Entity\\\" section based on the last line of your conversation with the human. If you are writing the summary for the first time, return a single sentence.\\nThe update should only include facts that are relayed in the last line of conversation about the provided entity, and should only contain facts about the provided entity.\\n\\nIf there is no new information about the provided entity or the information is not worth noting (not an important or relevant fact to remember long-term), output the exact string \\\"UNCHANGED\\\" below.\\n\\nFull conversation history (for context):\\n{history}\\n\\nEntity to summarize:\\n{entity}\\n\\nExisting summary of {entity}:\\n{summary}\\n\\nLast line of conversation:\\nHuman: {input}\\nUpdated summary (or the exact string \\\"UNCHANGED\\\" if there is no new information about {entity} above):\";\nexport declare const ENTITY_SUMMARIZATION_PROMPT: PromptTemplate<{\n entity: any;\n history: any;\n input: any;\n summary: any;\n}, any>;\n"],"mappings":";;;;cAMqBG,qCAAqCH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.cts","names":["Serializable","BaseEntityStore","Promise"],"sources":["../../../../src/memory/stores/entity/base.d.ts"],"sourcesContent":["import { Serializable } from \"@langchain/core/load/serializable\";\n/**\n * Base class for all entity stores. All entity stores should extend this\n * class.\n */\nexport declare abstract class BaseEntityStore extends Serializable {\n abstract get(key: string, defaultValue?: string): Promise<string | undefined>;\n abstract set(key: string, value?: string): Promise<void>;\n abstract delete(key: string): Promise<void>;\n abstract exists(key: string): Promise<boolean>;\n abstract clear(): Promise<void>;\n}\n"],"mappings":";;;;;;AAKA;;AACsDE,uBADxBD,eAAAA,SAAwBD,YAAAA,CACAE;EAAO,SACdA,GAAAA,CAAAA,GAAAA,EAAAA,MAAAA,EAAAA,YAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EADOA,OACPA,CAAAA,MAAAA,GAAAA,SAAAA,CAAAA;EAAO,SACpBA,GAAAA,CAAAA,GAAAA,EAAAA,MAAAA,EAAAA,KAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EADaA,OACbA,CAAAA,IAAAA,CAAAA;EAAO,SACPA,MAAAA,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EADAA,OACAA,CAAAA,IAAAA,CAAAA;EAAO,SACnBA,MAAAA,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EADYA,OACZA,CAAAA,OAAAA,CAAAA;EAAO,SALyBF,KAAAA,CAAAA,CAAAA,EAKhCE,OALgCF,CAAAA,IAAAA,CAAAA;AAAY"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","names":["Serializable","BaseEntityStore","Promise"],"sources":["../../../../src/memory/stores/entity/base.d.ts"],"sourcesContent":["import { Serializable } from \"@langchain/core/load/serializable\";\n/**\n * Base class for all entity stores. All entity stores should extend this\n * class.\n */\nexport declare abstract class BaseEntityStore extends Serializable {\n abstract get(key: string, defaultValue?: string): Promise<string | undefined>;\n abstract set(key: string, value?: string): Promise<void>;\n abstract delete(key: string): Promise<void>;\n abstract exists(key: string): Promise<boolean>;\n abstract clear(): Promise<void>;\n}\n"],"mappings":";;;;;;AAKA;;AACsDE,uBADxBD,eAAAA,SAAwBD,YAAAA,CACAE;EAAO,SACdA,GAAAA,CAAAA,GAAAA,EAAAA,MAAAA,EAAAA,YAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EADOA,OACPA,CAAAA,MAAAA,GAAAA,SAAAA,CAAAA;EAAO,SACpBA,GAAAA,CAAAA,GAAAA,EAAAA,MAAAA,EAAAA,KAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EADaA,OACbA,CAAAA,IAAAA,CAAAA;EAAO,SACPA,MAAAA,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EADAA,OACAA,CAAAA,IAAAA,CAAAA;EAAO,SACnBA,MAAAA,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EADYA,OACZA,CAAAA,OAAAA,CAAAA;EAAO,SALyBF,KAAAA,CAAAA,CAAAA,EAKhCE,OALgCF,CAAAA,IAAAA,CAAAA;AAAY"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"summary.d.cts","names":["BaseLanguageModelInterface","BaseMessage","BasePromptTemplate","InputValues","MemoryVariables","OutputValues","BaseChatMemory","BaseChatMemoryInput","ConversationSummaryMemoryInput","BaseConversationSummaryMemoryInput","BaseConversationSummaryMemory","Promise","ConversationSummaryMemory"],"sources":["../../src/memory/summary.d.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { BaseMessage } from \"@langchain/core/messages\";\nimport { BasePromptTemplate } from \"@langchain/core/prompts\";\nimport { InputValues, MemoryVariables, OutputValues } from \"@langchain/core/memory\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface for the input parameters of the ConversationSummaryMemory\n * class.\n */\nexport interface ConversationSummaryMemoryInput extends BaseConversationSummaryMemoryInput {\n}\n/**\n * Interface for the input parameters of the BaseConversationSummaryMemory\n * class.\n */\nexport interface BaseConversationSummaryMemoryInput extends BaseChatMemoryInput {\n llm: BaseLanguageModelInterface;\n memoryKey?: string;\n humanPrefix?: string;\n aiPrefix?: string;\n prompt?: BasePromptTemplate;\n summaryChatMessageClass?: new (content: string) => BaseMessage;\n}\n/**\n * Abstract class that provides a structure for storing and managing the\n * memory of a conversation. It includes methods for predicting a new\n * summary for the conversation given the existing messages and summary.\n */\nexport declare abstract class BaseConversationSummaryMemory extends BaseChatMemory {\n memoryKey: string;\n humanPrefix: string;\n aiPrefix: string;\n llm: BaseLanguageModelInterface;\n prompt: BasePromptTemplate;\n summaryChatMessageClass: new (content: string) => BaseMessage;\n constructor(fields: BaseConversationSummaryMemoryInput);\n /**\n * Predicts a new summary for the conversation given the existing messages\n * and summary.\n * @param messages Existing messages in the conversation.\n * @param existingSummary Current summary of the conversation.\n * @returns A promise that resolves to a new summary string.\n */\n predictNewSummary(messages: BaseMessage[], existingSummary: string): Promise<string>;\n}\n/**\n * Class that provides a concrete implementation of the conversation\n * memory. It includes methods for loading memory variables, saving\n * context, and clearing the memory.\n * @example\n * ```typescript\n * const memory = new ConversationSummaryMemory({\n * memoryKey: \"chat_history\",\n * llm: new ChatOpenAI({ model: \"gpt-3.5-turbo\", temperature: 0 }),\n * });\n *\n * const model = new ChatOpenAI({ model: \"gpt-4o-mini\" });\n * const prompt =\n * PromptTemplate.fromTemplate(`The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n *\n * Current conversation:\n * {chat_history}\n * Human: {input}\n * AI:`);\n * const chain = new LLMChain({ llm: model, prompt, memory });\n *\n * const res1 = await chain.call({ input: \"Hi! I'm Jim.\" });\n * console.log({ res1, memory: await memory.loadMemoryVariables({}) });\n *\n * const res2 = await chain.call({ input: \"What's my name?\" });\n * console.log({ res2, memory: await memory.loadMemoryVariables({}) });\n *\n * ```\n */\nexport declare class ConversationSummaryMemory extends BaseConversationSummaryMemory {\n buffer: string;\n constructor(fields: ConversationSummaryMemoryInput);\n get memoryKeys(): string[];\n /**\n * Loads the memory variables for the conversation memory.\n * @returns A promise that resolves to an object containing the memory variables.\n */\n loadMemoryVariables(_: InputValues): Promise<MemoryVariables>;\n /**\n * Saves the context of the conversation memory.\n * @param inputValues Input values for the conversation.\n * @param outputValues Output values from the conversation.\n * @returns A promise that resolves when the context has been saved.\n */\n saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n /**\n * Clears the conversation memory.\n * @returns A promise that resolves when the memory has been cleared.\n */\n clear(): Promise<void>;\n}\n"],"mappings":";;;;;;;;;;AASA;AAMA;AAAmD,UANlCQ,8BAAAA,SAAuCC,kCAML,CAAA;;;;AAA4B;AAajDC,UAbbD,kCAAAA,SAA2CF,mBAaD,CAAA;EAAA,GAAA,EAZlDP,0BAYkD;EAAA,SAIlDA,CAAAA,EAAAA,MAAAA;EAA0B,WACvBE,CAAAA,EAAAA,MAAAA;EAAkB,QACwBD,CAAAA,EAAAA,MAAAA;EAAW,MACzCQ,CAAAA,EAfXP,kBAeWO;EAAkC,uBAQ1BR,CAAAA,EAAAA,KAAAA,OAAAA,EAAAA,MAAAA,EAAAA,GAtBuBA,WAsBvBA;;;AAfkD;AA8ClF;;;AAQ2BE,uBAtDGO,6BAAAA,SAAsCJ,cAAAA,CAsDzCH;EAAW,SAAWC,EAAAA,MAAAA;EAAe,WAAvBO,EAAAA,MAAAA;EAAO,QAOnBR,EAAAA,MAAAA;EAAW,GAAgBE,EAzD/CL,0BAyD+CK;EAAY,MAAGM,EAxD3DT,kBAwD2DS;EAAO,uBAKjEA,EAAAA,KAAAA,OAAAA,EAAAA,MAAAA,EAAAA,GA5DyCV,WA4DzCU;EAAO,WApBmCD,CAAAA,MAAAA,EAvC/BD,kCAuC+BC;EAA6B;;;;;;;8BA/BpDT,yCAAyCU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BpDC,yBAAAA,SAAkCF,6BAAAA;;sBAE/BF;;;;;;yBAMGL,cAAcQ,QAAQP;;;;;;;2BAOpBD,2BAA2BE,eAAeM;;;;;WAK1DA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"summary.d.ts","names":["BaseLanguageModelInterface","BaseMessage","BasePromptTemplate","InputValues","MemoryVariables","OutputValues","BaseChatMemory","BaseChatMemoryInput","ConversationSummaryMemoryInput","BaseConversationSummaryMemoryInput","BaseConversationSummaryMemory","Promise","ConversationSummaryMemory"],"sources":["../../src/memory/summary.d.ts"],"sourcesContent":["import type { BaseLanguageModelInterface } from \"@langchain/core/language_models/base\";\nimport { BaseMessage } from \"@langchain/core/messages\";\nimport { BasePromptTemplate } from \"@langchain/core/prompts\";\nimport { InputValues, MemoryVariables, OutputValues } from \"@langchain/core/memory\";\nimport { BaseChatMemory, BaseChatMemoryInput } from \"./chat_memory.js\";\n/**\n * Interface for the input parameters of the ConversationSummaryMemory\n * class.\n */\nexport interface ConversationSummaryMemoryInput extends BaseConversationSummaryMemoryInput {\n}\n/**\n * Interface for the input parameters of the BaseConversationSummaryMemory\n * class.\n */\nexport interface BaseConversationSummaryMemoryInput extends BaseChatMemoryInput {\n llm: BaseLanguageModelInterface;\n memoryKey?: string;\n humanPrefix?: string;\n aiPrefix?: string;\n prompt?: BasePromptTemplate;\n summaryChatMessageClass?: new (content: string) => BaseMessage;\n}\n/**\n * Abstract class that provides a structure for storing and managing the\n * memory of a conversation. It includes methods for predicting a new\n * summary for the conversation given the existing messages and summary.\n */\nexport declare abstract class BaseConversationSummaryMemory extends BaseChatMemory {\n memoryKey: string;\n humanPrefix: string;\n aiPrefix: string;\n llm: BaseLanguageModelInterface;\n prompt: BasePromptTemplate;\n summaryChatMessageClass: new (content: string) => BaseMessage;\n constructor(fields: BaseConversationSummaryMemoryInput);\n /**\n * Predicts a new summary for the conversation given the existing messages\n * and summary.\n * @param messages Existing messages in the conversation.\n * @param existingSummary Current summary of the conversation.\n * @returns A promise that resolves to a new summary string.\n */\n predictNewSummary(messages: BaseMessage[], existingSummary: string): Promise<string>;\n}\n/**\n * Class that provides a concrete implementation of the conversation\n * memory. It includes methods for loading memory variables, saving\n * context, and clearing the memory.\n * @example\n * ```typescript\n * const memory = new ConversationSummaryMemory({\n * memoryKey: \"chat_history\",\n * llm: new ChatOpenAI({ model: \"gpt-3.5-turbo\", temperature: 0 }),\n * });\n *\n * const model = new ChatOpenAI({ model: \"gpt-4o-mini\" });\n * const prompt =\n * PromptTemplate.fromTemplate(`The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n *\n * Current conversation:\n * {chat_history}\n * Human: {input}\n * AI:`);\n * const chain = new LLMChain({ llm: model, prompt, memory });\n *\n * const res1 = await chain.call({ input: \"Hi! I'm Jim.\" });\n * console.log({ res1, memory: await memory.loadMemoryVariables({}) });\n *\n * const res2 = await chain.call({ input: \"What's my name?\" });\n * console.log({ res2, memory: await memory.loadMemoryVariables({}) });\n *\n * ```\n */\nexport declare class ConversationSummaryMemory extends BaseConversationSummaryMemory {\n buffer: string;\n constructor(fields: ConversationSummaryMemoryInput);\n get memoryKeys(): string[];\n /**\n * Loads the memory variables for the conversation memory.\n * @returns A promise that resolves to an object containing the memory variables.\n */\n loadMemoryVariables(_: InputValues): Promise<MemoryVariables>;\n /**\n * Saves the context of the conversation memory.\n * @param inputValues Input values for the conversation.\n * @param outputValues Output values from the conversation.\n * @returns A promise that resolves when the context has been saved.\n */\n saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n /**\n * Clears the conversation memory.\n * @returns A promise that resolves when the memory has been cleared.\n */\n clear(): Promise<void>;\n}\n"],"mappings":";;;;;;;;;;AASA;AAMA;AAAmD,UANlCQ,8BAAAA,SAAuCC,kCAML,CAAA;;;;AAA4B;AAajDC,UAbbD,kCAAAA,SAA2CF,mBAaD,CAAA;EAAA,GAAA,EAZlDP,0BAYkD;EAAA,SAIlDA,CAAAA,EAAAA,MAAAA;EAA0B,WACvBE,CAAAA,EAAAA,MAAAA;EAAkB,QACwBD,CAAAA,EAAAA,MAAAA;EAAW,MACzCQ,CAAAA,EAfXP,kBAeWO;EAAkC,uBAQ1BR,CAAAA,EAAAA,KAAAA,OAAAA,EAAAA,MAAAA,EAAAA,GAtBuBA,WAsBvBA;;;AAfkD;AA8ClF;;;AAQ2BE,uBAtDGO,6BAAAA,SAAsCJ,cAAAA,CAsDzCH;EAAW,SAAWC,EAAAA,MAAAA;EAAe,WAAvBO,EAAAA,MAAAA;EAAO,QAOnBR,EAAAA,MAAAA;EAAW,GAAgBE,EAzD/CL,0BAyD+CK;EAAY,MAAGM,EAxD3DT,kBAwD2DS;EAAO,uBAKjEA,EAAAA,KAAAA,OAAAA,EAAAA,MAAAA,EAAAA,GA5DyCV,WA4DzCU;EAAO,WApBmCD,CAAAA,MAAAA,EAvC/BD,kCAuC+BC;EAA6B;;;;;;;8BA/BpDT,yCAAyCU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BpDC,yBAAAA,SAAkCF,6BAAAA;;sBAE/BF;;;;;;yBAMGL,cAAcQ,QAAQP;;;;;;;2BAOpBD,2BAA2BE,eAAeM;;;;;WAK1DA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"summary_buffer.d.cts","names":["InputValues","MemoryVariables","OutputValues","BaseConversationSummaryMemory","BaseConversationSummaryMemoryInput","ConversationSummaryBufferMemoryInput","ConversationSummaryBufferMemory","Promise"],"sources":["../../src/memory/summary_buffer.d.ts"],"sourcesContent":["import { InputValues, MemoryVariables, OutputValues } from \"@langchain/core/memory\";\nimport { BaseConversationSummaryMemory, BaseConversationSummaryMemoryInput } from \"./summary.js\";\n/**\n * Interface for the input parameters of the\n * ConversationSummaryBufferMemory class.\n */\nexport interface ConversationSummaryBufferMemoryInput extends BaseConversationSummaryMemoryInput {\n maxTokenLimit?: number;\n}\n/**\n * Class that extends BaseConversationSummaryMemory and implements\n * ConversationSummaryBufferMemoryInput. It manages the conversation\n * history in a LangChain application by maintaining a buffer of chat\n * messages and providing methods to load, save, prune, and clear the\n * memory.\n * @example\n * ```typescript\n * // Initialize the memory with a specific model and token limit\n * const memory = new ConversationSummaryBufferMemory({\n * llm: new ChatOpenAI({ model: \"gpt-3.5-turbo-instruct\", temperature: 0 }),\n * maxTokenLimit: 10,\n * });\n *\n * // Save conversation context to memory\n * await memory.saveContext({ input: \"hi\" }, { output: \"whats up\" });\n * await memory.saveContext({ input: \"not much you\" }, { output: \"not much\" });\n *\n * // Load the conversation history from memory\n * const history = await memory.loadMemoryVariables({});\n * console.log({ history });\n *\n * // Create a chat prompt using the conversation history\n * const chatPrompt = ChatPromptTemplate.fromMessages([\n * SystemMessagePromptTemplate.fromTemplate(\n * \"The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\",\n * ),\n * new MessagesPlaceholder(\"history\"),\n * HumanMessagePromptTemplate.fromTemplate(\"{input}\"),\n * ]);\n *\n * // Initialize the conversation chain with the model, memory, and prompt\n * const chain = new ConversationChain({\n * llm: new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0.9, verbose: true }),\n * memory: memory,\n * prompt: chatPrompt,\n * });\n * ```\n */\nexport declare class ConversationSummaryBufferMemory extends BaseConversationSummaryMemory implements ConversationSummaryBufferMemoryInput {\n movingSummaryBuffer: string;\n maxTokenLimit: number;\n constructor(fields: ConversationSummaryBufferMemoryInput);\n get memoryKeys(): string[];\n /**\n * Method that loads the chat messages from the memory and returns them as\n * a string or as a list of messages, depending on the returnMessages\n * property.\n * @param _ InputValues object, not used in this method.\n * @returns Promise that resolves with MemoryVariables object containing the loaded chat messages.\n */\n loadMemoryVariables(_?: InputValues): Promise<MemoryVariables>;\n /**\n * Method that saves the context of the conversation, including the input\n * and output values, and prunes the memory if it exceeds the maximum\n * token limit.\n * @param inputValues InputValues object containing the input values of the conversation.\n * @param outputValues OutputValues object containing the output values of the conversation.\n * @returns Promise that resolves when the context is saved and the memory is pruned.\n */\n saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n /**\n * Method that prunes the memory if the total number of tokens in the\n * buffer exceeds the maxTokenLimit. It removes messages from the\n * beginning of the buffer until the total number of tokens is within the\n * limit.\n * @returns Promise that resolves when the memory is pruned.\n */\n prune(): Promise<void>;\n /**\n * Method that clears the memory and resets the movingSummaryBuffer.\n * @returns Promise that resolves when the memory is cleared.\n */\n clear(): Promise<void>;\n}\n"],"mappings":";;;;;;;AAMA;AA0CA;AAAoD,UA1CnCK,oCAAAA,SAA6CD,kCA0CV,CAAA;EAAA,aAG5BC,CAAAA,EAAAA,MAAAA;;;;;;;;;;;AAHkH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAArHC,+BAAAA,SAAwCH,6BAAAA,YAAyCE;;;sBAG9EA;;;;;;;;;0BASIL,cAAcO,QAAQN;;;;;;;;;2BASrBD,2BAA2BE,eAAeK;;;;;;;;WAQ1DA;;;;;WAKAA"}