@langchain/core 1.1.3 → 1.1.5-dev-1765431816670

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 (605) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/dist/agents.d.cts.map +1 -0
  4. package/dist/agents.d.ts.map +1 -0
  5. package/dist/caches/index.d.cts.map +1 -0
  6. package/dist/caches/index.d.ts.map +1 -0
  7. package/dist/callbacks/base.cjs +1 -1
  8. package/dist/callbacks/base.cjs.map +1 -1
  9. package/dist/callbacks/base.d.cts.map +1 -0
  10. package/dist/callbacks/base.d.ts.map +1 -0
  11. package/dist/callbacks/base.js +1 -1
  12. package/dist/callbacks/base.js.map +1 -1
  13. package/dist/callbacks/dispatch/index.d.cts.map +1 -0
  14. package/dist/callbacks/dispatch/index.d.ts.map +1 -0
  15. package/dist/callbacks/dispatch/web.d.cts.map +1 -0
  16. package/dist/callbacks/dispatch/web.d.ts.map +1 -0
  17. package/dist/callbacks/manager.cjs +6 -6
  18. package/dist/callbacks/manager.cjs.map +1 -1
  19. package/dist/callbacks/manager.d.cts.map +1 -0
  20. package/dist/callbacks/manager.d.ts.map +1 -0
  21. package/dist/callbacks/manager.js +7 -7
  22. package/dist/callbacks/manager.js.map +1 -1
  23. package/dist/chat_history.d.cts.map +1 -0
  24. package/dist/chat_history.d.ts.map +1 -0
  25. package/dist/context.d.cts.map +1 -0
  26. package/dist/context.d.ts.map +1 -0
  27. package/dist/document_loaders/base.d.cts.map +1 -0
  28. package/dist/document_loaders/base.d.ts.map +1 -0
  29. package/dist/document_loaders/langsmith.d.cts.map +1 -0
  30. package/dist/document_loaders/langsmith.d.ts.map +1 -0
  31. package/dist/documents/document.d.cts.map +1 -0
  32. package/dist/documents/document.d.ts.map +1 -0
  33. package/dist/documents/transformers.d.cts.map +1 -0
  34. package/dist/documents/transformers.d.ts.map +1 -0
  35. package/dist/embeddings.d.cts.map +1 -0
  36. package/dist/embeddings.d.ts.map +1 -0
  37. package/dist/example_selectors/base.d.cts.map +1 -0
  38. package/dist/example_selectors/base.d.ts.map +1 -0
  39. package/dist/example_selectors/conditional.d.cts.map +1 -0
  40. package/dist/example_selectors/conditional.d.ts.map +1 -0
  41. package/dist/example_selectors/length_based.d.cts.map +1 -0
  42. package/dist/example_selectors/length_based.d.ts.map +1 -0
  43. package/dist/example_selectors/semantic_similarity.d.cts.map +1 -0
  44. package/dist/example_selectors/semantic_similarity.d.ts.map +1 -0
  45. package/dist/indexing/base.d.cts.map +1 -0
  46. package/dist/indexing/base.d.ts.map +1 -0
  47. package/dist/indexing/record_manager.d.cts.map +1 -0
  48. package/dist/indexing/record_manager.d.ts.map +1 -0
  49. package/dist/language_models/base.d.cts.map +1 -0
  50. package/dist/language_models/base.d.ts.map +1 -0
  51. package/dist/language_models/chat_models.d.cts.map +1 -0
  52. package/dist/language_models/chat_models.d.ts.map +1 -0
  53. package/dist/language_models/llms.d.cts.map +1 -0
  54. package/dist/language_models/llms.d.ts.map +1 -0
  55. package/dist/language_models/profile.d.cts.map +1 -0
  56. package/dist/language_models/profile.d.ts.map +1 -0
  57. package/dist/load/import_type.d.cts.map +1 -0
  58. package/dist/load/import_type.d.ts.map +1 -0
  59. package/dist/load/index.d.cts.map +1 -0
  60. package/dist/load/index.d.ts.map +1 -0
  61. package/dist/load/map_keys.cjs +5 -4
  62. package/dist/load/map_keys.cjs.map +1 -1
  63. package/dist/load/map_keys.d.cts.map +1 -0
  64. package/dist/load/map_keys.d.ts.map +1 -0
  65. package/dist/load/map_keys.js +3 -3
  66. package/dist/load/map_keys.js.map +1 -1
  67. package/dist/load/serializable.d.cts.map +1 -0
  68. package/dist/load/serializable.d.ts.map +1 -0
  69. package/dist/memory.d.cts.map +1 -0
  70. package/dist/memory.d.ts.map +1 -0
  71. package/dist/messages/ai.d.cts.map +1 -0
  72. package/dist/messages/ai.d.ts.map +1 -0
  73. package/dist/messages/base.d.cts.map +1 -0
  74. package/dist/messages/base.d.ts.map +1 -0
  75. package/dist/messages/chat.d.cts.map +1 -0
  76. package/dist/messages/chat.d.ts.map +1 -0
  77. package/dist/messages/content/base.d.cts.map +1 -0
  78. package/dist/messages/content/base.d.ts.map +1 -0
  79. package/dist/messages/content/data.d.cts.map +1 -0
  80. package/dist/messages/content/data.d.ts.map +1 -0
  81. package/dist/messages/content/index.d.cts.map +1 -0
  82. package/dist/messages/content/index.d.ts.map +1 -0
  83. package/dist/messages/content/multimodal.d.cts.map +1 -0
  84. package/dist/messages/content/multimodal.d.ts.map +1 -0
  85. package/dist/messages/content/tools.d.cts.map +1 -0
  86. package/dist/messages/content/tools.d.ts.map +1 -0
  87. package/dist/messages/format.d.cts.map +1 -0
  88. package/dist/messages/format.d.ts.map +1 -0
  89. package/dist/messages/function.d.cts.map +1 -0
  90. package/dist/messages/function.d.ts.map +1 -0
  91. package/dist/messages/human.d.cts.map +1 -0
  92. package/dist/messages/human.d.ts.map +1 -0
  93. package/dist/messages/message.d.cts.map +1 -0
  94. package/dist/messages/message.d.ts.map +1 -0
  95. package/dist/messages/metadata.d.cts.map +1 -0
  96. package/dist/messages/metadata.d.ts.map +1 -0
  97. package/dist/messages/modifier.d.cts.map +1 -0
  98. package/dist/messages/modifier.d.ts.map +1 -0
  99. package/dist/messages/system.d.cts.map +1 -0
  100. package/dist/messages/system.d.ts.map +1 -0
  101. package/dist/messages/tool.d.cts.map +1 -0
  102. package/dist/messages/tool.d.ts.map +1 -0
  103. package/dist/messages/transformers.d.cts.map +1 -0
  104. package/dist/messages/transformers.d.ts.map +1 -0
  105. package/dist/messages/utils.d.cts.map +1 -0
  106. package/dist/messages/utils.d.ts.map +1 -0
  107. package/dist/output_parsers/base.d.cts.map +1 -0
  108. package/dist/output_parsers/base.d.ts.map +1 -0
  109. package/dist/output_parsers/bytes.d.cts.map +1 -0
  110. package/dist/output_parsers/bytes.d.ts.map +1 -0
  111. package/dist/output_parsers/json.d.cts.map +1 -0
  112. package/dist/output_parsers/json.d.ts.map +1 -0
  113. package/dist/output_parsers/list.d.cts.map +1 -0
  114. package/dist/output_parsers/list.d.ts.map +1 -0
  115. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts.map +1 -0
  116. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts.map +1 -0
  117. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts.map +1 -0
  118. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts.map +1 -0
  119. package/dist/output_parsers/string.d.cts.map +1 -0
  120. package/dist/output_parsers/string.d.ts.map +1 -0
  121. package/dist/output_parsers/structured.d.cts.map +1 -0
  122. package/dist/output_parsers/structured.d.ts.map +1 -0
  123. package/dist/output_parsers/transform.d.cts.map +1 -0
  124. package/dist/output_parsers/transform.d.ts.map +1 -0
  125. package/dist/output_parsers/xml.d.cts.map +1 -0
  126. package/dist/output_parsers/xml.d.ts.map +1 -0
  127. package/dist/outputs.d.cts.map +1 -0
  128. package/dist/outputs.d.ts.map +1 -0
  129. package/dist/prompt_values.d.cts.map +1 -0
  130. package/dist/prompt_values.d.ts.map +1 -0
  131. package/dist/prompts/base.d.cts.map +1 -0
  132. package/dist/prompts/base.d.ts.map +1 -0
  133. package/dist/prompts/chat.d.cts.map +1 -0
  134. package/dist/prompts/chat.d.ts.map +1 -0
  135. package/dist/prompts/dict.d.cts.map +1 -0
  136. package/dist/prompts/dict.d.ts.map +1 -0
  137. package/dist/prompts/few_shot.d.cts.map +1 -0
  138. package/dist/prompts/few_shot.d.ts.map +1 -0
  139. package/dist/prompts/image.d.cts.map +1 -0
  140. package/dist/prompts/image.d.ts.map +1 -0
  141. package/dist/prompts/pipeline.d.cts.map +1 -0
  142. package/dist/prompts/pipeline.d.ts.map +1 -0
  143. package/dist/prompts/prompt.d.cts.map +1 -0
  144. package/dist/prompts/prompt.d.ts.map +1 -0
  145. package/dist/prompts/serde.d.cts.map +1 -0
  146. package/dist/prompts/serde.d.ts.map +1 -0
  147. package/dist/prompts/string.d.cts.map +1 -0
  148. package/dist/prompts/string.d.ts.map +1 -0
  149. package/dist/prompts/structured.d.cts.map +1 -0
  150. package/dist/prompts/structured.d.ts.map +1 -0
  151. package/dist/prompts/template.d.cts.map +1 -0
  152. package/dist/prompts/template.d.ts.map +1 -0
  153. package/dist/retrievers/document_compressors/index.d.cts.map +1 -0
  154. package/dist/retrievers/document_compressors/index.d.ts.map +1 -0
  155. package/dist/retrievers/index.d.cts.map +1 -0
  156. package/dist/retrievers/index.d.ts.map +1 -0
  157. package/dist/runnables/base.cjs +7 -7
  158. package/dist/runnables/base.cjs.map +1 -1
  159. package/dist/runnables/base.d.cts.map +1 -0
  160. package/dist/runnables/base.d.ts.map +1 -0
  161. package/dist/runnables/base.js +1 -1
  162. package/dist/runnables/base.js.map +1 -1
  163. package/dist/runnables/branch.d.cts.map +1 -0
  164. package/dist/runnables/branch.d.ts.map +1 -0
  165. package/dist/runnables/config.cjs +15 -1
  166. package/dist/runnables/config.cjs.map +1 -1
  167. package/dist/runnables/config.d.cts.map +1 -0
  168. package/dist/runnables/config.d.ts.map +1 -0
  169. package/dist/runnables/config.js +15 -1
  170. package/dist/runnables/config.js.map +1 -1
  171. package/dist/runnables/graph.d.cts.map +1 -0
  172. package/dist/runnables/graph.d.ts.map +1 -0
  173. package/dist/runnables/history.d.cts.map +1 -0
  174. package/dist/runnables/history.d.ts.map +1 -0
  175. package/dist/runnables/passthrough.d.cts.map +1 -0
  176. package/dist/runnables/passthrough.d.ts.map +1 -0
  177. package/dist/runnables/router.d.cts.map +1 -0
  178. package/dist/runnables/router.d.ts.map +1 -0
  179. package/dist/runnables/types.d.cts.map +1 -0
  180. package/dist/runnables/types.d.ts.map +1 -0
  181. package/dist/singletons/async_local_storage/context.d.cts.map +1 -0
  182. package/dist/singletons/async_local_storage/context.d.ts.map +1 -0
  183. package/dist/singletons/async_local_storage/globals.d.cts.map +1 -0
  184. package/dist/singletons/async_local_storage/globals.d.ts.map +1 -0
  185. package/dist/singletons/async_local_storage/index.d.cts.map +1 -0
  186. package/dist/singletons/async_local_storage/index.d.ts.map +1 -0
  187. package/dist/singletons/callbacks.cjs.map +1 -1
  188. package/dist/singletons/callbacks.d.cts.map +1 -0
  189. package/dist/singletons/callbacks.d.ts.map +1 -0
  190. package/dist/singletons/callbacks.js.map +1 -1
  191. package/dist/stores.d.cts.map +1 -0
  192. package/dist/stores.d.ts.map +1 -0
  193. package/dist/structured_query/base.d.cts.map +1 -0
  194. package/dist/structured_query/base.d.ts.map +1 -0
  195. package/dist/structured_query/functional.d.cts.map +1 -0
  196. package/dist/structured_query/functional.d.ts.map +1 -0
  197. package/dist/structured_query/ir.d.cts.map +1 -0
  198. package/dist/structured_query/ir.d.ts.map +1 -0
  199. package/dist/structured_query/utils.d.cts.map +1 -0
  200. package/dist/structured_query/utils.d.ts.map +1 -0
  201. package/dist/tools/index.d.cts.map +1 -0
  202. package/dist/tools/index.d.ts.map +1 -0
  203. package/dist/tools/types.d.cts.map +1 -0
  204. package/dist/tools/types.d.ts.map +1 -0
  205. package/dist/tools/utils.d.cts.map +1 -0
  206. package/dist/tools/utils.d.ts.map +1 -0
  207. package/dist/tracers/base.d.cts.map +1 -0
  208. package/dist/tracers/base.d.ts.map +1 -0
  209. package/dist/tracers/console.cjs +3 -3
  210. package/dist/tracers/console.cjs.map +1 -1
  211. package/dist/tracers/console.d.cts.map +1 -0
  212. package/dist/tracers/console.d.ts.map +1 -0
  213. package/dist/tracers/console.js +3 -3
  214. package/dist/tracers/console.js.map +1 -1
  215. package/dist/tracers/event_stream.d.cts.map +1 -0
  216. package/dist/tracers/event_stream.d.ts.map +1 -0
  217. package/dist/tracers/log_stream.d.cts.map +1 -0
  218. package/dist/tracers/log_stream.d.ts.map +1 -0
  219. package/dist/tracers/run_collector.d.cts.map +1 -0
  220. package/dist/tracers/run_collector.d.ts.map +1 -0
  221. package/dist/tracers/tracer_langchain.d.cts.map +1 -0
  222. package/dist/tracers/tracer_langchain.d.ts.map +1 -0
  223. package/dist/types/_internal.d.cts.map +1 -0
  224. package/dist/types/_internal.d.ts.map +1 -0
  225. package/dist/types/type-utils.d.cts.map +1 -0
  226. package/dist/types/type-utils.d.ts.map +1 -0
  227. package/dist/utils/async_caller.cjs +1 -1
  228. package/dist/utils/async_caller.cjs.map +1 -1
  229. package/dist/utils/async_caller.d.cts.map +1 -0
  230. package/dist/utils/async_caller.d.ts.map +1 -0
  231. package/dist/utils/async_caller.js +1 -1
  232. package/dist/utils/async_caller.js.map +1 -1
  233. package/dist/utils/chunk_array.d.cts.map +1 -0
  234. package/dist/utils/chunk_array.d.ts.map +1 -0
  235. package/dist/utils/env.d.cts.map +1 -0
  236. package/dist/utils/env.d.ts.map +1 -0
  237. package/dist/utils/event_source_parse.d.cts.map +1 -0
  238. package/dist/utils/event_source_parse.d.ts.map +1 -0
  239. package/dist/utils/fast-json-patch/src/core.d.cts.map +1 -0
  240. package/dist/utils/fast-json-patch/src/core.d.ts.map +1 -0
  241. package/dist/utils/fast-json-patch/src/duplex.d.cts.map +1 -0
  242. package/dist/utils/fast-json-patch/src/duplex.d.ts.map +1 -0
  243. package/dist/utils/format.d.cts.map +1 -0
  244. package/dist/utils/format.d.ts.map +1 -0
  245. package/dist/utils/function_calling.d.cts.map +1 -0
  246. package/dist/utils/function_calling.d.ts.map +1 -0
  247. package/dist/utils/hash.d.cts.map +1 -0
  248. package/dist/utils/hash.d.ts.map +1 -0
  249. package/dist/{node_modules/.pnpm/is-network-error@1.3.0/node_modules → utils}/is-network-error/index.cjs +1 -1
  250. package/dist/utils/is-network-error/index.cjs.map +1 -0
  251. package/dist/{node_modules/.pnpm/is-network-error@1.3.0/node_modules → utils}/is-network-error/index.js +1 -1
  252. package/dist/utils/is-network-error/index.js.map +1 -0
  253. package/dist/utils/js-sha256/hash.d.cts.map +1 -0
  254. package/dist/utils/js-sha256/hash.d.ts.map +1 -0
  255. package/dist/utils/json.d.cts.map +1 -0
  256. package/dist/utils/json.d.ts.map +1 -0
  257. package/dist/utils/json_schema.d.cts.map +1 -0
  258. package/dist/utils/json_schema.d.ts.map +1 -0
  259. package/dist/utils/math.d.cts.map +1 -0
  260. package/dist/utils/math.d.ts.map +1 -0
  261. package/dist/utils/ml-distance/similarities.d.cts.map +1 -0
  262. package/dist/utils/ml-distance/similarities.d.ts.map +1 -0
  263. package/dist/{node_modules/.pnpm/p-retry@7.1.0/node_modules → utils}/p-retry/index.cjs +2 -2
  264. package/dist/utils/p-retry/index.cjs.map +1 -0
  265. package/dist/{node_modules/.pnpm/p-retry@7.1.0/node_modules → utils}/p-retry/index.js +2 -2
  266. package/dist/utils/p-retry/index.js.map +1 -0
  267. package/dist/utils/signal.d.cts.map +1 -0
  268. package/dist/utils/signal.d.ts.map +1 -0
  269. package/dist/utils/stream.d.cts.map +1 -0
  270. package/dist/utils/stream.d.ts.map +1 -0
  271. package/dist/utils/testing/chat_models.cjs +11 -5
  272. package/dist/utils/testing/chat_models.cjs.map +1 -1
  273. package/dist/utils/testing/chat_models.d.cts +8 -1
  274. package/dist/utils/testing/chat_models.d.cts.map +1 -0
  275. package/dist/utils/testing/chat_models.d.ts +8 -1
  276. package/dist/utils/testing/chat_models.d.ts.map +1 -0
  277. package/dist/utils/testing/chat_models.js +11 -5
  278. package/dist/utils/testing/chat_models.js.map +1 -1
  279. package/dist/utils/testing/embeddings.d.cts.map +1 -0
  280. package/dist/utils/testing/embeddings.d.ts.map +1 -0
  281. package/dist/utils/testing/llms.d.cts.map +1 -0
  282. package/dist/utils/testing/llms.d.ts.map +1 -0
  283. package/dist/utils/testing/message_history.d.cts.map +1 -0
  284. package/dist/utils/testing/message_history.d.ts.map +1 -0
  285. package/dist/utils/testing/output_parsers.d.cts.map +1 -0
  286. package/dist/utils/testing/output_parsers.d.ts.map +1 -0
  287. package/dist/utils/testing/retrievers.d.cts.map +1 -0
  288. package/dist/utils/testing/retrievers.d.ts.map +1 -0
  289. package/dist/utils/testing/runnables.d.cts.map +1 -0
  290. package/dist/utils/testing/runnables.d.ts.map +1 -0
  291. package/dist/utils/testing/tools.d.cts.map +1 -0
  292. package/dist/utils/testing/tools.d.ts.map +1 -0
  293. package/dist/utils/testing/tracers.d.cts.map +1 -0
  294. package/dist/utils/testing/tracers.d.ts.map +1 -0
  295. package/dist/utils/testing/vectorstores.d.cts.map +1 -0
  296. package/dist/utils/testing/vectorstores.d.ts.map +1 -0
  297. package/dist/utils/tiktoken.d.cts.map +1 -0
  298. package/dist/utils/tiktoken.d.ts.map +1 -0
  299. package/dist/utils/types/index.d.cts.map +1 -0
  300. package/dist/utils/types/index.d.ts.map +1 -0
  301. package/dist/utils/types/zod.d.cts.map +1 -0
  302. package/dist/utils/types/zod.d.ts.map +1 -0
  303. package/dist/utils/zod-to-json-schema/errorMessages.d.cts.map +1 -0
  304. package/dist/utils/zod-to-json-schema/errorMessages.d.ts.map +1 -0
  305. package/dist/utils/zod-to-json-schema/parseTypes.d.cts.map +1 -0
  306. package/dist/utils/zod-to-json-schema/parseTypes.d.ts.map +1 -0
  307. package/dist/utils/zod-to-json-schema/parsers/any.d.cts.map +1 -0
  308. package/dist/utils/zod-to-json-schema/parsers/any.d.ts.map +1 -0
  309. package/dist/utils/zod-to-json-schema/parsers/array.d.cts.map +1 -0
  310. package/dist/utils/zod-to-json-schema/parsers/array.d.ts.map +1 -0
  311. package/dist/utils/zod-to-json-schema/parsers/bigint.d.cts.map +1 -0
  312. package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts.map +1 -0
  313. package/dist/utils/zod-to-json-schema/parsers/boolean.d.cts.map +1 -0
  314. package/dist/utils/zod-to-json-schema/parsers/boolean.d.ts.map +1 -0
  315. package/dist/utils/zod-to-json-schema/parsers/date.d.cts.map +1 -0
  316. package/dist/utils/zod-to-json-schema/parsers/date.d.ts.map +1 -0
  317. package/dist/utils/zod-to-json-schema/parsers/enum.d.cts.map +1 -0
  318. package/dist/utils/zod-to-json-schema/parsers/enum.d.ts.map +1 -0
  319. package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts.map +1 -0
  320. package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts.map +1 -0
  321. package/dist/utils/zod-to-json-schema/parsers/literal.d.cts.map +1 -0
  322. package/dist/utils/zod-to-json-schema/parsers/literal.d.ts.map +1 -0
  323. package/dist/utils/zod-to-json-schema/parsers/map.d.cts.map +1 -0
  324. package/dist/utils/zod-to-json-schema/parsers/map.d.ts.map +1 -0
  325. package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts.map +1 -0
  326. package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts.map +1 -0
  327. package/dist/utils/zod-to-json-schema/parsers/never.d.cts.map +1 -0
  328. package/dist/utils/zod-to-json-schema/parsers/never.d.ts.map +1 -0
  329. package/dist/utils/zod-to-json-schema/parsers/null.d.cts.map +1 -0
  330. package/dist/utils/zod-to-json-schema/parsers/null.d.ts.map +1 -0
  331. package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts.map +1 -0
  332. package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts.map +1 -0
  333. package/dist/utils/zod-to-json-schema/parsers/number.d.cts.map +1 -0
  334. package/dist/utils/zod-to-json-schema/parsers/number.d.ts.map +1 -0
  335. package/dist/utils/zod-to-json-schema/parsers/object.d.cts.map +1 -0
  336. package/dist/utils/zod-to-json-schema/parsers/object.d.ts.map +1 -0
  337. package/dist/utils/zod-to-json-schema/parsers/record.d.cts.map +1 -0
  338. package/dist/utils/zod-to-json-schema/parsers/record.d.ts.map +1 -0
  339. package/dist/utils/zod-to-json-schema/parsers/set.d.cts.map +1 -0
  340. package/dist/utils/zod-to-json-schema/parsers/set.d.ts.map +1 -0
  341. package/dist/utils/zod-to-json-schema/parsers/string.d.cts.map +1 -0
  342. package/dist/utils/zod-to-json-schema/parsers/string.d.ts.map +1 -0
  343. package/dist/utils/zod-to-json-schema/parsers/tuple.d.cts.map +1 -0
  344. package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts.map +1 -0
  345. package/dist/utils/zod-to-json-schema/parsers/undefined.d.cts.map +1 -0
  346. package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts.map +1 -0
  347. package/dist/utils/zod-to-json-schema/parsers/union.d.cts.map +1 -0
  348. package/dist/utils/zod-to-json-schema/parsers/union.d.ts.map +1 -0
  349. package/dist/utils/zod-to-json-schema/parsers/unknown.d.cts.map +1 -0
  350. package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts.map +1 -0
  351. package/dist/vectorstores.d.cts.map +1 -0
  352. package/dist/vectorstores.d.ts.map +1 -0
  353. package/package.json +10 -10
  354. package/agents.cjs +0 -1
  355. package/agents.d.cts +0 -1
  356. package/agents.d.ts +0 -1
  357. package/agents.js +0 -1
  358. package/caches.cjs +0 -1
  359. package/caches.d.cts +0 -1
  360. package/caches.d.ts +0 -1
  361. package/caches.js +0 -1
  362. package/callbacks/base.cjs +0 -1
  363. package/callbacks/base.d.cts +0 -1
  364. package/callbacks/base.d.ts +0 -1
  365. package/callbacks/base.js +0 -1
  366. package/callbacks/dispatch/web.cjs +0 -1
  367. package/callbacks/dispatch/web.d.cts +0 -1
  368. package/callbacks/dispatch/web.d.ts +0 -1
  369. package/callbacks/dispatch/web.js +0 -1
  370. package/callbacks/dispatch.cjs +0 -1
  371. package/callbacks/dispatch.d.cts +0 -1
  372. package/callbacks/dispatch.d.ts +0 -1
  373. package/callbacks/dispatch.js +0 -1
  374. package/callbacks/manager.cjs +0 -1
  375. package/callbacks/manager.d.cts +0 -1
  376. package/callbacks/manager.d.ts +0 -1
  377. package/callbacks/manager.js +0 -1
  378. package/callbacks/promises.cjs +0 -1
  379. package/callbacks/promises.d.cts +0 -1
  380. package/callbacks/promises.d.ts +0 -1
  381. package/callbacks/promises.js +0 -1
  382. package/chat_history.cjs +0 -1
  383. package/chat_history.d.cts +0 -1
  384. package/chat_history.d.ts +0 -1
  385. package/chat_history.js +0 -1
  386. package/context.cjs +0 -1
  387. package/context.d.cts +0 -1
  388. package/context.d.ts +0 -1
  389. package/context.js +0 -1
  390. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.cjs +0 -169
  391. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.cjs.map +0 -1
  392. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js +0 -168
  393. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js.map +0 -1
  394. package/dist/node_modules/.pnpm/camelcase@9.0.0/node_modules/camelcase/index.cjs +0 -122
  395. package/dist/node_modules/.pnpm/camelcase@9.0.0/node_modules/camelcase/index.cjs.map +0 -1
  396. package/dist/node_modules/.pnpm/camelcase@9.0.0/node_modules/camelcase/index.js +0 -121
  397. package/dist/node_modules/.pnpm/camelcase@9.0.0/node_modules/camelcase/index.js.map +0 -1
  398. package/dist/node_modules/.pnpm/decamelize@6.0.1/node_modules/decamelize/index.cjs +0 -18
  399. package/dist/node_modules/.pnpm/decamelize@6.0.1/node_modules/decamelize/index.cjs.map +0 -1
  400. package/dist/node_modules/.pnpm/decamelize@6.0.1/node_modules/decamelize/index.js +0 -17
  401. package/dist/node_modules/.pnpm/decamelize@6.0.1/node_modules/decamelize/index.js.map +0 -1
  402. package/dist/node_modules/.pnpm/is-network-error@1.3.0/node_modules/is-network-error/index.cjs.map +0 -1
  403. package/dist/node_modules/.pnpm/is-network-error@1.3.0/node_modules/is-network-error/index.js.map +0 -1
  404. package/dist/node_modules/.pnpm/p-retry@7.1.0/node_modules/p-retry/index.cjs.map +0 -1
  405. package/dist/node_modules/.pnpm/p-retry@7.1.0/node_modules/p-retry/index.js.map +0 -1
  406. package/document_loaders/base.cjs +0 -1
  407. package/document_loaders/base.d.cts +0 -1
  408. package/document_loaders/base.d.ts +0 -1
  409. package/document_loaders/base.js +0 -1
  410. package/document_loaders/langsmith.cjs +0 -1
  411. package/document_loaders/langsmith.d.cts +0 -1
  412. package/document_loaders/langsmith.d.ts +0 -1
  413. package/document_loaders/langsmith.js +0 -1
  414. package/documents.cjs +0 -1
  415. package/documents.d.cts +0 -1
  416. package/documents.d.ts +0 -1
  417. package/documents.js +0 -1
  418. package/embeddings.cjs +0 -1
  419. package/embeddings.d.cts +0 -1
  420. package/embeddings.d.ts +0 -1
  421. package/embeddings.js +0 -1
  422. package/example_selectors.cjs +0 -1
  423. package/example_selectors.d.cts +0 -1
  424. package/example_selectors.d.ts +0 -1
  425. package/example_selectors.js +0 -1
  426. package/indexing.cjs +0 -1
  427. package/indexing.d.cts +0 -1
  428. package/indexing.d.ts +0 -1
  429. package/indexing.js +0 -1
  430. package/language_models/base.cjs +0 -1
  431. package/language_models/base.d.cts +0 -1
  432. package/language_models/base.d.ts +0 -1
  433. package/language_models/base.js +0 -1
  434. package/language_models/chat_models.cjs +0 -1
  435. package/language_models/chat_models.d.cts +0 -1
  436. package/language_models/chat_models.d.ts +0 -1
  437. package/language_models/chat_models.js +0 -1
  438. package/language_models/llms.cjs +0 -1
  439. package/language_models/llms.d.cts +0 -1
  440. package/language_models/llms.d.ts +0 -1
  441. package/language_models/llms.js +0 -1
  442. package/language_models/profile.cjs +0 -1
  443. package/language_models/profile.d.cts +0 -1
  444. package/language_models/profile.d.ts +0 -1
  445. package/language_models/profile.js +0 -1
  446. package/load/serializable.cjs +0 -1
  447. package/load/serializable.d.cts +0 -1
  448. package/load/serializable.d.ts +0 -1
  449. package/load/serializable.js +0 -1
  450. package/load.cjs +0 -1
  451. package/load.d.cts +0 -1
  452. package/load.d.ts +0 -1
  453. package/load.js +0 -1
  454. package/memory.cjs +0 -1
  455. package/memory.d.cts +0 -1
  456. package/memory.d.ts +0 -1
  457. package/memory.js +0 -1
  458. package/messages/tool.cjs +0 -1
  459. package/messages/tool.d.cts +0 -1
  460. package/messages/tool.d.ts +0 -1
  461. package/messages/tool.js +0 -1
  462. package/messages.cjs +0 -1
  463. package/messages.d.cts +0 -1
  464. package/messages.d.ts +0 -1
  465. package/messages.js +0 -1
  466. package/output_parsers/openai_functions.cjs +0 -1
  467. package/output_parsers/openai_functions.d.cts +0 -1
  468. package/output_parsers/openai_functions.d.ts +0 -1
  469. package/output_parsers/openai_functions.js +0 -1
  470. package/output_parsers/openai_tools.cjs +0 -1
  471. package/output_parsers/openai_tools.d.cts +0 -1
  472. package/output_parsers/openai_tools.d.ts +0 -1
  473. package/output_parsers/openai_tools.js +0 -1
  474. package/output_parsers.cjs +0 -1
  475. package/output_parsers.d.cts +0 -1
  476. package/output_parsers.d.ts +0 -1
  477. package/output_parsers.js +0 -1
  478. package/outputs.cjs +0 -1
  479. package/outputs.d.cts +0 -1
  480. package/outputs.d.ts +0 -1
  481. package/outputs.js +0 -1
  482. package/prompt_values.cjs +0 -1
  483. package/prompt_values.d.cts +0 -1
  484. package/prompt_values.d.ts +0 -1
  485. package/prompt_values.js +0 -1
  486. package/prompts.cjs +0 -1
  487. package/prompts.d.cts +0 -1
  488. package/prompts.d.ts +0 -1
  489. package/prompts.js +0 -1
  490. package/retrievers/document_compressors.cjs +0 -1
  491. package/retrievers/document_compressors.d.cts +0 -1
  492. package/retrievers/document_compressors.d.ts +0 -1
  493. package/retrievers/document_compressors.js +0 -1
  494. package/retrievers.cjs +0 -1
  495. package/retrievers.d.cts +0 -1
  496. package/retrievers.d.ts +0 -1
  497. package/retrievers.js +0 -1
  498. package/runnables/graph.cjs +0 -1
  499. package/runnables/graph.d.cts +0 -1
  500. package/runnables/graph.d.ts +0 -1
  501. package/runnables/graph.js +0 -1
  502. package/runnables.cjs +0 -1
  503. package/runnables.d.cts +0 -1
  504. package/runnables.d.ts +0 -1
  505. package/runnables.js +0 -1
  506. package/singletons.cjs +0 -1
  507. package/singletons.d.cts +0 -1
  508. package/singletons.d.ts +0 -1
  509. package/singletons.js +0 -1
  510. package/stores.cjs +0 -1
  511. package/stores.d.cts +0 -1
  512. package/stores.d.ts +0 -1
  513. package/stores.js +0 -1
  514. package/structured_query.cjs +0 -1
  515. package/structured_query.d.cts +0 -1
  516. package/structured_query.d.ts +0 -1
  517. package/structured_query.js +0 -1
  518. package/tools.cjs +0 -1
  519. package/tools.d.cts +0 -1
  520. package/tools.d.ts +0 -1
  521. package/tools.js +0 -1
  522. package/tracers/base.cjs +0 -1
  523. package/tracers/base.d.cts +0 -1
  524. package/tracers/base.d.ts +0 -1
  525. package/tracers/base.js +0 -1
  526. package/tracers/console.cjs +0 -1
  527. package/tracers/console.d.cts +0 -1
  528. package/tracers/console.d.ts +0 -1
  529. package/tracers/console.js +0 -1
  530. package/tracers/log_stream.cjs +0 -1
  531. package/tracers/log_stream.d.cts +0 -1
  532. package/tracers/log_stream.d.ts +0 -1
  533. package/tracers/log_stream.js +0 -1
  534. package/tracers/run_collector.cjs +0 -1
  535. package/tracers/run_collector.d.cts +0 -1
  536. package/tracers/run_collector.d.ts +0 -1
  537. package/tracers/run_collector.js +0 -1
  538. package/tracers/tracer_langchain.cjs +0 -1
  539. package/tracers/tracer_langchain.d.cts +0 -1
  540. package/tracers/tracer_langchain.d.ts +0 -1
  541. package/tracers/tracer_langchain.js +0 -1
  542. package/types/stream.cjs +0 -1
  543. package/types/stream.d.cts +0 -1
  544. package/types/stream.d.ts +0 -1
  545. package/types/stream.js +0 -1
  546. package/utils/async_caller.cjs +0 -1
  547. package/utils/async_caller.d.cts +0 -1
  548. package/utils/async_caller.d.ts +0 -1
  549. package/utils/async_caller.js +0 -1
  550. package/utils/chunk_array.cjs +0 -1
  551. package/utils/chunk_array.d.cts +0 -1
  552. package/utils/chunk_array.d.ts +0 -1
  553. package/utils/chunk_array.js +0 -1
  554. package/utils/env.cjs +0 -1
  555. package/utils/env.d.cts +0 -1
  556. package/utils/env.d.ts +0 -1
  557. package/utils/env.js +0 -1
  558. package/utils/event_source_parse.cjs +0 -1
  559. package/utils/event_source_parse.d.cts +0 -1
  560. package/utils/event_source_parse.d.ts +0 -1
  561. package/utils/event_source_parse.js +0 -1
  562. package/utils/format.cjs +0 -1
  563. package/utils/format.d.cts +0 -1
  564. package/utils/format.d.ts +0 -1
  565. package/utils/format.js +0 -1
  566. package/utils/function_calling.cjs +0 -1
  567. package/utils/function_calling.d.cts +0 -1
  568. package/utils/function_calling.d.ts +0 -1
  569. package/utils/function_calling.js +0 -1
  570. package/utils/hash.cjs +0 -1
  571. package/utils/hash.d.cts +0 -1
  572. package/utils/hash.d.ts +0 -1
  573. package/utils/hash.js +0 -1
  574. package/utils/json_patch.cjs +0 -1
  575. package/utils/json_patch.d.cts +0 -1
  576. package/utils/json_patch.d.ts +0 -1
  577. package/utils/json_patch.js +0 -1
  578. package/utils/json_schema.cjs +0 -1
  579. package/utils/json_schema.d.cts +0 -1
  580. package/utils/json_schema.d.ts +0 -1
  581. package/utils/json_schema.js +0 -1
  582. package/utils/math.cjs +0 -1
  583. package/utils/math.d.cts +0 -1
  584. package/utils/math.d.ts +0 -1
  585. package/utils/math.js +0 -1
  586. package/utils/stream.cjs +0 -1
  587. package/utils/stream.d.cts +0 -1
  588. package/utils/stream.d.ts +0 -1
  589. package/utils/stream.js +0 -1
  590. package/utils/testing.cjs +0 -1
  591. package/utils/testing.d.cts +0 -1
  592. package/utils/testing.d.ts +0 -1
  593. package/utils/testing.js +0 -1
  594. package/utils/tiktoken.cjs +0 -1
  595. package/utils/tiktoken.d.cts +0 -1
  596. package/utils/tiktoken.d.ts +0 -1
  597. package/utils/tiktoken.js +0 -1
  598. package/utils/types.cjs +0 -1
  599. package/utils/types.d.cts +0 -1
  600. package/utils/types.d.ts +0 -1
  601. package/utils/types.js +0 -1
  602. package/vectorstores.cjs +0 -1
  603. package/vectorstores.d.cts +0 -1
  604. package/vectorstores.d.ts +0 -1
  605. package/vectorstores.js +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.cts","names":["TiktokenModel","ZodType","ZodTypeV3","$ZodType","ZodTypeV4","BaseCache","BasePromptValueInterface","BaseMessage","BaseMessageLike","MessageContent","LLMResult","CallbackManager","Callbacks","AsyncCaller","AsyncCallerParams","Runnable","RunnableInterface","RunnableConfig","JSONSchema","InferInteropZodOutput","InteropZodObject","InteropZodType","ModelProfile","getModelNameForTiktoken","getEmbeddingContextSize","getModelContextSize","isOpenAITool","ToolDefinition","CalculateMaxTokenProps","calculateMaxTokens","prompt","modelName","Promise","SerializedLLM","Record","BaseLangChainParams","BaseLangChain","RunInput","RunOutput","CallOptions","BaseLanguageModelParams","BaseLanguageModelTracingCallOptions","BaseLanguageModelCallOptions","FunctionDefinition","FunctionCallOption","BaseFunctionCallOptions","BaseLanguageModelInput","StructuredOutputType","StructuredOutputMethodOptions","IncludeRaw","StructuredOutputMethodParams","BaseLanguageModelInterface","LanguageModelOutput","LanguageModelLike","BaseLanguageModel","callbacks","callbackManager","config","TokenUsage"],"sources":["../../src/language_models/base.d.ts"],"sourcesContent":["import type { TiktokenModel } from \"js-tiktoken/lite\";\nimport type { ZodType as ZodTypeV3 } from \"zod/v3\";\nimport type { $ZodType as ZodTypeV4 } from \"zod/v4/core\";\nimport { type BaseCache } from \"../caches/index.js\";\nimport { type BasePromptValueInterface } from \"../prompt_values.js\";\nimport { type BaseMessage, type BaseMessageLike, type MessageContent } from \"../messages/base.js\";\nimport { type LLMResult } from \"../outputs.js\";\nimport { CallbackManager, Callbacks } from \"../callbacks/manager.js\";\nimport { AsyncCaller, AsyncCallerParams } from \"../utils/async_caller.js\";\nimport { Runnable, type RunnableInterface } from \"../runnables/base.js\";\nimport { RunnableConfig } from \"../runnables/config.js\";\nimport { JSONSchema } from \"../utils/json_schema.js\";\nimport { InferInteropZodOutput, InteropZodObject, InteropZodType } from \"../utils/types/zod.js\";\nimport { ModelProfile } from \"./profile.js\";\nexport declare const getModelNameForTiktoken: (modelName: string) => TiktokenModel;\nexport declare const getEmbeddingContextSize: (modelName?: string | undefined) => number;\n/**\n * Get the context window size (max input tokens) for a given model.\n *\n * Context window sizes are sourced from official model documentation:\n * - OpenAI: https://platform.openai.com/docs/models\n * - Anthropic: https://docs.anthropic.com/claude/docs/models-overview\n * - Google: https://ai.google.dev/gemini/docs/models/gemini\n *\n * @param modelName - The name of the model\n * @returns The context window size in tokens\n */\nexport declare const getModelContextSize: (modelName: string) => number;\n/**\n * Whether or not the input matches the OpenAI tool definition.\n * @param {unknown} tool The input to check.\n * @returns {boolean} Whether the input is an OpenAI tool definition.\n */\nexport declare function isOpenAITool(tool: unknown): tool is ToolDefinition;\ninterface CalculateMaxTokenProps {\n prompt: string;\n modelName: TiktokenModel;\n}\nexport declare const calculateMaxTokens: ({ prompt, modelName, }: CalculateMaxTokenProps) => Promise<number>;\nexport type SerializedLLM = {\n _model: string;\n _type: string;\n} & Record<string, any>;\nexport interface BaseLangChainParams {\n verbose?: boolean;\n callbacks?: Callbacks;\n tags?: string[];\n metadata?: Record<string, unknown>;\n}\n/**\n * Base class for language models, chains, tools.\n */\nexport declare abstract class BaseLangChain<RunInput, RunOutput, CallOptions extends RunnableConfig = RunnableConfig> extends Runnable<RunInput, RunOutput, CallOptions> implements BaseLangChainParams {\n /**\n * Whether to print out response text.\n */\n verbose: boolean;\n callbacks?: Callbacks;\n tags?: string[];\n metadata?: Record<string, unknown>;\n get lc_attributes(): {\n [key: string]: undefined;\n } | undefined;\n constructor(params: BaseLangChainParams);\n}\n/**\n * Base interface for language model parameters.\n * A subclass of {@link BaseLanguageModel} should have a constructor that\n * takes in a parameter that extends this interface.\n */\nexport interface BaseLanguageModelParams extends AsyncCallerParams, BaseLangChainParams {\n /**\n * @deprecated Use `callbacks` instead\n */\n callbackManager?: CallbackManager;\n cache?: BaseCache | boolean;\n}\nexport interface BaseLanguageModelTracingCallOptions {\n /**\n * Describes the format of structured outputs.\n * This should be provided if an output is considered to be structured\n */\n ls_structured_output_format?: {\n /**\n * An object containing the method used for structured output (e.g., \"jsonMode\").\n */\n kwargs: {\n method: string;\n };\n /**\n * The JSON schema describing the expected output structure.\n */\n schema?: JSONSchema;\n };\n}\nexport interface BaseLanguageModelCallOptions extends RunnableConfig, BaseLanguageModelTracingCallOptions {\n /**\n * Stop tokens to use for this call.\n * If not provided, the default stop tokens for the model will be used.\n */\n stop?: string[];\n}\nexport interface FunctionDefinition {\n /**\n * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain\n * underscores and dashes, with a maximum length of 64.\n */\n name: string;\n /**\n * The parameters the functions accepts, described as a JSON Schema object. See the\n * [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for\n * examples, and the\n * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n * documentation about the format.\n *\n * To describe a function that accepts no parameters, provide the value\n * `{\"type\": \"object\", \"properties\": {}}`.\n */\n parameters: Record<string, unknown> | JSONSchema;\n /**\n * A description of what the function does, used by the model to choose when and\n * how to call the function.\n */\n description?: string;\n}\nexport interface ToolDefinition {\n type: \"function\";\n function: FunctionDefinition;\n}\nexport type FunctionCallOption = {\n name: string;\n};\nexport interface BaseFunctionCallOptions extends BaseLanguageModelCallOptions {\n function_call?: FunctionCallOption;\n functions?: FunctionDefinition[];\n}\nexport type BaseLanguageModelInput = BasePromptValueInterface | string | BaseMessageLike[];\nexport type StructuredOutputType = InferInteropZodOutput<InteropZodObject>;\nexport type StructuredOutputMethodOptions<IncludeRaw extends boolean = false> = {\n name?: string;\n method?: \"functionCalling\" | \"jsonMode\" | \"jsonSchema\" | string;\n includeRaw?: IncludeRaw;\n /** Whether to use strict mode. Currently only supported by OpenAI models. */\n strict?: boolean;\n};\n/** @deprecated Use StructuredOutputMethodOptions instead */\nexport type StructuredOutputMethodParams<RunOutput, IncludeRaw extends boolean = false> = {\n /** @deprecated Pass schema in as the first argument */\n schema: InteropZodType<RunOutput> | Record<string, any>;\n name?: string;\n method?: \"functionCalling\" | \"jsonMode\";\n includeRaw?: IncludeRaw;\n};\nexport interface BaseLanguageModelInterface<RunOutput = any, CallOptions extends BaseLanguageModelCallOptions = BaseLanguageModelCallOptions> extends RunnableInterface<BaseLanguageModelInput, RunOutput, CallOptions> {\n get callKeys(): string[];\n generatePrompt(promptValues: BasePromptValueInterface[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n _modelType(): string;\n _llmType(): string;\n getNumTokens(content: MessageContent): Promise<number>;\n /**\n * Get the identifying parameters of the LLM.\n */\n _identifyingParams(): Record<string, any>;\n serialize(): SerializedLLM;\n}\nexport type LanguageModelOutput = BaseMessage | string;\nexport type LanguageModelLike = Runnable<BaseLanguageModelInput, LanguageModelOutput>;\n/**\n * Base class for language models.\n */\nexport declare abstract class BaseLanguageModel<RunOutput = any, CallOptions extends BaseLanguageModelCallOptions = BaseLanguageModelCallOptions> extends BaseLangChain<BaseLanguageModelInput, RunOutput, CallOptions> implements BaseLanguageModelParams, BaseLanguageModelInterface<RunOutput, CallOptions> {\n /**\n * Keys that the language model accepts as call options.\n */\n get callKeys(): string[];\n /**\n * The async caller should be used by subclasses to make any async calls,\n * which will thus benefit from the concurrency and retry logic.\n */\n caller: AsyncCaller;\n cache?: BaseCache;\n constructor({ callbacks, callbackManager, ...params }: BaseLanguageModelParams);\n abstract generatePrompt(promptValues: BasePromptValueInterface[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n abstract _modelType(): string;\n abstract _llmType(): string;\n private _encoding?;\n /**\n * Get the number of tokens in the content.\n * @param content The content to get the number of tokens for.\n * @returns The number of tokens in the content.\n */\n getNumTokens(content: MessageContent): Promise<number>;\n protected static _convertInputToPromptValue(input: BaseLanguageModelInput): BasePromptValueInterface;\n /**\n * Get the identifying parameters of the LLM.\n */\n _identifyingParams(): Record<string, any>;\n /**\n * Create a unique cache key for a specific call to a specific language model.\n * @param callOptions Call options for the model\n * @returns A unique cache key.\n */\n _getSerializedCacheKeyParametersForCall({ config, ...callOptions }: CallOptions & {\n config?: RunnableConfig;\n }): string;\n /**\n * @deprecated\n * Return a json-like object representing this LLM.\n */\n serialize(): SerializedLLM;\n /**\n * @deprecated\n * Load an LLM from a json-like object describing it.\n */\n static deserialize(_data: SerializedLLM): Promise<BaseLanguageModel>;\n /**\n * Return profiling information for the model.\n *\n * @returns {ModelProfile} An object describing the model's capabilities and constraints\n */\n get profile(): ModelProfile;\n withStructuredOutput?<RunOutput extends Record<string, any> = Record<string, any>>(schema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput?<RunOutput extends Record<string, any> = Record<string, any>>(schema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n withStructuredOutput?<RunOutput extends Record<string, any> = Record<string, any>>(schema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput?<RunOutput extends Record<string, any> = Record<string, any>>(schema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n /**\n * Model wrapper that returns outputs formatted to match the given schema.\n *\n * @template {BaseLanguageModelInput} RunInput The input type for the Runnable, expected to be the same input for the LLM.\n * @template {Record<string, any>} RunOutput The output type for the Runnable, expected to be a Zod schema object for structured output validation.\n *\n * @param {InteropZodType<RunOutput>} schema The schema for the structured output. Either as a Zod schema or a valid JSON schema object.\n * If a Zod schema is passed, the returned attributes will be validated, whereas with JSON schema they will not be.\n * @param {string} name The name of the function to call.\n * @param {\"functionCalling\" | \"jsonMode\"} [method=functionCalling] The method to use for getting the structured output. Defaults to \"functionCalling\".\n * @param {boolean | undefined} [includeRaw=false] Whether to include the raw output in the result. Defaults to false.\n * @returns {Runnable<RunInput, RunOutput> | Runnable<RunInput, { raw: BaseMessage; parsed: RunOutput }>} A new runnable that calls the LLM with structured output.\n */\n withStructuredOutput?<RunOutput extends Record<string, any> = Record<string, any>>(schema: InteropZodType<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<boolean>): Runnable<BaseLanguageModelInput, RunOutput> | Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n}\n/**\n * Shared interface for token usage\n * return type from LLM calls.\n */\nexport interface TokenUsage {\n completionTokens?: number;\n promptTokens?: number;\n totalTokens?: number;\n}\nexport {};\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;;;;;;;;;;;cAcqBuB,gDAAgDvB;cAChDwB;AADrB;AACA;AAYA;AAMA;AAA4E;AAK5E;;;;;AAAoG;AACxFS,cAZSR,mBAeX,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,GAAA,MAAA;AACV;AASA;;;;AAAiJa,iBAnBzHZ,YAAAA,CAmByHY,IAAAA,EAAAA,OAAAA,CAAAA,EAAAA,IAAAA,IAnBpFX,cAmBoFW;UAlBvIV,sBAAAA,CAkBkJW;EAK5I3B,MAAAA,EAAAA,MAAAA;EAEDsB,SAAAA,EAvBAlC,aAuBAkC;;AAP+GnB,cAdzGc,kBAcyGd,EAAAA,CAAAA;EAAAA,MAAAA;EAAAA;AAAAA,CAAAA,EAd5Da,sBAc4Db,EAAAA,GAdjCiB,OAciCjB,CAAAA,MAAAA,CAAAA;AAAsDoB,KAbxKF,aAAAA,GAawKE;EAAmB,MAAA,EAAA,MAAA;EAkBtLK,KAAAA,EAAAA,MAAAA;CAIK7B,GAhClBuB,MAgCkBvB,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;AACVN,UAhCK8B,mBAAAA,CAgCL9B;EALqCS,OAAAA,CAAAA,EAAAA,OAAAA;EAAmBqB,SAAAA,CAAAA,EAzBpDvB,SAyBoDuB;EAAmB,IAAA,CAAA,EAAA,MAAA,EAAA;EAOtEM,QAAAA,CAAAA,EA9BFP,MA8BEO,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;AAkBjB;AAOA;AAuBA;AAIA;AAGiBI,uBAhFaT,aAgFU,CAAA,QAAA,EAAA,SAAA,EAAA,oBAhF6CnB,cAgF7C,GAhF8DA,cAgF9D,CAAA,SAhFsFF,QAgFtF,CAhF+FsB,QAgF/F,EAhFy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AA,CAAA,CAAA,EAAA,MAAA,EAAA;EAmFrQsB;;;;UA1EL7C;UACAR;;;;;KAC+CmC;wCACjBlC,iDAAiDiC,yBAAyB3B,YAAYoB,QAAQtB;;;;;;;;;wBAS9GD,iBAAiBuB;qDACYc,yBAAyBxC;;;;wBAItD4B;;;;;;;;;KAM8CK;aACvDtB;;;;;;eAMAgB;;;;;4BAKaA,gBAAgBD,QAAQsB;;;;;;iBAMnChC;0CACyBY,sBAAsBA,6BAA6BhC,QAAUoC,aAAaJ,8BAA8Bc,uCAAuCjC,SAAS+B,wBAAwBR;0CAChLJ,sBAAsBA,6BAA6BhC,QAAUoC,aAAaJ,8BAA8Bc,sCAAsCjC,SAAS+B;SACtLvC;YACG+B;;0CAE4BJ,sBAAsBA,6BAA6B9B,SAAUkC,aAAaJ,8BAA8Bc,uCAAuCjC,SAAS+B,wBAAwBR;0CAChLJ,sBAAsBA,6BAA6B9B,SAAUkC,aAAaJ,8BAA8Bc,sCAAsCjC,SAAS+B;SACtLvC;YACG+B;;;;;;;;;;;;;;;0CAe4BJ,sBAAsBA,6BAA6Bb,eAAeiB,aAAaJ,8BAA8Bc,yCAAyCjC,SAAS+B,wBAAwBR,aAAavB,SAAS+B;SAC5OvC;YACG+B;;;;;;;UAOCoB,UAAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","names":["TiktokenModel","ZodType","ZodTypeV3","$ZodType","ZodTypeV4","BaseCache","BasePromptValueInterface","BaseMessage","BaseMessageLike","MessageContent","LLMResult","CallbackManager","Callbacks","AsyncCaller","AsyncCallerParams","Runnable","RunnableInterface","RunnableConfig","JSONSchema","InferInteropZodOutput","InteropZodObject","InteropZodType","ModelProfile","getModelNameForTiktoken","getEmbeddingContextSize","getModelContextSize","isOpenAITool","ToolDefinition","CalculateMaxTokenProps","calculateMaxTokens","prompt","modelName","Promise","SerializedLLM","Record","BaseLangChainParams","BaseLangChain","RunInput","RunOutput","CallOptions","BaseLanguageModelParams","BaseLanguageModelTracingCallOptions","BaseLanguageModelCallOptions","FunctionDefinition","FunctionCallOption","BaseFunctionCallOptions","BaseLanguageModelInput","StructuredOutputType","StructuredOutputMethodOptions","IncludeRaw","StructuredOutputMethodParams","BaseLanguageModelInterface","LanguageModelOutput","LanguageModelLike","BaseLanguageModel","callbacks","callbackManager","config","TokenUsage"],"sources":["../../src/language_models/base.d.ts"],"sourcesContent":["import type { TiktokenModel } from \"js-tiktoken/lite\";\nimport type { ZodType as ZodTypeV3 } from \"zod/v3\";\nimport type { $ZodType as ZodTypeV4 } from \"zod/v4/core\";\nimport { type BaseCache } from \"../caches/index.js\";\nimport { type BasePromptValueInterface } from \"../prompt_values.js\";\nimport { type BaseMessage, type BaseMessageLike, type MessageContent } from \"../messages/base.js\";\nimport { type LLMResult } from \"../outputs.js\";\nimport { CallbackManager, Callbacks } from \"../callbacks/manager.js\";\nimport { AsyncCaller, AsyncCallerParams } from \"../utils/async_caller.js\";\nimport { Runnable, type RunnableInterface } from \"../runnables/base.js\";\nimport { RunnableConfig } from \"../runnables/config.js\";\nimport { JSONSchema } from \"../utils/json_schema.js\";\nimport { InferInteropZodOutput, InteropZodObject, InteropZodType } from \"../utils/types/zod.js\";\nimport { ModelProfile } from \"./profile.js\";\nexport declare const getModelNameForTiktoken: (modelName: string) => TiktokenModel;\nexport declare const getEmbeddingContextSize: (modelName?: string | undefined) => number;\n/**\n * Get the context window size (max input tokens) for a given model.\n *\n * Context window sizes are sourced from official model documentation:\n * - OpenAI: https://platform.openai.com/docs/models\n * - Anthropic: https://docs.anthropic.com/claude/docs/models-overview\n * - Google: https://ai.google.dev/gemini/docs/models/gemini\n *\n * @param modelName - The name of the model\n * @returns The context window size in tokens\n */\nexport declare const getModelContextSize: (modelName: string) => number;\n/**\n * Whether or not the input matches the OpenAI tool definition.\n * @param {unknown} tool The input to check.\n * @returns {boolean} Whether the input is an OpenAI tool definition.\n */\nexport declare function isOpenAITool(tool: unknown): tool is ToolDefinition;\ninterface CalculateMaxTokenProps {\n prompt: string;\n modelName: TiktokenModel;\n}\nexport declare const calculateMaxTokens: ({ prompt, modelName, }: CalculateMaxTokenProps) => Promise<number>;\nexport type SerializedLLM = {\n _model: string;\n _type: string;\n} & Record<string, any>;\nexport interface BaseLangChainParams {\n verbose?: boolean;\n callbacks?: Callbacks;\n tags?: string[];\n metadata?: Record<string, unknown>;\n}\n/**\n * Base class for language models, chains, tools.\n */\nexport declare abstract class BaseLangChain<RunInput, RunOutput, CallOptions extends RunnableConfig = RunnableConfig> extends Runnable<RunInput, RunOutput, CallOptions> implements BaseLangChainParams {\n /**\n * Whether to print out response text.\n */\n verbose: boolean;\n callbacks?: Callbacks;\n tags?: string[];\n metadata?: Record<string, unknown>;\n get lc_attributes(): {\n [key: string]: undefined;\n } | undefined;\n constructor(params: BaseLangChainParams);\n}\n/**\n * Base interface for language model parameters.\n * A subclass of {@link BaseLanguageModel} should have a constructor that\n * takes in a parameter that extends this interface.\n */\nexport interface BaseLanguageModelParams extends AsyncCallerParams, BaseLangChainParams {\n /**\n * @deprecated Use `callbacks` instead\n */\n callbackManager?: CallbackManager;\n cache?: BaseCache | boolean;\n}\nexport interface BaseLanguageModelTracingCallOptions {\n /**\n * Describes the format of structured outputs.\n * This should be provided if an output is considered to be structured\n */\n ls_structured_output_format?: {\n /**\n * An object containing the method used for structured output (e.g., \"jsonMode\").\n */\n kwargs: {\n method: string;\n };\n /**\n * The JSON schema describing the expected output structure.\n */\n schema?: JSONSchema;\n };\n}\nexport interface BaseLanguageModelCallOptions extends RunnableConfig, BaseLanguageModelTracingCallOptions {\n /**\n * Stop tokens to use for this call.\n * If not provided, the default stop tokens for the model will be used.\n */\n stop?: string[];\n}\nexport interface FunctionDefinition {\n /**\n * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain\n * underscores and dashes, with a maximum length of 64.\n */\n name: string;\n /**\n * The parameters the functions accepts, described as a JSON Schema object. See the\n * [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for\n * examples, and the\n * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n * documentation about the format.\n *\n * To describe a function that accepts no parameters, provide the value\n * `{\"type\": \"object\", \"properties\": {}}`.\n */\n parameters: Record<string, unknown> | JSONSchema;\n /**\n * A description of what the function does, used by the model to choose when and\n * how to call the function.\n */\n description?: string;\n}\nexport interface ToolDefinition {\n type: \"function\";\n function: FunctionDefinition;\n}\nexport type FunctionCallOption = {\n name: string;\n};\nexport interface BaseFunctionCallOptions extends BaseLanguageModelCallOptions {\n function_call?: FunctionCallOption;\n functions?: FunctionDefinition[];\n}\nexport type BaseLanguageModelInput = BasePromptValueInterface | string | BaseMessageLike[];\nexport type StructuredOutputType = InferInteropZodOutput<InteropZodObject>;\nexport type StructuredOutputMethodOptions<IncludeRaw extends boolean = false> = {\n name?: string;\n method?: \"functionCalling\" | \"jsonMode\" | \"jsonSchema\" | string;\n includeRaw?: IncludeRaw;\n /** Whether to use strict mode. Currently only supported by OpenAI models. */\n strict?: boolean;\n};\n/** @deprecated Use StructuredOutputMethodOptions instead */\nexport type StructuredOutputMethodParams<RunOutput, IncludeRaw extends boolean = false> = {\n /** @deprecated Pass schema in as the first argument */\n schema: InteropZodType<RunOutput> | Record<string, any>;\n name?: string;\n method?: \"functionCalling\" | \"jsonMode\";\n includeRaw?: IncludeRaw;\n};\nexport interface BaseLanguageModelInterface<RunOutput = any, CallOptions extends BaseLanguageModelCallOptions = BaseLanguageModelCallOptions> extends RunnableInterface<BaseLanguageModelInput, RunOutput, CallOptions> {\n get callKeys(): string[];\n generatePrompt(promptValues: BasePromptValueInterface[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n _modelType(): string;\n _llmType(): string;\n getNumTokens(content: MessageContent): Promise<number>;\n /**\n * Get the identifying parameters of the LLM.\n */\n _identifyingParams(): Record<string, any>;\n serialize(): SerializedLLM;\n}\nexport type LanguageModelOutput = BaseMessage | string;\nexport type LanguageModelLike = Runnable<BaseLanguageModelInput, LanguageModelOutput>;\n/**\n * Base class for language models.\n */\nexport declare abstract class BaseLanguageModel<RunOutput = any, CallOptions extends BaseLanguageModelCallOptions = BaseLanguageModelCallOptions> extends BaseLangChain<BaseLanguageModelInput, RunOutput, CallOptions> implements BaseLanguageModelParams, BaseLanguageModelInterface<RunOutput, CallOptions> {\n /**\n * Keys that the language model accepts as call options.\n */\n get callKeys(): string[];\n /**\n * The async caller should be used by subclasses to make any async calls,\n * which will thus benefit from the concurrency and retry logic.\n */\n caller: AsyncCaller;\n cache?: BaseCache;\n constructor({ callbacks, callbackManager, ...params }: BaseLanguageModelParams);\n abstract generatePrompt(promptValues: BasePromptValueInterface[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n abstract _modelType(): string;\n abstract _llmType(): string;\n private _encoding?;\n /**\n * Get the number of tokens in the content.\n * @param content The content to get the number of tokens for.\n * @returns The number of tokens in the content.\n */\n getNumTokens(content: MessageContent): Promise<number>;\n protected static _convertInputToPromptValue(input: BaseLanguageModelInput): BasePromptValueInterface;\n /**\n * Get the identifying parameters of the LLM.\n */\n _identifyingParams(): Record<string, any>;\n /**\n * Create a unique cache key for a specific call to a specific language model.\n * @param callOptions Call options for the model\n * @returns A unique cache key.\n */\n _getSerializedCacheKeyParametersForCall({ config, ...callOptions }: CallOptions & {\n config?: RunnableConfig;\n }): string;\n /**\n * @deprecated\n * Return a json-like object representing this LLM.\n */\n serialize(): SerializedLLM;\n /**\n * @deprecated\n * Load an LLM from a json-like object describing it.\n */\n static deserialize(_data: SerializedLLM): Promise<BaseLanguageModel>;\n /**\n * Return profiling information for the model.\n *\n * @returns {ModelProfile} An object describing the model's capabilities and constraints\n */\n get profile(): ModelProfile;\n withStructuredOutput?<RunOutput extends Record<string, any> = Record<string, any>>(schema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput?<RunOutput extends Record<string, any> = Record<string, any>>(schema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n withStructuredOutput?<RunOutput extends Record<string, any> = Record<string, any>>(schema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput?<RunOutput extends Record<string, any> = Record<string, any>>(schema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n /**\n * Model wrapper that returns outputs formatted to match the given schema.\n *\n * @template {BaseLanguageModelInput} RunInput The input type for the Runnable, expected to be the same input for the LLM.\n * @template {Record<string, any>} RunOutput The output type for the Runnable, expected to be a Zod schema object for structured output validation.\n *\n * @param {InteropZodType<RunOutput>} schema The schema for the structured output. Either as a Zod schema or a valid JSON schema object.\n * If a Zod schema is passed, the returned attributes will be validated, whereas with JSON schema they will not be.\n * @param {string} name The name of the function to call.\n * @param {\"functionCalling\" | \"jsonMode\"} [method=functionCalling] The method to use for getting the structured output. Defaults to \"functionCalling\".\n * @param {boolean | undefined} [includeRaw=false] Whether to include the raw output in the result. Defaults to false.\n * @returns {Runnable<RunInput, RunOutput> | Runnable<RunInput, { raw: BaseMessage; parsed: RunOutput }>} A new runnable that calls the LLM with structured output.\n */\n withStructuredOutput?<RunOutput extends Record<string, any> = Record<string, any>>(schema: InteropZodType<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<boolean>): Runnable<BaseLanguageModelInput, RunOutput> | Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n}\n/**\n * Shared interface for token usage\n * return type from LLM calls.\n */\nexport interface TokenUsage {\n completionTokens?: number;\n promptTokens?: number;\n totalTokens?: number;\n}\nexport {};\n//# sourceMappingURL=base.d.ts.map"],"mappings":";;;;;;;;;;;;;;;;;;cAcqBuB,gDA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AAyB3B,YAAYoB,QAAQtB;;;;;;;;;wBAS9GD,iBAAiBuB;qDACYc,yBAAyBxC;;;;wBAItD4B;;;;;;;;;KAM8CK;aACvDtB;;;;;;eAMAgB;;;;;4BAKaA,gBAAgBD,QAAQsB;;;;;;iBAMnChC;0CACyBY,sBAAsBA,6BAA6BhC,QAAUoC,aAAaJ,8BAA8Bc,uCAAuCjC,SAAS+B,wBAAwBR;0CAChLJ,sBAAsBA,6BAA6BhC,QAAUoC,aAAaJ,8BAA8Bc,sCAAsCjC,SAAS+B;SACtLvC;YACG+B;;0CAE4BJ,sBAAsBA,6BAA6B9B,SAAUkC,aAAaJ,8BAA8Bc,uCAAuCjC,SAAS+B,wBAAwBR;0CAChLJ,sBAAsBA,6BAA6B9B,SAAUkC,aAAaJ,8BAA8Bc,sCAAsCjC,SAAS+B;SACtLvC;YACG+B;;;;;;;;;;;;;;;0CAe4BJ,sBAAsBA,6BAA6Bb,eAAeiB,aAAaJ,8BAA8Bc,yCAAyCjC,SAAS+B,wBAAwBR,aAAavB,SAAS+B;SAC5OvC;YACG+B;;;;;;;UAOCoB,UAAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat_models.d.cts","names":["ZodType","ZodTypeV3","$ZodType","ZodTypeV4","BaseMessage","BaseMessageChunk","BaseMessageLike","AIMessageChunk","MessageOutputVersion","BasePromptValueInterface","LLMResult","ChatGenerationChunk","ChatResult","Generation","BaseLanguageModel","StructuredOutputMethodOptions","ToolDefinition","BaseLanguageModelCallOptions","BaseLanguageModelInput","BaseLanguageModelParams","CallbackManagerForLLMRun","Callbacks","RunnableConfig","BaseCache","StructuredToolInterface","StructuredToolParams","Runnable","RunnableToolLike","ToolChoice","Record","SerializedChatModel","SerializedLLM","BaseChatModelParams","BaseChatModelCallOptions","LangSmithParams","Array","BindToolsInput","BaseChatModel","RunOutput","CallOptions","OutputMessageType","Exclude","Omit","Partial","Promise","AsyncGenerator","messages","cache","llmStringKey","parsedOptions","handledOptions","SimpleChatModel"],"sources":["../../src/language_models/chat_models.d.ts"],"sourcesContent":["import type { ZodType as ZodTypeV3 } from \"zod/v3\";\nimport type { $ZodType as ZodTypeV4 } from \"zod/v4/core\";\nimport { type BaseMessage, BaseMessageChunk, type BaseMessageLike, AIMessageChunk, MessageOutputVersion } from \"../messages/index.js\";\nimport type { BasePromptValueInterface } from \"../prompt_values.js\";\nimport { LLMResult, ChatGenerationChunk, type ChatResult, type Generation } from \"../outputs.js\";\nimport { BaseLanguageModel, type StructuredOutputMethodOptions, type ToolDefinition, type BaseLanguageModelCallOptions, type BaseLanguageModelInput, type BaseLanguageModelParams } from \"./base.js\";\nimport { type CallbackManagerForLLMRun, type Callbacks } from \"../callbacks/manager.js\";\nimport type { RunnableConfig } from \"../runnables/config.js\";\nimport type { BaseCache } from \"../caches/index.js\";\nimport { StructuredToolInterface, StructuredToolParams } from \"../tools/index.js\";\nimport { Runnable, RunnableToolLike } from \"../runnables/base.js\";\nexport type ToolChoice = string | Record<string, any> | \"auto\" | \"any\";\n/**\n * Represents a serialized chat model.\n */\nexport type SerializedChatModel = {\n _model: string;\n _type: string;\n} & Record<string, any>;\n/**\n * Represents a serialized large language model.\n */\nexport type SerializedLLM = {\n _model: string;\n _type: string;\n} & Record<string, any>;\n/**\n * Represents the parameters for a base chat model.\n */\nexport type BaseChatModelParams = BaseLanguageModelParams & {\n /**\n * Whether to disable streaming.\n *\n * If streaming is bypassed, then `stream()` will defer to\n * `invoke()`.\n *\n * - If true, will always bypass streaming case.\n * - If false (default), will always use streaming case if available.\n */\n disableStreaming?: boolean;\n /**\n * Version of `AIMessage` output format to store in message content.\n *\n * `AIMessage.contentBlocks` will lazily parse the contents of `content` into a\n * standard format. This flag can be used to additionally store the standard format\n * as the message content, e.g., for serialization purposes.\n *\n * - \"v0\": provider-specific format in content (can lazily parse with `.contentBlocks`)\n * - \"v1\": standardized format in content (consistent with `.contentBlocks`)\n *\n * You can also set `LC_OUTPUT_VERSION` as an environment variable to \"v1\" to\n * enable this by default.\n *\n * @default \"v0\"\n */\n outputVersion?: MessageOutputVersion;\n};\n/**\n * Represents the call options for a base chat model.\n */\nexport type BaseChatModelCallOptions = BaseLanguageModelCallOptions & {\n /**\n * Specifies how the chat model should use tools.\n * @default undefined\n *\n * Possible values:\n * - \"auto\": The model may choose to use any of the provided tools, or none.\n * - \"any\": The model must use one of the provided tools.\n * - \"none\": The model must not use any tools.\n * - A string (not \"auto\", \"any\", or \"none\"): The name of a specific tool the model must use.\n * - An object: A custom schema specifying tool choice parameters. Specific to the provider.\n *\n * Note: Not all providers support tool_choice. An error will be thrown\n * if used with an unsupported model.\n */\n tool_choice?: ToolChoice;\n /**\n * Version of `AIMessage` output format to store in message content.\n *\n * `AIMessage.contentBlocks` will lazily parse the contents of `content` into a\n * standard format. This flag can be used to additionally store the standard format\n * as the message content, e.g., for serialization purposes.\n *\n * - \"v0\": provider-specific format in content (can lazily parse with `.contentBlocks`)\n * - \"v1\": standardized format in content (consistent with `.contentBlocks`)\n *\n * You can also set `LC_OUTPUT_VERSION` as an environment variable to \"v1\" to\n * enable this by default.\n *\n * @default \"v0\"\n */\n outputVersion?: MessageOutputVersion;\n};\nexport type LangSmithParams = {\n ls_provider?: string;\n ls_model_name?: string;\n ls_model_type: \"chat\";\n ls_temperature?: number;\n ls_max_tokens?: number;\n ls_stop?: Array<string>;\n};\nexport type BindToolsInput = StructuredToolInterface | Record<string, any> | ToolDefinition | RunnableToolLike | StructuredToolParams;\n/**\n * Base class for chat models. It extends the BaseLanguageModel class and\n * provides methods for generating chat based on input messages.\n */\nexport declare abstract class BaseChatModel<CallOptions extends BaseChatModelCallOptions = BaseChatModelCallOptions, OutputMessageType extends BaseMessageChunk = AIMessageChunk> extends BaseLanguageModel<OutputMessageType, CallOptions> {\n ParsedCallOptions: Omit<CallOptions, Exclude<keyof RunnableConfig, \"signal\" | \"timeout\" | \"maxConcurrency\">>;\n lc_namespace: string[];\n disableStreaming: boolean;\n outputVersion?: MessageOutputVersion;\n get callKeys(): string[];\n constructor(fields: BaseChatModelParams);\n _combineLLMOutput?(...llmOutputs: LLMResult[\"llmOutput\"][]): LLMResult[\"llmOutput\"];\n protected _separateRunnableConfigFromCallOptionsCompat(options?: Partial<CallOptions>): [RunnableConfig, this[\"ParsedCallOptions\"]];\n /**\n * Bind tool-like objects to this chat model.\n *\n * @param tools A list of tool definitions to bind to this chat model.\n * Can be a structured tool, an OpenAI formatted tool, or an object\n * matching the provider's specific tool schema.\n * @param kwargs Any additional parameters to bind.\n */\n bindTools?(tools: BindToolsInput[], kwargs?: Partial<CallOptions>): Runnable<BaseLanguageModelInput, OutputMessageType, CallOptions>;\n /**\n * Invokes the chat model with a single input.\n * @param input The input for the language model.\n * @param options The call options.\n * @returns A Promise that resolves to a BaseMessageChunk.\n */\n invoke(input: BaseLanguageModelInput, options?: CallOptions): Promise<OutputMessageType>;\n _streamResponseChunks(_messages: BaseMessage[], _options: this[\"ParsedCallOptions\"], _runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;\n _streamIterator(input: BaseLanguageModelInput, options?: CallOptions): AsyncGenerator<OutputMessageType>;\n getLsParams(options: this[\"ParsedCallOptions\"]): LangSmithParams;\n /** @ignore */\n _generateUncached(messages: BaseMessageLike[][], parsedOptions: this[\"ParsedCallOptions\"], handledOptions: RunnableConfig, startedRunManagers?: CallbackManagerForLLMRun[]): Promise<LLMResult>;\n _generateCached({ messages, cache, llmStringKey, parsedOptions, handledOptions }: {\n messages: BaseMessageLike[][];\n cache: BaseCache<Generation[]>;\n llmStringKey: string;\n parsedOptions: any;\n handledOptions: RunnableConfig;\n }): Promise<LLMResult & {\n missingPromptIndices: number[];\n startedRunManagers?: CallbackManagerForLLMRun[];\n }>;\n /**\n * Generates chat based on the input messages.\n * @param messages An array of arrays of BaseMessage instances.\n * @param options The call options or an array of stop sequences.\n * @param callbacks The callbacks for the language model.\n * @returns A Promise that resolves to an LLMResult.\n */\n generate(messages: BaseMessageLike[][], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n /**\n * Get the parameters used to invoke the model\n */\n invocationParams(_options?: this[\"ParsedCallOptions\"]): any;\n _modelType(): string;\n abstract _llmType(): string;\n /**\n * Generates a prompt based on the input prompt values.\n * @param promptValues An array of BasePromptValue instances.\n * @param options The call options or an array of stop sequences.\n * @param callbacks The callbacks for the language model.\n * @returns A Promise that resolves to an LLMResult.\n */\n generatePrompt(promptValues: BasePromptValueInterface[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n abstract _generate(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n}\n/**\n * An abstract class that extends BaseChatModel and provides a simple\n * implementation of _generate.\n */\nexport declare abstract class SimpleChatModel<CallOptions extends BaseChatModelCallOptions = BaseChatModelCallOptions> extends BaseChatModel<CallOptions> {\n abstract _call(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<string>;\n _generate(messages: BaseMessage[], options: this[\"Parsed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AAA,CAAAA,EA1C1DW,OA0C0DX,CA1ClDvB,SA0CkDuB,GAAAA;IAA2BA,oBAAAA,EAAAA,MAAAA,EAAAA;IAAgDM,kBAAAA,CAAAA,EAxChHnB,wBAwCgHmB,EAAAA;EAChHnC,CAAAA,CAAAA;EAAgEgB;;;;;;;EAD+C,QAAA,CAAA,QAAA,EA/BrHd,eA+BqH,EAAA,EAAA,EAAA,OAAA,CAAA,EAAA,MAAA,EAAA,GA/B3EiC,WA+B2E,EAAA,SAAA,CAAA,EA/BlDlB,SA+BkD,CAAA,EA/BtCuB,OA+BsC,CA/B9BlC,SA+B8B,CAAA;;;;;;;;;;;;;;+BAjB3GD,iDAAiD8B,yBAAyBlB,YAAYuB,QAAQlC;+BAC9FN,gEAAgEgB,2BAA2BwB,QAAQhC;yCACzFiB,sBAAsBA,mCAAmC1B,SAAUmC,aAAaT,8BAA8Bd,uCAAuCW,SAASR,wBAAwBoB;yCACtLT,sBAAsBA,mCAAmC1B,SAAUmC,aAAaT,8BAA8Bd,sCAAsCW,SAASR;SAC3Ld;YACGkC;;yCAE2BT,sBAAsBA,mCAAmC5B,QAAUqC,aAAaT,8BAA8Bd,uCAAuCW,SAASR,wBAAwBoB;yCACtLT,sBAAsBA,mCAAmC5B,QAAUqC,aAAaT,8BAA8Bd,sCAAsCW,SAASR;SAC3Ld;YACGkC;;;;;;;uBAOca,oCAAoClB,2BAA2BA,kCAAkCI,cAAcE;2BAChHnC,gEAAgEgB,2BAA2BwB;sBAChGxC,gEAAgEgB,2BAA2BwB,QAAQhC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat_models.d.ts","names":["ZodType","ZodTypeV3","$ZodType","ZodTypeV4","BaseMessage","BaseMessageChunk","BaseMessageLike","AIMessageChunk","MessageOutputVersion","BasePromptValueInterface","LLMResult","ChatGenerationChunk","ChatResult","Generation","BaseLanguageModel","StructuredOutputMethodOptions","ToolDefinition","BaseLanguageModelCallOptions","BaseLanguageModelInput","BaseLanguageModelParams","CallbackManagerForLLMRun","Callbacks","RunnableConfig","BaseCache","StructuredToolInterface","StructuredToolParams","Runnable","RunnableToolLike","ToolChoice","Record","SerializedChatModel","SerializedLLM","BaseChatModelParams","BaseChatModelCallOptions","LangSmithParams","Array","BindToolsInput","BaseChatModel","RunOutput","CallOptions","OutputMessageType","Exclude","Omit","Partial","Promise","AsyncGenerator","messages","cache","llmStringKey","parsedOptions","handledOptions","SimpleChatModel"],"sources":["../../src/language_models/chat_models.d.ts"],"sourcesContent":["import type { ZodType as ZodTypeV3 } from \"zod/v3\";\nimport type { $ZodType as ZodTypeV4 } from \"zod/v4/core\";\nimport { type BaseMessage, BaseMessageChunk, type BaseMessageLike, AIMessageChunk, MessageOutputVersion } from \"../messages/index.js\";\nimport type { BasePromptValueInterface } from \"../prompt_values.js\";\nimport { LLMResult, ChatGenerationChunk, type ChatResult, type Generation } from \"../outputs.js\";\nimport { BaseLanguageModel, type StructuredOutputMethodOptions, type ToolDefinition, type BaseLanguageModelCallOptions, type BaseLanguageModelInput, type BaseLanguageModelParams } from \"./base.js\";\nimport { type CallbackManagerForLLMRun, type Callbacks } from \"../callbacks/manager.js\";\nimport type { RunnableConfig } from \"../runnables/config.js\";\nimport type { BaseCache } from \"../caches/index.js\";\nimport { StructuredToolInterface, StructuredToolParams } from \"../tools/index.js\";\nimport { Runnable, RunnableToolLike } from \"../runnables/base.js\";\nexport type ToolChoice = string | Record<string, any> | \"auto\" | \"any\";\n/**\n * Represents a serialized chat model.\n */\nexport type SerializedChatModel = {\n _model: string;\n _type: string;\n} & Record<string, any>;\n/**\n * Represents a serialized large language model.\n */\nexport type SerializedLLM = {\n _model: string;\n _type: string;\n} & Record<string, any>;\n/**\n * Represents the parameters for a base chat model.\n */\nexport type BaseChatModelParams = BaseLanguageModelParams & {\n /**\n * Whether to disable streaming.\n *\n * If streaming is bypassed, then `stream()` will defer to\n * `invoke()`.\n *\n * - If true, will always bypass streaming case.\n * - If false (default), will always use streaming case if available.\n */\n disableStreaming?: boolean;\n /**\n * Version of `AIMessage` output format to store in message content.\n *\n * `AIMessage.contentBlocks` will lazily parse the contents of `content` into a\n * standard format. This flag can be used to additionally store the standard format\n * as the message content, e.g., for serialization purposes.\n *\n * - \"v0\": provider-specific format in content (can lazily parse with `.contentBlocks`)\n * - \"v1\": standardized format in content (consistent with `.contentBlocks`)\n *\n * You can also set `LC_OUTPUT_VERSION` as an environment variable to \"v1\" to\n * enable this by default.\n *\n * @default \"v0\"\n */\n outputVersion?: MessageOutputVersion;\n};\n/**\n * Represents the call options for a base chat model.\n */\nexport type BaseChatModelCallOptions = BaseLanguageModelCallOptions & {\n /**\n * Specifies how the chat model should use tools.\n * @default undefined\n *\n * Possible values:\n * - \"auto\": The model may choose to use any of the provided tools, or none.\n * - \"any\": The model must use one of the provided tools.\n * - \"none\": The model must not use any tools.\n * - A string (not \"auto\", \"any\", or \"none\"): The name of a specific tool the model must use.\n * - An object: A custom schema specifying tool choice parameters. Specific to the provider.\n *\n * Note: Not all providers support tool_choice. An error will be thrown\n * if used with an unsupported model.\n */\n tool_choice?: ToolChoice;\n /**\n * Version of `AIMessage` output format to store in message content.\n *\n * `AIMessage.contentBlocks` will lazily parse the contents of `content` into a\n * standard format. This flag can be used to additionally store the standard format\n * as the message content, e.g., for serialization purposes.\n *\n * - \"v0\": provider-specific format in content (can lazily parse with `.contentBlocks`)\n * - \"v1\": standardized format in content (consistent with `.contentBlocks`)\n *\n * You can also set `LC_OUTPUT_VERSION` as an environment variable to \"v1\" to\n * enable this by default.\n *\n * @default \"v0\"\n */\n outputVersion?: MessageOutputVersion;\n};\nexport type LangSmithParams = {\n ls_provider?: string;\n ls_model_name?: string;\n ls_model_type: \"chat\";\n ls_temperature?: number;\n ls_max_tokens?: number;\n ls_stop?: Array<string>;\n};\nexport type BindToolsInput = StructuredToolInterface | Record<string, any> | ToolDefinition | RunnableToolLike | StructuredToolParams;\n/**\n * Base class for chat models. It extends the BaseLanguageModel class and\n * provides methods for generating chat based on input messages.\n */\nexport declare abstract class BaseChatModel<CallOptions extends BaseChatModelCallOptions = BaseChatModelCallOptions, OutputMessageType extends BaseMessageChunk = AIMessageChunk> extends BaseLanguageModel<OutputMessageType, CallOptions> {\n ParsedCallOptions: Omit<CallOptions, Exclude<keyof RunnableConfig, \"signal\" | \"timeout\" | \"maxConcurrency\">>;\n lc_namespace: string[];\n disableStreaming: boolean;\n outputVersion?: MessageOutputVersion;\n get callKeys(): string[];\n constructor(fields: BaseChatModelParams);\n _combineLLMOutput?(...llmOutputs: LLMResult[\"llmOutput\"][]): LLMResult[\"llmOutput\"];\n protected _separateRunnableConfigFromCallOptionsCompat(options?: Partial<CallOptions>): [RunnableConfig, this[\"ParsedCallOptions\"]];\n /**\n * Bind tool-like objects to this chat model.\n *\n * @param tools A list of tool definitions to bind to this chat model.\n * Can be a structured tool, an OpenAI formatted tool, or an object\n * matching the provider's specific tool schema.\n * @param kwargs Any additional parameters to bind.\n */\n bindTools?(tools: BindToolsInput[], kwargs?: Partial<CallOptions>): Runnable<BaseLanguageModelInput, OutputMessageType, CallOptions>;\n /**\n * Invokes the chat model with a single input.\n * @param input The input for the language model.\n * @param options The call options.\n * @returns A Promise that resolves to a BaseMessageChunk.\n */\n invoke(input: BaseLanguageModelInput, options?: CallOptions): Promise<OutputMessageType>;\n _streamResponseChunks(_messages: BaseMessage[], _options: this[\"ParsedCallOptions\"], _runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;\n _streamIterator(input: BaseLanguageModelInput, options?: CallOptions): AsyncGenerator<OutputMessageType>;\n getLsParams(options: this[\"ParsedCallOptions\"]): LangSmithParams;\n /** @ignore */\n _generateUncached(messages: BaseMessageLike[][], parsedOptions: this[\"ParsedCallOptions\"], handledOptions: RunnableConfig, startedRunManagers?: CallbackManagerForLLMRun[]): Promise<LLMResult>;\n _generateCached({ messages, cache, llmStringKey, parsedOptions, handledOptions }: {\n messages: BaseMessageLike[][];\n cache: BaseCache<Generation[]>;\n llmStringKey: string;\n parsedOptions: any;\n handledOptions: RunnableConfig;\n }): Promise<LLMResult & {\n missingPromptIndices: number[];\n startedRunManagers?: CallbackManagerForLLMRun[];\n }>;\n /**\n * Generates chat based on the input messages.\n * @param messages An array of arrays of BaseMessage instances.\n * @param options The call options or an array of stop sequences.\n * @param callbacks The callbacks for the language model.\n * @returns A Promise that resolves to an LLMResult.\n */\n generate(messages: BaseMessageLike[][], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n /**\n * Get the parameters used to invoke the model\n */\n invocationParams(_options?: this[\"ParsedCallOptions\"]): any;\n _modelType(): string;\n abstract _llmType(): string;\n /**\n * Generates a prompt based on the input prompt values.\n * @param promptValues An array of BasePromptValue instances.\n * @param options The call options or an array of stop sequences.\n * @param callbacks The callbacks for the language model.\n * @returns A Promise that resolves to an LLMResult.\n */\n generatePrompt(promptValues: BasePromptValueInterface[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n abstract _generate(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV4<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;\n withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: ZodTypeV3<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {\n raw: BaseMessage;\n parsed: RunOutput;\n }>;\n}\n/**\n * An abstract class that extends BaseChatModel and provides a simple\n * implementation of _generate.\n */\nexport declare abstract class SimpleChatModel<CallOptions extends BaseChatModelCallOptions = BaseChatModelCallOptions> extends BaseChatModel<CallOptions> {\n abstract _call(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<string>;\n _generate(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n}\n//# sourceMappingURL=chat_models.d.ts.map"],"mappings":";;;;;;;;;;;;;;;;;;KAWY4B,UAAAA,YAAsBC;;;;KAItBC,mBAAAA;;;AAJZ,CAAA,GAOID,MAPQD,CAAAA,MAAU,EAAA,GAAA,CAAA;AAItB;AAOA;AAOA;AA+BYK,KAtCAF,aAAAA,GAsCAE;EAA2BhB,MAAAA,EAAAA,MAAAA;EAerBW,KAAAA,EAAAA,MAAAA;CAgBEpB,GAlEhBqB,MAkEgBrB,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;AAAoB;AAExC;AAQA;AAA6BgB,KAxEjBQ,mBAAAA,GAAsBb,uBAwELK,GAAAA;EAA0BK;;;;AAA8E;AAKrI;;;;EAAkKtB,gBAAAA,CAAAA,EAAAA,OAAAA;EAA0CiC;;;;;;;;;;;;;;;EAiB3JG,aAAAA,CAAAA,EApE7BnC,oBAoE6BmC;CAAgCzB;;;;AAO/DA,KAtENe,wBAAAA,GAA2BhB,4BAsErBC,GAAAA;EAAkCqB;;;;;;;;;;;;;;EAKgGnB,WAAAA,CAAAA,EA5DlIQ,UA4DkIR;EAAqCV;;;;;;;;;;;;;;;EAkBxH6B,aAAAA,CAAAA,EA9D7C/B,oBA8D6C+B;CAAyBlB;AAAoBX,KA5DlGwB,eAAAA,GA4DkGxB;EAARkC,WAAAA,CAAAA,EAAAA,MAAAA;EAcrEnC,aAAAA,CAAAA,EAAAA,MAAAA;EAAiD8B,aAAAA,EAAAA,MAAAA;EAA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"llms.d.cts","names":["BasePromptValueInterface","LLMResult","Generation","GenerationChunk","BaseCallbackConfig","CallbackManagerForLLMRun","Callbacks","BaseLanguageModel","BaseLanguageModelCallOptions","BaseLanguageModelInput","BaseLanguageModelParams","RunnableConfig","BaseCache","SerializedLLM","Record","BaseLLMParams","BaseLLMCallOptions","BaseLLM","CallOptions","Exclude","Omit","Promise","AsyncGenerator","Partial","prompts","cache","llmStringKey","parsedOptions","handledOptions","runId","LLM"],"sources":["../../src/language_models/llms.d.ts"],"sourcesContent":["import type { BasePromptValueInterface } from \"../prompt_values.js\";\nimport { type LLMResult, type Generation, GenerationChunk } from \"../outputs.js\";\nimport { type BaseCallbackConfig, type CallbackManagerForLLMRun, type Callbacks } from \"../callbacks/manager.js\";\nimport { BaseLanguageModel, type BaseLanguageModelCallOptions, type BaseLanguageModelInput, type BaseLanguageModelParams } from \"./base.js\";\nimport type { RunnableConfig } from \"../runnables/config.js\";\nimport type { BaseCache } from \"../caches/index.js\";\nexport type SerializedLLM = {\n _model: string;\n _type: string;\n} & Record<string, any>;\nexport interface BaseLLMParams extends BaseLanguageModelParams {\n}\nexport interface BaseLLMCallOptions extends BaseLanguageModelCallOptions {\n}\n/**\n * LLM Wrapper. Takes in a prompt (or prompts) and returns a string.\n */\nexport declare abstract class BaseLLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLanguageModel<string, CallOptions> {\n ParsedCallOptions: Omit<CallOptions, Exclude<keyof RunnableConfig, \"signal\" | \"timeout\" | \"maxConcurrency\">>;\n lc_namespace: string[];\n /**\n * This method takes an input and options, and returns a string. It\n * converts the input to a prompt value and generates a result based on\n * the prompt.\n * @param input Input for the LLM.\n * @param options Options for the LLM call.\n * @returns A string result based on the prompt.\n */\n invoke(input: BaseLanguageModelInput, options?: CallOptions): Promise<string>;\n _streamResponseChunks(_input: string, _options: this[\"ParsedCallOptions\"], _runManager?: CallbackManagerForLLMRun): AsyncGenerator<GenerationChunk>;\n protected _separateRunnableConfigFromCallOptionsCompat(options?: Partial<CallOptions>): [RunnableConfig, this[\"ParsedCallOptions\"]];\n _streamIterator(input: BaseLanguageModelInput, options?: CallOptions): AsyncGenerator<string>;\n /**\n * This method takes prompt values, options, and callbacks, and generates\n * a result based on the prompts.\n * @param promptValues Prompt values for the LLM.\n * @param options Options for the LLM call.\n * @param callbacks Callbacks for the LLM call.\n * @returns An LLMResult based on the prompts.\n */\n generatePrompt(promptValues: BasePromptValueInterface[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n /**\n * Run the LLM on the given prompts and input.\n */\n abstract _generate(prompts: string[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<LLMResult>;\n /**\n * Get the parameters used to invoke the model\n */\n invocationParams(_options?: this[\"ParsedCallOptions\"]): any;\n _flattenLLMResult(llmResult: LLMResult): LLMResult[];\n /** @ignore */\n _generateUncached(prompts: string[], parsedOptions: this[\"ParsedCallOptions\"], handledOptions: BaseCallbackConfig, startedRunManagers?: CallbackManagerForLLMRun[]): Promise<LLMResult>;\n _generateCached({ prompts, cache, llmStringKey, parsedOptions, handledOptions, runId }: {\n prompts: string[];\n cache: BaseCache<Generation[]>;\n llmStringKey: string;\n parsedOptions: any;\n handledOptions: RunnableConfig;\n runId?: string;\n }): Promise<LLMResult & {\n missingPromptIndices: number[];\n startedRunManagers?: CallbackManagerForLLMRun[];\n }>;\n /**\n * Run the LLM on the given prompts and input, handling caching.\n */\n generate(prompts: string[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n /**\n * Get the identifying parameters of the LLM.\n */\n _identifyingParams(): Record<string, any>;\n /**\n * Return the string type key uniquely identifying this class of LLM.\n */\n abstract _llmType(): string;\n _modelType(): string;\n}\n/**\n * LLM class that provides a simpler interface to subclass than {@link BaseLLM}.\n *\n * Requires only implementing a simpler {@link _call} method instead of {@link _generate}.\n *\n * @augments BaseLLM\n */\nexport declare abstract class LLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLLM<CallOptions> {\n /**\n * Run the LLM on the given prompt and input.\n */\n abstract _call(prompt: string, options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<string>;\n _generate(prompts: string[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<LLMResult>;\n}\n//# sourceMappingURL=llms.d.ts.map"],"mappings":";;;;;;;;KAMYa,aAAAA;;EAAAA,KAAAA,EAAAA,MAAAA;AAIZ,CAAA,GADIC,MACaC,CAAAA,MAAAA,EAAAA,GAAa,CAAA;AAEbC,UAFAD,aAAAA,SAAsBL,uBAEKF,CAAAA,CAK5C;AAA0DQ,UALzCA,kBAAAA,SAA2BR,4BAKcQ,CAAAA;;;;AACjBG,uBADXF,OACWE,CAAAA,oBADiBH,kBACjBG,GADsCH,kBACtCG,CAAAA,SADkEZ,iBAClEY,CAAAA,MAAAA,EAD4FD,WAC5FC,CAAAA,CAAAA;EAAlBC,iBAAAA,EAAAA,IAAAA,CAAKF,WAALE,EAAkBD,OAAlBC,CAAAA,MAAgCT,cAAhCS,EAAAA,QAAAA,GAAAA,SAAAA,GAAAA,gBAAAA,CAAAA,CAAAA;EAULX,YAAAA,EAAAA,MAAAA,EAAAA;EAAkCS;;;;;;;;EAGzBT,MAAAA,CAAAA,KAAAA,EAHTA,sBAGSA,EAAAA,OAAAA,CAAAA,EAHyBS,WAGzBT,CAAAA,EAHuCY,OAGvCZ,CAAAA,MAAAA,CAAAA;EAAkCS,qBAAAA,CAAAA,MAAAA,EAAAA,MAAAA,EAAAA,QAAAA,EAAAA,IAAAA,CAAAA,mBAAAA,CAAAA,EAAAA,WAAAA,CAAAA,EAFgCb,wBAEhCa,CAAAA,EAF2DI,cAE3DJ,CAF0Ef,eAE1Ee,CAAAA;EAAcI,UAAAA,4CAAAA,CAAAA,OAAAA,CAAAA,EADNC,OACMD,CADEJ,WACFI,CAAAA,CAAAA,EAAAA,CADkBX,cAClBW,EAAAA,IAAAA,CA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AA,CAAAA;IAEaI,YAAAA,EAAAA,MAAAA;IAFrBgB,aAAAA,EAAAA,GAAAA;IAO6CH,cAAAA,EAT7BP,cAS6BO;IAAyBZ,KAAAA,CAAAA,EAAAA,MAAAA;EAAoBL,CAAAA,CAAAA,EAP1FoB,OAO0FpB,CAPlFA,SAOkFA,GAAAA;IAARoB,oBAAAA,EAAAA,MAAAA,EAAAA;IAIhEP,kBAAAA,CAAAA,EATGT,wBASHS,EAAAA;EArDiFP,CAAAA,CAAAA;EAAiB;AAmE5H;;EAA2ES,QAAAA,CAAAA,OAAAA,EAAAA,MAAAA,EAAAA,EAAAA,OAAAA,CAAAA,EAAAA,MAAAA,EAAAA,GAlBtBE,WAkBsBF,EAAAA,SAAAA,CAAAA,EAlBGV,SAkBHU,CAAAA,EAlBeK,OAkBfL,CAlBuBf,SAkBvBe,CAAAA;EAAoCE;;;EAK7Bb,kBAAAA,CAAAA,CAAAA,EAnBxDS,MAmBwDT,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;EAAmCJ;;;EALP,SAAA,QAAA,CAAA,CAAA,EAAA,MAAA;;;;;;;;;;uBAAhF6B,wBAAwBd,qBAAqBA,4BAA4BC,QAAQC;;;;kFAI3Bb,2BAA2BgB;gFAC7BhB,2BAA2BgB,QAAQpB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llms.d.ts","names":["BasePromptValueInterface","LLMResult","Generation","GenerationChunk","BaseCallbackConfig","CallbackManagerForLLMRun","Callbacks","BaseLanguageModel","BaseLanguageModelCallOptions","BaseLanguageModelInput","BaseLanguageModelParams","RunnableConfig","BaseCache","SerializedLLM","Record","BaseLLMParams","BaseLLMCallOptions","BaseLLM","CallOptions","Exclude","Omit","Promise","AsyncGenerator","Partial","prompts","cache","llmStringKey","parsedOptions","handledOptions","runId","LLM"],"sources":["../../src/language_models/llms.d.ts"],"sourcesContent":["import type { BasePromptValueInterface } from \"../prompt_values.js\";\nimport { type LLMResult, type Generation, GenerationChunk } from \"../outputs.js\";\nimport { type BaseCallbackConfig, type CallbackManagerForLLMRun, type Callbacks } from \"../callbacks/manager.js\";\nimport { BaseLanguageModel, type BaseLanguageModelCallOptions, type BaseLanguageModelInput, type BaseLanguageModelParams } from \"./base.js\";\nimport type { RunnableConfig } from \"../runnables/config.js\";\nimport type { BaseCache } from \"../caches/index.js\";\nexport type SerializedLLM = {\n _model: string;\n _type: string;\n} & Record<string, any>;\nexport interface BaseLLMParams extends BaseLanguageModelParams {\n}\nexport interface BaseLLMCallOptions extends BaseLanguageModelCallOptions {\n}\n/**\n * LLM Wrapper. Takes in a prompt (or prompts) and returns a string.\n */\nexport declare abstract class BaseLLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLanguageModel<string, CallOptions> {\n ParsedCallOptions: Omit<CallOptions, Exclude<keyof RunnableConfig, \"signal\" | \"timeout\" | \"maxConcurrency\">>;\n lc_namespace: string[];\n /**\n * This method takes an input and options, and returns a string. It\n * converts the input to a prompt value and generates a result based on\n * the prompt.\n * @param input Input for the LLM.\n * @param options Options for the LLM call.\n * @returns A string result based on the prompt.\n */\n invoke(input: BaseLanguageModelInput, options?: CallOptions): Promise<string>;\n _streamResponseChunks(_input: string, _options: this[\"ParsedCallOptions\"], _runManager?: CallbackManagerForLLMRun): AsyncGenerator<GenerationChunk>;\n protected _separateRunnableConfigFromCallOptionsCompat(options?: Partial<CallOptions>): [RunnableConfig, this[\"ParsedCallOptions\"]];\n _streamIterator(input: BaseLanguageModelInput, options?: CallOptions): AsyncGenerator<string>;\n /**\n * This method takes prompt values, options, and callbacks, and generates\n * a result based on the prompts.\n * @param promptValues Prompt values for the LLM.\n * @param options Options for the LLM call.\n * @param callbacks Callbacks for the LLM call.\n * @returns An LLMResult based on the prompts.\n */\n generatePrompt(promptValues: BasePromptValueInterface[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n /**\n * Run the LLM on the given prompts and input.\n */\n abstract _generate(prompts: string[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<LLMResult>;\n /**\n * Get the parameters used to invoke the model\n */\n invocationParams(_options?: this[\"ParsedCallOptions\"]): any;\n _flattenLLMResult(llmResult: LLMResult): LLMResult[];\n /** @ignore */\n _generateUncached(prompts: string[], parsedOptions: this[\"ParsedCallOptions\"], handledOptions: BaseCallbackConfig, startedRunManagers?: CallbackManagerForLLMRun[]): Promise<LLMResult>;\n _generateCached({ prompts, cache, llmStringKey, parsedOptions, handledOptions, runId }: {\n prompts: string[];\n cache: BaseCache<Generation[]>;\n llmStringKey: string;\n parsedOptions: any;\n handledOptions: RunnableConfig;\n runId?: string;\n }): Promise<LLMResult & {\n missingPromptIndices: number[];\n startedRunManagers?: CallbackManagerForLLMRun[];\n }>;\n /**\n * Run the LLM on the given prompts and input, handling caching.\n */\n generate(prompts: string[], options?: string[] | CallOptions, callbacks?: Callbacks): Promise<LLMResult>;\n /**\n * Get the identifying parameters of the LLM.\n */\n _identifyingParams(): Record<string, any>;\n /**\n * Return the string type key uniquely identifying this class of LLM.\n */\n abstract _llmType(): string;\n _modelType(): string;\n}\n/**\n * LLM class that provides a simpler interface to subclass than {@link BaseLLM}.\n *\n * Requires only implementing a simpler {@link _call} method instead of {@link _generate}.\n *\n * @augments BaseLLM\n */\nexport declare abstract class LLM<CallOptions extends BaseLLMCallOptions = BaseLLMCallOptions> extends BaseLLM<CallOptions> {\n /**\n * Run the LLM on the given prompt and input.\n */\n abstract _call(prompt: string, options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<string>;\n _generate(prompts: string[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<LLMResult>;\n}\n//# sourceMappingURL=llms.d.ts.map"],"mappings":";;;;;;;;;KAMYa,aAAAA;;;AAAZ,CAAA,GAGIC,MAHQD,CAAAA,MAAAA,EAAAA,GAAa,CAAA;AAIRE,UAAAA,aAAAA,SAAsBL,uBAAuB,CAAA,CAE9D;AAK8BO,UALbD,k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WAkBCF,EAAAA,SAAAA,CAAAA,EAlBwBV,SAkBxBU,CAAAA,EAlBoCK,OAkBpCL,CAlB4Cf,SAkB5Ce,CAAAA;EAAqBA;;;EAIoCK,kBAAAA,CAAAA,CAAAA,EAlBrFP,MAkBqFO,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;EAC7BhB;;;EALqBY,SAAAA,QAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAO,UAAA,CAAA,CAAA,EAAA,MAAA;;;;;;;;;uBAAhFa,wBAAwBd,qBAAqBA,4BAA4BC,QAAQC;;;;kFAI3Bb,2BAA2BgB;gFAC7BhB,2BAA2BgB,QAAQpB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.cts","names":["ModelProfile"],"sources":["../../src/language_models/profile.d.ts"],"sourcesContent":["/**\n * Represents the capabilities and constraints of a language model.\n *\n * This interface defines the various features and limitations that a model may have,\n * including input/output constraints, multimodal support, and advanced capabilities\n * like tool calling and structured output.\n */\nexport interface ModelProfile {\n /**\n * Maximum number of tokens that can be included in the input context window.\n *\n * This represents the total token budget for the model's input, including\n * the prompt, system messages, conversation history, and any other context.\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxInputTokens: 128000 // Model supports up to 128k tokens\n * };\n * ```\n */\n maxInputTokens?: number;\n /**\n * Whether the model supports image inputs.\n *\n * When `true`, the model can process images as part of its input, enabling\n * multimodal interactions where visual content can be analyzed alongside text.\n *\n * @see {@link imageUrlInputs} for URL-based image input support\n */\n imageInputs?: boolean;\n /**\n * Whether the model supports image URL inputs.\n *\n * When `true`, the model can accept URLs pointing to images rather than\n * requiring the image data to be embedded directly in the request. This can\n * be more efficient for large images or when images are already hosted.\n *\n * @see {@link imageInputs} for direct image input support\n */\n imageUrlInputs?: boolean;\n /**\n * Whether the model supports PDF document inputs.\n *\n * When `true`, the model can process PDF files as input, allowing it to\n * analyze document content, extract information, or answer questions about\n * PDF documents.\n */\n pdfInputs?: boolean;\n /**\n * Whether the model supports audio inputs.\n *\n * When `true`, the model can process audio data as input, enabling\n * capabilities like speech recognition, audio analysis, or multimodal\n * interactions involving sound.\n */\n audioInputs?: boolean;\n /**\n * Whether the model supports video inputs.\n *\n * When `true`, the model can process video data as input, enabling\n * capabilities like video analysis, scene understanding, or multimodal\n * interactions involving moving images.\n */\n videoInputs?: boolean;\n /**\n * Whether the model supports image content in tool messages.\n *\n * When `true`, tool responses can include images that the model can process\n * and reason about. This enables workflows where tools return visual data\n * that the model needs to interpret.\n */\n imageToolMessage?: boolean;\n /**\n * Whether the model supports PDF content in tool messages.\n *\n * When `true`, tool responses can include PDF documents that the model can\n * process and reason about. This enables workflows where tools return\n * document data that the model needs to interpret.\n */\n pdfToolMessage?: boolean;\n /**\n * Maximum number of tokens the model can generate in its output.\n *\n * This represents the upper limit on the length of the model's response.\n * The actual output may be shorter depending on the completion criteria\n * (e.g., natural stopping point, stop sequences).\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxOutputTokens: 4096 // Model can generate up to 4k tokens\n * };\n * ```\n */\n maxOutputTokens?: number;\n /**\n * Whether the model supports reasoning or chain-of-thought output.\n *\n * When `true`, the model can produce explicit reasoning steps or\n * chain-of-thought explanations as part of its output. This is useful\n * for understanding the model's decision-making process and improving\n * transparency in complex reasoning tasks.\n */\n reasoningOutput?: boolean;\n /**\n * Whether the model can generate image outputs.\n *\n * When `true`, the model can produce images as part of its response,\n * enabling capabilities like image generation, editing, or visual\n * content creation.\n */\n imageOutputs?: boolean;\n /**\n * Whether the model can generate audio outputs.\n *\n * When `true`, the model can produce audio data as part of its response,\n * enabling capabilities like text-to-speech, audio generation, or\n * sound synthesis.\n */\n audioOutputs?: boolean;\n /**\n * Whether the model can generate video outputs.\n *\n * When `true`, the model can produce video data as part of its response,\n * enabling capabilities like video generation, editing, or visual\n * content creation with motion.\n */\n videoOutputs?: boolean;\n /**\n * Whether the model supports tool calling (function calling).\n *\n * When `true`, the model can invoke external tools or functions during\n * its reasoning process. The model can decide which tools to call,\n * with what arguments, and can incorporate the tool results into its\n * final response.\n *\n * @see {@link toolChoice} for controlling tool selection behavior\n * @see {@link https://docs.langchain.com/oss/javascript/langchain/models#tool-calling}\n */\n toolCalling?: boolean;\n /**\n * Whether the model supports tool choice control.\n *\n * When `true`, the caller can specify how the model should select tools,\n * such as forcing the use of a specific tool, allowing any tool, or\n * preventing tool use entirely. This provides fine-grained control over\n * the model's tool-calling behavior.\n *\n * @see {@link toolCalling} for basic tool calling support\n */\n toolChoice?: boolean;\n /**\n * Whether the model supports structured output generation.\n *\n * When `true`, the model can generate responses that conform to a\n * specified schema or structure (e.g., JSON with a particular format).\n * This is useful for ensuring the model's output can be reliably parsed\n * and processed programmatically.\n *\n * @example\n * ```typescript\n * // Model can be instructed to return JSON matching a schema\n * const profile: ModelProfile = {\n * structuredOutput: true\n * };\n * ```\n */\n structuredOutput?: boolean;\n}\n//# sourceMappingURL=profile.d.ts.map"],"mappings":";;AAOA;;;;;;UAAiBA,YAAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","names":["ModelProfile"],"sources":["../../src/language_models/profile.d.ts"],"sourcesContent":["/**\n * Represents the capabilities and constraints of a language model.\n *\n * This interface defines the various features and limitations that a model may have,\n * including input/output constraints, multimodal support, and advanced capabilities\n * like tool calling and structured output.\n */\nexport interface ModelProfile {\n /**\n * Maximum number of tokens that can be included in the input context window.\n *\n * This represents the total token budget for the model's input, including\n * the prompt, system messages, conversation history, and any other context.\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxInputTokens: 128000 // Model supports up to 128k tokens\n * };\n * ```\n */\n maxInputTokens?: number;\n /**\n * Whether the model supports image inputs.\n *\n * When `true`, the model can process images as part of its input, enabling\n * multimodal interactions where visual content can be analyzed alongside text.\n *\n * @see {@link imageUrlInputs} for URL-based image input support\n */\n imageInputs?: boolean;\n /**\n * Whether the model supports image URL inputs.\n *\n * When `true`, the model can accept URLs pointing to images rather than\n * requiring the image data to be embedded directly in the request. This can\n * be more efficient for large images or when images are already hosted.\n *\n * @see {@link imageInputs} for direct image input support\n */\n imageUrlInputs?: boolean;\n /**\n * Whether the model supports PDF document inputs.\n *\n * When `true`, the model can process PDF files as input, allowing it to\n * analyze document content, extract information, or answer questions about\n * PDF documents.\n */\n pdfInputs?: boolean;\n /**\n * Whether the model supports audio inputs.\n *\n * When `true`, the model can process audio data as input, enabling\n * capabilities like speech recognition, audio analysis, or multimodal\n * interactions involving sound.\n */\n audioInputs?: boolean;\n /**\n * Whether the model supports video inputs.\n *\n * When `true`, the model can process video data as input, enabling\n * capabilities like video analysis, scene understanding, or multimodal\n * interactions involving moving images.\n */\n videoInputs?: boolean;\n /**\n * Whether the model supports image content in tool messages.\n *\n * When `true`, tool responses can include images that the model can process\n * and reason about. This enables workflows where tools return visual data\n * that the model needs to interpret.\n */\n imageToolMessage?: boolean;\n /**\n * Whether the model supports PDF content in tool messages.\n *\n * When `true`, tool responses can include PDF documents that the model can\n * process and reason about. This enables workflows where tools return\n * document data that the model needs to interpret.\n */\n pdfToolMessage?: boolean;\n /**\n * Maximum number of tokens the model can generate in its output.\n *\n * This represents the upper limit on the length of the model's response.\n * The actual output may be shorter depending on the completion criteria\n * (e.g., natural stopping point, stop sequences).\n *\n * @example\n * ```typescript\n * const profile: ModelProfile = {\n * maxOutputTokens: 4096 // Model can generate up to 4k tokens\n * };\n * ```\n */\n maxOutputTokens?: number;\n /**\n * Whether the model supports reasoning or chain-of-thought output.\n *\n * When `true`, the model can produce explicit reasoning steps or\n * chain-of-thought explanations as part of its output. This is useful\n * for understanding the model's decision-making process and improving\n * transparency in complex reasoning tasks.\n */\n reasoningOutput?: boolean;\n /**\n * Whether the model can generate image outputs.\n *\n * When `true`, the model can produce images as part of its response,\n * enabling capabilities like image generation, editing, or visual\n * content creation.\n */\n imageOutputs?: boolean;\n /**\n * Whether the model can generate audio outputs.\n *\n * When `true`, the model can produce audio data as part of its response,\n * enabling capabilities like text-to-speech, audio generation, or\n * sound synthesis.\n */\n audioOutputs?: boolean;\n /**\n * Whether the model can generate video outputs.\n *\n * When `true`, the model can produce video data as part of its response,\n * enabling capabilities like video generation, editing, or visual\n * content creation with motion.\n */\n videoOutputs?: boolean;\n /**\n * Whether the model supports tool calling (function calling).\n *\n * When `true`, the model can invoke external tools or functions during\n * its reasoning process. The model can decide which tools to call,\n * with what arguments, and can incorporate the tool results into its\n * final response.\n *\n * @see {@link toolChoice} for controlling tool selection behavior\n * @see {@link https://docs.langchain.com/oss/javascript/langchain/models#tool-calling}\n */\n toolCalling?: boolean;\n /**\n * Whether the model supports tool choice control.\n *\n * When `true`, the caller can specify how the model should select tools,\n * such as forcing the use of a specific tool, allowing any tool, or\n * preventing tool use entirely. This provides fine-grained control over\n * the model's tool-calling behavior.\n *\n * @see {@link toolCalling} for basic tool calling support\n */\n toolChoice?: boolean;\n /**\n * Whether the model supports structured output generation.\n *\n * When `true`, the model can generate responses that conform to a\n * specified schema or structure (e.g., JSON with a particular format).\n * This is useful for ensuring the model's output can be reliably parsed\n * and processed programmatically.\n *\n * @example\n * ```typescript\n * // Model can be instructed to return JSON matching a schema\n * const profile: ModelProfile = {\n * structuredOutput: true\n * };\n * ```\n */\n structuredOutput?: boolean;\n}\n//# sourceMappingURL=profile.d.ts.map"],"mappings":";;AAOA;;;;;;UAAiBA,YAAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import_type.d.cts","names":["OptionalImportMap","SecretMap"],"sources":["../../src/load/import_type.d.ts"],"sourcesContent":["export interface OptionalImportMap {\n}\nexport interface SecretMap {\n}\n//# sourceMappingURL=import_type.d.ts.map"],"mappings":";UAAiBA,iBAAAA,EAAjB;AAEiBC,UAAAA,SAAAA,CAAS"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import_type.d.ts","names":["OptionalImportMap","SecretMap"],"sources":["../../src/load/import_type.d.ts"],"sourcesContent":["export interface OptionalImportMap {\n}\nexport interface SecretMap {\n}\n//# sourceMappingURL=import_type.d.ts.map"],"mappings":";UAAiBA,iBAAAA,EAAjB;AAEiBC,UAAAA,SAAAA,CAAS"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":["OptionalImportMap","SecretMap","load","T","Record","Promise"],"sources":["../../src/load/index.d.ts"],"sourcesContent":["import type { OptionalImportMap, SecretMap } from \"./import_type.js\";\nexport declare function load<T>(text: string, mappings?: {\n secretsMap?: SecretMap;\n optionalImportsMap?: OptionalImportMap;\n optionalImportEntrypoints?: string[];\n importMap?: Record<string, unknown>;\n}): Promise<T>;\n//# sourceMappingURL=index.d.ts.map"],"mappings":";;;iBACwBE,8BAIRE;eAHCH;EADOC,kBAAIC,CAAA,EAEHH,iBAFG;EACXC,yBAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EACQD,SAAAA,CAAAA,EAETI,MAFSJ,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;CAETI,CAAAA,EACZC,OADYD,CACJD,CADIC,CAAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":["OptionalImportMap","SecretMap","load","T","Record","Promise"],"sources":["../../src/load/index.d.ts"],"sourcesContent":["import type { OptionalImportMap, SecretMap } from \"./import_type.js\";\nexport declare function load<T>(text: string, mappings?: {\n secretsMap?: SecretMap;\n optionalImportsMap?: OptionalImportMap;\n optionalImportEntrypoints?: string[];\n importMap?: Record<string, unknown>;\n}): Promise<T>;\n//# sourceMappingURL=index.d.ts.map"],"mappings":";;;iBACwBE,8BAIRE;eAHCH;EADOC,kBAAIC,CAAAA,EAEHH,iBAFG;EACXC,yBAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EACQD,SAAAA,CAAAA,EAETI,MAFSJ,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;CAETI,CAAAA,EACZC,OADYD,CACJD,CADIC,CAAAA"}
@@ -1,12 +1,13 @@
1
- const require_index = require('../node_modules/.pnpm/decamelize@6.0.1/node_modules/decamelize/index.cjs');
2
- const require_index$1 = require('../node_modules/.pnpm/camelcase@9.0.0/node_modules/camelcase/index.cjs');
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ const decamelize = require_rolldown_runtime.__toESM(require("decamelize"));
3
+ const camelcase = require_rolldown_runtime.__toESM(require("camelcase"));
3
4
 
4
5
  //#region src/load/map_keys.ts
5
6
  function keyToJson(key, map) {
6
- return map?.[key] || require_index.decamelize(key);
7
+ return map?.[key] || (0, decamelize.default)(key);
7
8
  }
8
9
  function keyFromJson(key, map) {
9
- return map?.[key] || require_index$1.camelCase(key);
10
+ return map?.[key] || (0, camelcase.default)(key);
10
11
  }
11
12
  function mapKeys(fields, mapper, map) {
12
13
  const mapped = {};
@@ -1 +1 @@
1
- {"version":3,"file":"map_keys.cjs","names":["key: string","map?: SerializedKeyAlias","snakeCase","camelCase","fields: SerializedFields","mapper: typeof keyToJson","mapped: SerializedFields"],"sources":["../../src/load/map_keys.ts"],"sourcesContent":["import snakeCase from \"decamelize\";\nimport camelCase from \"camelcase\";\n\nexport interface SerializedFields {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\nexport interface SerializedKeyAlias {\n [key: string]: string;\n}\n\nexport function keyToJson(key: string, map?: SerializedKeyAlias): string {\n return map?.[key] || snakeCase(key);\n}\n\nexport function keyFromJson(key: string, map?: SerializedKeyAlias): string {\n return map?.[key] || camelCase(key);\n}\n\nexport function mapKeys(\n fields: SerializedFields,\n mapper: typeof keyToJson,\n map?: SerializedKeyAlias\n): SerializedFields {\n const mapped: SerializedFields = {};\n\n for (const key in fields) {\n if (Object.hasOwn(fields, key)) {\n mapped[mapper(key, map)] = fields[key];\n }\n }\n\n return mapped;\n}\n"],"mappings":";;;;AAYA,SAAgB,UAAUA,KAAaC,KAAkC;AACvE,QAAO,MAAM,QAAQC,yBAAU,IAAI;AACpC;AAED,SAAgB,YAAYF,KAAaC,KAAkC;AACzE,QAAO,MAAM,QAAQE,0BAAU,IAAI;AACpC;AAED,SAAgB,QACdC,QACAC,QACAJ,KACkB;CAClB,MAAMK,SAA2B,CAAE;AAEnC,MAAK,MAAM,OAAO,OAChB,KAAI,OAAO,OAAO,QAAQ,IAAI,EAC5B,OAAO,OAAO,KAAK,IAAI,IAAI,OAAO;AAItC,QAAO;AACR"}
1
+ {"version":3,"file":"map_keys.cjs","names":["key: string","map?: SerializedKeyAlias","fields: SerializedFields","mapper: typeof keyToJson","mapped: SerializedFields"],"sources":["../../src/load/map_keys.ts"],"sourcesContent":["import snakeCase from \"decamelize\";\nimport camelCase from \"camelcase\";\n\nexport interface SerializedFields {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\nexport interface SerializedKeyAlias {\n [key: string]: string;\n}\n\nexport function keyToJson(key: string, map?: SerializedKeyAlias): string {\n return map?.[key] || snakeCase(key);\n}\n\nexport function keyFromJson(key: string, map?: SerializedKeyAlias): string {\n return map?.[key] || camelCase(key);\n}\n\nexport function mapKeys(\n fields: SerializedFields,\n mapper: typeof keyToJson,\n map?: SerializedKeyAlias\n): SerializedFields {\n const mapped: SerializedFields = {};\n\n for (const key in fields) {\n if (Object.hasOwn(fields, key)) {\n mapped[mapper(key, map)] = fields[key];\n }\n }\n\n return mapped;\n}\n"],"mappings":";;;;;AAYA,SAAgB,UAAUA,KAAaC,KAAkC;AACvE,QAAO,MAAM,gCAAkB,IAAI;AACpC;AAED,SAAgB,YAAYD,KAAaC,KAAkC;AACzE,QAAO,MAAM,+BAAkB,IAAI;AACpC;AAED,SAAgB,QACdC,QACAC,QACAF,KACkB;CAClB,MAAMG,SAA2B,CAAE;AAEnC,MAAK,MAAM,OAAO,OAChB,KAAI,OAAO,OAAO,QAAQ,IAAI,EAC5B,OAAO,OAAO,KAAK,IAAI,IAAI,OAAO;AAItC,QAAO;AACR"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map_keys.d.cts","names":["SerializedFields","SerializedKeyAlias","keyToJson","keyFromJson","mapKeys"],"sources":["../../src/load/map_keys.d.ts"],"sourcesContent":["export interface SerializedFields {\n [key: string]: any;\n}\nexport interface SerializedKeyAlias {\n [key: string]: string;\n}\nexport declare function keyToJson(key: string, map?: SerializedKeyAlias): string;\nexport declare function keyFromJson(key: string, map?: SerializedKeyAlias): string;\nexport declare function mapKeys(fields: SerializedFields, mapper: typeof keyToJson, map?: SerializedKeyAlias): SerializedFields;\n//# sourceMappingURL=map_keys.d.ts.map"],"mappings":";UAAiBA,gBAAAA;EAAAA,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EAAAA,GAAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map_keys.d.ts","names":["SerializedFields","SerializedKeyAlias","keyToJson","keyFromJson","mapKeys"],"sources":["../../src/load/map_keys.d.ts"],"sourcesContent":["export interface SerializedFields {\n [key: string]: any;\n}\nexport interface SerializedKeyAlias {\n [key: string]: string;\n}\nexport declare function keyToJson(key: string, map?: SerializedKeyAlias): string;\nexport declare function keyFromJson(key: string, map?: SerializedKeyAlias): string;\nexport declare function mapKeys(fields: SerializedFields, mapper: typeof keyToJson, map?: SerializedKeyAlias): SerializedFields;\n//# sourceMappingURL=map_keys.d.ts.map"],"mappings":";UAAiBA,gBAAAA;EAAAA,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EAAAA,GAAAA"}
@@ -1,9 +1,9 @@
1
- import { decamelize } from "../node_modules/.pnpm/decamelize@6.0.1/node_modules/decamelize/index.js";
2
- import { camelCase } from "../node_modules/.pnpm/camelcase@9.0.0/node_modules/camelcase/index.js";
1
+ import snakeCase from "decamelize";
2
+ import camelCase from "camelcase";
3
3
 
4
4
  //#region src/load/map_keys.ts
5
5
  function keyToJson(key, map) {
6
- return map?.[key] || decamelize(key);
6
+ return map?.[key] || snakeCase(key);
7
7
  }
8
8
  function keyFromJson(key, map) {
9
9
  return map?.[key] || camelCase(key);
@@ -1 +1 @@
1
- {"version":3,"file":"map_keys.js","names":["key: string","map?: SerializedKeyAlias","snakeCase","fields: SerializedFields","mapper: typeof keyToJson","mapped: SerializedFields"],"sources":["../../src/load/map_keys.ts"],"sourcesContent":["import snakeCase from \"decamelize\";\nimport camelCase from \"camelcase\";\n\nexport interface SerializedFields {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\nexport interface SerializedKeyAlias {\n [key: string]: string;\n}\n\nexport function keyToJson(key: string, map?: SerializedKeyAlias): string {\n return map?.[key] || snakeCase(key);\n}\n\nexport function keyFromJson(key: string, map?: SerializedKeyAlias): string {\n return map?.[key] || camelCase(key);\n}\n\nexport function mapKeys(\n fields: SerializedFields,\n mapper: typeof keyToJson,\n map?: SerializedKeyAlias\n): SerializedFields {\n const mapped: SerializedFields = {};\n\n for (const key in fields) {\n if (Object.hasOwn(fields, key)) {\n mapped[mapper(key, map)] = fields[key];\n }\n }\n\n return mapped;\n}\n"],"mappings":";;;;AAYA,SAAgB,UAAUA,KAAaC,KAAkC;AACvE,QAAO,MAAM,QAAQC,WAAU,IAAI;AACpC;AAED,SAAgB,YAAYF,KAAaC,KAAkC;AACzE,QAAO,MAAM,QAAQ,UAAU,IAAI;AACpC;AAED,SAAgB,QACdE,QACAC,QACAH,KACkB;CAClB,MAAMI,SAA2B,CAAE;AAEnC,MAAK,MAAM,OAAO,OAChB,KAAI,OAAO,OAAO,QAAQ,IAAI,EAC5B,OAAO,OAAO,KAAK,IAAI,IAAI,OAAO;AAItC,QAAO;AACR"}
1
+ {"version":3,"file":"map_keys.js","names":["key: string","map?: SerializedKeyAlias","fields: SerializedFields","mapper: typeof keyToJson","mapped: SerializedFields"],"sources":["../../src/load/map_keys.ts"],"sourcesContent":["import snakeCase from \"decamelize\";\nimport camelCase from \"camelcase\";\n\nexport interface SerializedFields {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\nexport interface SerializedKeyAlias {\n [key: string]: string;\n}\n\nexport function keyToJson(key: string, map?: SerializedKeyAlias): string {\n return map?.[key] || snakeCase(key);\n}\n\nexport function keyFromJson(key: string, map?: SerializedKeyAlias): string {\n return map?.[key] || camelCase(key);\n}\n\nexport function mapKeys(\n fields: SerializedFields,\n mapper: typeof keyToJson,\n map?: SerializedKeyAlias\n): SerializedFields {\n const mapped: SerializedFields = {};\n\n for (const key in fields) {\n if (Object.hasOwn(fields, key)) {\n mapped[mapper(key, map)] = fields[key];\n }\n }\n\n return mapped;\n}\n"],"mappings":";;;;AAYA,SAAgB,UAAUA,KAAaC,KAAkC;AACvE,QAAO,MAAM,QAAQ,UAAU,IAAI;AACpC;AAED,SAAgB,YAAYD,KAAaC,KAAkC;AACzE,QAAO,MAAM,QAAQ,UAAU,IAAI;AACpC;AAED,SAAgB,QACdC,QACAC,QACAF,KACkB;CAClB,MAAMG,SAA2B,CAAE;AAEnC,MAAK,MAAM,OAAO,OAChB,KAAI,OAAO,OAAO,QAAQ,IAAI,EAC5B,OAAO,OAAO,KAAK,IAAI,IAAI,OAAO;AAItC,QAAO;AACR"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializable.d.cts","names":["SerializedFields","BaseSerialized","T","Record","SerializedConstructor","SerializedSecret","SerializedNotImplemented","Serialized","get_lc_unique_name","Serializable","SerializableInterface"],"sources":["../../src/load/serializable.d.ts"],"sourcesContent":["import { type SerializedFields } from \"./map_keys.js\";\nexport interface BaseSerialized<T extends string> {\n lc: number;\n type: T;\n id: string[];\n name?: string;\n graph?: Record<string, any>;\n}\nexport interface SerializedConstructor extends BaseSerialized<\"constructor\"> {\n kwargs: SerializedFields;\n}\nexport interface SerializedSecret extends BaseSerialized<\"secret\"> {\n}\nexport interface SerializedNotImplemented extends BaseSerialized<\"not_implemented\"> {\n}\nexport type Serialized = SerializedConstructor | SerializedSecret | SerializedNotImplemented;\n/**\n * Get a unique name for the module, rather than parent class implementations.\n * Should not be subclassed, subclass lc_name above instead.\n */\nexport declare function get_lc_unique_name(serializableClass: typeof Serializable): string;\nexport interface SerializableInterface {\n get lc_id(): string[];\n}\nexport declare abstract class Serializable implements SerializableInterface {\n lc_serializable: boolean;\n lc_kwargs: SerializedFields;\n /**\n * A path to the module that contains the class, eg. [\"langchain\", \"llms\"]\n * Usually should be the same as the entrypoint the class is exported from.\n */\n abstract lc_namespace: string[];\n /**\n * The name of the serializable. Override to provide an alias or\n * to preserve the serialized module name in minified environments.\n *\n * Implemented as a static method to support loading logic.\n */\n static lc_name(): string;\n /**\n * The final serialized identifier for the module.\n */\n get lc_id(): string[];\n /**\n * A map of secrets, which will be omitted from serialization.\n * Keys are paths to the secret in constructor args, e.g. \"foo.bar.baz\".\n * Values are the secret ids, which will be used when deserializing.\n */\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n /**\n * A map of additional attributes to merge with constructor args.\n * Keys are the attribute names, e.g. \"foo\".\n * Values are the attribute values, which will be serialized.\n * These attributes need to be accepted by the constructor as arguments.\n */\n get lc_attributes(): SerializedFields | undefined;\n /**\n * A map of aliases for constructor args.\n * Keys are the attribute names, e.g. \"foo\".\n * Values are the alias that will replace the key in serialization.\n * This is used to eg. make argument names match Python.\n */\n get lc_aliases(): {\n [key: string]: string;\n } | undefined;\n /**\n * A manual list of keys that should be serialized.\n * If not overridden, all fields passed into the constructor will be serialized.\n */\n get lc_serializable_keys(): string[] | undefined;\n constructor(kwargs?: SerializedFields, ..._args: never[]);\n toJSON(): Serialized;\n toJSONNotImplemented(): SerializedNotImplemented;\n}\n//# sourceMappingURL=serializable.d.ts.map"],"mappings":";;;UACiBC;;EAAAA,IAAAA,EAEPC,CAFOD;EAOAG,EAAAA,EAAAA,MAAAA,EAAAA;EAGAC,IAAAA,CAAAA,EAAAA,MAAAA;EAEAC,KAAAA,CAAAA,EAPLH,MAOKG,CAAAA,MAAAA,EAAAA,GAAAA,CAAwB;AAEzC;AAAyBF,UAPRA,qBAAAA,SAA8BH,cAOtBG,CAAAA,aAAAA,CAAAA,CAAAA;EAAwBC,MAAAA,EANrCL,gBAMqCK;;AAA2C,UAJ3EA,gBAAAA,SAAyBJ,cAIkD,CAAA,QAAA,CAAA,CAAA,CAK5F;AACiBS,UARAJ,wBAAAA,SAAiCL,cAQZ,CAAA,iBAAA,CAAA,CAAA,CAGtC;AAEeD,KAXHO,UAAAA,GAAaH,qBAWVJ,GAXkCK,gBAWlCL,GAXqDM,wBAWrDN;;;;;AAFuCU,iBAJ9BF,kBAAAA,CAI8BE,iBAAAA,EAAAA,OAJeD,YAIfC,CAAAA,EAAAA,MAAAA;AAAqB,UAH1DA,qBAAAA,CAG0D;;;uBAA7CD,YAAAA,YAAwBC;;aAEvCV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA+BUA;;;;;;;;;;;;;;;uBAeAA;YACXO;0BACcD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializable.d.ts","names":["SerializedFields","BaseSerialized","T","Record","SerializedConstructor","SerializedSecret","SerializedNotImplemented","Serialized","get_lc_unique_name","Serializable","SerializableInterface"],"sources":["../../src/load/serializable.d.ts"],"sourcesContent":["import { type SerializedFields } from \"./map_keys.js\";\nexport interface BaseSerialized<T extends string> {\n lc: number;\n type: T;\n id: string[];\n name?: string;\n graph?: Record<string, any>;\n}\nexport interface SerializedConstructor extends BaseSerialized<\"constructor\"> {\n kwargs: SerializedFields;\n}\nexport interface SerializedSecret extends BaseSerialized<\"secret\"> {\n}\nexport interface SerializedNotImplemented extends BaseSerialized<\"not_implemented\"> {\n}\nexport type Serialized = SerializedConstructor | SerializedSecret | SerializedNotImplemented;\n/**\n * Get a unique name for the module, rather than parent class implementations.\n * Should not be subclassed, subclass lc_name above instead.\n */\nexport declare function get_lc_unique_name(serializableClass: typeof Serializable): string;\nexport interface SerializableInterface {\n get lc_id(): string[];\n}\nexport declare abstract class Serializable implements SerializableInterface {\n lc_serializable: boolean;\n lc_kwargs: SerializedFields;\n /**\n * A path to the module that contains the class, eg. [\"langchain\", \"llms\"]\n * Usually should be the same as the entrypoint the class is exported from.\n */\n abstract lc_namespace: string[];\n /**\n * The name of the serializable. Override to provide an alias or\n * to preserve the serialized module name in minified environments.\n *\n * Implemented as a static method to support loading logic.\n */\n static lc_name(): string;\n /**\n * The final serialized identifier for the module.\n */\n get lc_id(): string[];\n /**\n * A map of secrets, which will be omitted from serialization.\n * Keys are paths to the secret in constructor args, e.g. \"foo.bar.baz\".\n * Values are the secret ids, which will be used when deserializing.\n */\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n /**\n * A map of additional attributes to merge with constructor args.\n * Keys are the attribute names, e.g. \"foo\".\n * Values are the attribute values, which will be serialized.\n * These attributes need to be accepted by the constructor as arguments.\n */\n get lc_attributes(): SerializedFields | undefined;\n /**\n * A map of aliases for constructor args.\n * Keys are the attribute names, e.g. \"foo\".\n * Values are the alias that will replace the key in serialization.\n * This is used to eg. make argument names match Python.\n */\n get lc_aliases(): {\n [key: string]: string;\n } | undefined;\n /**\n * A manual list of keys that should be serialized.\n * If not overridden, all fields passed into the constructor will be serialized.\n */\n get lc_serializable_keys(): string[] | undefined;\n constructor(kwargs?: SerializedFields, ..._args: never[]);\n toJSON(): Serialized;\n toJSONNotImplemented(): SerializedNotImplemented;\n}\n//# sourceMappingURL=serializable.d.ts.map"],"mappings":";;;UACiBC;;EAAAA,IAAAA,EAEPC,CAFOD;EAOAG,EAAAA,EAAAA,MAAAA,EAAAA;EAGAC,IAAAA,CAAAA,EAAAA,MAAAA;EAEAC,KAAAA,CAAAA,EAPLH,MAOKG,CAAAA,MAAAA,EAAAA,GAAAA,CAAwB;AAEzC;AAAyBF,UAPRA,qBAAAA,SAA8BH,cAOtBG,CAAAA,aAAAA,CAAAA,CAAAA;EAAwBC,MAAAA,EANrCL,gBAMqCK;;AAA2C,UAJ3EA,gBAAAA,SAAyBJ,cAIkD,CAAA,QAAA,CAAA,CAAA,CAK5F;AACiBS,UARAJ,wBAAAA,SAAiCL,cAQZ,CAAA,iBAAA,CAAA,CAAA,CAGtC;AAEeD,KAXHO,UAAAA,GAAaH,qBAWVJ,GAXkCK,gBAWlCL,GAXqDM,wBAWrDN;;;;;AAFuCU,iBAJ9BF,kBAAAA,CAI8BE,iBAAAA,EAAAA,OAJeD,YAIfC,CAAAA,EAAAA,MAAAA;AAAqB,UAH1DA,qBAAAA,CAG0D;;;uBAA7CD,YAAAA,YAAwBC;;aAEvCV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA+BUA;;;;;;;;;;;;;;;uBAeAA;YACXO;0BACcD"}
@@ -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"}
@@ -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,CAAAA,CAAAA;EAClGH,SAAAA,IAAAA,EAAAA,IAAAA;EACQD,UAAAA,CAAAA,EAKRC,QALQD,EA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,gBA3BmD,CA2BlCU,UA3BkC,EAAA,IAAA,CAAA,YA2BLC,SA3BK,CA2BKD,UA3BL,CAAA,EA2BkBQ,oBA3BlB,CA2BuCR,UA3BvC,CAAA,CAAA;EAe/HK,SAAAA,IAAAA,EAAW,IAAA;EAAoBV,UAAAA,CAAAA,EActCE,QAdsCF,EAAAA;EAAqBN,kBAAAA,CAAAA,EAenDO,eAfmDP,EAAAA;EAA6BW,gBAAAA,CAAAA,EAgBlFF,aAhBkFE,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"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai.d.ts","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,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,GAWjDD,eAXiD,CAWjCC,UAXiC,CAAA;EAK7FC,OAAAA,OAAS,CAAA,CAAA,EAAAD,MAAAA;EAA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BAAAA,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"}
@@ -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,CAAAA,EA9BYP,MA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AAmBA,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"}
@@ -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;E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,uBAAuBF;KAC9DE,eAAAA,GAAkBb,cAAcW,wBAAwB/B,aAAaS;;;;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 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":"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"}
@@ -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,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,GAAAA;IAAkBC,GAAAA,EAAAA,MAAAA;IAAqBC,MAAAA,CAAAA,EA9DlDT,WA8DkDS;EAAwBC,CAAAA;CAK5DH;;;;;AAOuCG,KAnE1DP,qBAAAA,GAAwBF,kBAmEkCS,GAnEbR,sBAm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