@langchain/core 1.1.4 → 1.1.5-dev-1765432861398

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 (706) hide show
  1. package/README.md +1 -1
  2. package/dist/agents.d.cts +0 -2
  3. package/dist/agents.d.cts.map +1 -0
  4. package/dist/agents.d.ts +0 -2
  5. package/dist/agents.d.ts.map +1 -0
  6. package/dist/caches/index.d.cts.map +1 -0
  7. package/dist/caches/index.d.ts.map +1 -0
  8. package/dist/callbacks/base.cjs +1 -1
  9. package/dist/callbacks/base.cjs.map +1 -1
  10. package/dist/callbacks/base.d.cts +22 -60
  11. package/dist/callbacks/base.d.cts.map +1 -0
  12. package/dist/callbacks/base.d.ts +22 -60
  13. package/dist/callbacks/base.d.ts.map +1 -0
  14. package/dist/callbacks/base.js +1 -1
  15. package/dist/callbacks/base.js.map +1 -1
  16. package/dist/callbacks/dispatch/index.d.cts +1 -3
  17. package/dist/callbacks/dispatch/index.d.cts.map +1 -0
  18. package/dist/callbacks/dispatch/index.d.ts +1 -3
  19. package/dist/callbacks/dispatch/index.d.ts.map +1 -0
  20. package/dist/callbacks/dispatch/web.d.cts +1 -3
  21. package/dist/callbacks/dispatch/web.d.cts.map +1 -0
  22. package/dist/callbacks/dispatch/web.d.ts +1 -3
  23. package/dist/callbacks/dispatch/web.d.ts.map +1 -0
  24. package/dist/callbacks/manager.cjs +6 -6
  25. package/dist/callbacks/manager.cjs.map +1 -1
  26. package/dist/callbacks/manager.d.cts +2 -12
  27. package/dist/callbacks/manager.d.cts.map +1 -0
  28. package/dist/callbacks/manager.d.ts +2 -12
  29. package/dist/callbacks/manager.d.ts.map +1 -0
  30. package/dist/callbacks/manager.js +7 -7
  31. package/dist/callbacks/manager.js.map +1 -1
  32. package/dist/chat_history.d.cts +0 -1
  33. package/dist/chat_history.d.cts.map +1 -0
  34. package/dist/chat_history.d.ts +0 -1
  35. package/dist/chat_history.d.ts.map +1 -0
  36. package/dist/context.d.cts.map +1 -0
  37. package/dist/context.d.ts.map +1 -0
  38. package/dist/document_loaders/base.d.cts.map +1 -0
  39. package/dist/document_loaders/base.d.ts.map +1 -0
  40. package/dist/document_loaders/langsmith.d.cts +0 -3
  41. package/dist/document_loaders/langsmith.d.cts.map +1 -0
  42. package/dist/document_loaders/langsmith.d.ts +0 -3
  43. package/dist/document_loaders/langsmith.d.ts.map +1 -0
  44. package/dist/documents/document.d.cts +3 -12
  45. package/dist/documents/document.d.cts.map +1 -0
  46. package/dist/documents/document.d.ts +3 -12
  47. package/dist/documents/document.d.ts.map +1 -0
  48. package/dist/documents/transformers.d.cts.map +1 -0
  49. package/dist/documents/transformers.d.ts.map +1 -0
  50. package/dist/embeddings.d.cts.map +1 -0
  51. package/dist/embeddings.d.ts.map +1 -0
  52. package/dist/example_selectors/base.d.cts.map +1 -0
  53. package/dist/example_selectors/base.d.ts.map +1 -0
  54. package/dist/example_selectors/conditional.d.cts.map +1 -0
  55. package/dist/example_selectors/conditional.d.ts.map +1 -0
  56. package/dist/example_selectors/length_based.d.cts +1 -1
  57. package/dist/example_selectors/length_based.d.cts.map +1 -0
  58. package/dist/example_selectors/length_based.d.ts +1 -1
  59. package/dist/example_selectors/length_based.d.ts.map +1 -0
  60. package/dist/example_selectors/semantic_similarity.d.cts.map +1 -0
  61. package/dist/example_selectors/semantic_similarity.d.ts.map +1 -0
  62. package/dist/indexing/base.d.cts +0 -1
  63. package/dist/indexing/base.d.cts.map +1 -0
  64. package/dist/indexing/base.d.ts +0 -1
  65. package/dist/indexing/base.d.ts.map +1 -0
  66. package/dist/indexing/record_manager.d.cts +0 -1
  67. package/dist/indexing/record_manager.d.cts.map +1 -0
  68. package/dist/indexing/record_manager.d.ts +0 -1
  69. package/dist/indexing/record_manager.d.ts.map +1 -0
  70. package/dist/language_models/base.d.cts +8 -38
  71. package/dist/language_models/base.d.cts.map +1 -0
  72. package/dist/language_models/base.d.ts +8 -38
  73. package/dist/language_models/base.d.ts.map +1 -0
  74. package/dist/language_models/chat_models.d.cts +6 -33
  75. package/dist/language_models/chat_models.d.cts.map +1 -0
  76. package/dist/language_models/chat_models.d.ts +6 -33
  77. package/dist/language_models/chat_models.d.ts.map +1 -0
  78. package/dist/language_models/llms.d.cts +0 -6
  79. package/dist/language_models/llms.d.cts.map +1 -0
  80. package/dist/language_models/llms.d.ts +0 -6
  81. package/dist/language_models/llms.d.ts.map +1 -0
  82. package/dist/language_models/profile.d.cts.map +1 -0
  83. package/dist/language_models/profile.d.ts.map +1 -0
  84. package/dist/load/import_type.d.cts +0 -1
  85. package/dist/load/import_type.d.cts.map +1 -0
  86. package/dist/load/import_type.d.ts +0 -1
  87. package/dist/load/import_type.d.ts.map +1 -0
  88. package/dist/load/index.d.cts.map +1 -0
  89. package/dist/load/index.d.ts.map +1 -0
  90. package/dist/load/map_keys.d.cts +0 -1
  91. package/dist/load/map_keys.d.cts.map +1 -0
  92. package/dist/load/map_keys.d.ts +0 -1
  93. package/dist/load/map_keys.d.ts.map +1 -0
  94. package/dist/load/serializable.d.cts +0 -1
  95. package/dist/load/serializable.d.cts.map +1 -0
  96. package/dist/load/serializable.d.ts +0 -1
  97. package/dist/load/serializable.d.ts.map +1 -0
  98. package/dist/memory.d.cts +0 -3
  99. package/dist/memory.d.cts.map +1 -0
  100. package/dist/memory.d.ts +0 -3
  101. package/dist/memory.d.ts.map +1 -0
  102. package/dist/messages/ai.d.cts.map +1 -0
  103. package/dist/messages/ai.d.ts.map +1 -0
  104. package/dist/messages/base.d.cts +1 -13
  105. package/dist/messages/base.d.cts.map +1 -0
  106. package/dist/messages/base.d.ts +1 -13
  107. package/dist/messages/base.d.ts.map +1 -0
  108. package/dist/messages/chat.d.cts.map +1 -0
  109. package/dist/messages/chat.d.ts.map +1 -0
  110. package/dist/messages/content/base.d.cts.map +1 -0
  111. package/dist/messages/content/base.d.ts.map +1 -0
  112. package/dist/messages/content/data.d.cts +2 -7
  113. package/dist/messages/content/data.d.cts.map +1 -0
  114. package/dist/messages/content/data.d.ts +2 -7
  115. package/dist/messages/content/data.d.ts.map +1 -0
  116. package/dist/messages/content/index.d.cts +1 -4
  117. package/dist/messages/content/index.d.cts.map +1 -0
  118. package/dist/messages/content/index.d.ts +1 -4
  119. package/dist/messages/content/index.d.ts.map +1 -0
  120. package/dist/messages/content/multimodal.d.cts +0 -1
  121. package/dist/messages/content/multimodal.d.cts.map +1 -0
  122. package/dist/messages/content/multimodal.d.ts +0 -1
  123. package/dist/messages/content/multimodal.d.ts.map +1 -0
  124. package/dist/messages/content/tools.d.cts +0 -1
  125. package/dist/messages/content/tools.d.cts.map +1 -0
  126. package/dist/messages/content/tools.d.ts +0 -1
  127. package/dist/messages/content/tools.d.ts.map +1 -0
  128. package/dist/messages/format.d.cts.map +1 -0
  129. package/dist/messages/format.d.ts.map +1 -0
  130. package/dist/messages/function.d.cts.map +1 -0
  131. package/dist/messages/function.d.ts.map +1 -0
  132. package/dist/messages/human.d.cts.map +1 -0
  133. package/dist/messages/human.d.ts.map +1 -0
  134. package/dist/messages/message.d.cts.map +1 -0
  135. package/dist/messages/message.d.ts.map +1 -0
  136. package/dist/messages/metadata.d.cts.map +1 -0
  137. package/dist/messages/metadata.d.ts.map +1 -0
  138. package/dist/messages/modifier.d.cts.map +1 -0
  139. package/dist/messages/modifier.d.ts.map +1 -0
  140. package/dist/messages/system.d.cts.map +1 -0
  141. package/dist/messages/system.d.ts.map +1 -0
  142. package/dist/messages/tool.d.cts +2 -9
  143. package/dist/messages/tool.d.cts.map +1 -0
  144. package/dist/messages/tool.d.ts +2 -9
  145. package/dist/messages/tool.d.ts.map +1 -0
  146. package/dist/messages/transformers.d.cts +0 -3
  147. package/dist/messages/transformers.d.cts.map +1 -0
  148. package/dist/messages/transformers.d.ts +0 -3
  149. package/dist/messages/transformers.d.ts.map +1 -0
  150. package/dist/messages/utils.d.cts +2 -5
  151. package/dist/messages/utils.d.cts.map +1 -0
  152. package/dist/messages/utils.d.ts +2 -5
  153. package/dist/messages/utils.d.ts.map +1 -0
  154. package/dist/output_parsers/base.d.cts.map +1 -0
  155. package/dist/output_parsers/base.d.ts.map +1 -0
  156. package/dist/output_parsers/bytes.d.cts.map +1 -0
  157. package/dist/output_parsers/bytes.d.ts.map +1 -0
  158. package/dist/output_parsers/json.d.cts +1 -5
  159. package/dist/output_parsers/json.d.cts.map +1 -0
  160. package/dist/output_parsers/json.d.ts +1 -5
  161. package/dist/output_parsers/json.d.ts.map +1 -0
  162. package/dist/output_parsers/list.d.cts.map +1 -0
  163. package/dist/output_parsers/list.d.ts.map +1 -0
  164. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts +2 -6
  165. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts.map +1 -0
  166. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts +2 -6
  167. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts.map +1 -0
  168. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts +10 -34
  169. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts.map +1 -0
  170. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts +10 -34
  171. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts.map +1 -0
  172. package/dist/output_parsers/string.d.cts.map +1 -0
  173. package/dist/output_parsers/string.d.ts.map +1 -0
  174. package/dist/output_parsers/structured.d.cts.map +1 -0
  175. package/dist/output_parsers/structured.d.ts.map +1 -0
  176. package/dist/output_parsers/transform.d.cts +0 -1
  177. package/dist/output_parsers/transform.d.cts.map +1 -0
  178. package/dist/output_parsers/transform.d.ts +0 -1
  179. package/dist/output_parsers/transform.d.ts.map +1 -0
  180. package/dist/output_parsers/xml.d.cts.map +1 -0
  181. package/dist/output_parsers/xml.d.ts.map +1 -0
  182. package/dist/outputs.d.cts +0 -6
  183. package/dist/outputs.d.cts.map +1 -0
  184. package/dist/outputs.d.ts +0 -6
  185. package/dist/outputs.d.ts.map +1 -0
  186. package/dist/prompt_values.d.cts.map +1 -0
  187. package/dist/prompt_values.d.ts.map +1 -0
  188. package/dist/prompts/base.d.cts +2 -10
  189. package/dist/prompts/base.d.cts.map +1 -0
  190. package/dist/prompts/base.d.ts +2 -10
  191. package/dist/prompts/base.d.ts.map +1 -0
  192. package/dist/prompts/chat.d.cts +13 -51
  193. package/dist/prompts/chat.d.cts.map +1 -0
  194. package/dist/prompts/chat.d.ts +13 -51
  195. package/dist/prompts/chat.d.ts.map +1 -0
  196. package/dist/prompts/dict.d.cts.map +1 -0
  197. package/dist/prompts/dict.d.ts.map +1 -0
  198. package/dist/prompts/few_shot.d.cts +1 -5
  199. package/dist/prompts/few_shot.d.cts.map +1 -0
  200. package/dist/prompts/few_shot.d.ts +1 -5
  201. package/dist/prompts/few_shot.d.ts.map +1 -0
  202. package/dist/prompts/image.d.cts +2 -10
  203. package/dist/prompts/image.d.cts.map +1 -0
  204. package/dist/prompts/image.d.ts +2 -10
  205. package/dist/prompts/image.d.ts.map +1 -0
  206. package/dist/prompts/pipeline.d.cts.map +1 -0
  207. package/dist/prompts/pipeline.d.ts.map +1 -0
  208. package/dist/prompts/prompt.d.cts +4 -15
  209. package/dist/prompts/prompt.d.cts.map +1 -0
  210. package/dist/prompts/prompt.d.ts +4 -16
  211. package/dist/prompts/prompt.d.ts.map +1 -0
  212. package/dist/prompts/serde.d.cts +0 -1
  213. package/dist/prompts/serde.d.cts.map +1 -0
  214. package/dist/prompts/serde.d.ts +0 -1
  215. package/dist/prompts/serde.d.ts.map +1 -0
  216. package/dist/prompts/string.d.cts +1 -5
  217. package/dist/prompts/string.d.cts.map +1 -0
  218. package/dist/prompts/string.d.ts +1 -5
  219. package/dist/prompts/string.d.ts.map +1 -0
  220. package/dist/prompts/structured.d.cts +3 -16
  221. package/dist/prompts/structured.d.cts.map +1 -0
  222. package/dist/prompts/structured.d.ts +3 -16
  223. package/dist/prompts/structured.d.ts.map +1 -0
  224. package/dist/prompts/template.d.cts.map +1 -0
  225. package/dist/prompts/template.d.ts.map +1 -0
  226. package/dist/retrievers/document_compressors/index.d.cts +0 -1
  227. package/dist/retrievers/document_compressors/index.d.cts.map +1 -0
  228. package/dist/retrievers/document_compressors/index.d.ts +0 -1
  229. package/dist/retrievers/document_compressors/index.d.ts.map +1 -0
  230. package/dist/retrievers/index.d.cts +2 -6
  231. package/dist/retrievers/index.d.cts.map +1 -0
  232. package/dist/retrievers/index.d.ts +2 -6
  233. package/dist/retrievers/index.d.ts.map +1 -0
  234. package/dist/runnables/base.d.cts +12 -64
  235. package/dist/runnables/base.d.cts.map +1 -0
  236. package/dist/runnables/base.d.ts +12 -64
  237. package/dist/runnables/base.d.ts.map +1 -0
  238. package/dist/runnables/branch.d.cts +0 -2
  239. package/dist/runnables/branch.d.cts.map +1 -0
  240. package/dist/runnables/branch.d.ts +0 -2
  241. package/dist/runnables/branch.d.ts.map +1 -0
  242. package/dist/runnables/config.cjs +15 -1
  243. package/dist/runnables/config.cjs.map +1 -1
  244. package/dist/runnables/config.d.cts +0 -1
  245. package/dist/runnables/config.d.cts.map +1 -0
  246. package/dist/runnables/config.d.ts +0 -1
  247. package/dist/runnables/config.d.ts.map +1 -0
  248. package/dist/runnables/config.js +15 -1
  249. package/dist/runnables/config.js.map +1 -1
  250. package/dist/runnables/graph.d.cts +1 -5
  251. package/dist/runnables/graph.d.cts.map +1 -0
  252. package/dist/runnables/graph.d.ts +1 -5
  253. package/dist/runnables/graph.d.ts.map +1 -0
  254. package/dist/runnables/history.d.cts +4 -12
  255. package/dist/runnables/history.d.cts.map +1 -0
  256. package/dist/runnables/history.d.ts +4 -12
  257. package/dist/runnables/history.d.ts.map +1 -0
  258. package/dist/runnables/passthrough.d.cts +0 -2
  259. package/dist/runnables/passthrough.d.cts.map +1 -0
  260. package/dist/runnables/passthrough.d.ts +0 -2
  261. package/dist/runnables/passthrough.d.ts.map +1 -0
  262. package/dist/runnables/router.d.cts +0 -1
  263. package/dist/runnables/router.d.cts.map +1 -0
  264. package/dist/runnables/router.d.ts +0 -1
  265. package/dist/runnables/router.d.ts.map +1 -0
  266. package/dist/runnables/types.d.cts +2 -9
  267. package/dist/runnables/types.d.cts.map +1 -0
  268. package/dist/runnables/types.d.ts +2 -9
  269. package/dist/runnables/types.d.ts.map +1 -0
  270. package/dist/singletons/async_local_storage/context.d.cts +0 -2
  271. package/dist/singletons/async_local_storage/context.d.cts.map +1 -0
  272. package/dist/singletons/async_local_storage/context.d.ts +0 -2
  273. package/dist/singletons/async_local_storage/context.d.ts.map +1 -0
  274. package/dist/singletons/async_local_storage/globals.d.cts +0 -1
  275. package/dist/singletons/async_local_storage/globals.d.cts.map +1 -0
  276. package/dist/singletons/async_local_storage/globals.d.ts +0 -1
  277. package/dist/singletons/async_local_storage/globals.d.ts.map +1 -0
  278. package/dist/singletons/async_local_storage/index.d.cts.map +1 -0
  279. package/dist/singletons/async_local_storage/index.d.ts.map +1 -0
  280. package/dist/singletons/callbacks.d.cts.map +1 -0
  281. package/dist/singletons/callbacks.d.ts.map +1 -0
  282. package/dist/stores.d.cts +0 -1
  283. package/dist/stores.d.cts.map +1 -0
  284. package/dist/stores.d.ts +0 -1
  285. package/dist/stores.d.ts.map +1 -0
  286. package/dist/structured_query/base.d.cts.map +1 -0
  287. package/dist/structured_query/base.d.ts.map +1 -0
  288. package/dist/structured_query/functional.d.cts.map +1 -0
  289. package/dist/structured_query/functional.d.ts.map +1 -0
  290. package/dist/structured_query/ir.d.cts.map +1 -0
  291. package/dist/structured_query/ir.d.ts.map +1 -0
  292. package/dist/structured_query/utils.d.cts +1 -4
  293. package/dist/structured_query/utils.d.cts.map +1 -0
  294. package/dist/structured_query/utils.d.ts +1 -4
  295. package/dist/structured_query/utils.d.ts.map +1 -0
  296. package/dist/tools/index.d.cts +1 -6
  297. package/dist/tools/index.d.cts.map +1 -0
  298. package/dist/tools/index.d.ts +1 -6
  299. package/dist/tools/index.d.ts.map +1 -0
  300. package/dist/tools/types.d.cts +3 -13
  301. package/dist/tools/types.d.cts.map +1 -0
  302. package/dist/tools/types.d.ts +3 -13
  303. package/dist/tools/types.d.ts.map +1 -0
  304. package/dist/tools/utils.d.cts.map +1 -0
  305. package/dist/tools/utils.d.ts.map +1 -0
  306. package/dist/tracers/base.d.cts +1 -20
  307. package/dist/tracers/base.d.cts.map +1 -0
  308. package/dist/tracers/base.d.ts +1 -20
  309. package/dist/tracers/base.d.ts.map +1 -0
  310. package/dist/tracers/console.d.cts +0 -2
  311. package/dist/tracers/console.d.cts.map +1 -0
  312. package/dist/tracers/console.d.ts +0 -2
  313. package/dist/tracers/console.d.ts.map +1 -0
  314. package/dist/tracers/event_stream.d.cts +0 -4
  315. package/dist/tracers/event_stream.d.cts.map +1 -0
  316. package/dist/tracers/event_stream.d.ts +0 -4
  317. package/dist/tracers/event_stream.d.ts.map +1 -0
  318. package/dist/tracers/log_stream.d.cts +0 -6
  319. package/dist/tracers/log_stream.d.cts.map +1 -0
  320. package/dist/tracers/log_stream.d.ts +0 -6
  321. package/dist/tracers/log_stream.d.ts.map +1 -0
  322. package/dist/tracers/run_collector.d.cts.map +1 -0
  323. package/dist/tracers/run_collector.d.ts.map +1 -0
  324. package/dist/tracers/tracer_langchain.d.cts.map +1 -0
  325. package/dist/tracers/tracer_langchain.d.ts.map +1 -0
  326. package/dist/types/_internal.d.cts +0 -3
  327. package/dist/types/_internal.d.cts.map +1 -0
  328. package/dist/types/_internal.d.ts +0 -3
  329. package/dist/types/_internal.d.ts.map +1 -0
  330. package/dist/types/type-utils.d.cts +0 -2
  331. package/dist/types/type-utils.d.cts.map +1 -0
  332. package/dist/types/type-utils.d.ts +0 -2
  333. package/dist/types/type-utils.d.ts.map +1 -0
  334. package/dist/utils/async_caller.d.cts +0 -3
  335. package/dist/utils/async_caller.d.cts.map +1 -0
  336. package/dist/utils/async_caller.d.ts +0 -3
  337. package/dist/utils/async_caller.d.ts.map +1 -0
  338. package/dist/utils/chunk_array.d.cts.map +1 -0
  339. package/dist/utils/chunk_array.d.ts.map +1 -0
  340. package/dist/utils/env.d.cts +0 -4
  341. package/dist/utils/env.d.cts.map +1 -0
  342. package/dist/utils/env.d.ts +0 -4
  343. package/dist/utils/env.d.ts.map +1 -0
  344. package/dist/utils/event_source_parse.d.cts +1 -4
  345. package/dist/utils/event_source_parse.d.cts.map +1 -0
  346. package/dist/utils/event_source_parse.d.ts +1 -4
  347. package/dist/utils/event_source_parse.d.ts.map +1 -0
  348. package/dist/utils/fast-json-patch/src/core.d.cts.map +1 -0
  349. package/dist/utils/fast-json-patch/src/core.d.ts.map +1 -0
  350. package/dist/utils/fast-json-patch/src/duplex.d.cts.map +1 -0
  351. package/dist/utils/fast-json-patch/src/duplex.d.ts.map +1 -0
  352. package/dist/utils/format.d.cts.map +1 -0
  353. package/dist/utils/format.d.ts.map +1 -0
  354. package/dist/utils/function_calling.d.cts +1 -3
  355. package/dist/utils/function_calling.d.cts.map +1 -0
  356. package/dist/utils/function_calling.d.ts +1 -3
  357. package/dist/utils/function_calling.d.ts.map +1 -0
  358. package/dist/utils/hash.d.cts.map +1 -0
  359. package/dist/utils/hash.d.ts.map +1 -0
  360. package/dist/utils/js-sha256/hash.d.cts.map +1 -0
  361. package/dist/utils/js-sha256/hash.d.ts.map +1 -0
  362. package/dist/utils/json.d.cts +0 -1
  363. package/dist/utils/json.d.cts.map +1 -0
  364. package/dist/utils/json.d.ts +0 -1
  365. package/dist/utils/json.d.ts.map +1 -0
  366. package/dist/utils/json_schema.d.cts.map +1 -0
  367. package/dist/utils/json_schema.d.ts.map +1 -0
  368. package/dist/utils/math.d.cts.map +1 -0
  369. package/dist/utils/math.d.ts.map +1 -0
  370. package/dist/utils/ml-distance/similarities.d.cts.map +1 -0
  371. package/dist/utils/ml-distance/similarities.d.ts.map +1 -0
  372. package/dist/utils/signal.d.cts.map +1 -0
  373. package/dist/utils/signal.d.ts.map +1 -0
  374. package/dist/utils/stream.d.cts +1 -13
  375. package/dist/utils/stream.d.cts.map +1 -0
  376. package/dist/utils/stream.d.ts +1 -13
  377. package/dist/utils/stream.d.ts.map +1 -0
  378. package/dist/utils/testing/chat_models.cjs +11 -5
  379. package/dist/utils/testing/chat_models.cjs.map +1 -1
  380. package/dist/utils/testing/chat_models.d.cts +11 -12
  381. package/dist/utils/testing/chat_models.d.cts.map +1 -0
  382. package/dist/utils/testing/chat_models.d.ts +11 -12
  383. package/dist/utils/testing/chat_models.d.ts.map +1 -0
  384. package/dist/utils/testing/chat_models.js +11 -5
  385. package/dist/utils/testing/chat_models.js.map +1 -1
  386. package/dist/utils/testing/embeddings.d.cts.map +1 -0
  387. package/dist/utils/testing/embeddings.d.ts.map +1 -0
  388. package/dist/utils/testing/llms.d.cts.map +1 -0
  389. package/dist/utils/testing/llms.d.ts.map +1 -0
  390. package/dist/utils/testing/message_history.d.cts.map +1 -0
  391. package/dist/utils/testing/message_history.d.ts.map +1 -0
  392. package/dist/utils/testing/output_parsers.d.cts.map +1 -0
  393. package/dist/utils/testing/output_parsers.d.ts.map +1 -0
  394. package/dist/utils/testing/retrievers.d.cts +1 -3
  395. package/dist/utils/testing/retrievers.d.cts.map +1 -0
  396. package/dist/utils/testing/retrievers.d.ts +1 -3
  397. package/dist/utils/testing/retrievers.d.ts.map +1 -0
  398. package/dist/utils/testing/runnables.d.cts.map +1 -0
  399. package/dist/utils/testing/runnables.d.ts.map +1 -0
  400. package/dist/utils/testing/tools.d.cts.map +1 -0
  401. package/dist/utils/testing/tools.d.ts.map +1 -0
  402. package/dist/utils/testing/tracers.d.cts.map +1 -0
  403. package/dist/utils/testing/tracers.d.ts.map +1 -0
  404. package/dist/utils/testing/vectorstores.d.cts +0 -1
  405. package/dist/utils/testing/vectorstores.d.cts.map +1 -0
  406. package/dist/utils/testing/vectorstores.d.ts +0 -1
  407. package/dist/utils/testing/vectorstores.d.ts.map +1 -0
  408. package/dist/utils/tiktoken.d.cts.map +1 -0
  409. package/dist/utils/tiktoken.d.ts.map +1 -0
  410. package/dist/utils/types/index.d.cts +0 -2
  411. package/dist/utils/types/index.d.cts.map +1 -0
  412. package/dist/utils/types/index.d.ts +0 -2
  413. package/dist/utils/types/index.d.ts.map +1 -0
  414. package/dist/utils/types/zod.d.cts +0 -3
  415. package/dist/utils/types/zod.d.cts.map +1 -0
  416. package/dist/utils/types/zod.d.ts +0 -3
  417. package/dist/utils/types/zod.d.ts.map +1 -0
  418. package/dist/utils/zod-to-json-schema/errorMessages.d.cts.map +1 -0
  419. package/dist/utils/zod-to-json-schema/errorMessages.d.ts.map +1 -0
  420. package/dist/utils/zod-to-json-schema/parseTypes.d.cts.map +1 -0
  421. package/dist/utils/zod-to-json-schema/parseTypes.d.ts.map +1 -0
  422. package/dist/utils/zod-to-json-schema/parsers/any.d.cts.map +1 -0
  423. package/dist/utils/zod-to-json-schema/parsers/any.d.ts.map +1 -0
  424. package/dist/utils/zod-to-json-schema/parsers/array.d.cts.map +1 -0
  425. package/dist/utils/zod-to-json-schema/parsers/array.d.ts.map +1 -0
  426. package/dist/utils/zod-to-json-schema/parsers/bigint.d.cts.map +1 -0
  427. package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts.map +1 -0
  428. package/dist/utils/zod-to-json-schema/parsers/boolean.d.cts.map +1 -0
  429. package/dist/utils/zod-to-json-schema/parsers/boolean.d.ts.map +1 -0
  430. package/dist/utils/zod-to-json-schema/parsers/date.d.cts.map +1 -0
  431. package/dist/utils/zod-to-json-schema/parsers/date.d.ts.map +1 -0
  432. package/dist/utils/zod-to-json-schema/parsers/enum.d.cts.map +1 -0
  433. package/dist/utils/zod-to-json-schema/parsers/enum.d.ts.map +1 -0
  434. package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts.map +1 -0
  435. package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts.map +1 -0
  436. package/dist/utils/zod-to-json-schema/parsers/literal.d.cts.map +1 -0
  437. package/dist/utils/zod-to-json-schema/parsers/literal.d.ts.map +1 -0
  438. package/dist/utils/zod-to-json-schema/parsers/map.d.cts.map +1 -0
  439. package/dist/utils/zod-to-json-schema/parsers/map.d.ts.map +1 -0
  440. package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts.map +1 -0
  441. package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts.map +1 -0
  442. package/dist/utils/zod-to-json-schema/parsers/never.d.cts.map +1 -0
  443. package/dist/utils/zod-to-json-schema/parsers/never.d.ts.map +1 -0
  444. package/dist/utils/zod-to-json-schema/parsers/null.d.cts.map +1 -0
  445. package/dist/utils/zod-to-json-schema/parsers/null.d.ts.map +1 -0
  446. package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts.map +1 -0
  447. package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts.map +1 -0
  448. package/dist/utils/zod-to-json-schema/parsers/number.d.cts.map +1 -0
  449. package/dist/utils/zod-to-json-schema/parsers/number.d.ts.map +1 -0
  450. package/dist/utils/zod-to-json-schema/parsers/object.d.cts.map +1 -0
  451. package/dist/utils/zod-to-json-schema/parsers/object.d.ts.map +1 -0
  452. package/dist/utils/zod-to-json-schema/parsers/record.d.cts.map +1 -0
  453. package/dist/utils/zod-to-json-schema/parsers/record.d.ts.map +1 -0
  454. package/dist/utils/zod-to-json-schema/parsers/set.d.cts.map +1 -0
  455. package/dist/utils/zod-to-json-schema/parsers/set.d.ts.map +1 -0
  456. package/dist/utils/zod-to-json-schema/parsers/string.d.cts.map +1 -0
  457. package/dist/utils/zod-to-json-schema/parsers/string.d.ts.map +1 -0
  458. package/dist/utils/zod-to-json-schema/parsers/tuple.d.cts.map +1 -0
  459. package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts.map +1 -0
  460. package/dist/utils/zod-to-json-schema/parsers/undefined.d.cts.map +1 -0
  461. package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts.map +1 -0
  462. package/dist/utils/zod-to-json-schema/parsers/union.d.cts.map +1 -0
  463. package/dist/utils/zod-to-json-schema/parsers/union.d.ts.map +1 -0
  464. package/dist/utils/zod-to-json-schema/parsers/unknown.d.cts.map +1 -0
  465. package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts.map +1 -0
  466. package/dist/vectorstores.d.cts +5 -17
  467. package/dist/vectorstores.d.cts.map +1 -0
  468. package/dist/vectorstores.d.ts +5 -17
  469. package/dist/vectorstores.d.ts.map +1 -0
  470. package/package.json +6 -5
  471. package/agents.cjs +0 -1
  472. package/agents.d.cts +0 -1
  473. package/agents.d.ts +0 -1
  474. package/agents.js +0 -1
  475. package/caches.cjs +0 -1
  476. package/caches.d.cts +0 -1
  477. package/caches.d.ts +0 -1
  478. package/caches.js +0 -1
  479. package/callbacks/base.cjs +0 -1
  480. package/callbacks/base.d.cts +0 -1
  481. package/callbacks/base.d.ts +0 -1
  482. package/callbacks/base.js +0 -1
  483. package/callbacks/dispatch/web.cjs +0 -1
  484. package/callbacks/dispatch/web.d.cts +0 -1
  485. package/callbacks/dispatch/web.d.ts +0 -1
  486. package/callbacks/dispatch/web.js +0 -1
  487. package/callbacks/dispatch.cjs +0 -1
  488. package/callbacks/dispatch.d.cts +0 -1
  489. package/callbacks/dispatch.d.ts +0 -1
  490. package/callbacks/dispatch.js +0 -1
  491. package/callbacks/manager.cjs +0 -1
  492. package/callbacks/manager.d.cts +0 -1
  493. package/callbacks/manager.d.ts +0 -1
  494. package/callbacks/manager.js +0 -1
  495. package/callbacks/promises.cjs +0 -1
  496. package/callbacks/promises.d.cts +0 -1
  497. package/callbacks/promises.d.ts +0 -1
  498. package/callbacks/promises.js +0 -1
  499. package/chat_history.cjs +0 -1
  500. package/chat_history.d.cts +0 -1
  501. package/chat_history.d.ts +0 -1
  502. package/chat_history.js +0 -1
  503. package/context.cjs +0 -1
  504. package/context.d.cts +0 -1
  505. package/context.d.ts +0 -1
  506. package/context.js +0 -1
  507. package/document_loaders/base.cjs +0 -1
  508. package/document_loaders/base.d.cts +0 -1
  509. package/document_loaders/base.d.ts +0 -1
  510. package/document_loaders/base.js +0 -1
  511. package/document_loaders/langsmith.cjs +0 -1
  512. package/document_loaders/langsmith.d.cts +0 -1
  513. package/document_loaders/langsmith.d.ts +0 -1
  514. package/document_loaders/langsmith.js +0 -1
  515. package/documents.cjs +0 -1
  516. package/documents.d.cts +0 -1
  517. package/documents.d.ts +0 -1
  518. package/documents.js +0 -1
  519. package/embeddings.cjs +0 -1
  520. package/embeddings.d.cts +0 -1
  521. package/embeddings.d.ts +0 -1
  522. package/embeddings.js +0 -1
  523. package/example_selectors.cjs +0 -1
  524. package/example_selectors.d.cts +0 -1
  525. package/example_selectors.d.ts +0 -1
  526. package/example_selectors.js +0 -1
  527. package/indexing.cjs +0 -1
  528. package/indexing.d.cts +0 -1
  529. package/indexing.d.ts +0 -1
  530. package/indexing.js +0 -1
  531. package/language_models/base.cjs +0 -1
  532. package/language_models/base.d.cts +0 -1
  533. package/language_models/base.d.ts +0 -1
  534. package/language_models/base.js +0 -1
  535. package/language_models/chat_models.cjs +0 -1
  536. package/language_models/chat_models.d.cts +0 -1
  537. package/language_models/chat_models.d.ts +0 -1
  538. package/language_models/chat_models.js +0 -1
  539. package/language_models/llms.cjs +0 -1
  540. package/language_models/llms.d.cts +0 -1
  541. package/language_models/llms.d.ts +0 -1
  542. package/language_models/llms.js +0 -1
  543. package/language_models/profile.cjs +0 -1
  544. package/language_models/profile.d.cts +0 -1
  545. package/language_models/profile.d.ts +0 -1
  546. package/language_models/profile.js +0 -1
  547. package/load/serializable.cjs +0 -1
  548. package/load/serializable.d.cts +0 -1
  549. package/load/serializable.d.ts +0 -1
  550. package/load/serializable.js +0 -1
  551. package/load.cjs +0 -1
  552. package/load.d.cts +0 -1
  553. package/load.d.ts +0 -1
  554. package/load.js +0 -1
  555. package/memory.cjs +0 -1
  556. package/memory.d.cts +0 -1
  557. package/memory.d.ts +0 -1
  558. package/memory.js +0 -1
  559. package/messages/tool.cjs +0 -1
  560. package/messages/tool.d.cts +0 -1
  561. package/messages/tool.d.ts +0 -1
  562. package/messages/tool.js +0 -1
  563. package/messages.cjs +0 -1
  564. package/messages.d.cts +0 -1
  565. package/messages.d.ts +0 -1
  566. package/messages.js +0 -1
  567. package/output_parsers/openai_functions.cjs +0 -1
  568. package/output_parsers/openai_functions.d.cts +0 -1
  569. package/output_parsers/openai_functions.d.ts +0 -1
  570. package/output_parsers/openai_functions.js +0 -1
  571. package/output_parsers/openai_tools.cjs +0 -1
  572. package/output_parsers/openai_tools.d.cts +0 -1
  573. package/output_parsers/openai_tools.d.ts +0 -1
  574. package/output_parsers/openai_tools.js +0 -1
  575. package/output_parsers.cjs +0 -1
  576. package/output_parsers.d.cts +0 -1
  577. package/output_parsers.d.ts +0 -1
  578. package/output_parsers.js +0 -1
  579. package/outputs.cjs +0 -1
  580. package/outputs.d.cts +0 -1
  581. package/outputs.d.ts +0 -1
  582. package/outputs.js +0 -1
  583. package/prompt_values.cjs +0 -1
  584. package/prompt_values.d.cts +0 -1
  585. package/prompt_values.d.ts +0 -1
  586. package/prompt_values.js +0 -1
  587. package/prompts.cjs +0 -1
  588. package/prompts.d.cts +0 -1
  589. package/prompts.d.ts +0 -1
  590. package/prompts.js +0 -1
  591. package/retrievers/document_compressors.cjs +0 -1
  592. package/retrievers/document_compressors.d.cts +0 -1
  593. package/retrievers/document_compressors.d.ts +0 -1
  594. package/retrievers/document_compressors.js +0 -1
  595. package/retrievers.cjs +0 -1
  596. package/retrievers.d.cts +0 -1
  597. package/retrievers.d.ts +0 -1
  598. package/retrievers.js +0 -1
  599. package/runnables/graph.cjs +0 -1
  600. package/runnables/graph.d.cts +0 -1
  601. package/runnables/graph.d.ts +0 -1
  602. package/runnables/graph.js +0 -1
  603. package/runnables.cjs +0 -1
  604. package/runnables.d.cts +0 -1
  605. package/runnables.d.ts +0 -1
  606. package/runnables.js +0 -1
  607. package/singletons.cjs +0 -1
  608. package/singletons.d.cts +0 -1
  609. package/singletons.d.ts +0 -1
  610. package/singletons.js +0 -1
  611. package/stores.cjs +0 -1
  612. package/stores.d.cts +0 -1
  613. package/stores.d.ts +0 -1
  614. package/stores.js +0 -1
  615. package/structured_query.cjs +0 -1
  616. package/structured_query.d.cts +0 -1
  617. package/structured_query.d.ts +0 -1
  618. package/structured_query.js +0 -1
  619. package/tools.cjs +0 -1
  620. package/tools.d.cts +0 -1
  621. package/tools.d.ts +0 -1
  622. package/tools.js +0 -1
  623. package/tracers/base.cjs +0 -1
  624. package/tracers/base.d.cts +0 -1
  625. package/tracers/base.d.ts +0 -1
  626. package/tracers/base.js +0 -1
  627. package/tracers/console.cjs +0 -1
  628. package/tracers/console.d.cts +0 -1
  629. package/tracers/console.d.ts +0 -1
  630. package/tracers/console.js +0 -1
  631. package/tracers/log_stream.cjs +0 -1
  632. package/tracers/log_stream.d.cts +0 -1
  633. package/tracers/log_stream.d.ts +0 -1
  634. package/tracers/log_stream.js +0 -1
  635. package/tracers/run_collector.cjs +0 -1
  636. package/tracers/run_collector.d.cts +0 -1
  637. package/tracers/run_collector.d.ts +0 -1
  638. package/tracers/run_collector.js +0 -1
  639. package/tracers/tracer_langchain.cjs +0 -1
  640. package/tracers/tracer_langchain.d.cts +0 -1
  641. package/tracers/tracer_langchain.d.ts +0 -1
  642. package/tracers/tracer_langchain.js +0 -1
  643. package/types/stream.cjs +0 -1
  644. package/types/stream.d.cts +0 -1
  645. package/types/stream.d.ts +0 -1
  646. package/types/stream.js +0 -1
  647. package/utils/async_caller.cjs +0 -1
  648. package/utils/async_caller.d.cts +0 -1
  649. package/utils/async_caller.d.ts +0 -1
  650. package/utils/async_caller.js +0 -1
  651. package/utils/chunk_array.cjs +0 -1
  652. package/utils/chunk_array.d.cts +0 -1
  653. package/utils/chunk_array.d.ts +0 -1
  654. package/utils/chunk_array.js +0 -1
  655. package/utils/env.cjs +0 -1
  656. package/utils/env.d.cts +0 -1
  657. package/utils/env.d.ts +0 -1
  658. package/utils/env.js +0 -1
  659. package/utils/event_source_parse.cjs +0 -1
  660. package/utils/event_source_parse.d.cts +0 -1
  661. package/utils/event_source_parse.d.ts +0 -1
  662. package/utils/event_source_parse.js +0 -1
  663. package/utils/format.cjs +0 -1
  664. package/utils/format.d.cts +0 -1
  665. package/utils/format.d.ts +0 -1
  666. package/utils/format.js +0 -1
  667. package/utils/function_calling.cjs +0 -1
  668. package/utils/function_calling.d.cts +0 -1
  669. package/utils/function_calling.d.ts +0 -1
  670. package/utils/function_calling.js +0 -1
  671. package/utils/hash.cjs +0 -1
  672. package/utils/hash.d.cts +0 -1
  673. package/utils/hash.d.ts +0 -1
  674. package/utils/hash.js +0 -1
  675. package/utils/json_patch.cjs +0 -1
  676. package/utils/json_patch.d.cts +0 -1
  677. package/utils/json_patch.d.ts +0 -1
  678. package/utils/json_patch.js +0 -1
  679. package/utils/json_schema.cjs +0 -1
  680. package/utils/json_schema.d.cts +0 -1
  681. package/utils/json_schema.d.ts +0 -1
  682. package/utils/json_schema.js +0 -1
  683. package/utils/math.cjs +0 -1
  684. package/utils/math.d.cts +0 -1
  685. package/utils/math.d.ts +0 -1
  686. package/utils/math.js +0 -1
  687. package/utils/stream.cjs +0 -1
  688. package/utils/stream.d.cts +0 -1
  689. package/utils/stream.d.ts +0 -1
  690. package/utils/stream.js +0 -1
  691. package/utils/testing.cjs +0 -1
  692. package/utils/testing.d.cts +0 -1
  693. package/utils/testing.d.ts +0 -1
  694. package/utils/testing.js +0 -1
  695. package/utils/tiktoken.cjs +0 -1
  696. package/utils/tiktoken.d.cts +0 -1
  697. package/utils/tiktoken.d.ts +0 -1
  698. package/utils/tiktoken.js +0 -1
  699. package/utils/types.cjs +0 -1
  700. package/utils/types.d.cts +0 -1
  701. package/utils/types.d.ts +0 -1
  702. package/utils/types.js +0 -1
  703. package/vectorstores.cjs +0 -1
  704. package/vectorstores.d.cts +0 -1
  705. package/vectorstores.d.ts +0 -1
  706. package/vectorstores.js +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.d.cts","names":["InputValues","Record","OutputValues","MemoryVariables","BaseMemory","Promise","getInputValue","getOutputValue","getPromptInputKey"],"sources":["../src/memory.d.ts"],"sourcesContent":["/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the input values for a Chain.\n */\nexport type InputValues = Record<string, any>;\n/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the output values from a Chain.\n */\nexport type OutputValues = Record<string, any>;\n/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the memory variables in a Chain.\n */\nexport type MemoryVariables = Record<string, any>;\n/**\n * Abstract base class for memory in LangChain's Chains. Memory refers to\n * the state in Chains. It can be used to store information about past\n * executions of a Chain and inject that information into the inputs of\n * future executions of the Chain.\n */\nexport declare abstract class BaseMemory {\n abstract get memoryKeys(): string[];\n /**\n * Abstract method that should take an object of input values and return a\n * Promise that resolves with an object of memory variables. The\n * implementation of this method should load the memory variables from the\n * provided input values.\n * @param values An object of input values.\n * @returns Promise that resolves with an object of memory variables.\n */\n abstract loadMemoryVariables(values: InputValues): Promise<MemoryVariables>;\n /**\n * Abstract method that should take two objects, one of input values and\n * one of output values, and return a Promise that resolves when the\n * context has been saved. The implementation of this method should save\n * the context based on the provided input and output values.\n * @param inputValues An object of input values.\n * @param outputValues An object of output values.\n * @returns Promise that resolves when the context has been saved.\n */\n abstract saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n}\n/**\n * This function is used by memory classes to select the input value\n * to use for the memory. If there is only one input value, it is used.\n * If there are multiple input values, the inputKey must be specified.\n */\nexport declare const getInputValue: (inputValues: InputValues, inputKey?: string | undefined) => any;\n/**\n * This function is used by memory classes to select the output value\n * to use for the memory. If there is only one output value, it is used.\n * If there are multiple output values, the outputKey must be specified.\n * If no outputKey is specified, an error is thrown.\n */\nexport declare const getOutputValue: (outputValues: OutputValues, outputKey?: string | undefined) => any;\n/**\n * Function used by memory classes to get the key of the prompt input,\n * excluding any keys that are memory variables or the \"stop\" key. If\n * there is not exactly one prompt input key, an error is thrown.\n */\nexport declare function getPromptInputKey(inputs: Record<string, unknown>, memoryVariables: string[]): string;\n//# sourceMappingURL=memory.d.ts.map"],"mappings":";;AAIA;AAKA;AAKA;AAO8BI,KAjBlBJ,WAAAA,GAAcC,MAiBc,CAAA,MAAA,EAAA,GAAA,CAAA;;;;;AAoByBC,KAhCrDA,YAAAA,GAAeD,MAgCsCC,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;;AAAsB;AAOvF;AAOA;AAMwBM,KA/CZL,eAAAA,GAAkBF,MA+CoBA,CAAAA,MAAM,EAAA,GAAA,CAAA;;;;;;;uBAxC1BG,UAAAA;;;;;;;;;;uCAUWJ,cAAcK,QAAQF;;;;;;;;;;oCAUzBH,2BAA2BE,eAAeG;;;;;;;cAO3DC,6BAA6BN;;;;;;;cAO7BO,+BAA+BL;;;;;;iBAM5BM,iBAAAA,SAA0BP"}
package/dist/memory.d.ts CHANGED
@@ -3,19 +3,16 @@
3
3
  * Type alias for a record where the keys are strings and the values can
4
4
  * be any type. This is used to represent the input values for a Chain.
5
5
  */
6
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
6
  type InputValues = Record<string, any>;
8
7
  /**
9
8
  * Type alias for a record where the keys are strings and the values can
10
9
  * be any type. This is used to represent the output values from a Chain.
11
10
  */
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
11
  type OutputValues = Record<string, any>;
14
12
  /**
15
13
  * Type alias for a record where the keys are strings and the values can
16
14
  * be any type. This is used to represent the memory variables in a Chain.
17
15
  */
18
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
16
  type MemoryVariables = Record<string, any>;
20
17
  /**
21
18
  * Abstract base class for memory in LangChain's Chains. Memory refers to
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.d.ts","names":["InputValues","Record","OutputValues","MemoryVariables","BaseMemory","Promise","getInputValue","getOutputValue","getPromptInputKey"],"sources":["../src/memory.d.ts"],"sourcesContent":["/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the input values for a Chain.\n */\nexport type InputValues = Record<string, any>;\n/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the output values from a Chain.\n */\nexport type OutputValues = Record<string, any>;\n/**\n * Type alias for a record where the keys are strings and the values can\n * be any type. This is used to represent the memory variables in a Chain.\n */\nexport type MemoryVariables = Record<string, any>;\n/**\n * Abstract base class for memory in LangChain's Chains. Memory refers to\n * the state in Chains. It can be used to store information about past\n * executions of a Chain and inject that information into the inputs of\n * future executions of the Chain.\n */\nexport declare abstract class BaseMemory {\n abstract get memoryKeys(): string[];\n /**\n * Abstract method that should take an object of input values and return a\n * Promise that resolves with an object of memory variables. The\n * implementation of this method should load the memory variables from the\n * provided input values.\n * @param values An object of input values.\n * @returns Promise that resolves with an object of memory variables.\n */\n abstract loadMemoryVariables(values: InputValues): Promise<MemoryVariables>;\n /**\n * Abstract method that should take two objects, one of input values and\n * one of output values, and return a Promise that resolves when the\n * context has been saved. The implementation of this method should save\n * the context based on the provided input and output values.\n * @param inputValues An object of input values.\n * @param outputValues An object of output values.\n * @returns Promise that resolves when the context has been saved.\n */\n abstract saveContext(inputValues: InputValues, outputValues: OutputValues): Promise<void>;\n}\n/**\n * This function is used by memory classes to select the input value\n * to use for the memory. If there is only one input value, it is used.\n * If there are multiple input values, the inputKey must be specified.\n */\nexport declare const getInputValue: (inputValues: InputValues, inputKey?: string | undefined) => any;\n/**\n * This function is used by memory classes to select the output value\n * to use for the memory. If there is only one output value, it is used.\n * If there are multiple output values, the outputKey must be specified.\n * If no outputKey is specified, an error is thrown.\n */\nexport declare const getOutputValue: (outputValues: OutputValues, outputKey?: string | undefined) => any;\n/**\n * Function used by memory classes to get the key of the prompt input,\n * excluding any keys that are memory variables or the \"stop\" key. If\n * there is not exactly one prompt input key, an error is thrown.\n */\nexport declare function getPromptInputKey(inputs: Record<string, unknown>, memoryVariables: string[]): string;\n//# sourceMappingURL=memory.d.ts.map"],"mappings":";;AAIA;AAKA;AAKA;AAO8BI,KAjBlBJ,WAAAA,GAAcC,MAiBc,CAAA,MAAA,EAAA,GAAA,CAAA;;;;;AAoByBC,KAhCrDA,YAAAA,GAAeD,MAgCsCC,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;;AAAsB;AAOvF;AAOA;AAMwBM,KA/CZL,eAAAA,GAAkBF,MA+CoBA,CAAAA,MAAM,EAAA,GAAA,CAAA;;;;;;;uBAxC1BG,UAAAA;;;;;;;;;;uCAUWJ,cAAcK,QAAQF;;;;;;;;;;oCAUzBH,2BAA2BE,eAAeG;;;;;;;cAO3DC,6BAA6BN;;;;;;;cAO7BO,+BAA+BL;;;;;;iBAM5BM,iBAAAA,SAA0BP"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai.d.cts","names":["BaseMessage","BaseMessageChunk","BaseMessageFields","ContentBlock","$InferMessageContent","$InferMessageProperty","MessageStructure","InvalidToolCall","ToolCall","ToolCallChunk","AIMessageFields","TStructure","AIMessage","Record","Standard","Array","isAIMessage","isAIMessageChunk","AIMessageChunk","AIMessageChunkFields"],"sources":["../../src/messages/ai.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageChunk, BaseMessageFields } from \"./base.js\";\nimport { ContentBlock } from \"./content/index.js\";\nimport { $InferMessageContent, $InferMessageProperty, MessageStructure } from \"./message.js\";\nimport { InvalidToolCall, ToolCall, ToolCallChunk } from \"./tool.js\";\nexport interface AIMessageFields<TStructure extends MessageStructure = MessageStructure> extends BaseMessageFields<TStructure, \"ai\"> {\n tool_calls?: ToolCall[];\n invalid_tool_calls?: InvalidToolCall[];\n usage_metadata?: $InferMessageProperty<TStructure, \"ai\", \"usage_metadata\">;\n}\nexport declare class AIMessage<TStructure extends MessageStructure = MessageStructure> extends BaseMessage<TStructure, \"ai\"> implements AIMessageFields<TStructure> {\n readonly type: \"ai\";\n tool_calls?: ToolCall[];\n invalid_tool_calls?: InvalidToolCall[];\n usage_metadata?: AIMessageFields<TStructure>[\"usage_metadata\"];\n get lc_aliases(): Record<string, string>;\n constructor(fields: $InferMessageContent<TStructure, \"ai\"> | AIMessageFields<TStructure>);\n static lc_name(): string;\n get contentBlocks(): Array<ContentBlock.Standard>;\n get _printableFields(): Record<string, unknown>;\n static isInstance(obj: unknown): obj is AIMessage;\n}\n/**\n * @deprecated Use {@link AIMessage.isInstance} instead\n */\nexport declare function isAIMessage<TStructure extends MessageStructure>(x: BaseMessage): x is AIMessage<TStructure>;\n/**\n * @deprecated Use {@link AIMessageChunk.isInstance} instead\n */\nexport declare function isAIMessageChunk<TStructure extends MessageStructure>(x: BaseMessageChunk): x is AIMessageChunk<TStructure>;\nexport type AIMessageChunkFields<TStructure extends MessageStructure = MessageStructure> = AIMessageFields<TStructure> & {\n tool_call_chunks?: ToolCallChunk[];\n};\n/**\n * Represents a chunk of an AI message, which can be concatenated with\n * other AI message chunks.\n */\nexport declare class AIMessageChunk<TStructure extends MessageStructure = MessageStructure> extends BaseMessageChunk<TStructure, \"ai\"> implements AIMessage<TStructure>, AIMessageChunkFields<TStructure> {\n readonly type: \"ai\";\n tool_calls?: ToolCall[];\n invalid_tool_calls?: InvalidToolCall[];\n tool_call_chunks?: ToolCallChunk[];\n usage_metadata?: AIMessageChunkFields<TStructure>[\"usage_metadata\"];\n constructor(fields: $InferMessageContent<TStructure, \"ai\"> | AIMessageChunkFields<TStructure>);\n get lc_aliases(): Record<string, string>;\n static lc_name(): string;\n get contentBlocks(): Array<ContentBlock.Standard>;\n get _printableFields(): Record<string, unknown>;\n concat(chunk: AIMessageChunk<TStructure>): this;\n static isInstance(obj: unknown): obj is AIMessageChunk;\n}\n//# sourceMappingURL=ai.d.ts.map"],"mappings":";;;;;;UAIiBU,mCAAmCJ,mBAAmBA,0BAA0BJ,kBAAkBS;eAClGH;EADAE,kBAAe,CAAA,EAEPH,eAFOI,EAAAA;EAAoBL,cAAAA,CAAAA,EAG/BD,qBAH+BC,CAGTK,UAHSL,EAAAA,IAAAA,EAAAA,gBAAAA,CAAAA;;AAA+DK,cAK9FC,SAL8FD,CAAAA,mBAKjEL,gBALiEK,GAK9CL,gBAL8CK,CAAAA,SAKpBX,WALoBW,CAKRA,UALQA,EAAAA,IAAAA,CAAAA,YAKqBD,eALrBC,CAKqCA,UALrCA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ageProperty","MessageStructure","InvalidToolCall","ToolCall","ToolCallChunk","AIMessageFields","TStructure","AIMessage","Record","Standard","Array","isAIMessage","isAIMessageChunk","AIMessageChunk","AIMessageChunkFields"],"sources":["../../src/messages/ai.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageChunk, BaseMessageFields } from \"./base.js\";\nimport { ContentBlock } from \"./content/index.js\";\nimport { $InferMessageContent, $InferMessageProperty, MessageStructure } from \"./message.js\";\nimport { InvalidToolCall, ToolCall, ToolCallChunk } from \"./tool.js\";\nexport interface AIMessageFields<TStructure extends MessageStructure = MessageStructure> extends BaseMessageFields<TStructure, \"ai\"> {\n tool_calls?: ToolCall[];\n invalid_tool_calls?: InvalidToolCall[];\n usage_metadata?: $InferMessageProperty<TStructure, \"ai\", \"usage_metadata\">;\n}\nexport declare class AIMessage<TStructure extends MessageStructure = MessageStructure> extends BaseMessage<TStructure, \"ai\"> implements AIMessageFields<TStructure> {\n readonly type: \"ai\";\n tool_calls?: ToolCall[];\n invalid_tool_calls?: InvalidToolCall[];\n usage_metadata?: AIMessageFields<TStructure>[\"usage_metadata\"];\n get lc_aliases(): Record<string, string>;\n constructor(fields: $InferMessageContent<TStructure, \"ai\"> | AIMessageFields<TStructure>);\n static lc_name(): string;\n get contentBlocks(): Array<ContentBlock.Standard>;\n get _printableFields(): Record<string, unknown>;\n static isInstance(obj: unknown): obj is AIMessage;\n}\n/**\n * @deprecated Use {@link AIMessage.isInstance} instead\n */\nexport declare function isAIMessage<TStructure extends MessageStructure>(x: BaseMessage): x is AIMessage<TStructure>;\n/**\n * @deprecated Use {@link AIMessageChunk.isInstance} instead\n */\nexport declare function isAIMessageChunk<TStructure extends MessageStructure>(x: BaseMessageChunk): x is AIMessageChunk<TStructure>;\nexport type AIMessageChunkFields<TStructure extends MessageStructure = MessageStructure> = AIMessageFields<TStructure> & {\n tool_call_chunks?: ToolCallChunk[];\n};\n/**\n * Represents a chunk of an AI message, which can be concatenated with\n * other AI message chunks.\n */\nexport declare class AIMessageChunk<TStructure extends MessageStructure = MessageStructure> extends BaseMessageChunk<TStructure, \"ai\"> implements AIMessage<TStructure>, AIMessageChunkFields<TStructure> {\n readonly type: \"ai\";\n tool_calls?: ToolCall[];\n invalid_tool_calls?: InvalidToolCall[];\n tool_call_chunks?: ToolCallChunk[];\n usage_metadata?: AIMessageChunkFields<TStructure>[\"usage_metadata\"];\n constructor(fields: $InferMessageContent<TStructure, \"ai\"> | AIMessageChunkFields<TStructure>);\n get lc_aliases(): Record<string, string>;\n static lc_name(): string;\n get contentBlocks(): Array<ContentBlock.Standard>;\n get _printableFields(): Record<string, unknown>;\n concat(chunk: AIMessageChunk<TStructure>): this;\n static isInstance(obj: unknown): obj is AIMessageChunk;\n}\n//# sourceMappingURL=ai.d.ts.map"],"mappings":";;;;;;UAIiBU,mCAAmCJ,mBAAmBA,0BAA0BJ,kBAAkBS;eAClGH;EADAE,kBAAe,CAAA,EAEPH,eAFOI,EAAAA;EAAoBL,cAAAA,CAAAA,EAG/BD,qBAH+BC,CAGTK,UAHSL,EAAAA,IAAAA,EAAAA,gBAAAA,CAAAA;;AAA+DK,cAK9FC,SAL8FD,CAAAA,mBAKjEL,gBALiEK,GAK9CL,gBAL8CK,CAAAA,SAKpBX,WALoBW,CAKRA,UALQA,EAAAA,IAAAA,CAAAA,YAKqBD,eALrBC,CAKqCA,UALrCA,CAAAA,CAAAA;EAClGH,SAAAA,IAAAA,EAAAA,IAAAA;EACQD,UAAAA,CAAAA,EAKRC,QALQD,EAAAA;EACkBI,kBAAAA,CAAAA,EAKlBJ,eALkBI,EAAAA;EAAtBN,cAAAA,CAAAA,EAMAK,eANAL,CAMgBM,UANhBN,CAAAA,CAAAA,gBAAAA,CAAAA;EAH4EH,IAAAA,UAAAA,CAAAA,CAAAA,EAU3EW,MAV2EX,CAAAA,MAAAA,EAAAA,MAAAA,CAAAA;EAAiB,WAAA,CAAA,MAAA,EAW1FE,oBAX0F,CAWrEO,UAXqE,EAAA,IAAA,CAAA,G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FE,EAAAA;EAAVC,cAAAA,CAAAA,EAiB1EO,oBAjB0EP,CAiBrDD,UAjBqDC,CAAAA,CAAAA,gBAAAA,CAAAA;EAAS,WAAA,CAAA,MAAA,EAkBhFR,oBAlBgF,CAkB3DO,UAlB2D,EAAA,IAAA,CAAA,GAkBvCQ,oBAlBuC,CAkBlBR,UAlBkB,CAAA;EAIhFM,IAAAA,UAAAA,CAAAA,CAAAA,EAeFJ,MAfkB,CAAAF,MAAAA,EAAAA,MAAAA,CAAAA;EAAoBL,OAAAA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAqBL,IAAAA,aAAAA,CAAAA,CAAAA,EAiBxDc,KAjBwDd,CAiBlDE,YAAAA,CAAaW,QAjBqCb,CAAAA;EAAuCU,IAAAA,gBAAAA,CAAAA,CAAAA,EAkB5FE,MAlB4FF,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;EAAfO,MAAAA,CAAAA,KAAAA,EAmBvFA,cAnBuFA,CAmBxEP,UAnBwEO,CAAAA,CAAAA,EAAAA,IAAAA;EAAc,OAAA,UAAA,CAAA,GAAA,EAAA,OAAA,CAAA,EAAA,GAAA,IAoB3EA,cApB2E;AACvH"}
@@ -11,10 +11,8 @@ interface StoredMessageData {
11
11
  role: string | undefined;
12
12
  name: string | undefined;
13
13
  tool_call_id: string | undefined;
14
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
14
  additional_kwargs?: Record<string, any>;
16
15
  /** Response metadata. For example: response headers, logprobs, token counts, model name. */
17
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
16
  response_metadata?: Record<string, any>;
19
17
  id?: string;
20
18
  }
@@ -113,11 +111,8 @@ declare abstract class BaseMessage<TStructure extends MessageStructure = Message
113
111
  get contentBlocks(): Array<ContentBlock.Standard>;
114
112
  toDict(): StoredMessage;
115
113
  static lc_name(): string;
116
- // Can't be protected for silly reasons
117
114
  get _printableFields(): Record<string, unknown>;
118
115
  static isInstance(obj: unknown): obj is BaseMessage;
119
- // this private method is used to update the ID for the runtime
120
- // value as well as in lc_kwargs for serialisation
121
116
  _updateId(value: string | undefined): void;
122
117
  get [Symbol.toStringTag](): any;
123
118
  toFormattedString(format?: MessageStringFormat): string;
@@ -141,15 +136,8 @@ type OpenAIToolCall = {
141
136
  index?: number;
142
137
  };
143
138
  declare function isOpenAIToolCallArray(value?: unknown): value is OpenAIToolCall[];
144
- declare function _mergeDicts(
145
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
146
- left?: Record<string, any>,
147
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
148
- right?: Record<string, any>
149
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
150
- ): Record<string, any>;
139
+ declare function _mergeDicts(left?: Record<string, any>, right?: Record<string, any>): Record<string, any>;
151
140
  declare function _mergeLists<Content extends ContentBlock>(left?: Content[], right?: Content[]): Content[] | undefined;
152
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
153
141
  declare function _mergeObj<T = any>(left: T | undefined, right: T | undefined): T;
154
142
  /**
155
143
  * Represents a chunk of a message, which can be concatenated with other
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.cts","names":["Serializable","SerializedConstructor","ContentBlock","$InferMessageContent","$InferResponseMetadata","MessageStructure","MessageType","Message","MessageStringFormat","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":["../../src/messages/base.d.ts"],"sourcesContent":["import { Serializable, SerializedConstructor } from \"../load/serializable.js\";\nimport { ContentBlock } from \"./content/index.js\";\nimport { $InferMessageContent, $InferResponseMetadata, MessageStructure, MessageType, Message } from \"./message.js\";\nimport { type MessageStringFormat } from \"./format.js\";\n/** @internal */\ndeclare const MESSAGE_SYMBOL: unique symbol;\nexport interface StoredMessageData {\n content: string;\n role: string | undefined;\n name: string | undefined;\n tool_call_id: string | undefined;\n additional_kwargs?: Record<string, any>;\n /** Response metadata. For example: response headers, logprobs, token counts, model name. */\n response_metadata?: Record<string, any>;\n id?: string;\n}\nexport interface StoredMessage {\n type: string;\n data: StoredMessageData;\n}\nexport interface StoredGeneration {\n text: string;\n message?: StoredMessage;\n}\nexport interface StoredMessageV1 {\n type: string;\n role: string | undefined;\n text: string;\n}\nexport type MessageContent = string | Array<ContentBlock>;\nexport interface 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}\nexport type 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};\nexport declare 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 */\nexport declare 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 */\nexport declare 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 get _printableFields(): Record<string, unknown>;\n static isInstance(obj: unknown): obj is BaseMessage;\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 */\nexport type 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};\nexport declare function isOpenAIToolCallArray(value?: unknown): value is OpenAIToolCall[];\nexport declare function _mergeDicts(left?: Record<string, any>, right?: Record<string, any>): Record<string, any>;\nexport declare function _mergeLists<Content extends ContentBlock>(left?: Content[], right?: Content[]): Content[] | undefined;\nexport declare 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 */\nexport declare 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}\nexport type MessageFieldWithRole = {\n role: MessageType;\n content: MessageContent;\n name?: string;\n} & Record<string, unknown>;\nexport declare function _isMessageFieldWithRole(x: BaseMessageLike): x is MessageFieldWithRole;\nexport type BaseMessageLike = BaseMessage | MessageFieldWithRole | [MessageType, MessageContent] | string\n/**\n * @deprecated Specifying \"type\" is deprecated and will be removed in 0.4.0.\n */\n | ({\n type: MessageType | \"user\" | \"assistant\" | \"placeholder\";\n} & BaseMessageFields & Record<string, unknown>) | SerializedConstructor;\n/**\n * @deprecated Use {@link BaseMessage.isInstance} instead\n */\nexport declare function isBaseMessage(messageLike?: unknown): messageLike is BaseMessage;\n/**\n * @deprecated Use {@link BaseMessageChunk.isInstance} instead\n */\nexport declare function isBaseMessageChunk(messageLike?: unknown): messageLike is BaseMessageChunk;\nexport {};\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;;cAKcS;AAAAA,UACGC,iBAAAA,CAD0B;EAC1BA,OAAAA,EAAAA,MAAAA;EAUAE,IAAAA,EAAAA,MAAAA,GAAAA,SAAa;EAIbC,IAAAA,EAAAA,MAAAA,GAAAA,SAAgB;EAIhBC,YAAAA,EAAAA,MAAe,GAAA,SAAA;EAKpBC,iBAAc,CAAA,EAlBFJ,MAkBE,CAAA,MAAkBT,EAAAA,GAAAA,CAAAA;EAC3Be;EAaLC,iBAAAA,C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9B,qBAAqB+B,mBAAmBA,YAAYA;iBAChFC,yBAAyBC,sBAAsBA,gBAAgBA;;;;;;;;uBAQzDC,oCAAoC/B,mBAAmBA,gCAAgCC,cAAcA,qBAAqBoB,YAAYP,YAAYC;yBACrJgB,mBAAmBA,iBAAiBjB,YAAYC;0CAC/BgB;;KAEhCC,oBAAAA;QACF/B;WACGS;;IAETJ;iBACoB2B,uBAAAA,IAA2BC,uBAAuBF;KAC9DE,eAAAA,GAAkBb,cAAcW,wBAAwB/B,aAAaS;;;;QAKvET;IACNY,oBAAoBP,2BAA2BV;;;;iBAI3BuC,aAAAA,wCAAqDd;;;;iBAIrDe,kBAAAA,wCAA0DL"}
@@ -11,10 +11,8 @@ interface StoredMessageData {
11
11
  role: string | undefined;
12
12
  name: string | undefined;
13
13
  tool_call_id: string | undefined;
14
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
14
  additional_kwargs?: Record<string, any>;
16
15
  /** Response metadata. For example: response headers, logprobs, token counts, model name. */
17
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
16
  response_metadata?: Record<string, any>;
19
17
  id?: string;
20
18
  }
@@ -113,11 +111,8 @@ declare abstract class BaseMessage<TStructure extends MessageStructure = Message
113
111
  get contentBlocks(): Array<ContentBlock.Standard>;
114
112
  toDict(): StoredMessage;
115
113
  static lc_name(): string;
116
- // Can't be protected for silly reasons
117
114
  get _printableFields(): Record<string, unknown>;
118
115
  static isInstance(obj: unknown): obj is BaseMessage;
119
- // this private method is used to update the ID for the runtime
120
- // value as well as in lc_kwargs for serialisation
121
116
  _updateId(value: string | undefined): void;
122
117
  get [Symbol.toStringTag](): any;
123
118
  toFormattedString(format?: MessageStringFormat): string;
@@ -141,15 +136,8 @@ type OpenAIToolCall = {
141
136
  index?: number;
142
137
  };
143
138
  declare function isOpenAIToolCallArray(value?: unknown): value is OpenAIToolCall[];
144
- declare function _mergeDicts(
145
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
146
- left?: Record<string, any>,
147
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
148
- right?: Record<string, any>
149
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
150
- ): Record<string, any>;
139
+ declare function _mergeDicts(left?: Record<string, any>, right?: Record<string, any>): Record<string, any>;
151
140
  declare function _mergeLists<Content extends ContentBlock>(left?: Content[], right?: Content[]): Content[] | undefined;
152
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
153
141
  declare function _mergeObj<T = any>(left: T | undefined, right: T | undefined): T;
154
142
  /**
155
143
  * Represents a chunk of a message, which can be concatenated with other
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","names":["Serializable","SerializedConstructor","ContentBlock","$InferMessageContent","$InferResponseMetadata","MessageStructure","MessageType","Message","MessageStringFormat","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":["../../src/messages/base.d.ts"],"sourcesContent":["import { Serializable, SerializedConstructor } from \"../load/serializable.js\";\nimport { ContentBlock } from \"./content/index.js\";\nimport { $InferMessageContent, $InferResponseMetadata, MessageStructure, MessageType, Message } from \"./message.js\";\nimport { type MessageStringFormat } from \"./format.js\";\n/** @internal */\ndeclare const MESSAGE_SYMBOL: unique symbol;\nexport interface StoredMessageData {\n content: string;\n role: string | undefined;\n name: string | undefined;\n tool_call_id: string | undefined;\n additional_kwargs?: Record<string, any>;\n /** Response metadata. For example: response headers, logprobs, token counts, model name. */\n response_metadata?: Record<string, any>;\n id?: string;\n}\nexport interface StoredMessage {\n type: string;\n data: StoredMessageData;\n}\nexport interface StoredGeneration {\n text: string;\n message?: StoredMessage;\n}\nexport interface StoredMessageV1 {\n type: string;\n role: string | undefined;\n text: string;\n}\nexport type MessageContent = string | Array<ContentBlock>;\nexport interface 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}\nexport type 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};\nexport declare 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 */\nexport declare 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 */\nexport declare 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 get _printableFields(): Record<string, unknown>;\n static isInstance(obj: unknown): obj is BaseMessage;\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 */\nexport type 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};\nexport declare function isOpenAIToolCallArray(value?: unknown): value is OpenAIToolCall[];\nexport declare function _mergeDicts(left?: Record<string, any>, right?: Record<string, any>): Record<string, any>;\nexport declare function _mergeLists<Content extends ContentBlock>(left?: Content[], right?: Content[]): Content[] | undefined;\nexport declare 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 */\nexport declare 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}\nexport type MessageFieldWithRole = {\n role: MessageType;\n content: MessageContent;\n name?: string;\n} & Record<string, unknown>;\nexport declare function _isMessageFieldWithRole(x: BaseMessageLike): x is MessageFieldWithRole;\nexport type BaseMessageLike = BaseMessage | MessageFieldWithRole | [MessageType, MessageContent] | string\n/**\n * @deprecated Specifying \"type\" is deprecated and will be removed in 0.4.0.\n */\n | ({\n type: MessageType | \"user\" | \"assistant\" | \"placeholder\";\n} & BaseMessageFields & Record<string, unknown>) | SerializedConstructor;\n/**\n * @deprecated Use {@link BaseMessage.isInstance} instead\n */\nexport declare function isBaseMessage(messageLike?: unknown): messageLike is BaseMessage;\n/**\n * @deprecated Use {@link BaseMessageChunk.isInstance} instead\n */\nexport declare function isBaseMessageChunk(messageLike?: unknown): messageLike is BaseMessageChunk;\nexport {};\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;;cAKcS;AAAAA,UACGC,iBAAAA,CAD0B;EAC1BA,OAAAA,EAAAA,MAAAA;EAUAE,IAAAA,EAAAA,MAAAA,GAAAA,SAAa;EAIbC,IAAAA,EAAAA,MAAAA,GAAAA,SAAgB;EAIhBC,YAAAA,EAAAA,MAAe,GAAA,SAAA;EAKpBC,iBAAc,CAAA,EAlBFJ,MAkBE,CAAA,MAAkBT,EAAAA,GAAAA,CAAAA;EAC3Be;EAaLC,iBAAAA,CAAAA,EA9BYP,MA8BK,CAAAQ,MAAAA,EAAAA,GAAAA,CAAAC;EAAoBf,EAAAA,CAAAA,EAAAA,MAAAA;;AAAmDC,UA3BnFM,aAAAA,CA2BmFN;EAAcA,IAAAA,EAAAA,MAAAA;EAG/Ea,IAAAA,EA5BzBT,iBA4ByBS;;AAArBhB,UA1BGU,gBAAAA,CA0BHV;EACYD,IAAAA,EAAAA,MAAamB;EAAnBL,OAAAA,CAAAA,EAzBNJ,aAyBMI;;AAUCM,UAjCJ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AAaS;;;;QAKvET;IACNY,oBAAoBP,2BAA2BV;;;;iBAI3BuC,aAAAA,wCAAqDd;;;;iBAIrDe,kBAAAA,wCAA0DL"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.d.cts","names":["BaseMessage","BaseMessageChunk","BaseMessageFields","$InferMessageContent","MessageStructure","ChatMessageFields","TStructure","ChatMessage","Record","ChatMessageChunk","isChatMessage","isChatMessageChunk"],"sources":["../../src/messages/chat.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageChunk, type BaseMessageFields } from \"./base.js\";\nimport { $InferMessageContent, MessageStructure } from \"./message.js\";\nexport interface ChatMessageFields<TStructure extends MessageStructure = MessageStructure> extends BaseMessageFields<TStructure, \"generic\"> {\n role: string;\n}\n/**\n * Represents a chat message in a conversation.\n */\nexport declare class ChatMessage<TStructure extends MessageStructure = MessageStructure> extends BaseMessage<TStructure, \"generic\"> implements ChatMessageFields<TStructure> {\n static lc_name(): string;\n readonly type: \"generic\";\n role: string;\n static _chatMessageClass(): typeof ChatMessage;\n constructor(content: $InferMessageContent<TStructure, \"generic\">, role: string);\n constructor(fields: ChatMessageFields<TStructure>);\n static isInstance(obj: unknown): obj is ChatMessage;\n get _printableFields(): Record<string, unknown>;\n}\n/**\n * Represents a chunk of a chat message, which can be concatenated with\n * other chat message chunks.\n */\nexport declare class ChatMessageChunk<TStructure extends MessageStructure = MessageStructure> extends BaseMessageChunk<TStructure, \"generic\"> {\n static lc_name(): string;\n readonly type: \"generic\";\n role: string;\n constructor(content: $InferMessageContent<TStructure, \"generic\">, role: string);\n constructor(fields: ChatMessageFields<TStructure>);\n concat(chunk: ChatMessageChunk<TStructure>): this;\n static isInstance(obj: unknown): obj is ChatMessageChunk;\n get _printableFields(): Record<string, unknown>;\n}\n/**\n * @deprecated Use {@link ChatMessage.isInstance} instead\n */\nexport declare function isChatMessage(x: BaseMessage): x is ChatMessage;\n/**\n * @deprecated Use {@link ChatMessageChunk.isInstance} instead\n */\nexport declare function isChatM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AAAA,MAAAA,EAKpDC,iBALoDD,CAKlCE,UALkCF,CAAAA;EAA2CE,MAAAA,CAAAA,KAAAA,EAMrGG,gBANqGH,CAMpFA,UANoFA,CAAAA,CAAAA,EAAAA,IAAAA;EAIzEA,OAAAA,UAAAA,CAAAA,GAAAA,EAAAA,OAAAA,CAAAA,EAAAA,GAAAA,IAGFG,gBAHEH;EAArBH,IAAAA,gBAAAA,CAAAA,CAAAA,EAIGK,MAJHL,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;;;;;AAGmBM,iBAMpBC,aAAAA,CANoBD,CAAAA,EAMHT,WANGS,CAAAA,EAAAA,CAAAA,IAMgBF,WANhBE;;;AAP0E;AAa9FC,iBAIAC,kBAAAA,CAJiBX,CAAAA,EAIKC,gBAJyB,CAAA,EAAA,CAAA,IAIDQ,gBAJC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.d.ts","names":["BaseMessage","BaseMessageChunk","BaseMessageFields","$InferMessageContent","MessageStructure","ChatMessageFields","TStructure","ChatMessage","Record","ChatMessageChunk","isChatMessage","isChatMessageChunk"],"sources":["../../src/messages/chat.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageChunk, type BaseMessageFields } from \"./base.js\";\nimport { $InferMessageContent, MessageStructure } from \"./message.js\";\nexport interface ChatMessageFields<TStructure extends MessageStructure = MessageStructure> extends BaseMessageFields<TStructure, \"generic\"> {\n role: string;\n}\n/**\n * Represents a chat message in a conversation.\n */\nexport declare class ChatMessage<TStructure extends MessageStructure = MessageStructure> extends BaseMessage<TStructure, \"generic\"> implements ChatMessageFields<TStructure> {\n static lc_name(): string;\n readonly type: \"generic\";\n role: string;\n static _chatMessageClass(): typeof ChatMessage;\n constructor(content: $InferMessageContent<TStructure, \"generic\">, role: string);\n constructor(fields: ChatMessageFields<TStructure>);\n static isInstance(obj: unknown): obj is ChatMessage;\n get _printableFields(): Record<string, unknown>;\n}\n/**\n * Represents a chunk of a chat message, which can be concatenated with\n * other chat message chunks.\n */\nexport declare class ChatMessageChunk<TStructure extends MessageStructure = MessageStructure> extends BaseMessageChunk<TStructure, \"generic\"> {\n static lc_name(): string;\n readonly type: \"generic\";\n role: string;\n constructor(content: $InferMessageContent<TStructure, \"generic\">, role: string);\n constructor(fields: ChatMessageFields<TStructure>);\n concat(chunk: ChatMessageChunk<TStructure>): this;\n static isInstance(obj: unknown): obj is ChatMessageChunk;\n get _printableFields(): Record<string, unknown>;\n}\n/**\n * @deprecated Use {@link ChatMessage.isInstance} instead\n */\nexport declare function isChatMessage(x: BaseMessage): x is ChatMessage;\n/**\n * @deprecated Use {@link ChatMessageChunk.isInstance} instead\n */\nexport declare function isChatMessageChunk(x: BaseMessageChunk): x is ChatMessageChunk;\n//# sourceMappingURL=chat.d.ts.map"],"mappings":";;;;UAEiBK,qCAAqCD,mBAAmBA,0BAA0BF,kBAAkBI;;AAArH;;;;AAAmGJ,cAM9EK,WAN8EL,CAAAA,mBAM/CE,gBAN+CF,GAM5BE,gBAN4BF,CAAAA,SAMFF,WANEE,CAMUI,UANVJ,EAAAA,SAAAA,CAAAA,YAM4CG,iBAN5CH,CAM8DI,UAN9DJ,CAAAA,CAAAA;EAAiB,OAAA,OAAA,CAAA,CAAA,EAAA,MAAA;EAM/FK,SAAAA,IAAAA,EAAW,SAAAD;EAAoBF,IAAAA,EAAAA,MAAAA;EAAmBA,OAAAA,iBAAAA,CAAAA,CAAAA,EAAAA,OAIhCG,WAJgCH;EAAsCE,WAAAA,CAAAA,OAAAA,EAKpFH,oBALoFG,CAK/DA,UAL+DA,EAAAA,SAAAA,CAAAA,EAAAA,IAAAA,EAAAA,MAAAA;EAAoDA,WAAAA,CAAAA,MAAAA,EAMzID,iBANyIC,CAMvHA,UANuHA,CAAAA;EAI1HC,OAAAA,UAAAA,CAAAA,GAAAA,EAAAA,OAAAA,CAAAA,EAAAA,GAAAA,IAGKA,WAHLA;EACOD,IAAAA,gBAAAA,CAAAA,CAAAA,EAGlBE,MAHkBF,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;;;;;;AALmDN,cAc5ES,gBAd4ET,CAAAA,mBAcxCI,gBAdwCJ,GAcrBI,gBAdqBJ,CAAAA,SAcKC,gBAdLD,CAcsBM,UAdtBN,EAAAA,SAAAA,CAAAA,CAAAA;EAA8CK,OAAAA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAiB,SAAA,IAAA,EAAA,SAAA;EAc3II,IAAAA,EAAAA,MAAAA;EAAoCL,WAAAA,CAAAA,OAAAA,EAIhCD,oBAJgCC,CAIXE,UAJWF,EAAAA,SAAAA,CAAAA,EAAAA,IAAAA,EAAAA,MAAAA;EAAmBA,WAAAA,CAAAA,MAAAA,EAKpDC,iBALoDD,CAKlCE,UALkCF,CAAAA;EAA2CE,MAAAA,CAAAA,KAAAA,EAMrGG,gBANqGH,CAMpFA,UANoFA,CAAAA,CAAAA,EAAAA,IAAAA;EAIzEA,OAAAA,UAAAA,CAAAA,GAAAA,EAAAA,OAAAA,CAAAA,EAAAA,GAAAA,IAGFG,gBAHEH;EAArBH,IAAAA,gBAAAA,CAAAA,CAAAA,EAIGK,MAJHL,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;;;;;AAGmBM,iBAMpBC,aAAAA,CANoBD,CAAAA,EAMHT,WANGS,CAAAA,EAAAA,CAAAA,IAMgBF,WANhBE;;;AAP0E;AAa9FC,iBAIAC,kBAAAA,CAJiBX,CAAAA,EAIKC,gBAJyB,CAAA,EAAA,CAAA,IAIDQ,gBAJC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.cts","names":["BaseContentBlock"],"sources":["../../../src/messages/content/base.d.ts"],"sourcesContent":["export interface 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//# sourceMappingURL=base.d.ts.map"],"mappings":";UAAiBA,gBAAAA;EAAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","names":["BaseContentBlock"],"sources":["../../../src/messages/content/base.d.ts"],"sourcesContent":["export interface 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//# sourceMappingURL=base.d.ts.map"],"mappings":";UAAiBA,gBAAAA;EAAAA"}
@@ -30,17 +30,12 @@ type MessageContentImageUrl = {
30
30
  * @deprecated
31
31
  * Use {@link ContentBlock} instead.
32
32
  */
33
- type MessageContentComplex = MessageContentText | MessageContentImageUrl
34
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
- | (Record<string, any> & {
33
+ type MessageContentComplex = MessageContentText | MessageContentImageUrl | (Record<string, any> & {
36
34
  type?: "text" | "image_url" | string;
37
- })
38
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
39
- | (Record<string, any> & {
35
+ }) | (Record<string, any> & {
40
36
  type?: never;
41
37
  });
42
38
  type Data = never;
43
- // eslint-disable-next-line @typescript-eslint/no-namespace
44
39
  declare namespace Data {
45
40
  /**
46
41
  * @deprecated
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.d.cts","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","Formats","Partial","StandardImageBlock","StandardAudioBlock","StandardFileBlock","StandardTextBlock","convertToProviderContentBlock"],"sources":["../../../src/messages/content/data.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\n/**\n * @deprecated\n * Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\nexport type ImageDetail = \"auto\" | \"low\" | \"high\";\n/**\n * @deprecated\n * Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\nexport type 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 */\nexport type 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 */\nexport type MessageContentComplex = MessageContentText | MessageContentImageUrl | (Record<string, any> & {\n type?: \"text\" | \"image_url\" | string;\n}) | (Record<string, any> & {\n type?: never;\n});\nexport type Data = never;\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare function parseBase64DataUrl({ dataUrl, asTypedArray }: {\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 */\nexport declare function parseBase64DataUrl({ dataUrl, asTypedArray }: {\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 */\nexport type 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 */\nexport interface 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 */\nexport declare function convertToProviderContentBlock<Formats extends Partial<ProviderFormatTypes>>(block: Data.DataContentBlock, converter: StandardContentBlockConverter<Formats>): Formats[keyof Formats];\n//# sourceMappingURL=data.d.ts.map"],"mappings":";;;;;;AAKA;AAKA;AAQYG,KAbAF,WAAAA,GAaAE,MAAsB,GAA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J;;;;;;gCAMzBzB,IAAAA,CAAK8B,oBAAoBL;;;;;;;;;;;;;;iBAcnCM,8CAA8CL,QAAQR,6BAA6BlB,IAAAA,CAAKM,6BAA6BkB,8BAA8BC,WAAWA,cAAcA"}
@@ -30,17 +30,12 @@ type MessageContentImageUrl = {
30
30
  * @deprecated
31
31
  * Use {@link ContentBlock} instead.
32
32
  */
33
- type MessageContentComplex = MessageContentText | MessageContentImageUrl
34
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
- | (Record<string, any> & {
33
+ type MessageContentComplex = MessageContentText | MessageContentImageUrl | (Record<string, any> & {
36
34
  type?: "text" | "image_url" | string;
37
- })
38
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
39
- | (Record<string, any> & {
35
+ }) | (Record<string, any> & {
40
36
  type?: never;
41
37
  });
42
38
  type Data = never;
43
- // eslint-disable-next-line @typescript-eslint/no-namespace
44
39
  declare namespace Data {
45
40
  /**
46
41
  * @deprecated
@@ -0,0 +1 @@
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","Formats","Partial","StandardImageBlock","StandardAudioBlock","StandardFileBlock","StandardTextBlock","convertToProviderContentBlock"],"sources":["../../../src/messages/content/data.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\n/**\n * @deprecated\n * Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\nexport type ImageDetail = \"auto\" | \"low\" | \"high\";\n/**\n * @deprecated\n * Don't use data content blocks. Use {@link ContentBlock.Multimodal.Data} instead.\n */\nexport type 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 */\nexport type 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 */\nexport type MessageContentComplex = MessageContentText | MessageContentImageUrl | (Record<string, any> & {\n type?: \"text\" | \"image_url\" | string;\n}) | (Record<string, any> & {\n type?: never;\n});\nexport type Data = never;\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare 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 */\nexport declare function parseBase64DataUrl({ dataUrl, asTypedArray }: {\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 */\nexport declare function parseBase64DataUrl({ dataUrl, asTypedArray }: {\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 */\nexport type 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 */\nexport interface 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 */\nexport declare function convertToProviderContentBlock<Formats extends Partial<ProviderFormatTypes>>(block: Data.DataContentBlock, converter: StandardContentBlockConverter<Formats>): Formats[keyof Formats];\n//# sourceMappingURL=data.d.ts.map"],"mappings":";;;;;;AAKA;AAKA;AAQYG,KAbAF,WAAAA,GAaAE,MAAsB,GAAA,KAAA,GAIjBF,MAAAA;AAOjB;;;;AAEMI,KArBMH,kBAAAA,GAqBNG;EAAM,IAAA,EAAA,MAAA;EAGAC,IAAAA,EAAAA,MAAI;AAChB,CAAA;;;;;AA+B4CC,KAhDhCJ,sBAAAA,GAgDgCI;EASPA,IAAAA,EAAAA,WAAAA;EASTC,SAAAA,EAAAA,MAAAA,GA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ends BaseContentBlock {}
8
8
  declare const KNOWN_BLOCK_TYPES: string[];
9
- // eslint-disable-next-line @typescript-eslint/no-namespace
10
9
  declare namespace ContentBlock {
11
10
  /**
12
11
  * Annotation for citing data from a document.
@@ -98,9 +97,7 @@ declare namespace ContentBlock {
98
97
  * If a provider's non-standard output includes reasoning and tool calls, it should be
99
98
  * the adapter's job to parse that payload and emit the corresponding standard reasoning and tool call blocks.
100
99
  */
101
- export interface NonStandard<
102
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
- TValue extends Record<string, any> = Record<string, any>> extends ContentBlock {
100
+ export interface NonStandard<TValue extends Record<string, any> = Record<string, any>> extends ContentBlock {
104
101
  /**
105
102
  * Type of the content block
106
103
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":["BaseContentBlock","Tools","Multimodal","Data","ContentBlock","KNOWN_BLOCK_TYPES","TValue","Citation","Array","Record","Text","Reasoning","NonStandard","Standard"],"sources":["../../../src/messages/content/index.d.ts"],"sourcesContent":["import type { BaseContentBlock } from \"./base.js\";\nimport { type Tools } from \"./tools.js\";\nimport { type Multimodal } from \"./multimodal.js\";\nimport { type Data } from \"./data.js\";\nexport interface ContentBlock extends BaseContentBlock {\n}\nexport declare const KNOWN_BLOCK_TYPES: string[];\nexport declare 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<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//# sourceMappingURL=index.d.ts.map"],"mappings":";;;;;;UAIiBI,YAAAA,SAAqBJ;AAArBI,cAEIC,iBAFiBL,EAAAA,MAAAA,EAAgB;AAEjCK,kBACID,YAAAA,CADuB;EACvBA;;;EA8DHI,OAAAA,UAAAA,QAAAA,CAAAA;IAhBYJ;;;IA6CoCK,SAAAA,IAAAA,EAAAA,UAAAA;IAQvDH;;;IAGFJ,MAAAA,CAAAA,EAAAA,MAAAA;IACAC;;;IACiCS,GAAAA,CAAAA,EAAAA,MAAAA;IAAoBC;;AAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA1D9DT;;;;;;;;;;;;;;;;kBAgBZI,MAAMD,WAAWP;;;;;qCAKAI;;;;;;;;;;;;;;;;;;;;;;;;8CAwBSK,sBAAsBA,6BAA6BL;;;;;;;;WAQpFE;;WAEFL;WACAC;WACAC;yBACcO,OAAOC,YAAYC,cAAcX,KAAAA,CAAMY,WAAWX,UAAAA,CAAWW"}
@@ -6,7 +6,6 @@ import { Data } from "./data.js";
6
6
  //#region src/messages/content/index.d.ts
7
7
  interface ContentBlock extends BaseContentBlock {}
8
8
  declare const KNOWN_BLOCK_TYPES: string[];
9
- // eslint-disable-next-line @typescript-eslint/no-namespace
10
9
  declare namespace ContentBlock {
11
10
  /**
12
11
  * Annotation for citing data from a document.
@@ -98,9 +97,7 @@ declare namespace ContentBlock {
98
97
  * If a provider's non-standard output includes reasoning and tool calls, it should be
99
98
  * the adapter's job to parse that payload and emit the corresponding standard reasoning and tool call blocks.
100
99
  */
101
- export interface NonStandard<
102
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
- TValue extends Record<string, any> = Record<string, any>> extends ContentBlock {
100
+ export interface NonStandard<TValue extends Record<string, any> = Record<string, any>> extends ContentBlock {
104
101
  /**
105
102
  * Type of the content block
106
103
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":["BaseContentBlock","Tools","Multimodal","Data","ContentBlock","KNOWN_BLOCK_TYPES","TValue","Citation","Array","Record","Text","Reasoning","NonStandard","Standard"],"sources":["../../../src/messages/content/index.d.ts"],"sourcesContent":["import type { BaseContentBlock } from \"./base.js\";\nimport { type Tools } from \"./tools.js\";\nimport { type Multimodal } from \"./multimodal.js\";\nimport { type Data } from \"./data.js\";\nexport interface ContentBlock extends BaseContentBlock {\n}\nexport declare const KNOWN_BLOCK_TYPES: string[];\nexport declare 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<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//# sourceMappingURL=index.d.ts.map"],"mappings":";;;;;;UAIiBI,YAAAA,SAAqBJ;AAArBI,cAEIC,iBAFiBL,EAAAA,MAAAA,EAAgB;AAEjCK,kBACID,YAAAA,CADuB;EACvBA;;;EA8DHI,OAAAA,UAAAA,QAAAA,CAAAA;IAhBYJ;;;IA6CoCK,SAAAA,IAAAA,EAAAA,UAAAA;IAQvDH;;;IAGFJ,MAAAA,CAAAA,EAAAA,MAAAA;IACAC;;;IACiCS,GAAAA,CAAAA,EAAAA,MAAAA;IAAoBC;;AAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA1D9DT;;;;;;;;;;;;;;;;kBAgBZI,MAAMD,WAAWP;;;;;qCAKAI;;;;;;;;;;;;;;;;;;;;;;;;8CAwBSK,sBAAsBA,6BAA6BL;;;;;;;;WAQpFE;;WAEFL;WACAC;WACAC;yBACcO,OAAOC,YAAYC,cAAcX,KAAAA,CAAMY,WAAWX,UAAAA,CAAWW"}
@@ -2,7 +2,6 @@ import { BaseContentBlock } from "./base.cjs";
2
2
 
3
3
  //#region src/messages/content/multimodal.d.ts
4
4
  type Multimodal = never;
5
- // eslint-disable-next-line @typescript-eslint/no-namespace
6
5
  declare namespace Multimodal {
7
6
  type BaseDataRecord = {
8
7
  /**
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multimodal.d.cts","names":["BaseContentBlock","Multimodal","KNOWN_BLOCK_TYPES","TMetadata","BaseDataRecord","Uint8Array","DataRecordFileId","DataRecordUrl","DataRecordBase64","Record","DataRecord","Data","Image","Video","Audio","PlainText","File"],"sources":["../../../src/messages/content/multimodal.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\nexport type Multimodal = never;\nexport declare const KNOWN_BLOCK_TYPES: string[];\nexport declare 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//# sourceMappingURL=multimodal.d.ts.map"],"mappings":";;;KACYC,UAAAA;AAAAA,kBAEaA,UAAAA,CAFH;EAEGA,KAAAA,cAAUE,GAAAA;IASPC;;;;;IA8BaG,QAAAA,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA;EAAgBC,CAAAA;EAE/BC,KAAAA,gBAAAA,GAhCEL,cAgCFK,GAAAA;IAA2BT;;;IAiBpCW,MAAAA,EAAAA,MAAAA;IAKAA,GAAAA,CAAAA,EAAAA,KAAAA;IAKAA,IAAAA,CAAAA,EAAAA,KAAAA;EAKIA,CAAAA;EAiBLA,KAAAA,aAAAA,GAzESP,cAyETO,GAAAA;IAQIC,MAAAA,CAAAA,EAAAA,KAAAA;IAAQC;;;IAA4BG,GAAAA,EAAAA,MAAAA;IAAI,IAAA,CAAA,EAAA,KAAA;;0BAzEhCZ;;;;;;;;;;;;mBAYLC;;oBAEDC,mBAAmBC,gBAAgBC;;wBAE/BC,2BAA2BT,mBAAmBU;;;;;;;;eAQrDP;;;;;;;;;eASFQ;;;;;eAKAA;;;;;eAKAA;;;;;mBAKIA;;;;;;;;;;;;;;;;;cAiBLA;;;;;;;;kBAQIC,QAAQC,QAAQC,QAAQC,YAAYC"}
@@ -2,7 +2,6 @@ import { BaseContentBlock } from "./base.js";
2
2
 
3
3
  //#region src/messages/content/multimodal.d.ts
4
4
  type Multimodal = never;
5
- // eslint-disable-next-line @typescript-eslint/no-namespace
6
5
  declare namespace Multimodal {
7
6
  type BaseDataRecord = {
8
7
  /**
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multimodal.d.ts","names":["BaseContentBlock","Multimodal","KNOWN_BLOCK_TYPES","TMetadata","BaseDataRecord","Uint8Array","DataRecordFileId","DataRecordUrl","DataRecordBase64","Record","DataRecord","Data","Image","Video","Audio","PlainText","File"],"sources":["../../../src/messages/content/multimodal.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\nexport type Multimodal = never;\nexport declare const KNOWN_BLOCK_TYPES: string[];\nexport declare 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//# sourceMappingURL=multimodal.d.ts.map"],"mappings":";;;KACYC,UAAAA;AAAAA,kBAEaA,UAAAA,CAFH;EAEGA,KAAAA,cAAUE,GAAAA;IASPC;;;;;IA8BaG,QAAAA,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA;EAAgBC,CAAAA;EAE/BC,KAAAA,gBAAAA,GAhCEL,cAgCFK,GAAAA;IAA2BT;;;IAiBpCW,MAAAA,EAAAA,MAAAA;IAKAA,GAAAA,CAAAA,EAAAA,KAAAA;IAKAA,IAAAA,CAAAA,EAAAA,KAAAA;EAKIA,CAAAA;EAiBLA,KAAAA,aAAAA,GAzESP,cAyETO,GAAAA;IAQIC,MAAAA,CAAAA,EAAAA,KAAAA;IAAQC;;;IAA4BG,GAAAA,EAAAA,MAAAA;IAAI,IAAA,CAAA,EAAA,KAAA;;0BAzEhCZ;;;;;;;;;;;;mBAYLC;;oBAEDC,mBAAmBC,gBAAgBC;;wBAE/BC,2BAA2BT,mBAAmBU;;;;;;;;eAQrDP;;;;;;;;;eASFQ;;;;;eAKAA;;;;;eAKAA;;;;;mBAKIA;;;;;;;;;;;;;;;;;cAiBLA;;;;;;;;kBAQIC,QAAQC,QAAQC,QAAQC,YAAYC"}
@@ -2,7 +2,6 @@ import { BaseContentBlock } from "./base.cjs";
2
2
 
3
3
  //#region src/messages/content/tools.d.ts
4
4
  type Tools = never;
5
- // eslint-disable-next-line @typescript-eslint/no-namespace
6
5
  declare namespace Tools {
7
6
  /**
8
7
  * Represents a request to call a tool.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.cts","names":["BaseContentBlock","Tools","KNOWN_BLOCK_TYPES","TName","TArgs","TOutput","Record","ToolCall","ToolCallChunk","InvalidToolCall","ServerToolCall","ServerToolCallChunk","ServerToolCallResult"],"sources":["../../../src/messages/content/tools.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\nexport type Tools = never;\nexport declare const KNOWN_BLOCK_TYPES: string[];\nexport declare 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//# sourceMappingURL=tools.d.ts.map"],"mappings":";;;KACYC,KAAAA;AAAAA,kBAEaA,KAAAA,CAFR;EAEQA;;;;;;;;;;;;;;;EAoGqDD,UAAAA,QAAAA,CAAAA,cAAAA,MAAAA,GAAAA,MAAAA,EAAAA,QAAAA,OAAAA,CAAAA,SApFCA,gBAoFDA,CAAAA;IAkB1DO;;;IAA6CG,SAAAA,IAAAA,EAAAA,WAAAA;IAAiBC;;AAA0C;UA9F9GR;;;;UAIAC;;;iEAGqDJ;;;;;;;;WAQpDG;;;;;;;;;;;mEAWsDH;;;;;;;;WAQtDG;;;;;;;;;;;;;;mFAcsEH;;;;;;;;UAQvEG;;;;UAIAC;;uEAE2DJ;;;;;;;;WAQ1DG;;;;;;2CAM8BG,iCAAiCN;;;;;;;;;;;;;;;;YAgB9DK;;kBAEIE,WAAWC,gBAAgBC,kBAAkBC,iBAAiBC,sBAAsBC"}
@@ -2,7 +2,6 @@ import { BaseContentBlock } from "./base.js";
2
2
 
3
3
  //#region src/messages/content/tools.d.ts
4
4
  type Tools = never;
5
- // eslint-disable-next-line @typescript-eslint/no-namespace
6
5
  declare namespace Tools {
7
6
  /**
8
7
  * Represents a request to call a tool.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","names":["BaseContentBlock","Tools","KNOWN_BLOCK_TYPES","TName","TArgs","TOutput","Record","ToolCall","ToolCallChunk","InvalidToolCall","ServerToolCall","ServerToolCallChunk","ServerToolCallResult"],"sources":["../../../src/messages/content/tools.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\nexport type Tools = never;\nexport declare const KNOWN_BLOCK_TYPES: string[];\nexport declare 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//# sourceMappingURL=tools.d.ts.map"],"mappings":";;;KACYC,KAAAA;AAAAA,kBAEaA,KAAAA,CAFR;EAEQA;;;;;;;;;;;;;;;EAoGqDD,UAAAA,QAAAA,CAAAA,cAAAA,MAAAA,GAAAA,MAAAA,EAAAA,QAAAA,OAAAA,CAAAA,SApFCA,gBAoFDA,CAAAA;IAkB1DO;;;IAA6CG,SAAAA,IAAAA,EAAAA,WAAAA;IAAiBC;;AAA0C;UA9F9GR;;;;UAIAC;;;iEAGqDJ;;;;;;;;WAQpDG;;;;;;;;;;;mEAWsDH;;;;;;;;WAQtDG;;;;;;;;;;;;;;mFAcsEH;;;;;;;;UAQvEG;;;;UAIAC;;uEAE2DJ;;;;;;;;WAQ1DG;;;;;;2CAM8BG,iCAAiCN;;;;;;;;;;;;;;;;YAgB9DK;;kBAEIE,WAAWC,gBAAgBC,kBAAkBC,iBAAiBC,sBAAsBC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.cts","names":["BaseMessage","MessageStringFormat","convertToFormattedString"],"sources":["../../src/messages/format.d.ts"],"sourcesContent":["import { type BaseMessage } from \"./base.js\";\nexport type MessageStringFormat = \"pretty\";\nexport declare function convertToFormattedString(message: BaseMessage, format?: MessageStringFormat): string;\n//# sourceMappingURL=format.d.ts.map"],"mappings":";AACYC,KAAAA,mBAAAA,GAAmB,QAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","names":["BaseMessage","MessageStringFormat","convertToFormattedString"],"sources":["../../src/messages/format.d.ts"],"sourcesContent":["import { type BaseMessage } from \"./base.js\";\nexport type MessageStringFormat = \"pretty\";\nexport declare function convertToFormattedString(message: BaseMessage, format?: MessageStringFormat): string;\n//# sourceMappingURL=format.d.ts.map"],"mappings":";AACYC,KAAAA,mBAAAA,GAAmB,QAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function.d.cts","names":["BaseMessage","BaseMessageChunk","BaseMessageFields","MessageStructure","FunctionMessageFields","TStructure","FunctionMessage","FunctionMessageChunk","isFunctionMessage","isFunctionMessageChunk"],"sources":["../../src/messages/function.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageChunk, type BaseMessageFields } from \"./base.js\";\nimport { MessageStructure } from \"./message.js\";\nexport interface FunctionMessageFields<TStructure extends MessageStructure = MessageStructure> extends BaseMessageFields<TStructure, \"function\"> {\n name: string;\n}\n/**\n * Represents a function message in a conversation.\n */\nexport declare class FunctionMessage<TStructure extends MessageStructure = MessageStructure> extends BaseMessage<TStructure, \"function\"> implements FunctionMessageFields<TStructure> {\n static lc_name(): string;\n readonly type: \"function\";\n name: string;\n constructor(fields: FunctionMessageFields<TStructure>);\n}\n/**\n * Represents a chunk of a function message, which can be concatenated\n * with other function message chunks.\n */\nexport declare class FunctionMessageChunk<TStructure extends MessageStructure = MessageStructure> extends BaseMessageChunk<TStructure, \"function\"> {\n static lc_name(): string;\n readonly type: \"function\";\n concat(chunk: FunctionMessageChunk<TStructure>): this;\n}\nexport declare function isFunctionMessage(x: BaseMessage): x is FunctionMessage;\nexport declare function isFunctionMessageChunk(x: BaseMessageChunk): x is FunctionMessageChunk;\n//# sourceMappingURL=function.d.ts.map"],"mappings":";;;;UAEiBI,yCAAyCD,mBAAmBA,0BAA0BD,kBAAkBG;;AAAzH;;;;AAAuGH,cAMlFI,eANkFJ,CAAAA,mBAM/CC,gBAN+CD,GAM5BC,gBAN4BD,CAAAA,SAMFF,WANEE,CAMUG,UANVH,EAAAA,UAAAA,CAAAA,YAM6CE,qBAN7CF,CAMmEG,UANnEH,CAAAA,CAAAA;EAAiB,OAAA,OAAA,CAAA,CAAA,EAAA,MAAA;EAMnGI,SAAAA,IAAAA,EAAAA,UAAeD;EAAoBF,IAAAA,EAAAA,MAAAA;EAAmBA,WAAAA,CAAAA,MAAAA,EAInDC,qBAJmDD,CAI7BE,UAJ6BF,CAAAA;;;;;;AAAyEC,cAU/HG,oBAV+HH,CAAAA,mBAUvFD,gBAVuFC,GAUpED,gBAVoEC,CAAAA,SAU1CH,gBAV0CG,CAUzBC,UAVyBD,EAAAA,UAAAA,CAAAA,CAAAA;EAAqB,OAAA,OAAA,CAAA,CAAA,EAAA,MAAA;EAUpJG,SAAAA,IAAAA,EAAAA,UAAoB;EAAoBJ,MAAAA,CAAAA,KAAAA,EAG3CI,oBAH2CJ,CAGtBE,UAHsBF,CAAAA,CAAAA,EAAAA,IAAAA;;AAA8DE,iBAKnGG,iBAAAA,CALmGH,CAAAA,EAK9EL,WAL8EK,CAAAA,EAAAA,CAAAA,IAK3DC,eAL2DD;AAGpFA,iBAGfI,sBAAAA,CAHeJ,CAAAA,EAGWJ,gBAHXI,CAAAA,EAAAA,CAAAA,IAGmCE,oBAHnCF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function.d.ts","names":["BaseMessage","BaseMessageChunk","BaseMessageFields","MessageStructure","FunctionMessageFields","TStructure","FunctionMessage","FunctionMessageChunk","isFunctionMessage","isFunctionMessageChunk"],"sources":["../../src/messages/function.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageChunk, type BaseMessageFields } from \"./base.js\";\nimport { MessageStructure } from \"./message.js\";\nexport interface FunctionMessageFields<TStructure extends MessageStructure = MessageStructure> extends BaseMessageFields<TStructure, \"function\"> {\n name: string;\n}\n/**\n * Represents a function message in a conversation.\n */\nexport declare class FunctionMessage<TStructure extends MessageStructure = MessageStructure> extends BaseMessage<TStructure, \"function\"> implements FunctionMessageFields<TStructure> {\n static lc_name(): string;\n readonly type: \"function\";\n name: string;\n constructor(fields: FunctionMessageFields<TStructure>);\n}\n/**\n * Represents a chunk of a function message, which can be concatenated\n * with other function message chunks.\n */\nexport declare class FunctionMessageChunk<TStructure extends MessageStructure = MessageStructure> extends BaseMessageChunk<TStructure, \"function\"> {\n static lc_name(): string;\n readonly type: \"function\";\n concat(chunk: FunctionMessageChunk<TStructure>): this;\n}\nexport declare function isFunctionMessage(x: BaseMessage): x is FunctionMessage;\nexport declare function isFunctionMessageChunk(x: BaseMessageChunk): x is FunctionMessageChunk;\n//# sourceMappingURL=function.d.ts.map"],"mappings":";;;;UAEiBI,yCAAyCD,mBAAmBA,0BAA0BD,kBAAkBG;;AAAzH;;;;AAAuGH,cAMlFI,eANkFJ,CAAAA,mBAM/CC,gBAN+CD,GAM5BC,gBAN4BD,CAAAA,SAMFF,WANEE,CAMUG,UANVH,EAAAA,UAAAA,CAAAA,YAM6CE,qBAN7CF,CAMmEG,UANnEH,CAAAA,CAAAA;EAAiB,OAAA,OAAA,CAAA,CAAA,EAAA,MAAA;EAMnGI,SAAAA,IAAAA,EAAAA,UAAeD;EAAoBF,IAAAA,EAAAA,MAAAA;EAAmBA,WAAAA,CAAAA,MAAAA,EAInDC,qBAJmDD,CAI7BE,UAJ6BF,CAAAA;;;;;;AAAyEC,cAU/HG,oBAV+HH,CAAAA,mBAUvFD,gBAVuFC,GAUpED,gBAVoEC,CAAAA,SAU1CH,gBAV0CG,CAUzBC,UAVyBD,EAAAA,UAAAA,CAAAA,CAAAA;EAAqB,OAAA,OAAA,CAAA,CAAA,EAAA,MAAA;EAUpJG,SAAAA,IAAAA,EAAAA,UAAoB;EAAoBJ,MAAAA,CAAAA,KAAAA,EAG3CI,oBAH2CJ,CAGtBE,UAHsBF,CAAAA,CAAAA,EAAAA,IAAAA;;AAA8DE,iBAKnGG,iBAAAA,CALmGH,CAAAA,EAK9EL,WAL8EK,CAAAA,EAAAA,CAAAA,IAK3DC,eAL2DD;AAGpFA,iBAGfI,sBAAAA,CAHeJ,CAAAA,EAGWJ,gBAHXI,CAAAA,EAAAA,CAAAA,IAGmCE,oBAHnCF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human.d.cts","names":["BaseMessage","BaseMessageChunk","BaseMessageFields","$InferMessageContent","MessageStructure","HumanMessageFields","TStructure","HumanMessage","HumanMessageChunk","isHumanMessage","isHumanMessageChunk"],"sources":["../../src/messages/human.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageChunk, type BaseMessageFields } from \"./base.js\";\nimport type { $InferMessageContent, MessageStructure } from \"./message.js\";\nexport interface HumanMessageFields<TStructure extends MessageStructure = MessageStructure> extends BaseMessageFields<TStructure, \"human\"> {\n}\n/**\n * Represents a human message in a conversation.\n */\nexport declare class HumanMessage<TStructure extends MessageStructure = MessageStructure> extends BaseMessage<TStructure, \"human\"> {\n static lc_name(): string;\n readonly type: \"human\";\n constructor(fields: $InferMessageContent<TStructure, \"human\"> | HumanMessageFields<TStructure>);\n static isInstance(obj: unknown): obj is HumanMessage;\n}\n/**\n * Represents a chunk of a human message, which can be concatenated with\n * other human message chunks.\n */\nexport declare class HumanMessageChunk<TStructure extends MessageStructure = MessageStructure> extends BaseMessageChunk<TStructure, \"human\"> {\n static lc_name(): string;\n readonly type: \"human\";\n constructor(fields: $InferMessageContent<TStructure, \"human\"> | HumanMessageFields<TStructure>);\n concat(chunk: HumanMessageChunk<TStructure>): this;\n static isInstance(obj: unknown): obj is HumanMessageChunk;\n}\n/**\n * @deprecated Use {@link HumanMessage.isInstance} instead\n */\nexport declare function isHumanMessage<TStructure extends MessageStructure>(x: BaseMessage): x is HumanMessage<TStructure>;\n/**\n * @deprecated Use {@link HumanMessageChunk.isInstance} instead\n */\nexport declare function isHumanMessageChunk<TStructure extends MessageStructure>(x: BaseMessageChunk): x is HumanMessageChunk<TStructure>;\n//# sourceMappingURL=human.d.ts.map"],"mappings":";;;;UAEiBK,sCAAsCD,mBAAmBA,0BAA0BF,kBAAkBI;AAAtH;;;AAAsHA,cAKjGC,YALiGD,CAAAA,mBAKjEF,gBALiEE,GAK9CF,gBAL8CE,CAAAA,SAKpBN,WALoBM,CAKRA,UALQA,EAAAA,OAAAA,CAAAA,CAAAA;EAAlBJ,OAAAA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAiB,SAAA,IAAA,EAAA,OAAA;EAKhGK,WAAAA,CAAAA,MAAY,EAGTJ,oBAHS,CAGYG,UAHZ,EAAA,OAAA,CAAA,GAGmCD,kBAHnC,CAGsDC,UAHtD,CAAA;EAAoBF,OAAAA,UAAAA,CAAAA,GAAAA,EAAAA,OAAAA,CAAAA,EAAAA,GAAAA,IAITG,YAJSH;;;;;;AAGeC,cAO/CG,iBAP+CH,CAAAA,mBAOVD,gBAPUC,GAOSD,gBAPTC,CAAAA,SAOmCJ,gBAPnCI,CAOoDC,UAPpDD,EAAAA,OAAAA,CAAAA,CAAAA;EACxBE,OAAAA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAJsDP,SAAAA,IAAAA,EAAAA,OAAAA;EAAW,WAAA,CAAA,MAAA,EAarFG,oBAbqF,CAahEG,UAbgE,EAAA,OAAA,CAAA,GAazCD,kBAbyC,CAatBC,UAbsB,CAAA;EAUxFE,MAAAA,CAAAA,KAAAA,EAIHA,iBAJoBF,CAIFA,UAJE,CAAA,CAAA,EAAA,IAAA;EAAoBF,OAAAA,UAAAA,CAAAA,GAAAA,EAAAA,OAAAA,CAAAA,EAAAA,GAAAA,IAKdI,iBALcJ;;;;;AAG6BE,iBAO/DG,cAP+DH,CAAAA,mBAO7BF,gBAP6BE,CAAAA,CAAAA,CAAAA,EAORN,WAPQM,CAAAA,EAAAA,CAAAA,IAOWC,YAPXD,CAOwBA,UAPxBA,CAAAA;;;;AAE3CE,iBASpBE,mBAToBF,CAAAA,mBASmBJ,gBATnBI,CAAAA,CAAAA,CAAAA,EASwCP,gBATxCO,CAAAA,EAAAA,CAAAA,IASgEA,iBAThEA,CASkFF,UATlFE,CAAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human.d.ts","names":["BaseMessage","BaseMessageChunk","BaseMessageFields","$InferMessageContent","MessageStructure","HumanMessageFields","TStructure","HumanMessage","HumanMessageChunk","isHumanMessage","isHumanMessageChunk"],"sources":["../../src/messages/human.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageChunk, type BaseMessageFields } from \"./base.js\";\nimport type { $InferMessageContent, MessageStructure } from \"./message.js\";\nexport interface HumanMessageFields<TStructure extends MessageStructure = MessageStructure> extends BaseMessageFields<TStructure, \"human\"> {\n}\n/**\n * Represents a human message in a conversation.\n */\nexport declare class HumanMessage<TStructure extends MessageStructure = MessageStructure> extends BaseMessage<TStructure, \"human\"> {\n static lc_name(): string;\n readonly type: \"human\";\n constructor(fields: $InferMessageContent<TStructure, \"human\"> | HumanMessageFields<TStructure>);\n static isInstance(obj: unknown): obj is HumanMessage;\n}\n/**\n * Represents a chunk of a human message, which can be concatenated with\n * other human message chunks.\n */\nexport declare class HumanMessageChunk<TStructure extends MessageStructure = MessageStructure> extends BaseMessageChunk<TStructure, \"human\"> {\n static lc_name(): string;\n readonly type: \"human\";\n constructor(fields: $InferMessageContent<TStructure, \"human\"> | HumanMessageFields<TStructure>);\n concat(chunk: HumanMessageChunk<TStructure>): this;\n static isInstance(obj: unknown): obj is HumanMessageChunk;\n}\n/**\n * @deprecated Use {@link HumanMessage.isInstance} instead\n */\nexport declare function isHumanMessage<TStructure extends MessageStructure>(x: BaseMessage): x is HumanMessage<TStructure>;\n/**\n * @deprecated Use {@link HumanMessageChunk.isInstance} instead\n */\nexport declare function isHumanMessageChunk<TStructure extends MessageStructure>(x: BaseMessageChunk): x is HumanMessageChunk<TStructure>;\n//# sourceMappingURL=human.d.ts.map"],"mappings":";;;;UAEiBK,sCAAsCD,mBAAmBA,0BAA0BF,kBAAkBI;AAAtH;;;AAAsHA,cAKjGC,YALiGD,CAAAA,mBAKjEF,gBALiEE,GAK9CF,gBAL8CE,CAAAA,SAKpBN,WALoBM,CAKRA,UALQA,EAAAA,OAAAA,CAAAA,CAAAA;EAAlBJ,OAAAA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAiB,SAAA,IAAA,EAAA,OAAA;EAKhGK,WAAAA,CAAAA,MAAY,EAGTJ,oBAHS,CAGYG,UAHZ,EAAA,OAAA,CAAA,GAGmCD,kBAHnC,CAGsDC,UAHtD,CAAA;EAAoBF,OAAAA,UAAAA,CAAAA,GAAAA,EAAAA,OAAAA,CAAAA,EAAAA,GAAAA,IAITG,YAJSH;;;;;;AAGeC,cAO/CG,iBAP+CH,CAAAA,mBAOVD,gBAPUC,GAOSD,gBAPTC,CAAAA,SAOmCJ,gBAPnCI,CAOoDC,UAPpDD,EAAAA,OAAAA,CAAAA,CAAAA;EACxBE,OAAAA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAJsDP,SAAAA,IAAAA,EAAAA,OAAAA;EAAW,WAAA,CAAA,MAAA,EAarFG,oBAbqF,CAahEG,UAbgE,EAAA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