@nocobase/plugin-ai 1.6.0-beta.17

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 (1780) hide show
  1. package/LICENSE.txt +161 -0
  2. package/README.md +1 -0
  3. package/build.config.ts +165 -0
  4. package/client.d.ts +2 -0
  5. package/client.js +1 -0
  6. package/dist/client/6f221c7c3acd67ae.js +10 -0
  7. package/dist/client/83ce71fb5895b112.js +10 -0
  8. package/dist/client/chat-settings/Messages.d.ts +11 -0
  9. package/dist/client/index.d.ts +22 -0
  10. package/dist/client/index.js +10 -0
  11. package/dist/client/llm-providers/components/Chat.d.ts +10 -0
  12. package/dist/client/llm-providers/components/Messages.d.ts +10 -0
  13. package/dist/client/llm-providers/components/ModelSelect.d.ts +10 -0
  14. package/dist/client/llm-providers/components/StructuredOutput.d.ts +10 -0
  15. package/dist/client/llm-providers/deepseek/ModelSettings.d.ts +10 -0
  16. package/dist/client/llm-providers/deepseek/index.d.ts +10 -0
  17. package/dist/client/llm-providers/openai/ModelSettings.d.ts +10 -0
  18. package/dist/client/llm-providers/openai/ProviderSettings.d.ts +10 -0
  19. package/dist/client/llm-providers/openai/index.d.ts +10 -0
  20. package/dist/client/llm-services/LLMServices.d.ts +12 -0
  21. package/dist/client/llm-services/llm-providers.d.ts +24 -0
  22. package/dist/client/locale.d.ts +11 -0
  23. package/dist/client/manager/ai-manager.d.ts +23 -0
  24. package/dist/client/schemas/llms.d.ts +253 -0
  25. package/dist/client/workflow/nodes/llm/ModelSettings.d.ts +11 -0
  26. package/dist/client/workflow/nodes/llm/index.d.ts +59 -0
  27. package/dist/collections/llm-services.d.ts +34 -0
  28. package/dist/collections/llm-services.js +63 -0
  29. package/dist/externalVersion.js +26 -0
  30. package/dist/index.d.ts +10 -0
  31. package/dist/index.js +48 -0
  32. package/dist/locale/en-US.json +25 -0
  33. package/dist/locale/zh-CN.json +25 -0
  34. package/dist/node_modules/@langchain/core/LICENSE +21 -0
  35. package/dist/node_modules/@langchain/core/agents.cjs +1 -0
  36. package/dist/node_modules/@langchain/core/agents.d.cts +1 -0
  37. package/dist/node_modules/@langchain/core/agents.d.ts +1 -0
  38. package/dist/node_modules/@langchain/core/agents.js +1 -0
  39. package/dist/node_modules/@langchain/core/caches.cjs +1 -0
  40. package/dist/node_modules/@langchain/core/caches.d.cts +1 -0
  41. package/dist/node_modules/@langchain/core/caches.d.ts +1 -0
  42. package/dist/node_modules/@langchain/core/caches.js +1 -0
  43. package/dist/node_modules/@langchain/core/callbacks/base.cjs +1 -0
  44. package/dist/node_modules/@langchain/core/callbacks/base.d.cts +1 -0
  45. package/dist/node_modules/@langchain/core/callbacks/base.d.ts +1 -0
  46. package/dist/node_modules/@langchain/core/callbacks/base.js +1 -0
  47. package/dist/node_modules/@langchain/core/callbacks/dispatch/web.cjs +1 -0
  48. package/dist/node_modules/@langchain/core/callbacks/dispatch/web.d.cts +1 -0
  49. package/dist/node_modules/@langchain/core/callbacks/dispatch/web.d.ts +1 -0
  50. package/dist/node_modules/@langchain/core/callbacks/dispatch/web.js +1 -0
  51. package/dist/node_modules/@langchain/core/callbacks/dispatch.cjs +1 -0
  52. package/dist/node_modules/@langchain/core/callbacks/dispatch.d.cts +1 -0
  53. package/dist/node_modules/@langchain/core/callbacks/dispatch.d.ts +1 -0
  54. package/dist/node_modules/@langchain/core/callbacks/dispatch.js +1 -0
  55. package/dist/node_modules/@langchain/core/callbacks/manager.cjs +1 -0
  56. package/dist/node_modules/@langchain/core/callbacks/manager.d.cts +1 -0
  57. package/dist/node_modules/@langchain/core/callbacks/manager.d.ts +1 -0
  58. package/dist/node_modules/@langchain/core/callbacks/manager.js +1 -0
  59. package/dist/node_modules/@langchain/core/callbacks/promises.cjs +1 -0
  60. package/dist/node_modules/@langchain/core/callbacks/promises.d.cts +1 -0
  61. package/dist/node_modules/@langchain/core/callbacks/promises.d.ts +1 -0
  62. package/dist/node_modules/@langchain/core/callbacks/promises.js +1 -0
  63. package/dist/node_modules/@langchain/core/chat_history.cjs +1 -0
  64. package/dist/node_modules/@langchain/core/chat_history.d.cts +1 -0
  65. package/dist/node_modules/@langchain/core/chat_history.d.ts +1 -0
  66. package/dist/node_modules/@langchain/core/chat_history.js +1 -0
  67. package/dist/node_modules/@langchain/core/context.cjs +1 -0
  68. package/dist/node_modules/@langchain/core/context.d.cts +1 -0
  69. package/dist/node_modules/@langchain/core/context.d.ts +1 -0
  70. package/dist/node_modules/@langchain/core/context.js +1 -0
  71. package/dist/node_modules/@langchain/core/dist/agents.cjs +2 -0
  72. package/dist/node_modules/@langchain/core/dist/agents.d.ts +13 -0
  73. package/dist/node_modules/@langchain/core/dist/agents.js +1 -0
  74. package/dist/node_modules/@langchain/core/dist/caches/base.cjs +89 -0
  75. package/dist/node_modules/@langchain/core/dist/caches/base.d.ts +56 -0
  76. package/dist/node_modules/@langchain/core/dist/caches/base.js +81 -0
  77. package/dist/node_modules/@langchain/core/dist/callbacks/base.cjs +183 -0
  78. package/dist/node_modules/@langchain/core/dist/callbacks/base.d.ts +291 -0
  79. package/dist/node_modules/@langchain/core/dist/callbacks/base.js +154 -0
  80. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/index.cjs +49 -0
  81. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/index.d.ts +35 -0
  82. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/index.js +45 -0
  83. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/web.cjs +59 -0
  84. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/web.d.ts +32 -0
  85. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/web.js +55 -0
  86. package/dist/node_modules/@langchain/core/dist/callbacks/manager.cjs +890 -0
  87. package/dist/node_modules/@langchain/core/dist/callbacks/manager.d.ts +179 -0
  88. package/dist/node_modules/@langchain/core/dist/callbacks/manager.js +876 -0
  89. package/dist/node_modules/@langchain/core/dist/callbacks/promises.cjs +6 -0
  90. package/dist/node_modules/@langchain/core/dist/callbacks/promises.d.ts +2 -0
  91. package/dist/node_modules/@langchain/core/dist/callbacks/promises.js +2 -0
  92. package/dist/node_modules/@langchain/core/dist/chat_history.cjs +123 -0
  93. package/dist/node_modules/@langchain/core/dist/chat_history.d.ts +92 -0
  94. package/dist/node_modules/@langchain/core/dist/chat_history.js +117 -0
  95. package/dist/node_modules/@langchain/core/dist/context.cjs +18 -0
  96. package/dist/node_modules/@langchain/core/dist/context.d.ts +2 -0
  97. package/dist/node_modules/@langchain/core/dist/context.js +13 -0
  98. package/dist/node_modules/@langchain/core/dist/document_loaders/base.cjs +24 -0
  99. package/dist/node_modules/@langchain/core/dist/document_loaders/base.d.ts +28 -0
  100. package/dist/node_modules/@langchain/core/dist/document_loaders/base.js +20 -0
  101. package/dist/node_modules/@langchain/core/dist/document_loaders/langsmith.cjs +198 -0
  102. package/dist/node_modules/@langchain/core/dist/document_loaders/langsmith.d.ts +96 -0
  103. package/dist/node_modules/@langchain/core/dist/document_loaders/langsmith.js +194 -0
  104. package/dist/node_modules/@langchain/core/dist/documents/document.cjs +42 -0
  105. package/dist/node_modules/@langchain/core/dist/documents/document.d.ts +37 -0
  106. package/dist/node_modules/@langchain/core/dist/documents/document.js +38 -0
  107. package/dist/node_modules/@langchain/core/dist/documents/index.cjs +18 -0
  108. package/dist/node_modules/@langchain/core/dist/documents/index.d.ts +2 -0
  109. package/dist/node_modules/@langchain/core/dist/documents/index.js +2 -0
  110. package/dist/node_modules/@langchain/core/dist/documents/transformers.cjs +51 -0
  111. package/dist/node_modules/@langchain/core/dist/documents/transformers.d.ts +38 -0
  112. package/dist/node_modules/@langchain/core/dist/documents/transformers.js +46 -0
  113. package/dist/node_modules/@langchain/core/dist/embeddings.cjs +24 -0
  114. package/dist/node_modules/@langchain/core/dist/embeddings.d.ts +50 -0
  115. package/dist/node_modules/@langchain/core/dist/embeddings.js +20 -0
  116. package/dist/node_modules/@langchain/core/dist/errors/index.cjs +11 -0
  117. package/dist/node_modules/@langchain/core/dist/errors/index.d.ts +2 -0
  118. package/dist/node_modules/@langchain/core/dist/errors/index.js +7 -0
  119. package/dist/node_modules/@langchain/core/dist/example_selectors/base.cjs +19 -0
  120. package/dist/node_modules/@langchain/core/dist/example_selectors/base.d.ts +20 -0
  121. package/dist/node_modules/@langchain/core/dist/example_selectors/base.js +15 -0
  122. package/dist/node_modules/@langchain/core/dist/example_selectors/conditional.cjs +76 -0
  123. package/dist/node_modules/@langchain/core/dist/example_selectors/conditional.d.ts +63 -0
  124. package/dist/node_modules/@langchain/core/dist/example_selectors/conditional.js +69 -0
  125. package/dist/node_modules/@langchain/core/dist/example_selectors/index.cjs +20 -0
  126. package/dist/node_modules/@langchain/core/dist/example_selectors/index.d.ts +4 -0
  127. package/dist/node_modules/@langchain/core/dist/example_selectors/index.js +4 -0
  128. package/dist/node_modules/@langchain/core/dist/example_selectors/length_based.cjs +150 -0
  129. package/dist/node_modules/@langchain/core/dist/example_selectors/length_based.d.ts +89 -0
  130. package/dist/node_modules/@langchain/core/dist/example_selectors/length_based.js +146 -0
  131. package/dist/node_modules/@langchain/core/dist/example_selectors/semantic_similarity.cjs +139 -0
  132. package/dist/node_modules/@langchain/core/dist/example_selectors/semantic_similarity.d.ts +91 -0
  133. package/dist/node_modules/@langchain/core/dist/example_selectors/semantic_similarity.js +135 -0
  134. package/dist/node_modules/@langchain/core/dist/index.cjs +63 -0
  135. package/dist/node_modules/@langchain/core/dist/index.d.ts +63 -0
  136. package/dist/node_modules/@langchain/core/dist/index.js +63 -0
  137. package/dist/node_modules/@langchain/core/dist/indexing/base.cjs +272 -0
  138. package/dist/node_modules/@langchain/core/dist/indexing/base.d.ts +114 -0
  139. package/dist/node_modules/@langchain/core/dist/indexing/base.js +263 -0
  140. package/dist/node_modules/@langchain/core/dist/indexing/index.cjs +18 -0
  141. package/dist/node_modules/@langchain/core/dist/indexing/index.d.ts +2 -0
  142. package/dist/node_modules/@langchain/core/dist/indexing/index.js +2 -0
  143. package/dist/node_modules/@langchain/core/dist/indexing/record_manager.cjs +18 -0
  144. package/dist/node_modules/@langchain/core/dist/indexing/record_manager.d.ts +64 -0
  145. package/dist/node_modules/@langchain/core/dist/indexing/record_manager.js +14 -0
  146. package/dist/node_modules/@langchain/core/dist/language_models/base.cjs +283 -0
  147. package/dist/node_modules/@langchain/core/dist/language_models/base.d.ts +226 -0
  148. package/dist/node_modules/@langchain/core/dist/language_models/base.js +273 -0
  149. package/dist/node_modules/@langchain/core/dist/language_models/chat_models.cjs +603 -0
  150. package/dist/node_modules/@langchain/core/dist/language_models/chat_models.d.ts +199 -0
  151. package/dist/node_modules/@langchain/core/dist/language_models/chat_models.js +597 -0
  152. package/dist/node_modules/@langchain/core/dist/language_models/llms.cjs +379 -0
  153. package/dist/node_modules/@langchain/core/dist/language_models/llms.d.ts +129 -0
  154. package/dist/node_modules/@langchain/core/dist/language_models/llms.js +374 -0
  155. package/dist/node_modules/@langchain/core/dist/load/import_constants.cjs +5 -0
  156. package/dist/node_modules/@langchain/core/dist/load/import_constants.d.ts +1 -0
  157. package/dist/node_modules/@langchain/core/dist/load/import_constants.js +2 -0
  158. package/dist/node_modules/@langchain/core/dist/load/import_map.cjs +70 -0
  159. package/dist/node_modules/@langchain/core/dist/load/import_map.d.ts +43 -0
  160. package/dist/node_modules/@langchain/core/dist/load/import_map.js +44 -0
  161. package/dist/node_modules/@langchain/core/dist/load/import_type.cjs +3 -0
  162. package/dist/node_modules/@langchain/core/dist/load/import_type.d.ts +4 -0
  163. package/dist/node_modules/@langchain/core/dist/load/import_type.js +2 -0
  164. package/dist/node_modules/@langchain/core/dist/load/index.cjs +189 -0
  165. package/dist/node_modules/@langchain/core/dist/load/index.d.ts +7 -0
  166. package/dist/node_modules/@langchain/core/dist/load/index.js +162 -0
  167. package/dist/node_modules/@langchain/core/dist/load/map_keys.cjs +26 -0
  168. package/dist/node_modules/@langchain/core/dist/load/map_keys.d.ts +9 -0
  169. package/dist/node_modules/@langchain/core/dist/load/map_keys.js +17 -0
  170. package/dist/node_modules/@langchain/core/dist/load/serializable.cjs +192 -0
  171. package/dist/node_modules/@langchain/core/dist/load/serializable.d.ts +76 -0
  172. package/dist/node_modules/@langchain/core/dist/load/serializable.js +187 -0
  173. package/dist/node_modules/@langchain/core/dist/memory.cjs +63 -0
  174. package/dist/node_modules/@langchain/core/dist/memory.d.ts +62 -0
  175. package/dist/node_modules/@langchain/core/dist/memory.js +56 -0
  176. package/dist/node_modules/@langchain/core/dist/messages/ai.cjs +327 -0
  177. package/dist/node_modules/@langchain/core/dist/messages/ai.d.ts +120 -0
  178. package/dist/node_modules/@langchain/core/dist/messages/ai.js +320 -0
  179. package/dist/node_modules/@langchain/core/dist/messages/base.cjs +350 -0
  180. package/dist/node_modules/@langchain/core/dist/messages/base.d.ts +189 -0
  181. package/dist/node_modules/@langchain/core/dist/messages/base.js +336 -0
  182. package/dist/node_modules/@langchain/core/dist/messages/chat.cjs +92 -0
  183. package/dist/node_modules/@langchain/core/dist/messages/chat.d.ts +32 -0
  184. package/dist/node_modules/@langchain/core/dist/messages/chat.js +85 -0
  185. package/dist/node_modules/@langchain/core/dist/messages/function.cjs +55 -0
  186. package/dist/node_modules/@langchain/core/dist/messages/function.d.ts +26 -0
  187. package/dist/node_modules/@langchain/core/dist/messages/function.js +48 -0
  188. package/dist/node_modules/@langchain/core/dist/messages/human.cjs +45 -0
  189. package/dist/node_modules/@langchain/core/dist/messages/human.d.ts +19 -0
  190. package/dist/node_modules/@langchain/core/dist/messages/human.js +38 -0
  191. package/dist/node_modules/@langchain/core/dist/messages/index.cjs +33 -0
  192. package/dist/node_modules/@langchain/core/dist/messages/index.d.ts +10 -0
  193. package/dist/node_modules/@langchain/core/dist/messages/index.js +12 -0
  194. package/dist/node_modules/@langchain/core/dist/messages/modifier.cjs +35 -0
  195. package/dist/node_modules/@langchain/core/dist/messages/modifier.d.ts +19 -0
  196. package/dist/node_modules/@langchain/core/dist/messages/modifier.js +31 -0
  197. package/dist/node_modules/@langchain/core/dist/messages/system.cjs +45 -0
  198. package/dist/node_modules/@langchain/core/dist/messages/system.d.ts +19 -0
  199. package/dist/node_modules/@langchain/core/dist/messages/system.js +38 -0
  200. package/dist/node_modules/@langchain/core/dist/messages/tool.cjs +191 -0
  201. package/dist/node_modules/@langchain/core/dist/messages/tool.d.ts +159 -0
  202. package/dist/node_modules/@langchain/core/dist/messages/tool.js +182 -0
  203. package/dist/node_modules/@langchain/core/dist/messages/transformers.cjs +459 -0
  204. package/dist/node_modules/@langchain/core/dist/messages/transformers.d.ts +466 -0
  205. package/dist/node_modules/@langchain/core/dist/messages/transformers.js +452 -0
  206. package/dist/node_modules/@langchain/core/dist/messages/utils.cjs +292 -0
  207. package/dist/node_modules/@langchain/core/dist/messages/utils.d.ts +31 -0
  208. package/dist/node_modules/@langchain/core/dist/messages/utils.js +283 -0
  209. package/dist/node_modules/@langchain/core/dist/output_parsers/base.cjs +124 -0
  210. package/dist/node_modules/@langchain/core/dist/output_parsers/base.d.ts +103 -0
  211. package/dist/node_modules/@langchain/core/dist/output_parsers/base.js +118 -0
  212. package/dist/node_modules/@langchain/core/dist/output_parsers/bytes.cjs +41 -0
  213. package/dist/node_modules/@langchain/core/dist/output_parsers/bytes.d.ts +13 -0
  214. package/dist/node_modules/@langchain/core/dist/output_parsers/bytes.js +37 -0
  215. package/dist/node_modules/@langchain/core/dist/output_parsers/index.cjs +24 -0
  216. package/dist/node_modules/@langchain/core/dist/output_parsers/index.d.ts +8 -0
  217. package/dist/node_modules/@langchain/core/dist/output_parsers/index.js +8 -0
  218. package/dist/node_modules/@langchain/core/dist/output_parsers/json.cjs +52 -0
  219. package/dist/node_modules/@langchain/core/dist/output_parsers/json.d.ts +17 -0
  220. package/dist/node_modules/@langchain/core/dist/output_parsers/json.js +47 -0
  221. package/dist/node_modules/@langchain/core/dist/output_parsers/list.cjs +244 -0
  222. package/dist/node_modules/@langchain/core/dist/output_parsers/list.d.ts +76 -0
  223. package/dist/node_modules/@langchain/core/dist/output_parsers/list.js +236 -0
  224. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/index.cjs +17 -0
  225. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/index.d.ts +1 -0
  226. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/index.js +1 -0
  227. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/json_output_functions_parsers.cjs +207 -0
  228. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts +80 -0
  229. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/json_output_functions_parsers.js +201 -0
  230. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/index.cjs +17 -0
  231. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/index.d.ts +1 -0
  232. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/index.js +1 -0
  233. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/json_output_tools_parsers.cjs +262 -0
  234. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts +78 -0
  235. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/json_output_tools_parsers.js +254 -0
  236. package/dist/node_modules/@langchain/core/dist/output_parsers/string.cjs +86 -0
  237. package/dist/node_modules/@langchain/core/dist/output_parsers/string.d.ts +39 -0
  238. package/dist/node_modules/@langchain/core/dist/output_parsers/string.js +82 -0
  239. package/dist/node_modules/@langchain/core/dist/output_parsers/structured.cjs +196 -0
  240. package/dist/node_modules/@langchain/core/dist/output_parsers/structured.d.ts +88 -0
  241. package/dist/node_modules/@langchain/core/dist/output_parsers/structured.js +190 -0
  242. package/dist/node_modules/@langchain/core/dist/output_parsers/transform.cjs +112 -0
  243. package/dist/node_modules/@langchain/core/dist/output_parsers/transform.d.ts +34 -0
  244. package/dist/node_modules/@langchain/core/dist/output_parsers/transform.js +107 -0
  245. package/dist/node_modules/@langchain/core/dist/output_parsers/xml.cjs +146 -0
  246. package/dist/node_modules/@langchain/core/dist/output_parsers/xml.d.ts +29 -0
  247. package/dist/node_modules/@langchain/core/dist/output_parsers/xml.js +141 -0
  248. package/dist/node_modules/@langchain/core/dist/outputs.cjs +59 -0
  249. package/dist/node_modules/@langchain/core/dist/outputs.d.ts +61 -0
  250. package/dist/node_modules/@langchain/core/dist/outputs.js +54 -0
  251. package/dist/node_modules/@langchain/core/dist/prompt_values.cjs +153 -0
  252. package/dist/node_modules/@langchain/core/dist/prompt_values.d.ts +78 -0
  253. package/dist/node_modules/@langchain/core/dist/prompt_values.js +146 -0
  254. package/dist/node_modules/@langchain/core/dist/prompts/base.cjs +142 -0
  255. package/dist/node_modules/@langchain/core/dist/prompts/base.d.ts +95 -0
  256. package/dist/node_modules/@langchain/core/dist/prompts/base.js +138 -0
  257. package/dist/node_modules/@langchain/core/dist/prompts/chat.cjs +764 -0
  258. package/dist/node_modules/@langchain/core/dist/prompts/chat.d.ts +240 -0
  259. package/dist/node_modules/@langchain/core/dist/prompts/chat.js +752 -0
  260. package/dist/node_modules/@langchain/core/dist/prompts/few_shot.cjs +355 -0
  261. package/dist/node_modules/@langchain/core/dist/prompts/few_shot.d.ts +195 -0
  262. package/dist/node_modules/@langchain/core/dist/prompts/few_shot.js +350 -0
  263. package/dist/node_modules/@langchain/core/dist/prompts/image.cjs +128 -0
  264. package/dist/node_modules/@langchain/core/dist/prompts/image.d.ts +70 -0
  265. package/dist/node_modules/@langchain/core/dist/prompts/image.js +124 -0
  266. package/dist/node_modules/@langchain/core/dist/prompts/index.cjs +26 -0
  267. package/dist/node_modules/@langchain/core/dist/prompts/index.d.ts +10 -0
  268. package/dist/node_modules/@langchain/core/dist/prompts/index.js +10 -0
  269. package/dist/node_modules/@langchain/core/dist/prompts/pipeline.cjs +144 -0
  270. package/dist/node_modules/@langchain/core/dist/prompts/pipeline.d.ts +98 -0
  271. package/dist/node_modules/@langchain/core/dist/prompts/pipeline.js +140 -0
  272. package/dist/node_modules/@langchain/core/dist/prompts/prompt.cjs +166 -0
  273. package/dist/node_modules/@langchain/core/dist/prompts/prompt.d.ts +107 -0
  274. package/dist/node_modules/@langchain/core/dist/prompts/prompt.js +162 -0
  275. package/dist/node_modules/@langchain/core/dist/prompts/serde.cjs +2 -0
  276. package/dist/node_modules/@langchain/core/dist/prompts/serde.d.ts +43 -0
  277. package/dist/node_modules/@langchain/core/dist/prompts/serde.js +1 -0
  278. package/dist/node_modules/@langchain/core/dist/prompts/string.cjs +25 -0
  279. package/dist/node_modules/@langchain/core/dist/prompts/string.d.ts +17 -0
  280. package/dist/node_modules/@langchain/core/dist/prompts/string.js +21 -0
  281. package/dist/node_modules/@langchain/core/dist/prompts/structured.cjs +64 -0
  282. package/dist/node_modules/@langchain/core/dist/prompts/structured.d.ts +19 -0
  283. package/dist/node_modules/@langchain/core/dist/prompts/structured.js +60 -0
  284. package/dist/node_modules/@langchain/core/dist/prompts/template.cjs +169 -0
  285. package/dist/node_modules/@langchain/core/dist/prompts/template.d.ts +43 -0
  286. package/dist/node_modules/@langchain/core/dist/prompts/template.js +156 -0
  287. package/dist/node_modules/@langchain/core/dist/retrievers/document_compressors/base.cjs +13 -0
  288. package/dist/node_modules/@langchain/core/dist/retrievers/document_compressors/base.d.ts +18 -0
  289. package/dist/node_modules/@langchain/core/dist/retrievers/document_compressors/base.js +9 -0
  290. package/dist/node_modules/@langchain/core/dist/retrievers/index.cjs +131 -0
  291. package/dist/node_modules/@langchain/core/dist/retrievers/index.d.ts +134 -0
  292. package/dist/node_modules/@langchain/core/dist/retrievers/index.js +127 -0
  293. package/dist/node_modules/@langchain/core/dist/runnables/base.cjs +2399 -0
  294. package/dist/node_modules/@langchain/core/dist/runnables/base.d.ts +923 -0
  295. package/dist/node_modules/@langchain/core/dist/runnables/base.js +2377 -0
  296. package/dist/node_modules/@langchain/core/dist/runnables/branch.cjs +207 -0
  297. package/dist/node_modules/@langchain/core/dist/runnables/branch.d.ts +95 -0
  298. package/dist/node_modules/@langchain/core/dist/runnables/branch.js +203 -0
  299. package/dist/node_modules/@langchain/core/dist/runnables/config.cjs +223 -0
  300. package/dist/node_modules/@langchain/core/dist/runnables/config.d.ts +15 -0
  301. package/dist/node_modules/@langchain/core/dist/runnables/config.js +215 -0
  302. package/dist/node_modules/@langchain/core/dist/runnables/graph.cjs +270 -0
  303. package/dist/node_modules/@langchain/core/dist/runnables/graph.d.ts +44 -0
  304. package/dist/node_modules/@langchain/core/dist/runnables/graph.js +266 -0
  305. package/dist/node_modules/@langchain/core/dist/runnables/graph_mermaid.cjs +152 -0
  306. package/dist/node_modules/@langchain/core/dist/runnables/graph_mermaid.d.ts +18 -0
  307. package/dist/node_modules/@langchain/core/dist/runnables/graph_mermaid.js +147 -0
  308. package/dist/node_modules/@langchain/core/dist/runnables/history.cjs +262 -0
  309. package/dist/node_modules/@langchain/core/dist/runnables/history.d.ts +92 -0
  310. package/dist/node_modules/@langchain/core/dist/runnables/history.js +258 -0
  311. package/dist/node_modules/@langchain/core/dist/runnables/index.cjs +31 -0
  312. package/dist/node_modules/@langchain/core/dist/runnables/index.d.ts +7 -0
  313. package/dist/node_modules/@langchain/core/dist/runnables/index.js +6 -0
  314. package/dist/node_modules/@langchain/core/dist/runnables/iter.cjs +50 -0
  315. package/dist/node_modules/@langchain/core/dist/runnables/iter.d.ts +6 -0
  316. package/dist/node_modules/@langchain/core/dist/runnables/iter.js +42 -0
  317. package/dist/node_modules/@langchain/core/dist/runnables/passthrough.cjs +127 -0
  318. package/dist/node_modules/@langchain/core/dist/runnables/passthrough.d.ts +70 -0
  319. package/dist/node_modules/@langchain/core/dist/runnables/passthrough.js +123 -0
  320. package/dist/node_modules/@langchain/core/dist/runnables/remote.cjs +518 -0
  321. package/dist/node_modules/@langchain/core/dist/runnables/remote.d.ts +59 -0
  322. package/dist/node_modules/@langchain/core/dist/runnables/remote.js +514 -0
  323. package/dist/node_modules/@langchain/core/dist/runnables/router.cjs +97 -0
  324. package/dist/node_modules/@langchain/core/dist/runnables/router.d.ts +52 -0
  325. package/dist/node_modules/@langchain/core/dist/runnables/router.js +93 -0
  326. package/dist/node_modules/@langchain/core/dist/runnables/types.cjs +2 -0
  327. package/dist/node_modules/@langchain/core/dist/runnables/types.d.ts +68 -0
  328. package/dist/node_modules/@langchain/core/dist/runnables/types.js +1 -0
  329. package/dist/node_modules/@langchain/core/dist/runnables/utils.cjs +89 -0
  330. package/dist/node_modules/@langchain/core/dist/runnables/utils.d.ts +27 -0
  331. package/dist/node_modules/@langchain/core/dist/runnables/utils.js +84 -0
  332. package/dist/node_modules/@langchain/core/dist/runnables/wrappers.cjs +18 -0
  333. package/dist/node_modules/@langchain/core/dist/runnables/wrappers.d.ts +2 -0
  334. package/dist/node_modules/@langchain/core/dist/runnables/wrappers.js +14 -0
  335. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/context.cjs +189 -0
  336. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/context.d.ts +155 -0
  337. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/context.js +182 -0
  338. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/globals.cjs +13 -0
  339. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/globals.d.ts +9 -0
  340. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/globals.js +8 -0
  341. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/index.cjs +69 -0
  342. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/index.d.ts +14 -0
  343. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/index.js +65 -0
  344. package/dist/node_modules/@langchain/core/dist/singletons/callbacks.cjs +68 -0
  345. package/dist/node_modules/@langchain/core/dist/singletons/callbacks.d.ts +13 -0
  346. package/dist/node_modules/@langchain/core/dist/singletons/callbacks.js +59 -0
  347. package/dist/node_modules/@langchain/core/dist/singletons/index.cjs +8 -0
  348. package/dist/node_modules/@langchain/core/dist/singletons/index.d.ts +4 -0
  349. package/dist/node_modules/@langchain/core/dist/singletons/index.js +4 -0
  350. package/dist/node_modules/@langchain/core/dist/singletons/tracer.cjs +23 -0
  351. package/dist/node_modules/@langchain/core/dist/singletons/tracer.d.ts +3 -0
  352. package/dist/node_modules/@langchain/core/dist/singletons/tracer.js +18 -0
  353. package/dist/node_modules/@langchain/core/dist/stores.cjs +90 -0
  354. package/dist/node_modules/@langchain/core/dist/stores.d.ts +105 -0
  355. package/dist/node_modules/@langchain/core/dist/stores.js +85 -0
  356. package/dist/node_modules/@langchain/core/dist/structured_query/base.cjs +139 -0
  357. package/dist/node_modules/@langchain/core/dist/structured_query/base.d.ts +69 -0
  358. package/dist/node_modules/@langchain/core/dist/structured_query/base.js +134 -0
  359. package/dist/node_modules/@langchain/core/dist/structured_query/functional.cjs +236 -0
  360. package/dist/node_modules/@langchain/core/dist/structured_query/functional.d.ts +93 -0
  361. package/dist/node_modules/@langchain/core/dist/structured_query/functional.js +232 -0
  362. package/dist/node_modules/@langchain/core/dist/structured_query/index.cjs +20 -0
  363. package/dist/node_modules/@langchain/core/dist/structured_query/index.d.ts +4 -0
  364. package/dist/node_modules/@langchain/core/dist/structured_query/index.js +4 -0
  365. package/dist/node_modules/@langchain/core/dist/structured_query/ir.cjs +141 -0
  366. package/dist/node_modules/@langchain/core/dist/structured_query/ir.d.ts +138 -0
  367. package/dist/node_modules/@langchain/core/dist/structured_query/ir.js +132 -0
  368. package/dist/node_modules/@langchain/core/dist/structured_query/utils.cjs +104 -0
  369. package/dist/node_modules/@langchain/core/dist/structured_query/utils.d.ts +33 -0
  370. package/dist/node_modules/@langchain/core/dist/structured_query/utils.js +94 -0
  371. package/dist/node_modules/@langchain/core/dist/tools/index.cjs +394 -0
  372. package/dist/node_modules/@langchain/core/dist/tools/index.d.ts +305 -0
  373. package/dist/node_modules/@langchain/core/dist/tools/index.js +385 -0
  374. package/dist/node_modules/@langchain/core/dist/tools/utils.cjs +28 -0
  375. package/dist/node_modules/@langchain/core/dist/tools/utils.d.ts +11 -0
  376. package/dist/node_modules/@langchain/core/dist/tools/utils.js +23 -0
  377. package/dist/node_modules/@langchain/core/dist/tracers/base.cjs +474 -0
  378. package/dist/node_modules/@langchain/core/dist/tracers/base.d.ts +259 -0
  379. package/dist/node_modules/@langchain/core/dist/tracers/base.js +469 -0
  380. package/dist/node_modules/@langchain/core/dist/tracers/console.cjs +233 -0
  381. package/dist/node_modules/@langchain/core/dist/tracers/console.d.ts +117 -0
  382. package/dist/node_modules/@langchain/core/dist/tracers/console.js +226 -0
  383. package/dist/node_modules/@langchain/core/dist/tracers/event_stream.cjs +533 -0
  384. package/dist/node_modules/@langchain/core/dist/tracers/event_stream.d.ts +140 -0
  385. package/dist/node_modules/@langchain/core/dist/tracers/event_stream.js +528 -0
  386. package/dist/node_modules/@langchain/core/dist/tracers/initialize.cjs +36 -0
  387. package/dist/node_modules/@langchain/core/dist/tracers/initialize.d.ts +20 -0
  388. package/dist/node_modules/@langchain/core/dist/tracers/initialize.js +31 -0
  389. package/dist/node_modules/@langchain/core/dist/tracers/log_stream.cjs +436 -0
  390. package/dist/node_modules/@langchain/core/dist/tracers/log_stream.d.ts +118 -0
  391. package/dist/node_modules/@langchain/core/dist/tracers/log_stream.js +429 -0
  392. package/dist/node_modules/@langchain/core/dist/tracers/root_listener.cjs +81 -0
  393. package/dist/node_modules/@langchain/core/dist/tracers/root_listener.d.ts +25 -0
  394. package/dist/node_modules/@langchain/core/dist/tracers/root_listener.js +77 -0
  395. package/dist/node_modules/@langchain/core/dist/tracers/run_collector.cjs +50 -0
  396. package/dist/node_modules/@langchain/core/dist/tracers/run_collector.d.ts +26 -0
  397. package/dist/node_modules/@langchain/core/dist/tracers/run_collector.js +46 -0
  398. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain.cjs +160 -0
  399. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain.d.ts +42 -0
  400. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain.js +156 -0
  401. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain_v1.cjs +200 -0
  402. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain_v1.d.ts +59 -0
  403. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain_v1.js +196 -0
  404. package/dist/node_modules/@langchain/core/dist/types/_internal.cjs +2 -0
  405. package/dist/node_modules/@langchain/core/dist/types/_internal.d.ts +1 -0
  406. package/dist/node_modules/@langchain/core/dist/types/_internal.js +1 -0
  407. package/dist/node_modules/@langchain/core/dist/types/stream.cjs +2 -0
  408. package/dist/node_modules/@langchain/core/dist/types/stream.d.ts +2 -0
  409. package/dist/node_modules/@langchain/core/dist/types/stream.js +1 -0
  410. package/dist/node_modules/@langchain/core/dist/types/type-utils.cjs +2 -0
  411. package/dist/node_modules/@langchain/core/dist/types/type-utils.d.ts +1 -0
  412. package/dist/node_modules/@langchain/core/dist/types/type-utils.js +1 -0
  413. package/dist/node_modules/@langchain/core/dist/utils/async_caller.cjs +128 -0
  414. package/dist/node_modules/@langchain/core/dist/utils/async_caller.d.ts +45 -0
  415. package/dist/node_modules/@langchain/core/dist/utils/async_caller.js +121 -0
  416. package/dist/node_modules/@langchain/core/dist/utils/callbacks.cjs +17 -0
  417. package/dist/node_modules/@langchain/core/dist/utils/callbacks.d.ts +1 -0
  418. package/dist/node_modules/@langchain/core/dist/utils/callbacks.js +13 -0
  419. package/dist/node_modules/@langchain/core/dist/utils/chunk_array.cjs +11 -0
  420. package/dist/node_modules/@langchain/core/dist/utils/chunk_array.d.ts +1 -0
  421. package/dist/node_modules/@langchain/core/dist/utils/chunk_array.js +7 -0
  422. package/dist/node_modules/@langchain/core/dist/utils/env.cjs +79 -0
  423. package/dist/node_modules/@langchain/core/dist/utils/env.d.ts +24 -0
  424. package/dist/node_modules/@langchain/core/dist/utils/env.js +68 -0
  425. package/dist/node_modules/@langchain/core/dist/utils/event_source_parse.cjs +241 -0
  426. package/dist/node_modules/@langchain/core/dist/utils/event_source_parse.d.ts +39 -0
  427. package/dist/node_modules/@langchain/core/dist/utils/event_source_parse.js +234 -0
  428. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/index.cjs +49 -0
  429. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/index.d.ts +22 -0
  430. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/index.js +16 -0
  431. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/core.cjs +469 -0
  432. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/core.d.ts +111 -0
  433. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/core.js +459 -0
  434. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/duplex.cjs +237 -0
  435. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/duplex.d.ts +23 -0
  436. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/duplex.js +230 -0
  437. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/helpers.cjs +194 -0
  438. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/helpers.d.ts +36 -0
  439. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/helpers.js +181 -0
  440. package/dist/node_modules/@langchain/core/dist/utils/function_calling.cjs +116 -0
  441. package/dist/node_modules/@langchain/core/dist/utils/function_calling.d.ts +66 -0
  442. package/dist/node_modules/@langchain/core/dist/utils/function_calling.js +107 -0
  443. package/dist/node_modules/@langchain/core/dist/utils/hash.cjs +5 -0
  444. package/dist/node_modules/@langchain/core/dist/utils/hash.d.ts +1 -0
  445. package/dist/node_modules/@langchain/core/dist/utils/hash.js +1 -0
  446. package/dist/node_modules/@langchain/core/dist/utils/js-sha1/hash.cjs +358 -0
  447. package/dist/node_modules/@langchain/core/dist/utils/js-sha1/hash.d.ts +1 -0
  448. package/dist/node_modules/@langchain/core/dist/utils/js-sha1/hash.js +355 -0
  449. package/dist/node_modules/@langchain/core/dist/utils/json.cjs +93 -0
  450. package/dist/node_modules/@langchain/core/dist/utils/json.d.ts +2 -0
  451. package/dist/node_modules/@langchain/core/dist/utils/json.js +88 -0
  452. package/dist/node_modules/@langchain/core/dist/utils/json_patch.cjs +6 -0
  453. package/dist/node_modules/@langchain/core/dist/utils/json_patch.d.ts +1 -0
  454. package/dist/node_modules/@langchain/core/dist/utils/json_patch.js +1 -0
  455. package/dist/node_modules/@langchain/core/dist/utils/json_schema.cjs +6 -0
  456. package/dist/node_modules/@langchain/core/dist/utils/json_schema.d.ts +1 -0
  457. package/dist/node_modules/@langchain/core/dist/utils/json_schema.js +1 -0
  458. package/dist/node_modules/@langchain/core/dist/utils/math.cjs +127 -0
  459. package/dist/node_modules/@langchain/core/dist/utils/math.d.ts +40 -0
  460. package/dist/node_modules/@langchain/core/dist/utils/math.js +118 -0
  461. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/distances.cjs +18 -0
  462. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/distances.d.ts +8 -0
  463. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/distances.js +14 -0
  464. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/similarities.cjs +21 -0
  465. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/similarities.d.ts +7 -0
  466. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/similarities.js +17 -0
  467. package/dist/node_modules/@langchain/core/dist/utils/ml-distance-euclidean/euclidean.cjs +15 -0
  468. package/dist/node_modules/@langchain/core/dist/utils/ml-distance-euclidean/euclidean.d.ts +2 -0
  469. package/dist/node_modules/@langchain/core/dist/utils/ml-distance-euclidean/euclidean.js +10 -0
  470. package/dist/node_modules/@langchain/core/dist/utils/sax-js/sax.cjs +1558 -0
  471. package/dist/node_modules/@langchain/core/dist/utils/sax-js/sax.d.ts +2 -0
  472. package/dist/node_modules/@langchain/core/dist/utils/sax-js/sax.js +1555 -0
  473. package/dist/node_modules/@langchain/core/dist/utils/signal.cjs +30 -0
  474. package/dist/node_modules/@langchain/core/dist/utils/signal.d.ts +1 -0
  475. package/dist/node_modules/@langchain/core/dist/utils/signal.js +26 -0
  476. package/dist/node_modules/@langchain/core/dist/utils/stream.cjs +274 -0
  477. package/dist/node_modules/@langchain/core/dist/utils/stream.d.ts +38 -0
  478. package/dist/node_modules/@langchain/core/dist/utils/stream.js +266 -0
  479. package/dist/node_modules/@langchain/core/dist/utils/testing/index.cjs +809 -0
  480. package/dist/node_modules/@langchain/core/dist/utils/testing/index.d.ts +326 -0
  481. package/dist/node_modules/@langchain/core/dist/utils/testing/index.js +790 -0
  482. package/dist/node_modules/@langchain/core/dist/utils/tiktoken.cjs +25 -0
  483. package/dist/node_modules/@langchain/core/dist/utils/tiktoken.d.ts +3 -0
  484. package/dist/node_modules/@langchain/core/dist/utils/tiktoken.js +20 -0
  485. package/dist/node_modules/@langchain/core/dist/utils/types/index.cjs +17 -0
  486. package/dist/node_modules/@langchain/core/dist/utils/types/index.d.ts +8 -0
  487. package/dist/node_modules/@langchain/core/dist/utils/types/index.js +1 -0
  488. package/dist/node_modules/@langchain/core/dist/utils/types/is_zod_schema.cjs +16 -0
  489. package/dist/node_modules/@langchain/core/dist/utils/types/is_zod_schema.d.ts +8 -0
  490. package/dist/node_modules/@langchain/core/dist/utils/types/is_zod_schema.js +12 -0
  491. package/dist/node_modules/@langchain/core/dist/vectorstores.cjs +428 -0
  492. package/dist/node_modules/@langchain/core/dist/vectorstores.d.ts +644 -0
  493. package/dist/node_modules/@langchain/core/dist/vectorstores.js +422 -0
  494. package/dist/node_modules/@langchain/core/document_loaders/base.cjs +1 -0
  495. package/dist/node_modules/@langchain/core/document_loaders/base.d.cts +1 -0
  496. package/dist/node_modules/@langchain/core/document_loaders/base.d.ts +1 -0
  497. package/dist/node_modules/@langchain/core/document_loaders/base.js +1 -0
  498. package/dist/node_modules/@langchain/core/document_loaders/langsmith.cjs +1 -0
  499. package/dist/node_modules/@langchain/core/document_loaders/langsmith.d.cts +1 -0
  500. package/dist/node_modules/@langchain/core/document_loaders/langsmith.d.ts +1 -0
  501. package/dist/node_modules/@langchain/core/document_loaders/langsmith.js +1 -0
  502. package/dist/node_modules/@langchain/core/documents.cjs +1 -0
  503. package/dist/node_modules/@langchain/core/documents.d.cts +1 -0
  504. package/dist/node_modules/@langchain/core/documents.d.ts +1 -0
  505. package/dist/node_modules/@langchain/core/documents.js +1 -0
  506. package/dist/node_modules/@langchain/core/embeddings.cjs +1 -0
  507. package/dist/node_modules/@langchain/core/embeddings.d.cts +1 -0
  508. package/dist/node_modules/@langchain/core/embeddings.d.ts +1 -0
  509. package/dist/node_modules/@langchain/core/embeddings.js +1 -0
  510. package/dist/node_modules/@langchain/core/example_selectors.cjs +1 -0
  511. package/dist/node_modules/@langchain/core/example_selectors.d.cts +1 -0
  512. package/dist/node_modules/@langchain/core/example_selectors.d.ts +1 -0
  513. package/dist/node_modules/@langchain/core/example_selectors.js +1 -0
  514. package/dist/node_modules/@langchain/core/index.cjs +1 -0
  515. package/dist/node_modules/@langchain/core/index.d.cts +63 -0
  516. package/dist/node_modules/@langchain/core/index.d.ts +63 -0
  517. package/dist/node_modules/@langchain/core/index.js +63 -0
  518. package/dist/node_modules/@langchain/core/indexing.cjs +1 -0
  519. package/dist/node_modules/@langchain/core/indexing.d.cts +1 -0
  520. package/dist/node_modules/@langchain/core/indexing.d.ts +1 -0
  521. package/dist/node_modules/@langchain/core/indexing.js +1 -0
  522. package/dist/node_modules/@langchain/core/language_models/base.cjs +1 -0
  523. package/dist/node_modules/@langchain/core/language_models/base.d.cts +1 -0
  524. package/dist/node_modules/@langchain/core/language_models/base.d.ts +1 -0
  525. package/dist/node_modules/@langchain/core/language_models/base.js +1 -0
  526. package/dist/node_modules/@langchain/core/language_models/chat_models.cjs +1 -0
  527. package/dist/node_modules/@langchain/core/language_models/chat_models.d.cts +1 -0
  528. package/dist/node_modules/@langchain/core/language_models/chat_models.d.ts +1 -0
  529. package/dist/node_modules/@langchain/core/language_models/chat_models.js +1 -0
  530. package/dist/node_modules/@langchain/core/language_models/llms.cjs +1 -0
  531. package/dist/node_modules/@langchain/core/language_models/llms.d.cts +1 -0
  532. package/dist/node_modules/@langchain/core/language_models/llms.d.ts +1 -0
  533. package/dist/node_modules/@langchain/core/language_models/llms.js +1 -0
  534. package/dist/node_modules/@langchain/core/load/serializable.cjs +1 -0
  535. package/dist/node_modules/@langchain/core/load/serializable.d.cts +1 -0
  536. package/dist/node_modules/@langchain/core/load/serializable.d.ts +1 -0
  537. package/dist/node_modules/@langchain/core/load/serializable.js +1 -0
  538. package/dist/node_modules/@langchain/core/load.cjs +1 -0
  539. package/dist/node_modules/@langchain/core/load.d.cts +1 -0
  540. package/dist/node_modules/@langchain/core/load.d.ts +1 -0
  541. package/dist/node_modules/@langchain/core/load.js +1 -0
  542. package/dist/node_modules/@langchain/core/memory.cjs +1 -0
  543. package/dist/node_modules/@langchain/core/memory.d.cts +1 -0
  544. package/dist/node_modules/@langchain/core/memory.d.ts +1 -0
  545. package/dist/node_modules/@langchain/core/memory.js +1 -0
  546. package/dist/node_modules/@langchain/core/messages/tool.cjs +1 -0
  547. package/dist/node_modules/@langchain/core/messages/tool.d.cts +1 -0
  548. package/dist/node_modules/@langchain/core/messages/tool.d.ts +1 -0
  549. package/dist/node_modules/@langchain/core/messages/tool.js +1 -0
  550. package/dist/node_modules/@langchain/core/messages.cjs +1 -0
  551. package/dist/node_modules/@langchain/core/messages.d.cts +1 -0
  552. package/dist/node_modules/@langchain/core/messages.d.ts +1 -0
  553. package/dist/node_modules/@langchain/core/messages.js +1 -0
  554. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/README.md +75 -0
  555. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/deep-compare-strict.d.ts +1 -0
  556. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/deep-compare-strict.js +42 -0
  557. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/dereference.d.ts +7 -0
  558. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/dereference.js +147 -0
  559. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/format.d.ts +1 -0
  560. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/format.js +111 -0
  561. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/index.d.ts +8 -0
  562. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/index.js +24 -0
  563. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/package.json +3 -0
  564. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/pointer.d.ts +2 -0
  565. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/pointer.js +10 -0
  566. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/types.d.ts +72 -0
  567. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/types.js +9 -0
  568. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/ucs2-length.d.ts +1 -0
  569. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/ucs2-length.js +20 -0
  570. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/validate.d.ts +3 -0
  571. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/validate.js +805 -0
  572. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/validator.d.ts +10 -0
  573. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/validator.js +27 -0
  574. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.d.ts +1 -0
  575. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js +39 -0
  576. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/dereference.d.ts +7 -0
  577. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/dereference.js +143 -0
  578. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/format.d.ts +1 -0
  579. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/format.js +108 -0
  580. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/index.d.ts +8 -0
  581. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/index.js +8 -0
  582. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/package.json +3 -0
  583. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/pointer.d.ts +2 -0
  584. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/pointer.js +6 -0
  585. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/types.d.ts +72 -0
  586. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/types.js +6 -0
  587. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.d.ts +1 -0
  588. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js +17 -0
  589. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/validate.d.ts +3 -0
  590. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/validate.js +802 -0
  591. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/validator.d.ts +10 -0
  592. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/validator.js +23 -0
  593. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/package.json +68 -0
  594. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/deep-compare-strict.d.ts +1 -0
  595. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/deep-compare-strict.ts +39 -0
  596. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/dereference.d.ts +12 -0
  597. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/dereference.ts +188 -0
  598. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/format.d.ts +2 -0
  599. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/format.ts +164 -0
  600. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/index.d.ts +8 -0
  601. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/index.ts +8 -0
  602. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/pointer.d.ts +2 -0
  603. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/pointer.ts +7 -0
  604. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/types.d.ts +79 -0
  605. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/types.ts +92 -0
  606. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/ucs2-length.d.ts +1 -0
  607. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/ucs2-length.ts +24 -0
  608. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/validate.d.ts +13 -0
  609. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/validate.ts +1168 -0
  610. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/validator.d.ts +14 -0
  611. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/validator.ts +32 -0
  612. package/dist/node_modules/@langchain/core/node_modules/ansi-styles/index.d.ts +167 -0
  613. package/dist/node_modules/@langchain/core/node_modules/ansi-styles/index.js +164 -0
  614. package/dist/node_modules/@langchain/core/node_modules/ansi-styles/license +9 -0
  615. package/dist/node_modules/@langchain/core/node_modules/ansi-styles/package.json +52 -0
  616. package/dist/node_modules/@langchain/core/node_modules/camelcase/index.d.ts +103 -0
  617. package/dist/node_modules/@langchain/core/node_modules/camelcase/index.js +113 -0
  618. package/dist/node_modules/@langchain/core/node_modules/camelcase/license +9 -0
  619. package/dist/node_modules/@langchain/core/node_modules/camelcase/package.json +44 -0
  620. package/dist/node_modules/@langchain/core/node_modules/decamelize/index.js +13 -0
  621. package/dist/node_modules/@langchain/core/node_modules/decamelize/license +21 -0
  622. package/dist/node_modules/@langchain/core/node_modules/decamelize/package.json +38 -0
  623. package/dist/node_modules/@langchain/core/node_modules/decamelize/readme.md +48 -0
  624. package/dist/node_modules/@langchain/core/node_modules/js-tiktoken/lite.cjs +256 -0
  625. package/dist/node_modules/@langchain/core/node_modules/js-tiktoken/lite.d.ts +1 -0
  626. package/dist/node_modules/@langchain/core/node_modules/js-tiktoken/lite.js +1 -0
  627. package/dist/node_modules/@langchain/core/node_modules/langsmith/README.md +523 -0
  628. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.cjs +1 -0
  629. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.d.cts +1 -0
  630. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.d.ts +1 -0
  631. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.js +1 -0
  632. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.cjs +1 -0
  633. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.d.cts +1 -0
  634. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.d.ts +1 -0
  635. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.js +1 -0
  636. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/anonymizer/index.cjs +102 -0
  637. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/anonymizer/index.d.ts +16 -0
  638. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/anonymizer/index.js +95 -0
  639. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.cjs +3266 -0
  640. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.d.ts +899 -0
  641. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.js +3237 -0
  642. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/env.cjs +12 -0
  643. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/env.d.ts +1 -0
  644. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/env.js +8 -0
  645. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_random_name.cjs +730 -0
  646. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_random_name.d.ts +5 -0
  647. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_random_name.js +726 -0
  648. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_runner.cjs +869 -0
  649. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_runner.d.ts +236 -0
  650. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_runner.js +864 -0
  651. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluate_comparative.cjs +219 -0
  652. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluate_comparative.d.ts +61 -0
  653. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluate_comparative.js +212 -0
  654. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluator.cjs +112 -0
  655. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluator.d.ts +105 -0
  656. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluator.js +107 -0
  657. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/index.cjs +9 -0
  658. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/index.d.ts +4 -0
  659. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/index.js +3 -0
  660. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/langchain.cjs +55 -0
  661. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/langchain.d.ts +21 -0
  662. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/langchain.js +51 -0
  663. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/string_evaluator.cjs +66 -0
  664. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/string_evaluator.d.ts +30 -0
  665. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/string_evaluator.js +62 -0
  666. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.cjs +11 -0
  667. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.d.ts +5 -0
  668. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.js +5 -0
  669. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/index.cjs +44 -0
  670. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/index.d.ts +437 -0
  671. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/index.js +322 -0
  672. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/reporter.cjs +37 -0
  673. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/reporter.d.ts +5 -0
  674. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/reporter.js +35 -0
  675. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/langchain.cjs +139 -0
  676. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/langchain.d.ts +30 -0
  677. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/langchain.js +134 -0
  678. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/run_trees.cjs +586 -0
  679. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/run_trees.d.ts +112 -0
  680. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/run_trees.js +556 -0
  681. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/schemas.cjs +2 -0
  682. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/schemas.d.ts +530 -0
  683. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/schemas.js +1 -0
  684. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/constants.cjs +4 -0
  685. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/constants.d.ts +1 -0
  686. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/constants.js +1 -0
  687. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.cjs +27 -0
  688. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.d.ts +7 -0
  689. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.js +22 -0
  690. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/traceable.cjs +61 -0
  691. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/traceable.d.ts +22 -0
  692. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/traceable.js +55 -0
  693. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/types.cjs +2 -0
  694. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/types.d.ts +40 -0
  695. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/types.js +1 -0
  696. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/traceable.cjs +554 -0
  697. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/traceable.d.ts +57 -0
  698. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/traceable.js +546 -0
  699. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_git.cjs +72 -0
  700. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_git.d.ts +14 -0
  701. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_git.js +67 -0
  702. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.cjs +37 -0
  703. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.d.ts +1 -0
  704. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.js +10 -0
  705. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/asserts.cjs +47 -0
  706. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/asserts.d.ts +7 -0
  707. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/asserts.js +37 -0
  708. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.cjs +139 -0
  709. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.d.ts +41 -0
  710. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.js +132 -0
  711. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/atee.cjs +24 -0
  712. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/atee.d.ts +1 -0
  713. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/atee.js +20 -0
  714. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.cjs +234 -0
  715. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.d.ts +61 -0
  716. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.js +217 -0
  717. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.cjs +89 -0
  718. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.d.ts +44 -0
  719. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.js +83 -0
  720. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs +235 -0
  721. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.d.ts +1 -0
  722. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js +231 -0
  723. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/constants.cjs +10 -0
  724. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/constants.d.ts +4 -0
  725. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/constants.js +7 -0
  726. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/globals.cjs +40 -0
  727. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/globals.d.ts +34 -0
  728. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/globals.js +35 -0
  729. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/index.cjs +591 -0
  730. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/index.d.ts +95 -0
  731. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/index.js +553 -0
  732. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/matchers.cjs +104 -0
  733. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/matchers.d.ts +27 -0
  734. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/matchers.js +98 -0
  735. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/reporter.cjs +286 -0
  736. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/reporter.d.ts +5 -0
  737. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/reporter.js +256 -0
  738. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/types.cjs +2 -0
  739. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/types.d.ts +28 -0
  740. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/types.js +1 -0
  741. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/chain.cjs +93 -0
  742. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/chain.d.ts +2 -0
  743. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/chain.js +89 -0
  744. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/evaluatedBy.cjs +90 -0
  745. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/evaluatedBy.d.ts +12 -0
  746. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/evaluatedBy.js +85 -0
  747. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/assignValue.cjs +29 -0
  748. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/assignValue.d.ts +10 -0
  749. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/assignValue.js +24 -0
  750. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseAssignValue.cjs +25 -0
  751. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseAssignValue.d.ts +11 -0
  752. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseAssignValue.js +23 -0
  753. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseSet.cjs +50 -0
  754. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseSet.d.ts +12 -0
  755. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseSet.js +45 -0
  756. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/castPath.cjs +22 -0
  757. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/castPath.d.ts +10 -0
  758. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/castPath.js +17 -0
  759. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/eq.cjs +36 -0
  760. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/eq.d.ts +32 -0
  761. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/eq.js +34 -0
  762. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/getTag.cjs +18 -0
  763. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/getTag.d.ts +9 -0
  764. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/getTag.js +16 -0
  765. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isIndex.cjs +25 -0
  766. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isIndex.d.ts +10 -0
  767. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isIndex.js +23 -0
  768. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isKey.cjs +34 -0
  769. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isKey.d.ts +10 -0
  770. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isKey.js +29 -0
  771. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isObject.cjs +31 -0
  772. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isObject.d.ts +25 -0
  773. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isObject.js +29 -0
  774. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isSymbol.cjs +28 -0
  775. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isSymbol.d.ts +17 -0
  776. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isSymbol.js +23 -0
  777. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/memoizeCapped.cjs +65 -0
  778. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/memoizeCapped.d.ts +50 -0
  779. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/memoizeCapped.js +63 -0
  780. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/set.cjs +41 -0
  781. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/set.d.ts +32 -0
  782. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/set.js +36 -0
  783. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/stringToPath.cjs +49 -0
  784. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/stringToPath.d.ts +12 -0
  785. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/stringToPath.js +44 -0
  786. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/toKey.cjs +24 -0
  787. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/toKey.d.ts +9 -0
  788. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/toKey.js +19 -0
  789. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.cjs +22 -0
  790. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.d.ts +11 -0
  791. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.js +17 -0
  792. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.cjs +38 -0
  793. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.d.ts +2 -0
  794. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.js +33 -0
  795. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/shuffle.cjs +15 -0
  796. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/shuffle.d.ts +1 -0
  797. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/shuffle.js +11 -0
  798. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.cjs +11 -0
  799. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.d.ts +1 -0
  800. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.js +7 -0
  801. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.cjs +673 -0
  802. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.d.ts +75 -0
  803. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.js +669 -0
  804. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.types.cjs +2 -0
  805. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.types.d.ts +1 -0
  806. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.types.js +1 -0
  807. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/index.cjs +44 -0
  808. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/index.d.ts +435 -0
  809. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/index.js +322 -0
  810. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/reporter.cjs +29 -0
  811. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/reporter.d.ts +6 -0
  812. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/reporter.js +27 -0
  813. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/generic.cjs +49 -0
  814. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/generic.d.ts +21 -0
  815. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/generic.js +44 -0
  816. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/index.cjs +20 -0
  817. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/index.d.ts +2 -0
  818. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/index.js +2 -0
  819. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/openai.cjs +286 -0
  820. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/openai.d.ts +78 -0
  821. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/openai.js +282 -0
  822. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/vercel.cjs +100 -0
  823. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/vercel.d.ts +30 -0
  824. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/vercel.js +96 -0
  825. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation/langchain.cjs +1 -0
  826. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation/langchain.d.cts +1 -0
  827. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation/langchain.d.ts +1 -0
  828. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation/langchain.js +1 -0
  829. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.cjs +1 -0
  830. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.d.cts +1 -0
  831. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.d.ts +1 -0
  832. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.js +1 -0
  833. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.cjs +1 -0
  834. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.d.cts +1 -0
  835. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.d.ts +1 -0
  836. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.js +1 -0
  837. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.cjs +1 -0
  838. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.d.cts +1 -0
  839. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.d.ts +1 -0
  840. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.js +1 -0
  841. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.cjs +1 -0
  842. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.d.cts +1 -0
  843. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.d.ts +1 -0
  844. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.js +1 -0
  845. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.cjs +1 -0
  846. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.d.cts +1 -0
  847. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.d.ts +1 -0
  848. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.js +1 -0
  849. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/LICENSE +15 -0
  850. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/README.md +654 -0
  851. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/bin/semver.js +188 -0
  852. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/comparator.js +141 -0
  853. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/index.js +5 -0
  854. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/range.js +554 -0
  855. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/semver.js +302 -0
  856. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/clean.js +6 -0
  857. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/cmp.js +52 -0
  858. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/coerce.js +60 -0
  859. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/compare-build.js +7 -0
  860. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/compare-loose.js +3 -0
  861. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/compare.js +5 -0
  862. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/diff.js +65 -0
  863. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/eq.js +3 -0
  864. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/gt.js +3 -0
  865. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/gte.js +3 -0
  866. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/inc.js +19 -0
  867. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/lt.js +3 -0
  868. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/lte.js +3 -0
  869. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/major.js +3 -0
  870. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/minor.js +3 -0
  871. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/neq.js +3 -0
  872. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/parse.js +16 -0
  873. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/patch.js +3 -0
  874. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/prerelease.js +6 -0
  875. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/rcompare.js +3 -0
  876. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/rsort.js +3 -0
  877. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/satisfies.js +10 -0
  878. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/sort.js +3 -0
  879. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/valid.js +6 -0
  880. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/index.js +89 -0
  881. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/constants.js +35 -0
  882. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/debug.js +9 -0
  883. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/identifiers.js +23 -0
  884. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/lrucache.js +40 -0
  885. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/parse-options.js +15 -0
  886. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/re.js +217 -0
  887. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/package.json +77 -0
  888. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/preload.js +2 -0
  889. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/range.bnf +16 -0
  890. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/gtr.js +4 -0
  891. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/intersects.js +7 -0
  892. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/ltr.js +4 -0
  893. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/max-satisfying.js +25 -0
  894. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/min-satisfying.js +24 -0
  895. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/min-version.js +61 -0
  896. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/outside.js +80 -0
  897. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/simplify.js +47 -0
  898. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/subset.js +247 -0
  899. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/to-comparators.js +8 -0
  900. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/valid.js +11 -0
  901. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/CHANGELOG.md +292 -0
  902. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/CONTRIBUTING.md +18 -0
  903. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/LICENSE.md +9 -0
  904. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/README.md +584 -0
  905. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/bin/uuid +2 -0
  906. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/index.js +104 -0
  907. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
  908. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/md5.js +200 -0
  909. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/native.js +10 -0
  910. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/nil.js +7 -0
  911. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/parse.js +44 -0
  912. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/regex.js +7 -0
  913. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/rng.js +23 -0
  914. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/sha1.js +82 -0
  915. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/stringify.js +38 -0
  916. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v1.js +131 -0
  917. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
  918. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v3.js +11 -0
  919. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v35.js +63 -0
  920. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v4.js +32 -0
  921. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v5.js +11 -0
  922. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
  923. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
  924. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
  925. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/validate.js +12 -0
  926. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/version.js +15 -0
  927. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/index.js +14 -0
  928. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/max.js +1 -0
  929. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/md5.js +194 -0
  930. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/native.js +4 -0
  931. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  932. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/parse.js +37 -0
  933. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  934. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/rng.js +17 -0
  935. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/sha1.js +76 -0
  936. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/stringify.js +31 -0
  937. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v1.js +125 -0
  938. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v1ToV6.js +20 -0
  939. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  940. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v35.js +55 -0
  941. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v4.js +25 -0
  942. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  943. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v6.js +36 -0
  944. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v6ToV1.js +20 -0
  945. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v7.js +146 -0
  946. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/validate.js +5 -0
  947. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/version.js +8 -0
  948. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/index.js +14 -0
  949. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/max.js +1 -0
  950. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/md5.js +10 -0
  951. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/native.js +4 -0
  952. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/nil.js +1 -0
  953. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/parse.js +37 -0
  954. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/regex.js +1 -0
  955. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/rng.js +10 -0
  956. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/sha1.js +10 -0
  957. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/stringify.js +31 -0
  958. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v1.js +125 -0
  959. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
  960. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v3.js +4 -0
  961. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v35.js +55 -0
  962. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v4.js +25 -0
  963. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v5.js +4 -0
  964. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v6.js +32 -0
  965. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
  966. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v7.js +146 -0
  967. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/validate.js +5 -0
  968. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/version.js +8 -0
  969. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/index.js +104 -0
  970. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/max.js +7 -0
  971. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/md5-browser.js +200 -0
  972. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/md5.js +17 -0
  973. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/native-browser.js +10 -0
  974. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/native.js +11 -0
  975. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/nil.js +7 -0
  976. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/parse.js +44 -0
  977. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/regex.js +7 -0
  978. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/rng-browser.js +23 -0
  979. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/rng.js +17 -0
  980. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/sha1-browser.js +82 -0
  981. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/sha1.js +17 -0
  982. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/stringify.js +38 -0
  983. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/uuid-bin.js +75 -0
  984. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v1.js +131 -0
  985. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v1ToV6.js +26 -0
  986. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v3.js +11 -0
  987. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v35.js +63 -0
  988. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v4.js +32 -0
  989. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v5.js +11 -0
  990. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v6.js +38 -0
  991. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v6ToV1.js +26 -0
  992. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v7.js +152 -0
  993. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/validate.js +12 -0
  994. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/version.js +15 -0
  995. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/package.json +142 -0
  996. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/wrapper.mjs +15 -0
  997. package/dist/node_modules/@langchain/core/node_modules/langsmith/package.json +360 -0
  998. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.cjs +1 -0
  999. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.d.cts +1 -0
  1000. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.d.ts +1 -0
  1001. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.js +1 -0
  1002. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.cjs +1 -0
  1003. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.d.cts +1 -0
  1004. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.d.ts +1 -0
  1005. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.js +1 -0
  1006. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.cjs +1 -0
  1007. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.d.cts +1 -0
  1008. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.d.ts +1 -0
  1009. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.js +1 -0
  1010. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.cjs +1 -0
  1011. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.d.cts +1 -0
  1012. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.d.ts +1 -0
  1013. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.js +1 -0
  1014. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.cjs +1 -0
  1015. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.d.cts +1 -0
  1016. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.d.ts +1 -0
  1017. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.js +1 -0
  1018. package/dist/node_modules/@langchain/core/node_modules/langsmith/vercel.cjs +1 -0
  1019. package/dist/node_modules/@langchain/core/node_modules/langsmith/vercel.d.cts +1 -0
  1020. package/dist/node_modules/@langchain/core/node_modules/langsmith/vercel.d.ts +1 -0
  1021. package/dist/node_modules/@langchain/core/node_modules/langsmith/vercel.js +1 -0
  1022. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.cjs +1 -0
  1023. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.d.cts +1 -0
  1024. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.d.ts +1 -0
  1025. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.js +1 -0
  1026. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.cjs +1 -0
  1027. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.d.cts +1 -0
  1028. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.d.ts +1 -0
  1029. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.js +1 -0
  1030. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.cjs +1 -0
  1031. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.d.cts +1 -0
  1032. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.d.ts +1 -0
  1033. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.js +1 -0
  1034. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/vercel.cjs +1 -0
  1035. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/vercel.d.cts +1 -0
  1036. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/vercel.d.ts +1 -0
  1037. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/vercel.js +1 -0
  1038. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.cjs +1 -0
  1039. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.d.cts +1 -0
  1040. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.d.ts +1 -0
  1041. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.js +1 -0
  1042. package/dist/node_modules/@langchain/core/node_modules/mustache/CHANGELOG.md +618 -0
  1043. package/dist/node_modules/@langchain/core/node_modules/mustache/LICENSE +11 -0
  1044. package/dist/node_modules/@langchain/core/node_modules/mustache/README.md +621 -0
  1045. package/dist/node_modules/@langchain/core/node_modules/mustache/bin/mustache +150 -0
  1046. package/dist/node_modules/@langchain/core/node_modules/mustache/mustache.js +772 -0
  1047. package/dist/node_modules/@langchain/core/node_modules/mustache/mustache.min.js +1 -0
  1048. package/dist/node_modules/@langchain/core/node_modules/mustache/mustache.mjs +764 -0
  1049. package/dist/node_modules/@langchain/core/node_modules/mustache/package.json +67 -0
  1050. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/dojo/mustache.js.post +4 -0
  1051. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/dojo/mustache.js.pre +9 -0
  1052. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/jquery/mustache.js.post +13 -0
  1053. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/jquery/mustache.js.pre +9 -0
  1054. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/mootools/mustache.js.post +5 -0
  1055. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/mootools/mustache.js.pre +2 -0
  1056. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/qooxdoo/mustache.js.post +9 -0
  1057. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/qooxdoo/mustache.js.pre +172 -0
  1058. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/yui3/mustache.js.post +4 -0
  1059. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/yui3/mustache.js.pre +1 -0
  1060. package/dist/node_modules/@langchain/core/node_modules/p-finally/index.js +15 -0
  1061. package/dist/node_modules/@langchain/core/node_modules/p-finally/license +21 -0
  1062. package/dist/node_modules/@langchain/core/node_modules/p-finally/package.json +42 -0
  1063. package/dist/node_modules/@langchain/core/node_modules/p-finally/readme.md +47 -0
  1064. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/index.d.ts +101 -0
  1065. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/index.js +279 -0
  1066. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/lower-bound.d.ts +1 -0
  1067. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/lower-bound.js +21 -0
  1068. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/options.d.ts +64 -0
  1069. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/options.js +2 -0
  1070. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/priority-queue.d.ts +12 -0
  1071. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/priority-queue.js +32 -0
  1072. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/queue.d.ts +7 -0
  1073. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/queue.js +2 -0
  1074. package/dist/node_modules/@langchain/core/node_modules/p-queue/license +9 -0
  1075. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/LICENSE +21 -0
  1076. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/README.md +94 -0
  1077. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/index.d.ts +134 -0
  1078. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/index.js +336 -0
  1079. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/package.json +56 -0
  1080. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.js +340 -0
  1081. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.min.js +1 -0
  1082. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.min.js.map +1 -0
  1083. package/dist/node_modules/@langchain/core/node_modules/p-queue/package.json +92 -0
  1084. package/dist/node_modules/@langchain/core/node_modules/p-queue/readme.md +400 -0
  1085. package/dist/node_modules/@langchain/core/node_modules/p-retry/index.d.ts +106 -0
  1086. package/dist/node_modules/@langchain/core/node_modules/p-retry/index.js +85 -0
  1087. package/dist/node_modules/@langchain/core/node_modules/p-retry/license +9 -0
  1088. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/License +21 -0
  1089. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/README.md +227 -0
  1090. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/example/dns.js +31 -0
  1091. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/example/stop.js +40 -0
  1092. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/index.js +1 -0
  1093. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/lib/retry.js +100 -0
  1094. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/lib/retry_operation.js +162 -0
  1095. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/package.json +36 -0
  1096. package/dist/node_modules/@langchain/core/node_modules/p-retry/package.json +51 -0
  1097. package/dist/node_modules/@langchain/core/node_modules/p-retry/readme.md +148 -0
  1098. package/dist/node_modules/@langchain/core/node_modules/p-timeout/index.d.ts +72 -0
  1099. package/dist/node_modules/@langchain/core/node_modules/p-timeout/index.js +57 -0
  1100. package/dist/node_modules/@langchain/core/node_modules/p-timeout/license +9 -0
  1101. package/dist/node_modules/@langchain/core/node_modules/p-timeout/package.json +45 -0
  1102. package/dist/node_modules/@langchain/core/node_modules/p-timeout/readme.md +87 -0
  1103. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/bin/uuid +2 -0
  1104. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/index.js +104 -0
  1105. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
  1106. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/md5.js +200 -0
  1107. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/native.js +10 -0
  1108. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/nil.js +7 -0
  1109. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/parse.js +44 -0
  1110. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/regex.js +7 -0
  1111. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/rng.js +23 -0
  1112. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/sha1.js +82 -0
  1113. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/stringify.js +38 -0
  1114. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v1.js +131 -0
  1115. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
  1116. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v3.js +11 -0
  1117. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v35.js +63 -0
  1118. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v4.js +32 -0
  1119. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v5.js +11 -0
  1120. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
  1121. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
  1122. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
  1123. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/validate.js +12 -0
  1124. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/version.js +15 -0
  1125. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/index.js +14 -0
  1126. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/max.js +1 -0
  1127. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/md5.js +194 -0
  1128. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/native.js +4 -0
  1129. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  1130. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/parse.js +37 -0
  1131. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  1132. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/rng.js +17 -0
  1133. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/sha1.js +76 -0
  1134. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/stringify.js +31 -0
  1135. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v1.js +125 -0
  1136. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v1ToV6.js +20 -0
  1137. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  1138. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v35.js +55 -0
  1139. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v4.js +25 -0
  1140. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  1141. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v6.js +36 -0
  1142. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v6ToV1.js +20 -0
  1143. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v7.js +146 -0
  1144. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/validate.js +5 -0
  1145. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/version.js +8 -0
  1146. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/index.js +14 -0
  1147. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/max.js +1 -0
  1148. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/md5.js +10 -0
  1149. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/native.js +4 -0
  1150. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/nil.js +1 -0
  1151. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/parse.js +37 -0
  1152. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/regex.js +1 -0
  1153. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/rng.js +10 -0
  1154. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/sha1.js +10 -0
  1155. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/stringify.js +31 -0
  1156. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v1.js +125 -0
  1157. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
  1158. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v3.js +4 -0
  1159. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v35.js +55 -0
  1160. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v4.js +25 -0
  1161. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v5.js +4 -0
  1162. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v6.js +32 -0
  1163. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
  1164. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v7.js +146 -0
  1165. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/validate.js +5 -0
  1166. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/version.js +8 -0
  1167. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/index.js +104 -0
  1168. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/max.js +7 -0
  1169. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/md5-browser.js +200 -0
  1170. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/md5.js +17 -0
  1171. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/native-browser.js +10 -0
  1172. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/native.js +11 -0
  1173. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/nil.js +7 -0
  1174. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/parse.js +44 -0
  1175. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/regex.js +7 -0
  1176. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/rng-browser.js +23 -0
  1177. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/rng.js +17 -0
  1178. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/sha1-browser.js +82 -0
  1179. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/sha1.js +17 -0
  1180. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/stringify.js +38 -0
  1181. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/uuid-bin.js +75 -0
  1182. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v1.js +131 -0
  1183. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v1ToV6.js +26 -0
  1184. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v3.js +11 -0
  1185. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v35.js +63 -0
  1186. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v4.js +32 -0
  1187. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v5.js +11 -0
  1188. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v6.js +38 -0
  1189. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v6ToV1.js +26 -0
  1190. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v7.js +152 -0
  1191. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/validate.js +12 -0
  1192. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/version.js +15 -0
  1193. package/dist/node_modules/@langchain/core/node_modules/uuid/package.json +142 -0
  1194. package/dist/node_modules/@langchain/core/node_modules/zod/LICENSE +21 -0
  1195. package/dist/node_modules/@langchain/core/node_modules/zod/README.md +3074 -0
  1196. package/dist/node_modules/@langchain/core/node_modules/zod/index.d.ts +2 -0
  1197. package/dist/node_modules/@langchain/core/node_modules/zod/lib/ZodError.d.ts +164 -0
  1198. package/dist/node_modules/@langchain/core/node_modules/zod/lib/ZodError.js +137 -0
  1199. package/dist/node_modules/@langchain/core/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  1200. package/dist/node_modules/@langchain/core/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  1201. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
  1202. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/datetime.js +54 -0
  1203. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  1204. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  1205. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  1206. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/index.js +59 -0
  1207. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
  1208. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
  1209. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  1210. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/object.js +70 -0
  1211. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  1212. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/primitives.js +170 -0
  1213. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  1214. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  1215. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  1216. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/string.js +55 -0
  1217. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  1218. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/union.js +79 -0
  1219. package/dist/node_modules/@langchain/core/node_modules/zod/lib/errors.d.ts +5 -0
  1220. package/dist/node_modules/@langchain/core/node_modules/zod/lib/errors.js +17 -0
  1221. package/dist/node_modules/@langchain/core/node_modules/zod/lib/external.d.ts +6 -0
  1222. package/dist/node_modules/@langchain/core/node_modules/zod/lib/external.js +22 -0
  1223. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  1224. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  1225. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  1226. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  1227. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  1228. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/parseUtil.js +125 -0
  1229. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  1230. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  1231. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  1232. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  1233. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/util.d.ts +82 -0
  1234. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/util.js +142 -0
  1235. package/dist/node_modules/@langchain/core/node_modules/zod/lib/index.d.ts +4 -0
  1236. package/dist/node_modules/@langchain/core/node_modules/zod/lib/index.js +33 -0
  1237. package/dist/node_modules/@langchain/core/node_modules/zod/lib/index.mjs +4405 -0
  1238. package/dist/node_modules/@langchain/core/node_modules/zod/lib/index.umd.js +4520 -0
  1239. package/dist/node_modules/@langchain/core/node_modules/zod/lib/locales/en.d.ts +3 -0
  1240. package/dist/node_modules/@langchain/core/node_modules/zod/lib/locales/en.js +129 -0
  1241. package/dist/node_modules/@langchain/core/node_modules/zod/lib/standard-schema.d.ts +102 -0
  1242. package/dist/node_modules/@langchain/core/node_modules/zod/lib/standard-schema.js +2 -0
  1243. package/dist/node_modules/@langchain/core/node_modules/zod/lib/types.d.ts +1062 -0
  1244. package/dist/node_modules/@langchain/core/node_modules/zod/lib/types.js +3846 -0
  1245. package/dist/node_modules/@langchain/core/node_modules/zod/package.json +122 -0
  1246. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/.github/CR_logotype-full-color.png +0 -0
  1247. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/.github/FUNDING.yml +1 -0
  1248. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/.prettierrc.json +1 -0
  1249. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/LICENSE +15 -0
  1250. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/README.md +371 -0
  1251. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/SECURITY.md +12 -0
  1252. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/changelog.md +77 -0
  1253. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/contributing.md +9 -0
  1254. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/createIndex.ts +32 -0
  1255. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/Options.js +48 -0
  1256. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/Refs.js +25 -0
  1257. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/errorMessages.js +19 -0
  1258. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/index.js +55 -0
  1259. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/package.json +1 -0
  1260. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parseDef.js +72 -0
  1261. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parseTypes.js +2 -0
  1262. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/any.js +7 -0
  1263. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/array.js +30 -0
  1264. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/bigint.js +53 -0
  1265. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/boolean.js +9 -0
  1266. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/branded.js +8 -0
  1267. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/catch.js +8 -0
  1268. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/date.js +50 -0
  1269. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/default.js +11 -0
  1270. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/effects.js +10 -0
  1271. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/enum.js +10 -0
  1272. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/intersection.js +56 -0
  1273. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/literal.js +25 -0
  1274. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/map.js +29 -0
  1275. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/nativeEnum.js +20 -0
  1276. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/never.js +9 -0
  1277. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/null.js +14 -0
  1278. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/nullable.js +37 -0
  1279. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/number.js +56 -0
  1280. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/object.js +59 -0
  1281. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/optional.js +24 -0
  1282. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/pipeline.js +24 -0
  1283. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/promise.js +8 -0
  1284. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/readonly.js +8 -0
  1285. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/record.js +64 -0
  1286. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/set.js +24 -0
  1287. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/string.js +357 -0
  1288. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/tuple.js +36 -0
  1289. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/undefined.js +9 -0
  1290. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/union.js +84 -0
  1291. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/unknown.js +7 -0
  1292. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/selectParser.js +110 -0
  1293. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/zodToJsonSchema.js +69 -0
  1294. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/Options.js +43 -0
  1295. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/Refs.js +21 -0
  1296. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +14 -0
  1297. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/index.js +39 -0
  1298. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/package.json +1 -0
  1299. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parseDef.js +68 -0
  1300. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parseTypes.js +1 -0
  1301. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +3 -0
  1302. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +26 -0
  1303. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +49 -0
  1304. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +5 -0
  1305. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +4 -0
  1306. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +4 -0
  1307. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +46 -0
  1308. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +7 -0
  1309. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +6 -0
  1310. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +6 -0
  1311. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +52 -0
  1312. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +21 -0
  1313. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +25 -0
  1314. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +16 -0
  1315. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +5 -0
  1316. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +10 -0
  1317. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +33 -0
  1318. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +52 -0
  1319. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +55 -0
  1320. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +20 -0
  1321. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +20 -0
  1322. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +4 -0
  1323. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +4 -0
  1324. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +60 -0
  1325. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +20 -0
  1326. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +353 -0
  1327. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +32 -0
  1328. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +5 -0
  1329. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +80 -0
  1330. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +3 -0
  1331. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/selectParser.js +106 -0
  1332. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +66 -0
  1333. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/Options.d.ts +34 -0
  1334. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/Refs.d.ts +14 -0
  1335. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/errorMessages.d.ts +11 -0
  1336. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/index.d.ts +39 -0
  1337. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parseDef.d.ts +4 -0
  1338. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parseTypes.d.ts +34 -0
  1339. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/any.d.ts +2 -0
  1340. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/array.d.ts +12 -0
  1341. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/bigint.d.ts +14 -0
  1342. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/boolean.d.ts +4 -0
  1343. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/branded.d.ts +3 -0
  1344. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/catch.d.ts +3 -0
  1345. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/date.d.ts +15 -0
  1346. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/default.d.ts +6 -0
  1347. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/effects.d.ts +4 -0
  1348. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/enum.d.ts +6 -0
  1349. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/intersection.d.ts +8 -0
  1350. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/literal.d.ts +9 -0
  1351. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/map.d.ts +15 -0
  1352. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/nativeEnum.d.ts +6 -0
  1353. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/never.d.ts +4 -0
  1354. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/null.d.ts +5 -0
  1355. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/nullable.d.ts +10 -0
  1356. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/number.d.ts +13 -0
  1357. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/object.d.ts +10 -0
  1358. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/optional.d.ts +4 -0
  1359. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/pipeline.d.ts +5 -0
  1360. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/promise.d.ts +4 -0
  1361. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/readonly.d.ts +3 -0
  1362. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/record.d.ts +13 -0
  1363. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/set.d.ts +13 -0
  1364. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/string.d.ts +73 -0
  1365. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/tuple.d.ts +13 -0
  1366. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/undefined.d.ts +4 -0
  1367. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/union.d.ts +23 -0
  1368. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/unknown.d.ts +2 -0
  1369. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/selectParser.d.ts +5 -0
  1370. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/zodToJsonSchema.d.ts +10 -0
  1371. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/index.js +12 -0
  1372. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/.package-lock.json +26 -0
  1373. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/LICENSE +21 -0
  1374. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/README.md +3074 -0
  1375. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/index.d.ts +2 -0
  1376. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/ZodError.d.ts +164 -0
  1377. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/ZodError.js +137 -0
  1378. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  1379. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  1380. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
  1381. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/datetime.js +54 -0
  1382. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  1383. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  1384. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  1385. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/index.js +59 -0
  1386. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
  1387. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
  1388. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  1389. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/object.js +70 -0
  1390. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  1391. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/primitives.js +170 -0
  1392. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  1393. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  1394. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  1395. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/string.js +55 -0
  1396. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  1397. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/union.js +79 -0
  1398. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/errors.d.ts +5 -0
  1399. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/errors.js +17 -0
  1400. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/external.d.ts +6 -0
  1401. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/external.js +22 -0
  1402. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  1403. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  1404. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  1405. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  1406. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  1407. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/parseUtil.js +125 -0
  1408. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  1409. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  1410. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  1411. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  1412. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/util.d.ts +82 -0
  1413. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/util.js +142 -0
  1414. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/index.d.ts +4 -0
  1415. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/index.js +33 -0
  1416. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/index.mjs +4405 -0
  1417. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/index.umd.js +4520 -0
  1418. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/locales/en.d.ts +3 -0
  1419. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/locales/en.js +129 -0
  1420. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/standard-schema.d.ts +102 -0
  1421. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/standard-schema.js +2 -0
  1422. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/types.d.ts +1062 -0
  1423. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/types.js +3846 -0
  1424. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/package.json +122 -0
  1425. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/package-lock.json +32 -0
  1426. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/package.json +9 -0
  1427. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/index.js +12 -0
  1428. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/.package-lock.json +26 -0
  1429. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/LICENSE +21 -0
  1430. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/README.md +3074 -0
  1431. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/index.d.ts +2 -0
  1432. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/ZodError.d.ts +164 -0
  1433. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/ZodError.js +137 -0
  1434. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  1435. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  1436. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
  1437. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/datetime.js +54 -0
  1438. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  1439. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  1440. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  1441. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/index.js +59 -0
  1442. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
  1443. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
  1444. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  1445. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/object.js +70 -0
  1446. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  1447. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/primitives.js +170 -0
  1448. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  1449. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  1450. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  1451. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/string.js +55 -0
  1452. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  1453. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/union.js +79 -0
  1454. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/errors.d.ts +5 -0
  1455. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/errors.js +17 -0
  1456. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/external.d.ts +6 -0
  1457. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/external.js +22 -0
  1458. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  1459. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  1460. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  1461. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  1462. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  1463. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/parseUtil.js +125 -0
  1464. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  1465. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  1466. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  1467. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  1468. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/util.d.ts +82 -0
  1469. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/util.js +142 -0
  1470. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/index.d.ts +4 -0
  1471. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/index.js +33 -0
  1472. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/index.mjs +4405 -0
  1473. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/index.umd.js +4520 -0
  1474. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/locales/en.d.ts +3 -0
  1475. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/locales/en.js +129 -0
  1476. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/standard-schema.d.ts +102 -0
  1477. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/standard-schema.js +2 -0
  1478. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/types.d.ts +1062 -0
  1479. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/types.js +3846 -0
  1480. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/package.json +122 -0
  1481. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/package-lock.json +32 -0
  1482. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/package.json +11 -0
  1483. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/package.json +5 -0
  1484. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/index.ts +14 -0
  1485. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/.package-lock.json +29 -0
  1486. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/LICENSE +21 -0
  1487. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/README.md +3074 -0
  1488. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/index.d.ts +2 -0
  1489. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/ZodError.d.ts +164 -0
  1490. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/ZodError.js +137 -0
  1491. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  1492. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  1493. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
  1494. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/datetime.js +54 -0
  1495. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  1496. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  1497. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  1498. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/index.js +59 -0
  1499. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
  1500. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
  1501. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  1502. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/object.js +70 -0
  1503. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  1504. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/primitives.js +170 -0
  1505. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  1506. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  1507. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  1508. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/string.js +55 -0
  1509. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  1510. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/union.js +79 -0
  1511. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/errors.d.ts +5 -0
  1512. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/errors.js +17 -0
  1513. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/external.d.ts +6 -0
  1514. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/external.js +22 -0
  1515. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  1516. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  1517. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  1518. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  1519. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  1520. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/parseUtil.js +125 -0
  1521. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  1522. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  1523. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  1524. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  1525. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/util.d.ts +82 -0
  1526. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/util.js +142 -0
  1527. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/index.d.ts +4 -0
  1528. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/index.js +33 -0
  1529. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/index.mjs +4405 -0
  1530. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/index.umd.js +4520 -0
  1531. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/locales/en.d.ts +3 -0
  1532. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/locales/en.js +129 -0
  1533. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/standard-schema.d.ts +102 -0
  1534. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/standard-schema.js +2 -0
  1535. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/types.d.ts +1062 -0
  1536. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/types.js +3846 -0
  1537. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/package.json +122 -0
  1538. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/package-lock.json +35 -0
  1539. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/package.json +9 -0
  1540. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/package.json +79 -0
  1541. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/postcjs.ts +3 -0
  1542. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/postesm.ts +3 -0
  1543. package/dist/node_modules/@langchain/core/output_parsers/openai_functions.cjs +1 -0
  1544. package/dist/node_modules/@langchain/core/output_parsers/openai_functions.d.cts +1 -0
  1545. package/dist/node_modules/@langchain/core/output_parsers/openai_functions.d.ts +1 -0
  1546. package/dist/node_modules/@langchain/core/output_parsers/openai_functions.js +1 -0
  1547. package/dist/node_modules/@langchain/core/output_parsers/openai_tools.cjs +1 -0
  1548. package/dist/node_modules/@langchain/core/output_parsers/openai_tools.d.cts +1 -0
  1549. package/dist/node_modules/@langchain/core/output_parsers/openai_tools.d.ts +1 -0
  1550. package/dist/node_modules/@langchain/core/output_parsers/openai_tools.js +1 -0
  1551. package/dist/node_modules/@langchain/core/output_parsers.cjs +1 -0
  1552. package/dist/node_modules/@langchain/core/output_parsers.d.cts +1 -0
  1553. package/dist/node_modules/@langchain/core/output_parsers.d.ts +1 -0
  1554. package/dist/node_modules/@langchain/core/output_parsers.js +1 -0
  1555. package/dist/node_modules/@langchain/core/outputs.cjs +1 -0
  1556. package/dist/node_modules/@langchain/core/outputs.d.cts +1 -0
  1557. package/dist/node_modules/@langchain/core/outputs.d.ts +1 -0
  1558. package/dist/node_modules/@langchain/core/outputs.js +1 -0
  1559. package/dist/node_modules/@langchain/core/package.json +1 -0
  1560. package/dist/node_modules/@langchain/core/prompt_values.cjs +1 -0
  1561. package/dist/node_modules/@langchain/core/prompt_values.d.cts +1 -0
  1562. package/dist/node_modules/@langchain/core/prompt_values.d.ts +1 -0
  1563. package/dist/node_modules/@langchain/core/prompt_values.js +1 -0
  1564. package/dist/node_modules/@langchain/core/prompts.cjs +1 -0
  1565. package/dist/node_modules/@langchain/core/prompts.d.cts +1 -0
  1566. package/dist/node_modules/@langchain/core/prompts.d.ts +1 -0
  1567. package/dist/node_modules/@langchain/core/prompts.js +1 -0
  1568. package/dist/node_modules/@langchain/core/retrievers/document_compressors.cjs +1 -0
  1569. package/dist/node_modules/@langchain/core/retrievers/document_compressors.d.cts +1 -0
  1570. package/dist/node_modules/@langchain/core/retrievers/document_compressors.d.ts +1 -0
  1571. package/dist/node_modules/@langchain/core/retrievers/document_compressors.js +1 -0
  1572. package/dist/node_modules/@langchain/core/retrievers.cjs +1 -0
  1573. package/dist/node_modules/@langchain/core/retrievers.d.cts +1 -0
  1574. package/dist/node_modules/@langchain/core/retrievers.d.ts +1 -0
  1575. package/dist/node_modules/@langchain/core/retrievers.js +1 -0
  1576. package/dist/node_modules/@langchain/core/runnables/graph.cjs +1 -0
  1577. package/dist/node_modules/@langchain/core/runnables/graph.d.cts +1 -0
  1578. package/dist/node_modules/@langchain/core/runnables/graph.d.ts +1 -0
  1579. package/dist/node_modules/@langchain/core/runnables/graph.js +1 -0
  1580. package/dist/node_modules/@langchain/core/runnables/remote.cjs +1 -0
  1581. package/dist/node_modules/@langchain/core/runnables/remote.d.cts +1 -0
  1582. package/dist/node_modules/@langchain/core/runnables/remote.d.ts +1 -0
  1583. package/dist/node_modules/@langchain/core/runnables/remote.js +1 -0
  1584. package/dist/node_modules/@langchain/core/runnables.cjs +1 -0
  1585. package/dist/node_modules/@langchain/core/runnables.d.cts +1 -0
  1586. package/dist/node_modules/@langchain/core/runnables.d.ts +1 -0
  1587. package/dist/node_modules/@langchain/core/runnables.js +1 -0
  1588. package/dist/node_modules/@langchain/core/singletons.cjs +1 -0
  1589. package/dist/node_modules/@langchain/core/singletons.d.cts +1 -0
  1590. package/dist/node_modules/@langchain/core/singletons.d.ts +1 -0
  1591. package/dist/node_modules/@langchain/core/singletons.js +1 -0
  1592. package/dist/node_modules/@langchain/core/stores.cjs +1 -0
  1593. package/dist/node_modules/@langchain/core/stores.d.cts +1 -0
  1594. package/dist/node_modules/@langchain/core/stores.d.ts +1 -0
  1595. package/dist/node_modules/@langchain/core/stores.js +1 -0
  1596. package/dist/node_modules/@langchain/core/structured_query.cjs +1 -0
  1597. package/dist/node_modules/@langchain/core/structured_query.d.cts +1 -0
  1598. package/dist/node_modules/@langchain/core/structured_query.d.ts +1 -0
  1599. package/dist/node_modules/@langchain/core/structured_query.js +1 -0
  1600. package/dist/node_modules/@langchain/core/tools.cjs +1 -0
  1601. package/dist/node_modules/@langchain/core/tools.d.cts +1 -0
  1602. package/dist/node_modules/@langchain/core/tools.d.ts +1 -0
  1603. package/dist/node_modules/@langchain/core/tools.js +1 -0
  1604. package/dist/node_modules/@langchain/core/tracers/base.cjs +1 -0
  1605. package/dist/node_modules/@langchain/core/tracers/base.d.cts +1 -0
  1606. package/dist/node_modules/@langchain/core/tracers/base.d.ts +1 -0
  1607. package/dist/node_modules/@langchain/core/tracers/base.js +1 -0
  1608. package/dist/node_modules/@langchain/core/tracers/console.cjs +1 -0
  1609. package/dist/node_modules/@langchain/core/tracers/console.d.cts +1 -0
  1610. package/dist/node_modules/@langchain/core/tracers/console.d.ts +1 -0
  1611. package/dist/node_modules/@langchain/core/tracers/console.js +1 -0
  1612. package/dist/node_modules/@langchain/core/tracers/initialize.cjs +1 -0
  1613. package/dist/node_modules/@langchain/core/tracers/initialize.d.cts +1 -0
  1614. package/dist/node_modules/@langchain/core/tracers/initialize.d.ts +1 -0
  1615. package/dist/node_modules/@langchain/core/tracers/initialize.js +1 -0
  1616. package/dist/node_modules/@langchain/core/tracers/log_stream.cjs +1 -0
  1617. package/dist/node_modules/@langchain/core/tracers/log_stream.d.cts +1 -0
  1618. package/dist/node_modules/@langchain/core/tracers/log_stream.d.ts +1 -0
  1619. package/dist/node_modules/@langchain/core/tracers/log_stream.js +1 -0
  1620. package/dist/node_modules/@langchain/core/tracers/run_collector.cjs +1 -0
  1621. package/dist/node_modules/@langchain/core/tracers/run_collector.d.cts +1 -0
  1622. package/dist/node_modules/@langchain/core/tracers/run_collector.d.ts +1 -0
  1623. package/dist/node_modules/@langchain/core/tracers/run_collector.js +1 -0
  1624. package/dist/node_modules/@langchain/core/tracers/tracer_langchain.cjs +1 -0
  1625. package/dist/node_modules/@langchain/core/tracers/tracer_langchain.d.cts +1 -0
  1626. package/dist/node_modules/@langchain/core/tracers/tracer_langchain.d.ts +1 -0
  1627. package/dist/node_modules/@langchain/core/tracers/tracer_langchain.js +1 -0
  1628. package/dist/node_modules/@langchain/core/tracers/tracer_langchain_v1.cjs +1 -0
  1629. package/dist/node_modules/@langchain/core/tracers/tracer_langchain_v1.d.cts +1 -0
  1630. package/dist/node_modules/@langchain/core/tracers/tracer_langchain_v1.d.ts +1 -0
  1631. package/dist/node_modules/@langchain/core/tracers/tracer_langchain_v1.js +1 -0
  1632. package/dist/node_modules/@langchain/core/types/stream.cjs +1 -0
  1633. package/dist/node_modules/@langchain/core/types/stream.d.cts +1 -0
  1634. package/dist/node_modules/@langchain/core/types/stream.d.ts +1 -0
  1635. package/dist/node_modules/@langchain/core/types/stream.js +1 -0
  1636. package/dist/node_modules/@langchain/core/utils/async_caller.cjs +1 -0
  1637. package/dist/node_modules/@langchain/core/utils/async_caller.d.cts +1 -0
  1638. package/dist/node_modules/@langchain/core/utils/async_caller.d.ts +1 -0
  1639. package/dist/node_modules/@langchain/core/utils/async_caller.js +1 -0
  1640. package/dist/node_modules/@langchain/core/utils/chunk_array.cjs +1 -0
  1641. package/dist/node_modules/@langchain/core/utils/chunk_array.d.cts +1 -0
  1642. package/dist/node_modules/@langchain/core/utils/chunk_array.d.ts +1 -0
  1643. package/dist/node_modules/@langchain/core/utils/chunk_array.js +1 -0
  1644. package/dist/node_modules/@langchain/core/utils/env.cjs +1 -0
  1645. package/dist/node_modules/@langchain/core/utils/env.d.cts +1 -0
  1646. package/dist/node_modules/@langchain/core/utils/env.d.ts +1 -0
  1647. package/dist/node_modules/@langchain/core/utils/env.js +1 -0
  1648. package/dist/node_modules/@langchain/core/utils/event_source_parse.cjs +1 -0
  1649. package/dist/node_modules/@langchain/core/utils/event_source_parse.d.cts +1 -0
  1650. package/dist/node_modules/@langchain/core/utils/event_source_parse.d.ts +1 -0
  1651. package/dist/node_modules/@langchain/core/utils/event_source_parse.js +1 -0
  1652. package/dist/node_modules/@langchain/core/utils/function_calling.cjs +1 -0
  1653. package/dist/node_modules/@langchain/core/utils/function_calling.d.cts +1 -0
  1654. package/dist/node_modules/@langchain/core/utils/function_calling.d.ts +1 -0
  1655. package/dist/node_modules/@langchain/core/utils/function_calling.js +1 -0
  1656. package/dist/node_modules/@langchain/core/utils/hash.cjs +1 -0
  1657. package/dist/node_modules/@langchain/core/utils/hash.d.cts +1 -0
  1658. package/dist/node_modules/@langchain/core/utils/hash.d.ts +1 -0
  1659. package/dist/node_modules/@langchain/core/utils/hash.js +1 -0
  1660. package/dist/node_modules/@langchain/core/utils/json_patch.cjs +1 -0
  1661. package/dist/node_modules/@langchain/core/utils/json_patch.d.cts +1 -0
  1662. package/dist/node_modules/@langchain/core/utils/json_patch.d.ts +1 -0
  1663. package/dist/node_modules/@langchain/core/utils/json_patch.js +1 -0
  1664. package/dist/node_modules/@langchain/core/utils/json_schema.cjs +1 -0
  1665. package/dist/node_modules/@langchain/core/utils/json_schema.d.cts +1 -0
  1666. package/dist/node_modules/@langchain/core/utils/json_schema.d.ts +1 -0
  1667. package/dist/node_modules/@langchain/core/utils/json_schema.js +1 -0
  1668. package/dist/node_modules/@langchain/core/utils/math.cjs +1 -0
  1669. package/dist/node_modules/@langchain/core/utils/math.d.cts +1 -0
  1670. package/dist/node_modules/@langchain/core/utils/math.d.ts +1 -0
  1671. package/dist/node_modules/@langchain/core/utils/math.js +1 -0
  1672. package/dist/node_modules/@langchain/core/utils/stream.cjs +1 -0
  1673. package/dist/node_modules/@langchain/core/utils/stream.d.cts +1 -0
  1674. package/dist/node_modules/@langchain/core/utils/stream.d.ts +1 -0
  1675. package/dist/node_modules/@langchain/core/utils/stream.js +1 -0
  1676. package/dist/node_modules/@langchain/core/utils/testing.cjs +1 -0
  1677. package/dist/node_modules/@langchain/core/utils/testing.d.cts +1 -0
  1678. package/dist/node_modules/@langchain/core/utils/testing.d.ts +1 -0
  1679. package/dist/node_modules/@langchain/core/utils/testing.js +1 -0
  1680. package/dist/node_modules/@langchain/core/utils/tiktoken.cjs +1 -0
  1681. package/dist/node_modules/@langchain/core/utils/tiktoken.d.cts +1 -0
  1682. package/dist/node_modules/@langchain/core/utils/tiktoken.d.ts +1 -0
  1683. package/dist/node_modules/@langchain/core/utils/tiktoken.js +1 -0
  1684. package/dist/node_modules/@langchain/core/utils/types.cjs +1 -0
  1685. package/dist/node_modules/@langchain/core/utils/types.d.cts +1 -0
  1686. package/dist/node_modules/@langchain/core/utils/types.d.ts +1 -0
  1687. package/dist/node_modules/@langchain/core/utils/types.js +1 -0
  1688. package/dist/node_modules/@langchain/core/vectorstores.cjs +1 -0
  1689. package/dist/node_modules/@langchain/core/vectorstores.d.cts +1 -0
  1690. package/dist/node_modules/@langchain/core/vectorstores.d.ts +1 -0
  1691. package/dist/node_modules/@langchain/core/vectorstores.js +1 -0
  1692. package/dist/node_modules/@langchain/deepseek/LICENSE +21 -0
  1693. package/dist/node_modules/@langchain/deepseek/dist/chat_models.cjs +417 -0
  1694. package/dist/node_modules/@langchain/deepseek/dist/chat_models.d.ts +414 -0
  1695. package/dist/node_modules/@langchain/deepseek/dist/chat_models.js +413 -0
  1696. package/dist/node_modules/@langchain/deepseek/dist/index.cjs +17 -0
  1697. package/dist/node_modules/@langchain/deepseek/dist/index.d.ts +1 -0
  1698. package/dist/node_modules/@langchain/deepseek/dist/index.js +1 -0
  1699. package/dist/node_modules/@langchain/deepseek/index.cjs +37 -0
  1700. package/dist/node_modules/@langchain/deepseek/index.d.cts +1 -0
  1701. package/dist/node_modules/@langchain/deepseek/index.d.ts +1 -0
  1702. package/dist/node_modules/@langchain/deepseek/index.js +1 -0
  1703. package/dist/node_modules/@langchain/deepseek/package.json +1 -0
  1704. package/dist/node_modules/@langchain/openai/LICENSE +21 -0
  1705. package/dist/node_modules/@langchain/openai/dist/azure/chat_models.cjs +647 -0
  1706. package/dist/node_modules/@langchain/openai/dist/azure/chat_models.d.ts +456 -0
  1707. package/dist/node_modules/@langchain/openai/dist/azure/chat_models.js +643 -0
  1708. package/dist/node_modules/@langchain/openai/dist/azure/embeddings.cjs +129 -0
  1709. package/dist/node_modules/@langchain/openai/dist/azure/embeddings.d.ts +22 -0
  1710. package/dist/node_modules/@langchain/openai/dist/azure/embeddings.js +125 -0
  1711. package/dist/node_modules/@langchain/openai/dist/azure/llms.cjs +167 -0
  1712. package/dist/node_modules/@langchain/openai/dist/azure/llms.d.ts +27 -0
  1713. package/dist/node_modules/@langchain/openai/dist/azure/llms.js +163 -0
  1714. package/dist/node_modules/@langchain/openai/dist/chat_models.cjs +1769 -0
  1715. package/dist/node_modules/@langchain/openai/dist/chat_models.d.ts +759 -0
  1716. package/dist/node_modules/@langchain/openai/dist/chat_models.js +1763 -0
  1717. package/dist/node_modules/@langchain/openai/dist/embeddings.cjs +195 -0
  1718. package/dist/node_modules/@langchain/openai/dist/embeddings.d.ts +104 -0
  1719. package/dist/node_modules/@langchain/openai/dist/embeddings.js +191 -0
  1720. package/dist/node_modules/@langchain/openai/dist/index.cjs +32 -0
  1721. package/dist/node_modules/@langchain/openai/dist/index.d.ts +12 -0
  1722. package/dist/node_modules/@langchain/openai/dist/index.js +12 -0
  1723. package/dist/node_modules/@langchain/openai/dist/llms.cjs +470 -0
  1724. package/dist/node_modules/@langchain/openai/dist/llms.d.ts +117 -0
  1725. package/dist/node_modules/@langchain/openai/dist/llms.js +466 -0
  1726. package/dist/node_modules/@langchain/openai/dist/tools/dalle.cjs +193 -0
  1727. package/dist/node_modules/@langchain/openai/dist/tools/dalle.d.ts +111 -0
  1728. package/dist/node_modules/@langchain/openai/dist/tools/dalle.js +189 -0
  1729. package/dist/node_modules/@langchain/openai/dist/tools/index.cjs +17 -0
  1730. package/dist/node_modules/@langchain/openai/dist/tools/index.d.ts +1 -0
  1731. package/dist/node_modules/@langchain/openai/dist/tools/index.js +1 -0
  1732. package/dist/node_modules/@langchain/openai/dist/types.cjs +2 -0
  1733. package/dist/node_modules/@langchain/openai/dist/types.d.ts +218 -0
  1734. package/dist/node_modules/@langchain/openai/dist/types.js +1 -0
  1735. package/dist/node_modules/@langchain/openai/dist/utils/azure.cjs +51 -0
  1736. package/dist/node_modules/@langchain/openai/dist/utils/azure.d.ts +34 -0
  1737. package/dist/node_modules/@langchain/openai/dist/utils/azure.js +47 -0
  1738. package/dist/node_modules/@langchain/openai/dist/utils/errors.cjs +11 -0
  1739. package/dist/node_modules/@langchain/openai/dist/utils/errors.d.ts +2 -0
  1740. package/dist/node_modules/@langchain/openai/dist/utils/errors.js +7 -0
  1741. package/dist/node_modules/@langchain/openai/dist/utils/openai-format-fndef.cjs +81 -0
  1742. package/dist/node_modules/@langchain/openai/dist/utils/openai-format-fndef.d.ts +44 -0
  1743. package/dist/node_modules/@langchain/openai/dist/utils/openai-format-fndef.js +77 -0
  1744. package/dist/node_modules/@langchain/openai/dist/utils/openai.cjs +75 -0
  1745. package/dist/node_modules/@langchain/openai/dist/utils/openai.d.ts +20 -0
  1746. package/dist/node_modules/@langchain/openai/dist/utils/openai.js +68 -0
  1747. package/dist/node_modules/@langchain/openai/dist/utils/prompts.cjs +42 -0
  1748. package/dist/node_modules/@langchain/openai/dist/utils/prompts.d.ts +36 -0
  1749. package/dist/node_modules/@langchain/openai/dist/utils/prompts.js +38 -0
  1750. package/dist/node_modules/@langchain/openai/dist/utils/tools.cjs +54 -0
  1751. package/dist/node_modules/@langchain/openai/dist/utils/tools.d.ts +20 -0
  1752. package/dist/node_modules/@langchain/openai/dist/utils/tools.js +50 -0
  1753. package/dist/node_modules/@langchain/openai/index.cjs +37 -0
  1754. package/dist/node_modules/@langchain/openai/index.d.cts +1 -0
  1755. package/dist/node_modules/@langchain/openai/index.d.ts +1 -0
  1756. package/dist/node_modules/@langchain/openai/index.js +1 -0
  1757. package/dist/node_modules/@langchain/openai/package.json +1 -0
  1758. package/dist/server/collections/llm-services.d.ts +10 -0
  1759. package/dist/server/collections/llm-services.js +48 -0
  1760. package/dist/server/index.d.ts +11 -0
  1761. package/dist/server/index.js +51 -0
  1762. package/dist/server/llm-providers/deepseek.d.ts +16 -0
  1763. package/dist/server/llm-providers/deepseek.js +64 -0
  1764. package/dist/server/llm-providers/handlers/parse-messages.d.ts +9 -0
  1765. package/dist/server/llm-providers/handlers/parse-messages.js +70 -0
  1766. package/dist/server/llm-providers/openai.d.ts +18 -0
  1767. package/dist/server/llm-providers/openai.js +69 -0
  1768. package/dist/server/llm-providers/provider.d.ts +36 -0
  1769. package/dist/server/llm-providers/provider.js +104 -0
  1770. package/dist/server/manager/ai-manager.d.ts +26 -0
  1771. package/dist/server/manager/ai-manager.js +45 -0
  1772. package/dist/server/plugin.d.ts +21 -0
  1773. package/dist/server/plugin.js +83 -0
  1774. package/dist/server/resource/ai.d.ts +11 -0
  1775. package/dist/server/resource/ai.js +71 -0
  1776. package/dist/server/workflow/nodes/llm/index.d.ts +15 -0
  1777. package/dist/server/workflow/nodes/llm/index.js +127 -0
  1778. package/package.json +21 -0
  1779. package/server.d.ts +2 -0
  1780. package/server.js +1 -0
@@ -0,0 +1,3237 @@
1
+ import * as uuid from "uuid";
2
+ import { AsyncCaller } from "./utils/async_caller.js";
3
+ import { convertLangChainMessageToExample, isLangChainMessage, } from "./utils/messages.js";
4
+ import { getEnvironmentVariable, getLangChainEnvVarsMetadata, getLangSmithEnvironmentVariable, getRuntimeEnvironment, } from "./utils/env.js";
5
+ import { __version__ } from "./index.js";
6
+ import { assertUuid } from "./utils/_uuid.js";
7
+ import { warnOnce } from "./utils/warn.js";
8
+ import { parsePromptIdentifier } from "./utils/prompts.js";
9
+ import { raiseForStatus } from "./utils/error.js";
10
+ import { _getFetchImplementation } from "./singletons/fetch.js";
11
+ import { serialize as serializePayloadForTracing } from "./utils/fast-safe-stringify/index.js";
12
+ export function mergeRuntimeEnvIntoRunCreate(run) {
13
+ const runtimeEnv = getRuntimeEnvironment();
14
+ const envVars = getLangChainEnvVarsMetadata();
15
+ const extra = run.extra ?? {};
16
+ const metadata = extra.metadata;
17
+ run.extra = {
18
+ ...extra,
19
+ runtime: {
20
+ ...runtimeEnv,
21
+ ...extra?.runtime,
22
+ },
23
+ metadata: {
24
+ ...envVars,
25
+ ...(envVars.revision_id || run.revision_id
26
+ ? { revision_id: run.revision_id ?? envVars.revision_id }
27
+ : {}),
28
+ ...metadata,
29
+ },
30
+ };
31
+ return run;
32
+ }
33
+ const getTracingSamplingRate = () => {
34
+ const samplingRateStr = getLangSmithEnvironmentVariable("TRACING_SAMPLING_RATE");
35
+ if (samplingRateStr === undefined) {
36
+ return undefined;
37
+ }
38
+ const samplingRate = parseFloat(samplingRateStr);
39
+ if (samplingRate < 0 || samplingRate > 1) {
40
+ throw new Error(`LANGSMITH_TRACING_SAMPLING_RATE must be between 0 and 1 if set. Got: ${samplingRate}`);
41
+ }
42
+ return samplingRate;
43
+ };
44
+ // utility functions
45
+ const isLocalhost = (url) => {
46
+ const strippedUrl = url.replace("http://", "").replace("https://", "");
47
+ const hostname = strippedUrl.split("/")[0].split(":")[0];
48
+ return (hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1");
49
+ };
50
+ async function toArray(iterable) {
51
+ const result = [];
52
+ for await (const item of iterable) {
53
+ result.push(item);
54
+ }
55
+ return result;
56
+ }
57
+ function trimQuotes(str) {
58
+ if (str === undefined) {
59
+ return undefined;
60
+ }
61
+ return str
62
+ .trim()
63
+ .replace(/^"(.*)"$/, "$1")
64
+ .replace(/^'(.*)'$/, "$1");
65
+ }
66
+ const handle429 = async (response) => {
67
+ if (response?.status === 429) {
68
+ const retryAfter = parseInt(response.headers.get("retry-after") ?? "30", 10) * 1000;
69
+ if (retryAfter > 0) {
70
+ await new Promise((resolve) => setTimeout(resolve, retryAfter));
71
+ // Return directly after calling this check
72
+ return true;
73
+ }
74
+ }
75
+ // Fall back to existing status checks
76
+ return false;
77
+ };
78
+ export class AutoBatchQueue {
79
+ constructor() {
80
+ Object.defineProperty(this, "items", {
81
+ enumerable: true,
82
+ configurable: true,
83
+ writable: true,
84
+ value: []
85
+ });
86
+ Object.defineProperty(this, "sizeBytes", {
87
+ enumerable: true,
88
+ configurable: true,
89
+ writable: true,
90
+ value: 0
91
+ });
92
+ }
93
+ peek() {
94
+ return this.items[0];
95
+ }
96
+ push(item) {
97
+ let itemPromiseResolve;
98
+ const itemPromise = new Promise((resolve) => {
99
+ // Setting itemPromiseResolve is synchronous with promise creation:
100
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise
101
+ itemPromiseResolve = resolve;
102
+ });
103
+ const size = serializePayloadForTracing(item.item).length;
104
+ this.items.push({
105
+ action: item.action,
106
+ payload: item.item,
107
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
108
+ itemPromiseResolve: itemPromiseResolve,
109
+ itemPromise,
110
+ size,
111
+ });
112
+ this.sizeBytes += size;
113
+ return itemPromise;
114
+ }
115
+ pop(upToSizeBytes) {
116
+ if (upToSizeBytes < 1) {
117
+ throw new Error("Number of bytes to pop off may not be less than 1.");
118
+ }
119
+ const popped = [];
120
+ let poppedSizeBytes = 0;
121
+ // Pop items until we reach or exceed the size limit
122
+ while (poppedSizeBytes + (this.peek()?.size ?? 0) < upToSizeBytes &&
123
+ this.items.length > 0) {
124
+ const item = this.items.shift();
125
+ if (item) {
126
+ popped.push(item);
127
+ poppedSizeBytes += item.size;
128
+ this.sizeBytes -= item.size;
129
+ }
130
+ }
131
+ // If there is an item on the queue we were unable to pop,
132
+ // just return it as a single batch.
133
+ if (popped.length === 0 && this.items.length > 0) {
134
+ const item = this.items.shift();
135
+ popped.push(item);
136
+ poppedSizeBytes += item.size;
137
+ this.sizeBytes -= item.size;
138
+ }
139
+ return [
140
+ popped.map((it) => ({ action: it.action, item: it.payload })),
141
+ () => popped.forEach((it) => it.itemPromiseResolve()),
142
+ ];
143
+ }
144
+ }
145
+ // 20 MB
146
+ export const DEFAULT_BATCH_SIZE_LIMIT_BYTES = 20_971_520;
147
+ const SERVER_INFO_REQUEST_TIMEOUT = 2500;
148
+ export class Client {
149
+ constructor(config = {}) {
150
+ Object.defineProperty(this, "apiKey", {
151
+ enumerable: true,
152
+ configurable: true,
153
+ writable: true,
154
+ value: void 0
155
+ });
156
+ Object.defineProperty(this, "apiUrl", {
157
+ enumerable: true,
158
+ configurable: true,
159
+ writable: true,
160
+ value: void 0
161
+ });
162
+ Object.defineProperty(this, "webUrl", {
163
+ enumerable: true,
164
+ configurable: true,
165
+ writable: true,
166
+ value: void 0
167
+ });
168
+ Object.defineProperty(this, "caller", {
169
+ enumerable: true,
170
+ configurable: true,
171
+ writable: true,
172
+ value: void 0
173
+ });
174
+ Object.defineProperty(this, "batchIngestCaller", {
175
+ enumerable: true,
176
+ configurable: true,
177
+ writable: true,
178
+ value: void 0
179
+ });
180
+ Object.defineProperty(this, "timeout_ms", {
181
+ enumerable: true,
182
+ configurable: true,
183
+ writable: true,
184
+ value: void 0
185
+ });
186
+ Object.defineProperty(this, "_tenantId", {
187
+ enumerable: true,
188
+ configurable: true,
189
+ writable: true,
190
+ value: null
191
+ });
192
+ Object.defineProperty(this, "hideInputs", {
193
+ enumerable: true,
194
+ configurable: true,
195
+ writable: true,
196
+ value: void 0
197
+ });
198
+ Object.defineProperty(this, "hideOutputs", {
199
+ enumerable: true,
200
+ configurable: true,
201
+ writable: true,
202
+ value: void 0
203
+ });
204
+ Object.defineProperty(this, "tracingSampleRate", {
205
+ enumerable: true,
206
+ configurable: true,
207
+ writable: true,
208
+ value: void 0
209
+ });
210
+ Object.defineProperty(this, "filteredPostUuids", {
211
+ enumerable: true,
212
+ configurable: true,
213
+ writable: true,
214
+ value: new Set()
215
+ });
216
+ Object.defineProperty(this, "autoBatchTracing", {
217
+ enumerable: true,
218
+ configurable: true,
219
+ writable: true,
220
+ value: true
221
+ });
222
+ Object.defineProperty(this, "autoBatchQueue", {
223
+ enumerable: true,
224
+ configurable: true,
225
+ writable: true,
226
+ value: new AutoBatchQueue()
227
+ });
228
+ Object.defineProperty(this, "autoBatchTimeout", {
229
+ enumerable: true,
230
+ configurable: true,
231
+ writable: true,
232
+ value: void 0
233
+ });
234
+ Object.defineProperty(this, "autoBatchAggregationDelayMs", {
235
+ enumerable: true,
236
+ configurable: true,
237
+ writable: true,
238
+ value: 250
239
+ });
240
+ Object.defineProperty(this, "batchSizeBytesLimit", {
241
+ enumerable: true,
242
+ configurable: true,
243
+ writable: true,
244
+ value: void 0
245
+ });
246
+ Object.defineProperty(this, "fetchOptions", {
247
+ enumerable: true,
248
+ configurable: true,
249
+ writable: true,
250
+ value: void 0
251
+ });
252
+ Object.defineProperty(this, "settings", {
253
+ enumerable: true,
254
+ configurable: true,
255
+ writable: true,
256
+ value: void 0
257
+ });
258
+ Object.defineProperty(this, "blockOnRootRunFinalization", {
259
+ enumerable: true,
260
+ configurable: true,
261
+ writable: true,
262
+ value: getEnvironmentVariable("LANGSMITH_TRACING_BACKGROUND") === "false"
263
+ });
264
+ Object.defineProperty(this, "traceBatchConcurrency", {
265
+ enumerable: true,
266
+ configurable: true,
267
+ writable: true,
268
+ value: 5
269
+ });
270
+ Object.defineProperty(this, "_serverInfo", {
271
+ enumerable: true,
272
+ configurable: true,
273
+ writable: true,
274
+ value: void 0
275
+ });
276
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
277
+ Object.defineProperty(this, "_getServerInfoPromise", {
278
+ enumerable: true,
279
+ configurable: true,
280
+ writable: true,
281
+ value: void 0
282
+ });
283
+ Object.defineProperty(this, "manualFlushMode", {
284
+ enumerable: true,
285
+ configurable: true,
286
+ writable: true,
287
+ value: false
288
+ });
289
+ const defaultConfig = Client.getDefaultClientConfig();
290
+ this.tracingSampleRate = getTracingSamplingRate();
291
+ this.apiUrl = trimQuotes(config.apiUrl ?? defaultConfig.apiUrl) ?? "";
292
+ if (this.apiUrl.endsWith("/")) {
293
+ this.apiUrl = this.apiUrl.slice(0, -1);
294
+ }
295
+ this.apiKey = trimQuotes(config.apiKey ?? defaultConfig.apiKey);
296
+ this.webUrl = trimQuotes(config.webUrl ?? defaultConfig.webUrl);
297
+ if (this.webUrl?.endsWith("/")) {
298
+ this.webUrl = this.webUrl.slice(0, -1);
299
+ }
300
+ this.timeout_ms = config.timeout_ms ?? 90_000;
301
+ this.caller = new AsyncCaller(config.callerOptions ?? {});
302
+ this.traceBatchConcurrency =
303
+ config.traceBatchConcurrency ?? this.traceBatchConcurrency;
304
+ if (this.traceBatchConcurrency < 1) {
305
+ throw new Error("Trace batch concurrency must be positive.");
306
+ }
307
+ this.batchIngestCaller = new AsyncCaller({
308
+ maxRetries: 2,
309
+ maxConcurrency: this.traceBatchConcurrency,
310
+ ...(config.callerOptions ?? {}),
311
+ onFailedResponseHook: handle429,
312
+ });
313
+ this.hideInputs =
314
+ config.hideInputs ?? config.anonymizer ?? defaultConfig.hideInputs;
315
+ this.hideOutputs =
316
+ config.hideOutputs ?? config.anonymizer ?? defaultConfig.hideOutputs;
317
+ this.autoBatchTracing = config.autoBatchTracing ?? this.autoBatchTracing;
318
+ this.blockOnRootRunFinalization =
319
+ config.blockOnRootRunFinalization ?? this.blockOnRootRunFinalization;
320
+ this.batchSizeBytesLimit = config.batchSizeBytesLimit;
321
+ this.fetchOptions = config.fetchOptions || {};
322
+ this.manualFlushMode = config.manualFlushMode ?? this.manualFlushMode;
323
+ }
324
+ static getDefaultClientConfig() {
325
+ const apiKey = getLangSmithEnvironmentVariable("API_KEY");
326
+ const apiUrl = getLangSmithEnvironmentVariable("ENDPOINT") ??
327
+ "https://api.smith.langchain.com";
328
+ const hideInputs = getLangSmithEnvironmentVariable("HIDE_INPUTS") === "true";
329
+ const hideOutputs = getLangSmithEnvironmentVariable("HIDE_OUTPUTS") === "true";
330
+ return {
331
+ apiUrl: apiUrl,
332
+ apiKey: apiKey,
333
+ webUrl: undefined,
334
+ hideInputs: hideInputs,
335
+ hideOutputs: hideOutputs,
336
+ };
337
+ }
338
+ getHostUrl() {
339
+ if (this.webUrl) {
340
+ return this.webUrl;
341
+ }
342
+ else if (isLocalhost(this.apiUrl)) {
343
+ this.webUrl = "http://localhost:3000";
344
+ return this.webUrl;
345
+ }
346
+ else if (this.apiUrl.endsWith("/api/v1")) {
347
+ this.webUrl = this.apiUrl.replace("/api/v1", "");
348
+ return this.webUrl;
349
+ }
350
+ else if (this.apiUrl.includes("/api") &&
351
+ !this.apiUrl.split(".", 1)[0].endsWith("api")) {
352
+ this.webUrl = this.apiUrl.replace("/api", "");
353
+ return this.webUrl;
354
+ }
355
+ else if (this.apiUrl.split(".", 1)[0].includes("dev")) {
356
+ this.webUrl = "https://dev.smith.langchain.com";
357
+ return this.webUrl;
358
+ }
359
+ else if (this.apiUrl.split(".", 1)[0].includes("eu")) {
360
+ this.webUrl = "https://eu.smith.langchain.com";
361
+ return this.webUrl;
362
+ }
363
+ else if (this.apiUrl.split(".", 1)[0].includes("beta")) {
364
+ this.webUrl = "https://beta.smith.langchain.com";
365
+ return this.webUrl;
366
+ }
367
+ else {
368
+ this.webUrl = "https://smith.langchain.com";
369
+ return this.webUrl;
370
+ }
371
+ }
372
+ get headers() {
373
+ const headers = {
374
+ "User-Agent": `langsmith-js/${__version__}`,
375
+ };
376
+ if (this.apiKey) {
377
+ headers["x-api-key"] = `${this.apiKey}`;
378
+ }
379
+ return headers;
380
+ }
381
+ processInputs(inputs) {
382
+ if (this.hideInputs === false) {
383
+ return inputs;
384
+ }
385
+ if (this.hideInputs === true) {
386
+ return {};
387
+ }
388
+ if (typeof this.hideInputs === "function") {
389
+ return this.hideInputs(inputs);
390
+ }
391
+ return inputs;
392
+ }
393
+ processOutputs(outputs) {
394
+ if (this.hideOutputs === false) {
395
+ return outputs;
396
+ }
397
+ if (this.hideOutputs === true) {
398
+ return {};
399
+ }
400
+ if (typeof this.hideOutputs === "function") {
401
+ return this.hideOutputs(outputs);
402
+ }
403
+ return outputs;
404
+ }
405
+ prepareRunCreateOrUpdateInputs(run) {
406
+ const runParams = { ...run };
407
+ if (runParams.inputs !== undefined) {
408
+ runParams.inputs = this.processInputs(runParams.inputs);
409
+ }
410
+ if (runParams.outputs !== undefined) {
411
+ runParams.outputs = this.processOutputs(runParams.outputs);
412
+ }
413
+ return runParams;
414
+ }
415
+ async _getResponse(path, queryParams) {
416
+ const paramsString = queryParams?.toString() ?? "";
417
+ const url = `${this.apiUrl}${path}?${paramsString}`;
418
+ const response = await this.caller.call(_getFetchImplementation(), url, {
419
+ method: "GET",
420
+ headers: this.headers,
421
+ signal: AbortSignal.timeout(this.timeout_ms),
422
+ ...this.fetchOptions,
423
+ });
424
+ await raiseForStatus(response, `Failed to fetch ${path}`);
425
+ return response;
426
+ }
427
+ async _get(path, queryParams) {
428
+ const response = await this._getResponse(path, queryParams);
429
+ return response.json();
430
+ }
431
+ async *_getPaginated(path, queryParams = new URLSearchParams(), transform) {
432
+ let offset = Number(queryParams.get("offset")) || 0;
433
+ const limit = Number(queryParams.get("limit")) || 100;
434
+ while (true) {
435
+ queryParams.set("offset", String(offset));
436
+ queryParams.set("limit", String(limit));
437
+ const url = `${this.apiUrl}${path}?${queryParams}`;
438
+ const response = await this.caller.call(_getFetchImplementation(), url, {
439
+ method: "GET",
440
+ headers: this.headers,
441
+ signal: AbortSignal.timeout(this.timeout_ms),
442
+ ...this.fetchOptions,
443
+ });
444
+ await raiseForStatus(response, `Failed to fetch ${path}`);
445
+ const items = transform
446
+ ? transform(await response.json())
447
+ : await response.json();
448
+ if (items.length === 0) {
449
+ break;
450
+ }
451
+ yield items;
452
+ if (items.length < limit) {
453
+ break;
454
+ }
455
+ offset += items.length;
456
+ }
457
+ }
458
+ async *_getCursorPaginatedList(path, body = null, requestMethod = "POST", dataKey = "runs") {
459
+ const bodyParams = body ? { ...body } : {};
460
+ while (true) {
461
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}${path}`, {
462
+ method: requestMethod,
463
+ headers: { ...this.headers, "Content-Type": "application/json" },
464
+ signal: AbortSignal.timeout(this.timeout_ms),
465
+ ...this.fetchOptions,
466
+ body: JSON.stringify(bodyParams),
467
+ });
468
+ const responseBody = await response.json();
469
+ if (!responseBody) {
470
+ break;
471
+ }
472
+ if (!responseBody[dataKey]) {
473
+ break;
474
+ }
475
+ yield responseBody[dataKey];
476
+ const cursors = responseBody.cursors;
477
+ if (!cursors) {
478
+ break;
479
+ }
480
+ if (!cursors.next) {
481
+ break;
482
+ }
483
+ bodyParams.cursor = cursors.next;
484
+ }
485
+ }
486
+ _filterForSampling(runs, patch = false) {
487
+ if (this.tracingSampleRate === undefined) {
488
+ return runs;
489
+ }
490
+ if (patch) {
491
+ const sampled = [];
492
+ for (const run of runs) {
493
+ if (!this.filteredPostUuids.has(run.id)) {
494
+ sampled.push(run);
495
+ }
496
+ else {
497
+ this.filteredPostUuids.delete(run.id);
498
+ }
499
+ }
500
+ return sampled;
501
+ }
502
+ else {
503
+ const sampled = [];
504
+ for (const run of runs) {
505
+ if ((run.id !== run.trace_id &&
506
+ !this.filteredPostUuids.has(run.trace_id)) ||
507
+ Math.random() < this.tracingSampleRate) {
508
+ sampled.push(run);
509
+ }
510
+ else {
511
+ this.filteredPostUuids.add(run.id);
512
+ }
513
+ }
514
+ return sampled;
515
+ }
516
+ }
517
+ async _getBatchSizeLimitBytes() {
518
+ const serverInfo = await this._ensureServerInfo();
519
+ return (this.batchSizeBytesLimit ??
520
+ serverInfo.batch_ingest_config?.size_limit_bytes ??
521
+ DEFAULT_BATCH_SIZE_LIMIT_BYTES);
522
+ }
523
+ async _getMultiPartSupport() {
524
+ const serverInfo = await this._ensureServerInfo();
525
+ return (serverInfo.instance_flags?.dataset_examples_multipart_enabled ?? false);
526
+ }
527
+ drainAutoBatchQueue(batchSizeLimit) {
528
+ const promises = [];
529
+ while (this.autoBatchQueue.items.length > 0) {
530
+ const [batch, done] = this.autoBatchQueue.pop(batchSizeLimit);
531
+ if (!batch.length) {
532
+ done();
533
+ break;
534
+ }
535
+ const batchPromise = this._processBatch(batch, done).catch(console.error);
536
+ promises.push(batchPromise);
537
+ }
538
+ return Promise.all(promises);
539
+ }
540
+ async _processBatch(batch, done) {
541
+ if (!batch.length) {
542
+ done();
543
+ return;
544
+ }
545
+ try {
546
+ const ingestParams = {
547
+ runCreates: batch
548
+ .filter((item) => item.action === "create")
549
+ .map((item) => item.item),
550
+ runUpdates: batch
551
+ .filter((item) => item.action === "update")
552
+ .map((item) => item.item),
553
+ };
554
+ const serverInfo = await this._ensureServerInfo();
555
+ if (serverInfo?.batch_ingest_config?.use_multipart_endpoint) {
556
+ await this.multipartIngestRuns(ingestParams);
557
+ }
558
+ else {
559
+ await this.batchIngestRuns(ingestParams);
560
+ }
561
+ }
562
+ finally {
563
+ done();
564
+ }
565
+ }
566
+ async processRunOperation(item) {
567
+ clearTimeout(this.autoBatchTimeout);
568
+ this.autoBatchTimeout = undefined;
569
+ if (item.action === "create") {
570
+ item.item = mergeRuntimeEnvIntoRunCreate(item.item);
571
+ }
572
+ const itemPromise = this.autoBatchQueue.push(item);
573
+ if (this.manualFlushMode) {
574
+ // Rely on manual flushing in serverless environments
575
+ return itemPromise;
576
+ }
577
+ const sizeLimitBytes = await this._getBatchSizeLimitBytes();
578
+ if (this.autoBatchQueue.sizeBytes > sizeLimitBytes) {
579
+ void this.drainAutoBatchQueue(sizeLimitBytes);
580
+ }
581
+ if (this.autoBatchQueue.items.length > 0) {
582
+ this.autoBatchTimeout = setTimeout(() => {
583
+ this.autoBatchTimeout = undefined;
584
+ void this.drainAutoBatchQueue(sizeLimitBytes);
585
+ }, this.autoBatchAggregationDelayMs);
586
+ }
587
+ return itemPromise;
588
+ }
589
+ async _getServerInfo() {
590
+ const response = await _getFetchImplementation()(`${this.apiUrl}/info`, {
591
+ method: "GET",
592
+ headers: { Accept: "application/json" },
593
+ signal: AbortSignal.timeout(SERVER_INFO_REQUEST_TIMEOUT),
594
+ ...this.fetchOptions,
595
+ });
596
+ await raiseForStatus(response, "get server info");
597
+ return response.json();
598
+ }
599
+ async _ensureServerInfo() {
600
+ if (this._getServerInfoPromise === undefined) {
601
+ this._getServerInfoPromise = (async () => {
602
+ if (this._serverInfo === undefined) {
603
+ try {
604
+ this._serverInfo = await this._getServerInfo();
605
+ }
606
+ catch (e) {
607
+ console.warn(`[WARNING]: LangSmith failed to fetch info on supported operations. Falling back to batch operations and default limits.`);
608
+ }
609
+ }
610
+ return this._serverInfo ?? {};
611
+ })();
612
+ }
613
+ return this._getServerInfoPromise.then((serverInfo) => {
614
+ if (this._serverInfo === undefined) {
615
+ this._getServerInfoPromise = undefined;
616
+ }
617
+ return serverInfo;
618
+ });
619
+ }
620
+ async _getSettings() {
621
+ if (!this.settings) {
622
+ this.settings = this._get("/settings");
623
+ }
624
+ return await this.settings;
625
+ }
626
+ /**
627
+ * Flushes current queued traces.
628
+ */
629
+ async flush() {
630
+ const sizeLimitBytes = await this._getBatchSizeLimitBytes();
631
+ await this.drainAutoBatchQueue(sizeLimitBytes);
632
+ }
633
+ async createRun(run) {
634
+ if (!this._filterForSampling([run]).length) {
635
+ return;
636
+ }
637
+ const headers = { ...this.headers, "Content-Type": "application/json" };
638
+ const session_name = run.project_name;
639
+ delete run.project_name;
640
+ const runCreate = this.prepareRunCreateOrUpdateInputs({
641
+ session_name,
642
+ ...run,
643
+ start_time: run.start_time ?? Date.now(),
644
+ });
645
+ if (this.autoBatchTracing &&
646
+ runCreate.trace_id !== undefined &&
647
+ runCreate.dotted_order !== undefined) {
648
+ void this.processRunOperation({
649
+ action: "create",
650
+ item: runCreate,
651
+ }).catch(console.error);
652
+ return;
653
+ }
654
+ const mergedRunCreateParam = mergeRuntimeEnvIntoRunCreate(runCreate);
655
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/runs`, {
656
+ method: "POST",
657
+ headers,
658
+ body: serializePayloadForTracing(mergedRunCreateParam),
659
+ signal: AbortSignal.timeout(this.timeout_ms),
660
+ ...this.fetchOptions,
661
+ });
662
+ await raiseForStatus(response, "create run", true);
663
+ }
664
+ /**
665
+ * Batch ingest/upsert multiple runs in the Langsmith system.
666
+ * @param runs
667
+ */
668
+ async batchIngestRuns({ runCreates, runUpdates, }) {
669
+ if (runCreates === undefined && runUpdates === undefined) {
670
+ return;
671
+ }
672
+ let preparedCreateParams = runCreates?.map((create) => this.prepareRunCreateOrUpdateInputs(create)) ?? [];
673
+ let preparedUpdateParams = runUpdates?.map((update) => this.prepareRunCreateOrUpdateInputs(update)) ?? [];
674
+ if (preparedCreateParams.length > 0 && preparedUpdateParams.length > 0) {
675
+ const createById = preparedCreateParams.reduce((params, run) => {
676
+ if (!run.id) {
677
+ return params;
678
+ }
679
+ params[run.id] = run;
680
+ return params;
681
+ }, {});
682
+ const standaloneUpdates = [];
683
+ for (const updateParam of preparedUpdateParams) {
684
+ if (updateParam.id !== undefined && createById[updateParam.id]) {
685
+ createById[updateParam.id] = {
686
+ ...createById[updateParam.id],
687
+ ...updateParam,
688
+ };
689
+ }
690
+ else {
691
+ standaloneUpdates.push(updateParam);
692
+ }
693
+ }
694
+ preparedCreateParams = Object.values(createById);
695
+ preparedUpdateParams = standaloneUpdates;
696
+ }
697
+ const rawBatch = {
698
+ post: this._filterForSampling(preparedCreateParams),
699
+ patch: this._filterForSampling(preparedUpdateParams, true),
700
+ };
701
+ if (!rawBatch.post.length && !rawBatch.patch.length) {
702
+ return;
703
+ }
704
+ const batchChunks = {
705
+ post: [],
706
+ patch: [],
707
+ };
708
+ for (const k of ["post", "patch"]) {
709
+ const key = k;
710
+ const batchItems = rawBatch[key].reverse();
711
+ let batchItem = batchItems.pop();
712
+ while (batchItem !== undefined) {
713
+ batchChunks[key].push(batchItem);
714
+ batchItem = batchItems.pop();
715
+ }
716
+ }
717
+ if (batchChunks.post.length > 0 || batchChunks.patch.length > 0) {
718
+ await this._postBatchIngestRuns(serializePayloadForTracing(batchChunks));
719
+ }
720
+ }
721
+ async _postBatchIngestRuns(body) {
722
+ const headers = {
723
+ ...this.headers,
724
+ "Content-Type": "application/json",
725
+ Accept: "application/json",
726
+ };
727
+ const response = await this.batchIngestCaller.call(_getFetchImplementation(), `${this.apiUrl}/runs/batch`, {
728
+ method: "POST",
729
+ headers,
730
+ body: body,
731
+ signal: AbortSignal.timeout(this.timeout_ms),
732
+ ...this.fetchOptions,
733
+ });
734
+ await raiseForStatus(response, "batch create run", true);
735
+ }
736
+ /**
737
+ * Batch ingest/upsert multiple runs in the Langsmith system.
738
+ * @param runs
739
+ */
740
+ async multipartIngestRuns({ runCreates, runUpdates, }) {
741
+ if (runCreates === undefined && runUpdates === undefined) {
742
+ return;
743
+ }
744
+ // transform and convert to dicts
745
+ const allAttachments = {};
746
+ let preparedCreateParams = [];
747
+ for (const create of runCreates ?? []) {
748
+ const preparedCreate = this.prepareRunCreateOrUpdateInputs(create);
749
+ if (preparedCreate.id !== undefined &&
750
+ preparedCreate.attachments !== undefined) {
751
+ allAttachments[preparedCreate.id] = preparedCreate.attachments;
752
+ }
753
+ delete preparedCreate.attachments;
754
+ preparedCreateParams.push(preparedCreate);
755
+ }
756
+ let preparedUpdateParams = [];
757
+ for (const update of runUpdates ?? []) {
758
+ preparedUpdateParams.push(this.prepareRunCreateOrUpdateInputs(update));
759
+ }
760
+ // require trace_id and dotted_order
761
+ const invalidRunCreate = preparedCreateParams.find((runCreate) => {
762
+ return (runCreate.trace_id === undefined || runCreate.dotted_order === undefined);
763
+ });
764
+ if (invalidRunCreate !== undefined) {
765
+ throw new Error(`Multipart ingest requires "trace_id" and "dotted_order" to be set when creating a run`);
766
+ }
767
+ const invalidRunUpdate = preparedUpdateParams.find((runUpdate) => {
768
+ return (runUpdate.trace_id === undefined || runUpdate.dotted_order === undefined);
769
+ });
770
+ if (invalidRunUpdate !== undefined) {
771
+ throw new Error(`Multipart ingest requires "trace_id" and "dotted_order" to be set when updating a run`);
772
+ }
773
+ // combine post and patch dicts where possible
774
+ if (preparedCreateParams.length > 0 && preparedUpdateParams.length > 0) {
775
+ const createById = preparedCreateParams.reduce((params, run) => {
776
+ if (!run.id) {
777
+ return params;
778
+ }
779
+ params[run.id] = run;
780
+ return params;
781
+ }, {});
782
+ const standaloneUpdates = [];
783
+ for (const updateParam of preparedUpdateParams) {
784
+ if (updateParam.id !== undefined && createById[updateParam.id]) {
785
+ createById[updateParam.id] = {
786
+ ...createById[updateParam.id],
787
+ ...updateParam,
788
+ };
789
+ }
790
+ else {
791
+ standaloneUpdates.push(updateParam);
792
+ }
793
+ }
794
+ preparedCreateParams = Object.values(createById);
795
+ preparedUpdateParams = standaloneUpdates;
796
+ }
797
+ if (preparedCreateParams.length === 0 &&
798
+ preparedUpdateParams.length === 0) {
799
+ return;
800
+ }
801
+ // send the runs in multipart requests
802
+ const accumulatedContext = [];
803
+ const accumulatedParts = [];
804
+ for (const [method, payloads] of [
805
+ ["post", preparedCreateParams],
806
+ ["patch", preparedUpdateParams],
807
+ ]) {
808
+ for (const originalPayload of payloads) {
809
+ // collect fields to be sent as separate parts
810
+ const { inputs, outputs, events, attachments, ...payload } = originalPayload;
811
+ const fields = { inputs, outputs, events };
812
+ // encode the main run payload
813
+ const stringifiedPayload = serializePayloadForTracing(payload);
814
+ accumulatedParts.push({
815
+ name: `${method}.${payload.id}`,
816
+ payload: new Blob([stringifiedPayload], {
817
+ type: `application/json; length=${stringifiedPayload.length}`, // encoding=gzip
818
+ }),
819
+ });
820
+ // encode the fields we collected
821
+ for (const [key, value] of Object.entries(fields)) {
822
+ if (value === undefined) {
823
+ continue;
824
+ }
825
+ const stringifiedValue = serializePayloadForTracing(value);
826
+ accumulatedParts.push({
827
+ name: `${method}.${payload.id}.${key}`,
828
+ payload: new Blob([stringifiedValue], {
829
+ type: `application/json; length=${stringifiedValue.length}`,
830
+ }),
831
+ });
832
+ }
833
+ // encode the attachments
834
+ if (payload.id !== undefined) {
835
+ const attachments = allAttachments[payload.id];
836
+ if (attachments) {
837
+ delete allAttachments[payload.id];
838
+ for (const [name, attachment] of Object.entries(attachments)) {
839
+ let contentType;
840
+ let content;
841
+ if (Array.isArray(attachment)) {
842
+ [contentType, content] = attachment;
843
+ }
844
+ else {
845
+ contentType = attachment.mimeType;
846
+ content = attachment.data;
847
+ }
848
+ // Validate that the attachment name doesn't contain a '.'
849
+ if (name.includes(".")) {
850
+ console.warn(`Skipping attachment '${name}' for run ${payload.id}: Invalid attachment name. ` +
851
+ `Attachment names must not contain periods ('.'). Please rename the attachment and try again.`);
852
+ continue;
853
+ }
854
+ accumulatedParts.push({
855
+ name: `attachment.${payload.id}.${name}`,
856
+ payload: new Blob([content], {
857
+ type: `${contentType}; length=${content.byteLength}`,
858
+ }),
859
+ });
860
+ }
861
+ }
862
+ }
863
+ // compute context
864
+ accumulatedContext.push(`trace=${payload.trace_id},id=${payload.id}`);
865
+ }
866
+ }
867
+ await this._sendMultipartRequest(accumulatedParts, accumulatedContext.join("; "));
868
+ }
869
+ async _sendMultipartRequest(parts, context) {
870
+ try {
871
+ // Create multipart form data manually using Blobs
872
+ const boundary = "----LangSmithFormBoundary" + Math.random().toString(36).slice(2);
873
+ const chunks = [];
874
+ for (const part of parts) {
875
+ // Add field boundary
876
+ chunks.push(new Blob([`--${boundary}\r\n`]));
877
+ chunks.push(new Blob([
878
+ `Content-Disposition: form-data; name="${part.name}"\r\n`,
879
+ `Content-Type: ${part.payload.type}\r\n\r\n`,
880
+ ]));
881
+ chunks.push(part.payload);
882
+ chunks.push(new Blob(["\r\n"]));
883
+ }
884
+ // Add final boundary
885
+ chunks.push(new Blob([`--${boundary}--\r\n`]));
886
+ // Combine all chunks into a single Blob
887
+ const body = new Blob(chunks);
888
+ // Convert Blob to ArrayBuffer for compatibility
889
+ const arrayBuffer = await body.arrayBuffer();
890
+ const res = await this.batchIngestCaller.call(_getFetchImplementation(), `${this.apiUrl}/runs/multipart`, {
891
+ method: "POST",
892
+ headers: {
893
+ ...this.headers,
894
+ "Content-Type": `multipart/form-data; boundary=${boundary}`,
895
+ },
896
+ body: arrayBuffer,
897
+ signal: AbortSignal.timeout(this.timeout_ms),
898
+ ...this.fetchOptions,
899
+ });
900
+ await raiseForStatus(res, "ingest multipart runs", true);
901
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
902
+ }
903
+ catch (e) {
904
+ console.warn(`${e.message.trim()}\n\nContext: ${context}`);
905
+ }
906
+ }
907
+ async updateRun(runId, run) {
908
+ assertUuid(runId);
909
+ if (run.inputs) {
910
+ run.inputs = this.processInputs(run.inputs);
911
+ }
912
+ if (run.outputs) {
913
+ run.outputs = this.processOutputs(run.outputs);
914
+ }
915
+ // TODO: Untangle types
916
+ const data = { ...run, id: runId };
917
+ if (!this._filterForSampling([data], true).length) {
918
+ return;
919
+ }
920
+ if (this.autoBatchTracing &&
921
+ data.trace_id !== undefined &&
922
+ data.dotted_order !== undefined) {
923
+ if (run.end_time !== undefined &&
924
+ data.parent_run_id === undefined &&
925
+ this.blockOnRootRunFinalization &&
926
+ !this.manualFlushMode) {
927
+ // Trigger batches as soon as a root trace ends and wait to ensure trace finishes
928
+ // in serverless environments.
929
+ await this.processRunOperation({ action: "update", item: data }).catch(console.error);
930
+ return;
931
+ }
932
+ else {
933
+ void this.processRunOperation({ action: "update", item: data }).catch(console.error);
934
+ }
935
+ return;
936
+ }
937
+ const headers = { ...this.headers, "Content-Type": "application/json" };
938
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/runs/${runId}`, {
939
+ method: "PATCH",
940
+ headers,
941
+ body: serializePayloadForTracing(run),
942
+ signal: AbortSignal.timeout(this.timeout_ms),
943
+ ...this.fetchOptions,
944
+ });
945
+ await raiseForStatus(response, "update run", true);
946
+ }
947
+ async readRun(runId, { loadChildRuns } = { loadChildRuns: false }) {
948
+ assertUuid(runId);
949
+ let run = await this._get(`/runs/${runId}`);
950
+ if (loadChildRuns && run.child_run_ids) {
951
+ run = await this._loadChildRuns(run);
952
+ }
953
+ return run;
954
+ }
955
+ async getRunUrl({ runId, run, projectOpts, }) {
956
+ if (run !== undefined) {
957
+ let sessionId;
958
+ if (run.session_id) {
959
+ sessionId = run.session_id;
960
+ }
961
+ else if (projectOpts?.projectName) {
962
+ sessionId = (await this.readProject({ projectName: projectOpts?.projectName })).id;
963
+ }
964
+ else if (projectOpts?.projectId) {
965
+ sessionId = projectOpts?.projectId;
966
+ }
967
+ else {
968
+ const project = await this.readProject({
969
+ projectName: getLangSmithEnvironmentVariable("PROJECT") || "default",
970
+ });
971
+ sessionId = project.id;
972
+ }
973
+ const tenantId = await this._getTenantId();
974
+ return `${this.getHostUrl()}/o/${tenantId}/projects/p/${sessionId}/r/${run.id}?poll=true`;
975
+ }
976
+ else if (runId !== undefined) {
977
+ const run_ = await this.readRun(runId);
978
+ if (!run_.app_path) {
979
+ throw new Error(`Run ${runId} has no app_path`);
980
+ }
981
+ const baseUrl = this.getHostUrl();
982
+ return `${baseUrl}${run_.app_path}`;
983
+ }
984
+ else {
985
+ throw new Error("Must provide either runId or run");
986
+ }
987
+ }
988
+ async _loadChildRuns(run) {
989
+ const childRuns = await toArray(this.listRuns({ id: run.child_run_ids }));
990
+ const treemap = {};
991
+ const runs = {};
992
+ // TODO: make dotted order required when the migration finishes
993
+ childRuns.sort((a, b) => (a?.dotted_order ?? "").localeCompare(b?.dotted_order ?? ""));
994
+ for (const childRun of childRuns) {
995
+ if (childRun.parent_run_id === null ||
996
+ childRun.parent_run_id === undefined) {
997
+ throw new Error(`Child run ${childRun.id} has no parent`);
998
+ }
999
+ if (!(childRun.parent_run_id in treemap)) {
1000
+ treemap[childRun.parent_run_id] = [];
1001
+ }
1002
+ treemap[childRun.parent_run_id].push(childRun);
1003
+ runs[childRun.id] = childRun;
1004
+ }
1005
+ run.child_runs = treemap[run.id] || [];
1006
+ for (const runId in treemap) {
1007
+ if (runId !== run.id) {
1008
+ runs[runId].child_runs = treemap[runId];
1009
+ }
1010
+ }
1011
+ return run;
1012
+ }
1013
+ /**
1014
+ * List runs from the LangSmith server.
1015
+ * @param projectId - The ID of the project to filter by.
1016
+ * @param projectName - The name of the project to filter by.
1017
+ * @param parentRunId - The ID of the parent run to filter by.
1018
+ * @param traceId - The ID of the trace to filter by.
1019
+ * @param referenceExampleId - The ID of the reference example to filter by.
1020
+ * @param startTime - The start time to filter by.
1021
+ * @param isRoot - Indicates whether to only return root runs.
1022
+ * @param runType - The run type to filter by.
1023
+ * @param error - Indicates whether to filter by error runs.
1024
+ * @param id - The ID of the run to filter by.
1025
+ * @param query - The query string to filter by.
1026
+ * @param filter - The filter string to apply to the run spans.
1027
+ * @param traceFilter - The filter string to apply on the root run of the trace.
1028
+ * @param treeFilter - The filter string to apply on other runs in the trace.
1029
+ * @param limit - The maximum number of runs to retrieve.
1030
+ * @returns {AsyncIterable<Run>} - The runs.
1031
+ *
1032
+ * @example
1033
+ * // List all runs in a project
1034
+ * const projectRuns = client.listRuns({ projectName: "<your_project>" });
1035
+ *
1036
+ * @example
1037
+ * // List LLM and Chat runs in the last 24 hours
1038
+ * const todaysLLMRuns = client.listRuns({
1039
+ * projectName: "<your_project>",
1040
+ * start_time: new Date(Date.now() - 24 * 60 * 60 * 1000),
1041
+ * run_type: "llm",
1042
+ * });
1043
+ *
1044
+ * @example
1045
+ * // List traces in a project
1046
+ * const rootRuns = client.listRuns({
1047
+ * projectName: "<your_project>",
1048
+ * execution_order: 1,
1049
+ * });
1050
+ *
1051
+ * @example
1052
+ * // List runs without errors
1053
+ * const correctRuns = client.listRuns({
1054
+ * projectName: "<your_project>",
1055
+ * error: false,
1056
+ * });
1057
+ *
1058
+ * @example
1059
+ * // List runs by run ID
1060
+ * const runIds = [
1061
+ * "a36092d2-4ad5-4fb4-9c0d-0dba9a2ed836",
1062
+ * "9398e6be-964f-4aa4-8ae9-ad78cd4b7074",
1063
+ * ];
1064
+ * const selectedRuns = client.listRuns({ run_ids: runIds });
1065
+ *
1066
+ * @example
1067
+ * // List all "chain" type runs that took more than 10 seconds and had `total_tokens` greater than 5000
1068
+ * const chainRuns = client.listRuns({
1069
+ * projectName: "<your_project>",
1070
+ * filter: 'and(eq(run_type, "chain"), gt(latency, 10), gt(total_tokens, 5000))',
1071
+ * });
1072
+ *
1073
+ * @example
1074
+ * // List all runs called "extractor" whose root of the trace was assigned feedback "user_score" score of 1
1075
+ * const goodExtractorRuns = client.listRuns({
1076
+ * projectName: "<your_project>",
1077
+ * filter: 'eq(name, "extractor")',
1078
+ * traceFilter: 'and(eq(feedback_key, "user_score"), eq(feedback_score, 1))',
1079
+ * });
1080
+ *
1081
+ * @example
1082
+ * // List all runs that started after a specific timestamp and either have "error" not equal to null or a "Correctness" feedback score equal to 0
1083
+ * const complexRuns = client.listRuns({
1084
+ * projectName: "<your_project>",
1085
+ * filter: 'and(gt(start_time, "2023-07-15T12:34:56Z"), or(neq(error, null), and(eq(feedback_key, "Correctness"), eq(feedback_score, 0.0))))',
1086
+ * });
1087
+ *
1088
+ * @example
1089
+ * // List all runs where `tags` include "experimental" or "beta" and `latency` is greater than 2 seconds
1090
+ * const taggedRuns = client.listRuns({
1091
+ * projectName: "<your_project>",
1092
+ * filter: 'and(or(has(tags, "experimental"), has(tags, "beta")), gt(latency, 2))',
1093
+ * });
1094
+ */
1095
+ async *listRuns(props) {
1096
+ const { projectId, projectName, parentRunId, traceId, referenceExampleId, startTime, executionOrder, isRoot, runType, error, id, query, filter, traceFilter, treeFilter, limit, select, } = props;
1097
+ let projectIds = [];
1098
+ if (projectId) {
1099
+ projectIds = Array.isArray(projectId) ? projectId : [projectId];
1100
+ }
1101
+ if (projectName) {
1102
+ const projectNames = Array.isArray(projectName)
1103
+ ? projectName
1104
+ : [projectName];
1105
+ const projectIds_ = await Promise.all(projectNames.map((name) => this.readProject({ projectName: name }).then((project) => project.id)));
1106
+ projectIds.push(...projectIds_);
1107
+ }
1108
+ const default_select = [
1109
+ "app_path",
1110
+ "child_run_ids",
1111
+ "completion_cost",
1112
+ "completion_tokens",
1113
+ "dotted_order",
1114
+ "end_time",
1115
+ "error",
1116
+ "events",
1117
+ "extra",
1118
+ "feedback_stats",
1119
+ "first_token_time",
1120
+ "id",
1121
+ "inputs",
1122
+ "name",
1123
+ "outputs",
1124
+ "parent_run_id",
1125
+ "parent_run_ids",
1126
+ "prompt_cost",
1127
+ "prompt_tokens",
1128
+ "reference_example_id",
1129
+ "run_type",
1130
+ "session_id",
1131
+ "start_time",
1132
+ "status",
1133
+ "tags",
1134
+ "total_cost",
1135
+ "total_tokens",
1136
+ "trace_id",
1137
+ ];
1138
+ const body = {
1139
+ session: projectIds.length ? projectIds : null,
1140
+ run_type: runType,
1141
+ reference_example: referenceExampleId,
1142
+ query,
1143
+ filter,
1144
+ trace_filter: traceFilter,
1145
+ tree_filter: treeFilter,
1146
+ execution_order: executionOrder,
1147
+ parent_run: parentRunId,
1148
+ start_time: startTime ? startTime.toISOString() : null,
1149
+ error,
1150
+ id,
1151
+ limit,
1152
+ trace: traceId,
1153
+ select: select ? select : default_select,
1154
+ is_root: isRoot,
1155
+ };
1156
+ let runsYielded = 0;
1157
+ for await (const runs of this._getCursorPaginatedList("/runs/query", body)) {
1158
+ if (limit) {
1159
+ if (runsYielded >= limit) {
1160
+ break;
1161
+ }
1162
+ if (runs.length + runsYielded > limit) {
1163
+ const newRuns = runs.slice(0, limit - runsYielded);
1164
+ yield* newRuns;
1165
+ break;
1166
+ }
1167
+ runsYielded += runs.length;
1168
+ yield* runs;
1169
+ }
1170
+ else {
1171
+ yield* runs;
1172
+ }
1173
+ }
1174
+ }
1175
+ async getRunStats({ id, trace, parentRun, runType, projectNames, projectIds, referenceExampleIds, startTime, endTime, error, query, filter, traceFilter, treeFilter, isRoot, dataSourceType, }) {
1176
+ let projectIds_ = projectIds || [];
1177
+ if (projectNames) {
1178
+ projectIds_ = [
1179
+ ...(projectIds || []),
1180
+ ...(await Promise.all(projectNames.map((name) => this.readProject({ projectName: name }).then((project) => project.id)))),
1181
+ ];
1182
+ }
1183
+ const payload = {
1184
+ id,
1185
+ trace,
1186
+ parent_run: parentRun,
1187
+ run_type: runType,
1188
+ session: projectIds_,
1189
+ reference_example: referenceExampleIds,
1190
+ start_time: startTime,
1191
+ end_time: endTime,
1192
+ error,
1193
+ query,
1194
+ filter,
1195
+ trace_filter: traceFilter,
1196
+ tree_filter: treeFilter,
1197
+ is_root: isRoot,
1198
+ data_source_type: dataSourceType,
1199
+ };
1200
+ // Remove undefined values from the payload
1201
+ const filteredPayload = Object.fromEntries(Object.entries(payload).filter(([_, value]) => value !== undefined));
1202
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/runs/stats`, {
1203
+ method: "POST",
1204
+ headers: this.headers,
1205
+ body: JSON.stringify(filteredPayload),
1206
+ signal: AbortSignal.timeout(this.timeout_ms),
1207
+ ...this.fetchOptions,
1208
+ });
1209
+ const result = await response.json();
1210
+ return result;
1211
+ }
1212
+ async shareRun(runId, { shareId } = {}) {
1213
+ const data = {
1214
+ run_id: runId,
1215
+ share_token: shareId || uuid.v4(),
1216
+ };
1217
+ assertUuid(runId);
1218
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/runs/${runId}/share`, {
1219
+ method: "PUT",
1220
+ headers: this.headers,
1221
+ body: JSON.stringify(data),
1222
+ signal: AbortSignal.timeout(this.timeout_ms),
1223
+ ...this.fetchOptions,
1224
+ });
1225
+ const result = await response.json();
1226
+ if (result === null || !("share_token" in result)) {
1227
+ throw new Error("Invalid response from server");
1228
+ }
1229
+ return `${this.getHostUrl()}/public/${result["share_token"]}/r`;
1230
+ }
1231
+ async unshareRun(runId) {
1232
+ assertUuid(runId);
1233
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/runs/${runId}/share`, {
1234
+ method: "DELETE",
1235
+ headers: this.headers,
1236
+ signal: AbortSignal.timeout(this.timeout_ms),
1237
+ ...this.fetchOptions,
1238
+ });
1239
+ await raiseForStatus(response, "unshare run", true);
1240
+ }
1241
+ async readRunSharedLink(runId) {
1242
+ assertUuid(runId);
1243
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/runs/${runId}/share`, {
1244
+ method: "GET",
1245
+ headers: this.headers,
1246
+ signal: AbortSignal.timeout(this.timeout_ms),
1247
+ ...this.fetchOptions,
1248
+ });
1249
+ const result = await response.json();
1250
+ if (result === null || !("share_token" in result)) {
1251
+ return undefined;
1252
+ }
1253
+ return `${this.getHostUrl()}/public/${result["share_token"]}/r`;
1254
+ }
1255
+ async listSharedRuns(shareToken, { runIds, } = {}) {
1256
+ const queryParams = new URLSearchParams({
1257
+ share_token: shareToken,
1258
+ });
1259
+ if (runIds !== undefined) {
1260
+ for (const runId of runIds) {
1261
+ queryParams.append("id", runId);
1262
+ }
1263
+ }
1264
+ assertUuid(shareToken);
1265
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/public/${shareToken}/runs${queryParams}`, {
1266
+ method: "GET",
1267
+ headers: this.headers,
1268
+ signal: AbortSignal.timeout(this.timeout_ms),
1269
+ ...this.fetchOptions,
1270
+ });
1271
+ const runs = await response.json();
1272
+ return runs;
1273
+ }
1274
+ async readDatasetSharedSchema(datasetId, datasetName) {
1275
+ if (!datasetId && !datasetName) {
1276
+ throw new Error("Either datasetId or datasetName must be given");
1277
+ }
1278
+ if (!datasetId) {
1279
+ const dataset = await this.readDataset({ datasetName });
1280
+ datasetId = dataset.id;
1281
+ }
1282
+ assertUuid(datasetId);
1283
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/datasets/${datasetId}/share`, {
1284
+ method: "GET",
1285
+ headers: this.headers,
1286
+ signal: AbortSignal.timeout(this.timeout_ms),
1287
+ ...this.fetchOptions,
1288
+ });
1289
+ const shareSchema = await response.json();
1290
+ shareSchema.url = `${this.getHostUrl()}/public/${shareSchema.share_token}/d`;
1291
+ return shareSchema;
1292
+ }
1293
+ async shareDataset(datasetId, datasetName) {
1294
+ if (!datasetId && !datasetName) {
1295
+ throw new Error("Either datasetId or datasetName must be given");
1296
+ }
1297
+ if (!datasetId) {
1298
+ const dataset = await this.readDataset({ datasetName });
1299
+ datasetId = dataset.id;
1300
+ }
1301
+ const data = {
1302
+ dataset_id: datasetId,
1303
+ };
1304
+ assertUuid(datasetId);
1305
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/datasets/${datasetId}/share`, {
1306
+ method: "PUT",
1307
+ headers: this.headers,
1308
+ body: JSON.stringify(data),
1309
+ signal: AbortSignal.timeout(this.timeout_ms),
1310
+ ...this.fetchOptions,
1311
+ });
1312
+ const shareSchema = await response.json();
1313
+ shareSchema.url = `${this.getHostUrl()}/public/${shareSchema.share_token}/d`;
1314
+ return shareSchema;
1315
+ }
1316
+ async unshareDataset(datasetId) {
1317
+ assertUuid(datasetId);
1318
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/datasets/${datasetId}/share`, {
1319
+ method: "DELETE",
1320
+ headers: this.headers,
1321
+ signal: AbortSignal.timeout(this.timeout_ms),
1322
+ ...this.fetchOptions,
1323
+ });
1324
+ await raiseForStatus(response, "unshare dataset", true);
1325
+ }
1326
+ async readSharedDataset(shareToken) {
1327
+ assertUuid(shareToken);
1328
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/public/${shareToken}/datasets`, {
1329
+ method: "GET",
1330
+ headers: this.headers,
1331
+ signal: AbortSignal.timeout(this.timeout_ms),
1332
+ ...this.fetchOptions,
1333
+ });
1334
+ const dataset = await response.json();
1335
+ return dataset;
1336
+ }
1337
+ /**
1338
+ * Get shared examples.
1339
+ *
1340
+ * @param {string} shareToken The share token to get examples for. A share token is the UUID (or LangSmith URL, including UUID) generated when explicitly marking an example as public.
1341
+ * @param {Object} [options] Additional options for listing the examples.
1342
+ * @param {string[] | undefined} [options.exampleIds] A list of example IDs to filter by.
1343
+ * @returns {Promise<Example[]>} The shared examples.
1344
+ */
1345
+ async listSharedExamples(shareToken, options) {
1346
+ const params = {};
1347
+ if (options?.exampleIds) {
1348
+ params.id = options.exampleIds;
1349
+ }
1350
+ const urlParams = new URLSearchParams();
1351
+ Object.entries(params).forEach(([key, value]) => {
1352
+ if (Array.isArray(value)) {
1353
+ value.forEach((v) => urlParams.append(key, v));
1354
+ }
1355
+ else {
1356
+ urlParams.append(key, value);
1357
+ }
1358
+ });
1359
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/public/${shareToken}/examples?${urlParams.toString()}`, {
1360
+ method: "GET",
1361
+ headers: this.headers,
1362
+ signal: AbortSignal.timeout(this.timeout_ms),
1363
+ ...this.fetchOptions,
1364
+ });
1365
+ const result = await response.json();
1366
+ if (!response.ok) {
1367
+ if ("detail" in result) {
1368
+ throw new Error(`Failed to list shared examples.\nStatus: ${response.status}\nMessage: ${result.detail.join("\n")}`);
1369
+ }
1370
+ throw new Error(`Failed to list shared examples: ${response.status} ${response.statusText}`);
1371
+ }
1372
+ return result.map((example) => ({
1373
+ ...example,
1374
+ _hostUrl: this.getHostUrl(),
1375
+ }));
1376
+ }
1377
+ async createProject({ projectName, description = null, metadata = null, upsert = false, projectExtra = null, referenceDatasetId = null, }) {
1378
+ const upsert_ = upsert ? `?upsert=true` : "";
1379
+ const endpoint = `${this.apiUrl}/sessions${upsert_}`;
1380
+ const extra = projectExtra || {};
1381
+ if (metadata) {
1382
+ extra["metadata"] = metadata;
1383
+ }
1384
+ const body = {
1385
+ name: projectName,
1386
+ extra,
1387
+ description,
1388
+ };
1389
+ if (referenceDatasetId !== null) {
1390
+ body["reference_dataset_id"] = referenceDatasetId;
1391
+ }
1392
+ const response = await this.caller.call(_getFetchImplementation(), endpoint, {
1393
+ method: "POST",
1394
+ headers: { ...this.headers, "Content-Type": "application/json" },
1395
+ body: JSON.stringify(body),
1396
+ signal: AbortSignal.timeout(this.timeout_ms),
1397
+ ...this.fetchOptions,
1398
+ });
1399
+ await raiseForStatus(response, "create project");
1400
+ const result = await response.json();
1401
+ return result;
1402
+ }
1403
+ async updateProject(projectId, { name = null, description = null, metadata = null, projectExtra = null, endTime = null, }) {
1404
+ const endpoint = `${this.apiUrl}/sessions/${projectId}`;
1405
+ let extra = projectExtra;
1406
+ if (metadata) {
1407
+ extra = { ...(extra || {}), metadata };
1408
+ }
1409
+ const body = {
1410
+ name,
1411
+ extra,
1412
+ description,
1413
+ end_time: endTime ? new Date(endTime).toISOString() : null,
1414
+ };
1415
+ const response = await this.caller.call(_getFetchImplementation(), endpoint, {
1416
+ method: "PATCH",
1417
+ headers: { ...this.headers, "Content-Type": "application/json" },
1418
+ body: JSON.stringify(body),
1419
+ signal: AbortSignal.timeout(this.timeout_ms),
1420
+ ...this.fetchOptions,
1421
+ });
1422
+ await raiseForStatus(response, "update project");
1423
+ const result = await response.json();
1424
+ return result;
1425
+ }
1426
+ async hasProject({ projectId, projectName, }) {
1427
+ // TODO: Add a head request
1428
+ let path = "/sessions";
1429
+ const params = new URLSearchParams();
1430
+ if (projectId !== undefined && projectName !== undefined) {
1431
+ throw new Error("Must provide either projectName or projectId, not both");
1432
+ }
1433
+ else if (projectId !== undefined) {
1434
+ assertUuid(projectId);
1435
+ path += `/${projectId}`;
1436
+ }
1437
+ else if (projectName !== undefined) {
1438
+ params.append("name", projectName);
1439
+ }
1440
+ else {
1441
+ throw new Error("Must provide projectName or projectId");
1442
+ }
1443
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}${path}?${params}`, {
1444
+ method: "GET",
1445
+ headers: this.headers,
1446
+ signal: AbortSignal.timeout(this.timeout_ms),
1447
+ ...this.fetchOptions,
1448
+ });
1449
+ // consume the response body to release the connection
1450
+ // https://undici.nodejs.org/#/?id=garbage-collection
1451
+ try {
1452
+ const result = await response.json();
1453
+ if (!response.ok) {
1454
+ return false;
1455
+ }
1456
+ // If it's OK and we're querying by name, need to check the list is not empty
1457
+ if (Array.isArray(result)) {
1458
+ return result.length > 0;
1459
+ }
1460
+ // projectId querying
1461
+ return true;
1462
+ }
1463
+ catch (e) {
1464
+ return false;
1465
+ }
1466
+ }
1467
+ async readProject({ projectId, projectName, includeStats, }) {
1468
+ let path = "/sessions";
1469
+ const params = new URLSearchParams();
1470
+ if (projectId !== undefined && projectName !== undefined) {
1471
+ throw new Error("Must provide either projectName or projectId, not both");
1472
+ }
1473
+ else if (projectId !== undefined) {
1474
+ assertUuid(projectId);
1475
+ path += `/${projectId}`;
1476
+ }
1477
+ else if (projectName !== undefined) {
1478
+ params.append("name", projectName);
1479
+ }
1480
+ else {
1481
+ throw new Error("Must provide projectName or projectId");
1482
+ }
1483
+ if (includeStats !== undefined) {
1484
+ params.append("include_stats", includeStats.toString());
1485
+ }
1486
+ const response = await this._get(path, params);
1487
+ let result;
1488
+ if (Array.isArray(response)) {
1489
+ if (response.length === 0) {
1490
+ throw new Error(`Project[id=${projectId}, name=${projectName}] not found`);
1491
+ }
1492
+ result = response[0];
1493
+ }
1494
+ else {
1495
+ result = response;
1496
+ }
1497
+ return result;
1498
+ }
1499
+ async getProjectUrl({ projectId, projectName, }) {
1500
+ if (projectId === undefined && projectName === undefined) {
1501
+ throw new Error("Must provide either projectName or projectId");
1502
+ }
1503
+ const project = await this.readProject({ projectId, projectName });
1504
+ const tenantId = await this._getTenantId();
1505
+ return `${this.getHostUrl()}/o/${tenantId}/projects/p/${project.id}`;
1506
+ }
1507
+ async getDatasetUrl({ datasetId, datasetName, }) {
1508
+ if (datasetId === undefined && datasetName === undefined) {
1509
+ throw new Error("Must provide either datasetName or datasetId");
1510
+ }
1511
+ const dataset = await this.readDataset({ datasetId, datasetName });
1512
+ const tenantId = await this._getTenantId();
1513
+ return `${this.getHostUrl()}/o/${tenantId}/datasets/${dataset.id}`;
1514
+ }
1515
+ async _getTenantId() {
1516
+ if (this._tenantId !== null) {
1517
+ return this._tenantId;
1518
+ }
1519
+ const queryParams = new URLSearchParams({ limit: "1" });
1520
+ for await (const projects of this._getPaginated("/sessions", queryParams)) {
1521
+ this._tenantId = projects[0].tenant_id;
1522
+ return projects[0].tenant_id;
1523
+ }
1524
+ throw new Error("No projects found to resolve tenant.");
1525
+ }
1526
+ async *listProjects({ projectIds, name, nameContains, referenceDatasetId, referenceDatasetName, referenceFree, metadata, } = {}) {
1527
+ const params = new URLSearchParams();
1528
+ if (projectIds !== undefined) {
1529
+ for (const projectId of projectIds) {
1530
+ params.append("id", projectId);
1531
+ }
1532
+ }
1533
+ if (name !== undefined) {
1534
+ params.append("name", name);
1535
+ }
1536
+ if (nameContains !== undefined) {
1537
+ params.append("name_contains", nameContains);
1538
+ }
1539
+ if (referenceDatasetId !== undefined) {
1540
+ params.append("reference_dataset", referenceDatasetId);
1541
+ }
1542
+ else if (referenceDatasetName !== undefined) {
1543
+ const dataset = await this.readDataset({
1544
+ datasetName: referenceDatasetName,
1545
+ });
1546
+ params.append("reference_dataset", dataset.id);
1547
+ }
1548
+ if (referenceFree !== undefined) {
1549
+ params.append("reference_free", referenceFree.toString());
1550
+ }
1551
+ if (metadata !== undefined) {
1552
+ params.append("metadata", JSON.stringify(metadata));
1553
+ }
1554
+ for await (const projects of this._getPaginated("/sessions", params)) {
1555
+ yield* projects;
1556
+ }
1557
+ }
1558
+ async deleteProject({ projectId, projectName, }) {
1559
+ let projectId_;
1560
+ if (projectId === undefined && projectName === undefined) {
1561
+ throw new Error("Must provide projectName or projectId");
1562
+ }
1563
+ else if (projectId !== undefined && projectName !== undefined) {
1564
+ throw new Error("Must provide either projectName or projectId, not both");
1565
+ }
1566
+ else if (projectId === undefined) {
1567
+ projectId_ = (await this.readProject({ projectName })).id;
1568
+ }
1569
+ else {
1570
+ projectId_ = projectId;
1571
+ }
1572
+ assertUuid(projectId_);
1573
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/sessions/${projectId_}`, {
1574
+ method: "DELETE",
1575
+ headers: this.headers,
1576
+ signal: AbortSignal.timeout(this.timeout_ms),
1577
+ ...this.fetchOptions,
1578
+ });
1579
+ await raiseForStatus(response, `delete session ${projectId_} (${projectName})`, true);
1580
+ }
1581
+ async uploadCsv({ csvFile, fileName, inputKeys, outputKeys, description, dataType, name, }) {
1582
+ const url = `${this.apiUrl}/datasets/upload`;
1583
+ const formData = new FormData();
1584
+ formData.append("file", csvFile, fileName);
1585
+ inputKeys.forEach((key) => {
1586
+ formData.append("input_keys", key);
1587
+ });
1588
+ outputKeys.forEach((key) => {
1589
+ formData.append("output_keys", key);
1590
+ });
1591
+ if (description) {
1592
+ formData.append("description", description);
1593
+ }
1594
+ if (dataType) {
1595
+ formData.append("data_type", dataType);
1596
+ }
1597
+ if (name) {
1598
+ formData.append("name", name);
1599
+ }
1600
+ const response = await this.caller.call(_getFetchImplementation(), url, {
1601
+ method: "POST",
1602
+ headers: this.headers,
1603
+ body: formData,
1604
+ signal: AbortSignal.timeout(this.timeout_ms),
1605
+ ...this.fetchOptions,
1606
+ });
1607
+ await raiseForStatus(response, "upload CSV");
1608
+ const result = await response.json();
1609
+ return result;
1610
+ }
1611
+ async createDataset(name, { description, dataType, inputsSchema, outputsSchema, metadata, } = {}) {
1612
+ const body = {
1613
+ name,
1614
+ description,
1615
+ extra: metadata ? { metadata } : undefined,
1616
+ };
1617
+ if (dataType) {
1618
+ body.data_type = dataType;
1619
+ }
1620
+ if (inputsSchema) {
1621
+ body.inputs_schema_definition = inputsSchema;
1622
+ }
1623
+ if (outputsSchema) {
1624
+ body.outputs_schema_definition = outputsSchema;
1625
+ }
1626
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/datasets`, {
1627
+ method: "POST",
1628
+ headers: { ...this.headers, "Content-Type": "application/json" },
1629
+ body: JSON.stringify(body),
1630
+ signal: AbortSignal.timeout(this.timeout_ms),
1631
+ ...this.fetchOptions,
1632
+ });
1633
+ await raiseForStatus(response, "create dataset");
1634
+ const result = await response.json();
1635
+ return result;
1636
+ }
1637
+ async readDataset({ datasetId, datasetName, }) {
1638
+ let path = "/datasets";
1639
+ // limit to 1 result
1640
+ const params = new URLSearchParams({ limit: "1" });
1641
+ if (datasetId !== undefined && datasetName !== undefined) {
1642
+ throw new Error("Must provide either datasetName or datasetId, not both");
1643
+ }
1644
+ else if (datasetId !== undefined) {
1645
+ assertUuid(datasetId);
1646
+ path += `/${datasetId}`;
1647
+ }
1648
+ else if (datasetName !== undefined) {
1649
+ params.append("name", datasetName);
1650
+ }
1651
+ else {
1652
+ throw new Error("Must provide datasetName or datasetId");
1653
+ }
1654
+ const response = await this._get(path, params);
1655
+ let result;
1656
+ if (Array.isArray(response)) {
1657
+ if (response.length === 0) {
1658
+ throw new Error(`Dataset[id=${datasetId}, name=${datasetName}] not found`);
1659
+ }
1660
+ result = response[0];
1661
+ }
1662
+ else {
1663
+ result = response;
1664
+ }
1665
+ return result;
1666
+ }
1667
+ async hasDataset({ datasetId, datasetName, }) {
1668
+ try {
1669
+ await this.readDataset({ datasetId, datasetName });
1670
+ return true;
1671
+ }
1672
+ catch (e) {
1673
+ if (
1674
+ // eslint-disable-next-line no-instanceof/no-instanceof
1675
+ e instanceof Error &&
1676
+ e.message.toLocaleLowerCase().includes("not found")) {
1677
+ return false;
1678
+ }
1679
+ throw e;
1680
+ }
1681
+ }
1682
+ async diffDatasetVersions({ datasetId, datasetName, fromVersion, toVersion, }) {
1683
+ let datasetId_ = datasetId;
1684
+ if (datasetId_ === undefined && datasetName === undefined) {
1685
+ throw new Error("Must provide either datasetName or datasetId");
1686
+ }
1687
+ else if (datasetId_ !== undefined && datasetName !== undefined) {
1688
+ throw new Error("Must provide either datasetName or datasetId, not both");
1689
+ }
1690
+ else if (datasetId_ === undefined) {
1691
+ const dataset = await this.readDataset({ datasetName });
1692
+ datasetId_ = dataset.id;
1693
+ }
1694
+ const urlParams = new URLSearchParams({
1695
+ from_version: typeof fromVersion === "string"
1696
+ ? fromVersion
1697
+ : fromVersion.toISOString(),
1698
+ to_version: typeof toVersion === "string" ? toVersion : toVersion.toISOString(),
1699
+ });
1700
+ const response = await this._get(`/datasets/${datasetId_}/versions/diff`, urlParams);
1701
+ return response;
1702
+ }
1703
+ async readDatasetOpenaiFinetuning({ datasetId, datasetName, }) {
1704
+ const path = "/datasets";
1705
+ if (datasetId !== undefined) {
1706
+ // do nothing
1707
+ }
1708
+ else if (datasetName !== undefined) {
1709
+ datasetId = (await this.readDataset({ datasetName })).id;
1710
+ }
1711
+ else {
1712
+ throw new Error("Must provide either datasetName or datasetId");
1713
+ }
1714
+ const response = await this._getResponse(`${path}/${datasetId}/openai_ft`);
1715
+ const datasetText = await response.text();
1716
+ const dataset = datasetText
1717
+ .trim()
1718
+ .split("\n")
1719
+ .map((line) => JSON.parse(line));
1720
+ return dataset;
1721
+ }
1722
+ async *listDatasets({ limit = 100, offset = 0, datasetIds, datasetName, datasetNameContains, metadata, } = {}) {
1723
+ const path = "/datasets";
1724
+ const params = new URLSearchParams({
1725
+ limit: limit.toString(),
1726
+ offset: offset.toString(),
1727
+ });
1728
+ if (datasetIds !== undefined) {
1729
+ for (const id_ of datasetIds) {
1730
+ params.append("id", id_);
1731
+ }
1732
+ }
1733
+ if (datasetName !== undefined) {
1734
+ params.append("name", datasetName);
1735
+ }
1736
+ if (datasetNameContains !== undefined) {
1737
+ params.append("name_contains", datasetNameContains);
1738
+ }
1739
+ if (metadata !== undefined) {
1740
+ params.append("metadata", JSON.stringify(metadata));
1741
+ }
1742
+ for await (const datasets of this._getPaginated(path, params)) {
1743
+ yield* datasets;
1744
+ }
1745
+ }
1746
+ /**
1747
+ * Update a dataset
1748
+ * @param props The dataset details to update
1749
+ * @returns The updated dataset
1750
+ */
1751
+ async updateDataset(props) {
1752
+ const { datasetId, datasetName, ...update } = props;
1753
+ if (!datasetId && !datasetName) {
1754
+ throw new Error("Must provide either datasetName or datasetId");
1755
+ }
1756
+ const _datasetId = datasetId ?? (await this.readDataset({ datasetName })).id;
1757
+ assertUuid(_datasetId);
1758
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/datasets/${_datasetId}`, {
1759
+ method: "PATCH",
1760
+ headers: { ...this.headers, "Content-Type": "application/json" },
1761
+ body: JSON.stringify(update),
1762
+ signal: AbortSignal.timeout(this.timeout_ms),
1763
+ ...this.fetchOptions,
1764
+ });
1765
+ await raiseForStatus(response, "update dataset");
1766
+ return (await response.json());
1767
+ }
1768
+ /**
1769
+ * Updates a tag on a dataset.
1770
+ *
1771
+ * If the tag is already assigned to a different version of this dataset,
1772
+ * the tag will be moved to the new version. The as_of parameter is used to
1773
+ * determine which version of the dataset to apply the new tags to.
1774
+ *
1775
+ * It must be an exact version of the dataset to succeed. You can
1776
+ * use the "readDatasetVersion" method to find the exact version
1777
+ * to apply the tags to.
1778
+ * @param params.datasetId The ID of the dataset to update. Must be provided if "datasetName" is not provided.
1779
+ * @param params.datasetName The name of the dataset to update. Must be provided if "datasetId" is not provided.
1780
+ * @param params.asOf The timestamp of the dataset to apply the new tags to.
1781
+ * @param params.tag The new tag to apply to the dataset.
1782
+ */
1783
+ async updateDatasetTag(props) {
1784
+ const { datasetId, datasetName, asOf, tag } = props;
1785
+ if (!datasetId && !datasetName) {
1786
+ throw new Error("Must provide either datasetName or datasetId");
1787
+ }
1788
+ const _datasetId = datasetId ?? (await this.readDataset({ datasetName })).id;
1789
+ assertUuid(_datasetId);
1790
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/datasets/${_datasetId}/tags`, {
1791
+ method: "PUT",
1792
+ headers: { ...this.headers, "Content-Type": "application/json" },
1793
+ body: JSON.stringify({
1794
+ as_of: typeof asOf === "string" ? asOf : asOf.toISOString(),
1795
+ tag,
1796
+ }),
1797
+ signal: AbortSignal.timeout(this.timeout_ms),
1798
+ ...this.fetchOptions,
1799
+ });
1800
+ await raiseForStatus(response, "update dataset tags");
1801
+ }
1802
+ async deleteDataset({ datasetId, datasetName, }) {
1803
+ let path = "/datasets";
1804
+ let datasetId_ = datasetId;
1805
+ if (datasetId !== undefined && datasetName !== undefined) {
1806
+ throw new Error("Must provide either datasetName or datasetId, not both");
1807
+ }
1808
+ else if (datasetName !== undefined) {
1809
+ const dataset = await this.readDataset({ datasetName });
1810
+ datasetId_ = dataset.id;
1811
+ }
1812
+ if (datasetId_ !== undefined) {
1813
+ assertUuid(datasetId_);
1814
+ path += `/${datasetId_}`;
1815
+ }
1816
+ else {
1817
+ throw new Error("Must provide datasetName or datasetId");
1818
+ }
1819
+ const response = await this.caller.call(_getFetchImplementation(), this.apiUrl + path, {
1820
+ method: "DELETE",
1821
+ headers: this.headers,
1822
+ signal: AbortSignal.timeout(this.timeout_ms),
1823
+ ...this.fetchOptions,
1824
+ });
1825
+ await raiseForStatus(response, `delete ${path}`);
1826
+ await response.json();
1827
+ }
1828
+ async indexDataset({ datasetId, datasetName, tag, }) {
1829
+ let datasetId_ = datasetId;
1830
+ if (!datasetId_ && !datasetName) {
1831
+ throw new Error("Must provide either datasetName or datasetId");
1832
+ }
1833
+ else if (datasetId_ && datasetName) {
1834
+ throw new Error("Must provide either datasetName or datasetId, not both");
1835
+ }
1836
+ else if (!datasetId_) {
1837
+ const dataset = await this.readDataset({ datasetName });
1838
+ datasetId_ = dataset.id;
1839
+ }
1840
+ assertUuid(datasetId_);
1841
+ const data = {
1842
+ tag: tag,
1843
+ };
1844
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/datasets/${datasetId_}/index`, {
1845
+ method: "POST",
1846
+ headers: { ...this.headers, "Content-Type": "application/json" },
1847
+ body: JSON.stringify(data),
1848
+ signal: AbortSignal.timeout(this.timeout_ms),
1849
+ ...this.fetchOptions,
1850
+ });
1851
+ await raiseForStatus(response, "index dataset");
1852
+ await response.json();
1853
+ }
1854
+ /**
1855
+ * Lets you run a similarity search query on a dataset.
1856
+ *
1857
+ * Requires the dataset to be indexed. Please see the `indexDataset` method to set up indexing.
1858
+ *
1859
+ * @param inputs The input on which to run the similarity search. Must have the
1860
+ * same schema as the dataset.
1861
+ *
1862
+ * @param datasetId The dataset to search for similar examples.
1863
+ *
1864
+ * @param limit The maximum number of examples to return. Will return the top `limit` most
1865
+ * similar examples in order of most similar to least similar. If no similar
1866
+ * examples are found, random examples will be returned.
1867
+ *
1868
+ * @param filter A filter string to apply to the search. Only examples will be returned that
1869
+ * match the filter string. Some examples of filters
1870
+ *
1871
+ * - eq(metadata.mykey, "value")
1872
+ * - and(neq(metadata.my.nested.key, "value"), neq(metadata.mykey, "value"))
1873
+ * - or(eq(metadata.mykey, "value"), eq(metadata.mykey, "othervalue"))
1874
+ *
1875
+ * @returns A list of similar examples.
1876
+ *
1877
+ *
1878
+ * @example
1879
+ * dataset_id = "123e4567-e89b-12d3-a456-426614174000"
1880
+ * inputs = {"text": "How many people live in Berlin?"}
1881
+ * limit = 5
1882
+ * examples = await client.similarExamples(inputs, dataset_id, limit)
1883
+ */
1884
+ async similarExamples(inputs, datasetId, limit, { filter, } = {}) {
1885
+ const data = {
1886
+ limit: limit,
1887
+ inputs: inputs,
1888
+ };
1889
+ if (filter !== undefined) {
1890
+ data["filter"] = filter;
1891
+ }
1892
+ assertUuid(datasetId);
1893
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/datasets/${datasetId}/search`, {
1894
+ method: "POST",
1895
+ headers: { ...this.headers, "Content-Type": "application/json" },
1896
+ body: JSON.stringify(data),
1897
+ signal: AbortSignal.timeout(this.timeout_ms),
1898
+ ...this.fetchOptions,
1899
+ });
1900
+ await raiseForStatus(response, "fetch similar examples");
1901
+ const result = await response.json();
1902
+ return result["examples"];
1903
+ }
1904
+ async createExample(inputsOrUpdate, outputs, options) {
1905
+ if (isExampleCreate(inputsOrUpdate)) {
1906
+ if (outputs !== undefined || options !== undefined) {
1907
+ throw new Error("Cannot provide outputs or options when using ExampleCreate object");
1908
+ }
1909
+ }
1910
+ let datasetId_ = outputs ? options?.datasetId : inputsOrUpdate.dataset_id;
1911
+ const datasetName_ = outputs
1912
+ ? options?.datasetName
1913
+ : inputsOrUpdate.dataset_name;
1914
+ if (datasetId_ === undefined && datasetName_ === undefined) {
1915
+ throw new Error("Must provide either datasetName or datasetId");
1916
+ }
1917
+ else if (datasetId_ !== undefined && datasetName_ !== undefined) {
1918
+ throw new Error("Must provide either datasetName or datasetId, not both");
1919
+ }
1920
+ else if (datasetId_ === undefined) {
1921
+ const dataset = await this.readDataset({ datasetName: datasetName_ });
1922
+ datasetId_ = dataset.id;
1923
+ }
1924
+ const createdAt_ = (outputs ? options?.createdAt : inputsOrUpdate.created_at) || new Date();
1925
+ let data;
1926
+ if (!isExampleCreate(inputsOrUpdate)) {
1927
+ data = {
1928
+ inputs: inputsOrUpdate,
1929
+ outputs,
1930
+ created_at: createdAt_?.toISOString(),
1931
+ id: options?.exampleId,
1932
+ metadata: options?.metadata,
1933
+ split: options?.split,
1934
+ source_run_id: options?.sourceRunId,
1935
+ use_source_run_io: options?.useSourceRunIO,
1936
+ use_source_run_attachments: options?.useSourceRunAttachments,
1937
+ attachments: options?.attachments,
1938
+ };
1939
+ }
1940
+ else {
1941
+ data = inputsOrUpdate;
1942
+ }
1943
+ const response = await this._uploadExamplesMultipart(datasetId_, [data]);
1944
+ const example = await this.readExample(response.example_ids?.[0] ?? uuid.v4());
1945
+ return example;
1946
+ }
1947
+ async createExamples(propsOrUploads) {
1948
+ if (Array.isArray(propsOrUploads)) {
1949
+ if (propsOrUploads.length === 0) {
1950
+ return [];
1951
+ }
1952
+ const uploads = propsOrUploads;
1953
+ let datasetId_ = uploads[0].dataset_id;
1954
+ const datasetName_ = uploads[0].dataset_name;
1955
+ if (datasetId_ === undefined && datasetName_ === undefined) {
1956
+ throw new Error("Must provide either datasetName or datasetId");
1957
+ }
1958
+ else if (datasetId_ !== undefined && datasetName_ !== undefined) {
1959
+ throw new Error("Must provide either datasetName or datasetId, not both");
1960
+ }
1961
+ else if (datasetId_ === undefined) {
1962
+ const dataset = await this.readDataset({ datasetName: datasetName_ });
1963
+ datasetId_ = dataset.id;
1964
+ }
1965
+ const response = await this._uploadExamplesMultipart(datasetId_, uploads);
1966
+ const examples = await Promise.all(response.example_ids.map((id) => this.readExample(id)));
1967
+ return examples;
1968
+ }
1969
+ const { inputs, outputs, metadata, splits, sourceRunIds, useSourceRunIOs, useSourceRunAttachments, attachments, exampleIds, datasetId, datasetName, } = propsOrUploads;
1970
+ if (inputs === undefined) {
1971
+ throw new Error("Must provide inputs when using legacy parameters");
1972
+ }
1973
+ let datasetId_ = datasetId;
1974
+ const datasetName_ = datasetName;
1975
+ if (datasetId_ === undefined && datasetName_ === undefined) {
1976
+ throw new Error("Must provide either datasetName or datasetId");
1977
+ }
1978
+ else if (datasetId_ !== undefined && datasetName_ !== undefined) {
1979
+ throw new Error("Must provide either datasetName or datasetId, not both");
1980
+ }
1981
+ else if (datasetId_ === undefined) {
1982
+ const dataset = await this.readDataset({ datasetName: datasetName_ });
1983
+ datasetId_ = dataset.id;
1984
+ }
1985
+ const formattedExamples = inputs.map((input, idx) => {
1986
+ return {
1987
+ dataset_id: datasetId_,
1988
+ inputs: input,
1989
+ outputs: outputs?.[idx],
1990
+ metadata: metadata?.[idx],
1991
+ split: splits?.[idx],
1992
+ id: exampleIds?.[idx],
1993
+ attachments: attachments?.[idx],
1994
+ source_run_id: sourceRunIds?.[idx],
1995
+ use_source_run_io: useSourceRunIOs?.[idx],
1996
+ use_source_run_attachments: useSourceRunAttachments?.[idx],
1997
+ };
1998
+ });
1999
+ const response = await this._uploadExamplesMultipart(datasetId_, formattedExamples);
2000
+ const examples = await Promise.all(response.example_ids.map((id) => this.readExample(id)));
2001
+ return examples;
2002
+ }
2003
+ async createLLMExample(input, generation, options) {
2004
+ return this.createExample({ input }, { output: generation }, options);
2005
+ }
2006
+ async createChatExample(input, generations, options) {
2007
+ const finalInput = input.map((message) => {
2008
+ if (isLangChainMessage(message)) {
2009
+ return convertLangChainMessageToExample(message);
2010
+ }
2011
+ return message;
2012
+ });
2013
+ const finalOutput = isLangChainMessage(generations)
2014
+ ? convertLangChainMessageToExample(generations)
2015
+ : generations;
2016
+ return this.createExample({ input: finalInput }, { output: finalOutput }, options);
2017
+ }
2018
+ async readExample(exampleId) {
2019
+ assertUuid(exampleId);
2020
+ const path = `/examples/${exampleId}`;
2021
+ const rawExample = await this._get(path);
2022
+ const { attachment_urls, ...rest } = rawExample;
2023
+ const example = rest;
2024
+ if (attachment_urls) {
2025
+ example.attachments = Object.entries(attachment_urls).reduce((acc, [key, value]) => {
2026
+ acc[key.slice("attachment.".length)] = {
2027
+ presigned_url: value.presigned_url,
2028
+ mime_type: value.mime_type,
2029
+ };
2030
+ return acc;
2031
+ }, {});
2032
+ }
2033
+ return example;
2034
+ }
2035
+ async *listExamples({ datasetId, datasetName, exampleIds, asOf, splits, inlineS3Urls, metadata, limit, offset, filter, includeAttachments, } = {}) {
2036
+ let datasetId_;
2037
+ if (datasetId !== undefined && datasetName !== undefined) {
2038
+ throw new Error("Must provide either datasetName or datasetId, not both");
2039
+ }
2040
+ else if (datasetId !== undefined) {
2041
+ datasetId_ = datasetId;
2042
+ }
2043
+ else if (datasetName !== undefined) {
2044
+ const dataset = await this.readDataset({ datasetName });
2045
+ datasetId_ = dataset.id;
2046
+ }
2047
+ else {
2048
+ throw new Error("Must provide a datasetName or datasetId");
2049
+ }
2050
+ const params = new URLSearchParams({ dataset: datasetId_ });
2051
+ const dataset_version = asOf
2052
+ ? typeof asOf === "string"
2053
+ ? asOf
2054
+ : asOf?.toISOString()
2055
+ : undefined;
2056
+ if (dataset_version) {
2057
+ params.append("as_of", dataset_version);
2058
+ }
2059
+ const inlineS3Urls_ = inlineS3Urls ?? true;
2060
+ params.append("inline_s3_urls", inlineS3Urls_.toString());
2061
+ if (exampleIds !== undefined) {
2062
+ for (const id_ of exampleIds) {
2063
+ params.append("id", id_);
2064
+ }
2065
+ }
2066
+ if (splits !== undefined) {
2067
+ for (const split of splits) {
2068
+ params.append("splits", split);
2069
+ }
2070
+ }
2071
+ if (metadata !== undefined) {
2072
+ const serializedMetadata = JSON.stringify(metadata);
2073
+ params.append("metadata", serializedMetadata);
2074
+ }
2075
+ if (limit !== undefined) {
2076
+ params.append("limit", limit.toString());
2077
+ }
2078
+ if (offset !== undefined) {
2079
+ params.append("offset", offset.toString());
2080
+ }
2081
+ if (filter !== undefined) {
2082
+ params.append("filter", filter);
2083
+ }
2084
+ if (includeAttachments === true) {
2085
+ ["attachment_urls", "outputs", "metadata"].forEach((field) => params.append("select", field));
2086
+ }
2087
+ let i = 0;
2088
+ for await (const rawExamples of this._getPaginated("/examples", params)) {
2089
+ for (const rawExample of rawExamples) {
2090
+ const { attachment_urls, ...rest } = rawExample;
2091
+ const example = rest;
2092
+ if (attachment_urls) {
2093
+ example.attachments = Object.entries(attachment_urls).reduce((acc, [key, value]) => {
2094
+ acc[key.slice("attachment.".length)] = {
2095
+ presigned_url: value.presigned_url,
2096
+ mime_type: value.mime_type || undefined,
2097
+ };
2098
+ return acc;
2099
+ }, {});
2100
+ }
2101
+ yield example;
2102
+ i++;
2103
+ }
2104
+ if (limit !== undefined && i >= limit) {
2105
+ break;
2106
+ }
2107
+ }
2108
+ }
2109
+ async deleteExample(exampleId) {
2110
+ assertUuid(exampleId);
2111
+ const path = `/examples/${exampleId}`;
2112
+ const response = await this.caller.call(_getFetchImplementation(), this.apiUrl + path, {
2113
+ method: "DELETE",
2114
+ headers: this.headers,
2115
+ signal: AbortSignal.timeout(this.timeout_ms),
2116
+ ...this.fetchOptions,
2117
+ });
2118
+ await raiseForStatus(response, `delete ${path}`);
2119
+ await response.json();
2120
+ }
2121
+ async updateExample(exampleIdOrUpdate, update) {
2122
+ let exampleId;
2123
+ if (update) {
2124
+ exampleId = exampleIdOrUpdate;
2125
+ }
2126
+ else {
2127
+ exampleId = exampleIdOrUpdate.id;
2128
+ }
2129
+ assertUuid(exampleId);
2130
+ let updateToUse;
2131
+ if (update) {
2132
+ updateToUse = { id: exampleId, ...update };
2133
+ }
2134
+ else {
2135
+ updateToUse = exampleIdOrUpdate;
2136
+ }
2137
+ let datasetId;
2138
+ if (updateToUse.dataset_id !== undefined) {
2139
+ datasetId = updateToUse.dataset_id;
2140
+ }
2141
+ else {
2142
+ const example = await this.readExample(exampleId);
2143
+ datasetId = example.dataset_id;
2144
+ }
2145
+ return this._updateExamplesMultipart(datasetId, [updateToUse]);
2146
+ }
2147
+ async updateExamples(update) {
2148
+ // We will naively get dataset id from first example and assume it works for all
2149
+ let datasetId;
2150
+ if (update[0].dataset_id === undefined) {
2151
+ const example = await this.readExample(update[0].id);
2152
+ datasetId = example.dataset_id;
2153
+ }
2154
+ else {
2155
+ datasetId = update[0].dataset_id;
2156
+ }
2157
+ return this._updateExamplesMultipart(datasetId, update);
2158
+ }
2159
+ /**
2160
+ * Get dataset version by closest date or exact tag.
2161
+ *
2162
+ * Use this to resolve the nearest version to a given timestamp or for a given tag.
2163
+ *
2164
+ * @param options The options for getting the dataset version
2165
+ * @param options.datasetId The ID of the dataset
2166
+ * @param options.datasetName The name of the dataset
2167
+ * @param options.asOf The timestamp of the dataset to retrieve
2168
+ * @param options.tag The tag of the dataset to retrieve
2169
+ * @returns The dataset version
2170
+ */
2171
+ async readDatasetVersion({ datasetId, datasetName, asOf, tag, }) {
2172
+ let resolvedDatasetId;
2173
+ if (!datasetId) {
2174
+ const dataset = await this.readDataset({ datasetName });
2175
+ resolvedDatasetId = dataset.id;
2176
+ }
2177
+ else {
2178
+ resolvedDatasetId = datasetId;
2179
+ }
2180
+ assertUuid(resolvedDatasetId);
2181
+ if ((asOf && tag) || (!asOf && !tag)) {
2182
+ throw new Error("Exactly one of asOf and tag must be specified.");
2183
+ }
2184
+ const params = new URLSearchParams();
2185
+ if (asOf !== undefined) {
2186
+ params.append("as_of", typeof asOf === "string" ? asOf : asOf.toISOString());
2187
+ }
2188
+ if (tag !== undefined) {
2189
+ params.append("tag", tag);
2190
+ }
2191
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/datasets/${resolvedDatasetId}/version?${params.toString()}`, {
2192
+ method: "GET",
2193
+ headers: { ...this.headers },
2194
+ signal: AbortSignal.timeout(this.timeout_ms),
2195
+ ...this.fetchOptions,
2196
+ });
2197
+ await raiseForStatus(response, "read dataset version");
2198
+ return await response.json();
2199
+ }
2200
+ async listDatasetSplits({ datasetId, datasetName, asOf, }) {
2201
+ let datasetId_;
2202
+ if (datasetId === undefined && datasetName === undefined) {
2203
+ throw new Error("Must provide dataset name or ID");
2204
+ }
2205
+ else if (datasetId !== undefined && datasetName !== undefined) {
2206
+ throw new Error("Must provide either datasetName or datasetId, not both");
2207
+ }
2208
+ else if (datasetId === undefined) {
2209
+ const dataset = await this.readDataset({ datasetName });
2210
+ datasetId_ = dataset.id;
2211
+ }
2212
+ else {
2213
+ datasetId_ = datasetId;
2214
+ }
2215
+ assertUuid(datasetId_);
2216
+ const params = new URLSearchParams();
2217
+ const dataset_version = asOf
2218
+ ? typeof asOf === "string"
2219
+ ? asOf
2220
+ : asOf?.toISOString()
2221
+ : undefined;
2222
+ if (dataset_version) {
2223
+ params.append("as_of", dataset_version);
2224
+ }
2225
+ const response = await this._get(`/datasets/${datasetId_}/splits`, params);
2226
+ return response;
2227
+ }
2228
+ async updateDatasetSplits({ datasetId, datasetName, splitName, exampleIds, remove = false, }) {
2229
+ let datasetId_;
2230
+ if (datasetId === undefined && datasetName === undefined) {
2231
+ throw new Error("Must provide dataset name or ID");
2232
+ }
2233
+ else if (datasetId !== undefined && datasetName !== undefined) {
2234
+ throw new Error("Must provide either datasetName or datasetId, not both");
2235
+ }
2236
+ else if (datasetId === undefined) {
2237
+ const dataset = await this.readDataset({ datasetName });
2238
+ datasetId_ = dataset.id;
2239
+ }
2240
+ else {
2241
+ datasetId_ = datasetId;
2242
+ }
2243
+ assertUuid(datasetId_);
2244
+ const data = {
2245
+ split_name: splitName,
2246
+ examples: exampleIds.map((id) => {
2247
+ assertUuid(id);
2248
+ return id;
2249
+ }),
2250
+ remove,
2251
+ };
2252
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/datasets/${datasetId_}/splits`, {
2253
+ method: "PUT",
2254
+ headers: { ...this.headers, "Content-Type": "application/json" },
2255
+ body: JSON.stringify(data),
2256
+ signal: AbortSignal.timeout(this.timeout_ms),
2257
+ ...this.fetchOptions,
2258
+ });
2259
+ await raiseForStatus(response, "update dataset splits", true);
2260
+ }
2261
+ /**
2262
+ * @deprecated This method is deprecated and will be removed in future LangSmith versions, use `evaluate` from `langsmith/evaluation` instead.
2263
+ */
2264
+ async evaluateRun(run, evaluator, { sourceInfo, loadChildRuns, referenceExample, } = { loadChildRuns: false }) {
2265
+ warnOnce("This method is deprecated and will be removed in future LangSmith versions, use `evaluate` from `langsmith/evaluation` instead.");
2266
+ let run_;
2267
+ if (typeof run === "string") {
2268
+ run_ = await this.readRun(run, { loadChildRuns });
2269
+ }
2270
+ else if (typeof run === "object" && "id" in run) {
2271
+ run_ = run;
2272
+ }
2273
+ else {
2274
+ throw new Error(`Invalid run type: ${typeof run}`);
2275
+ }
2276
+ if (run_.reference_example_id !== null &&
2277
+ run_.reference_example_id !== undefined) {
2278
+ referenceExample = await this.readExample(run_.reference_example_id);
2279
+ }
2280
+ const feedbackResult = await evaluator.evaluateRun(run_, referenceExample);
2281
+ const [_, feedbacks] = await this._logEvaluationFeedback(feedbackResult, run_, sourceInfo);
2282
+ return feedbacks[0];
2283
+ }
2284
+ async createFeedback(runId, key, { score, value, correction, comment, sourceInfo, feedbackSourceType = "api", sourceRunId, feedbackId, feedbackConfig, projectId, comparativeExperimentId, }) {
2285
+ if (!runId && !projectId) {
2286
+ throw new Error("One of runId or projectId must be provided");
2287
+ }
2288
+ if (runId && projectId) {
2289
+ throw new Error("Only one of runId or projectId can be provided");
2290
+ }
2291
+ const feedback_source = {
2292
+ type: feedbackSourceType ?? "api",
2293
+ metadata: sourceInfo ?? {},
2294
+ };
2295
+ if (sourceRunId !== undefined &&
2296
+ feedback_source?.metadata !== undefined &&
2297
+ !feedback_source.metadata["__run"]) {
2298
+ feedback_source.metadata["__run"] = { run_id: sourceRunId };
2299
+ }
2300
+ if (feedback_source?.metadata !== undefined &&
2301
+ feedback_source.metadata["__run"]?.run_id !== undefined) {
2302
+ assertUuid(feedback_source.metadata["__run"].run_id);
2303
+ }
2304
+ const feedback = {
2305
+ id: feedbackId ?? uuid.v4(),
2306
+ run_id: runId,
2307
+ key,
2308
+ score,
2309
+ value,
2310
+ correction,
2311
+ comment,
2312
+ feedback_source: feedback_source,
2313
+ comparative_experiment_id: comparativeExperimentId,
2314
+ feedbackConfig,
2315
+ session_id: projectId,
2316
+ };
2317
+ const url = `${this.apiUrl}/feedback`;
2318
+ const response = await this.caller.call(_getFetchImplementation(), url, {
2319
+ method: "POST",
2320
+ headers: { ...this.headers, "Content-Type": "application/json" },
2321
+ body: JSON.stringify(feedback),
2322
+ signal: AbortSignal.timeout(this.timeout_ms),
2323
+ ...this.fetchOptions,
2324
+ });
2325
+ await raiseForStatus(response, "create feedback", true);
2326
+ return feedback;
2327
+ }
2328
+ async updateFeedback(feedbackId, { score, value, correction, comment, }) {
2329
+ const feedbackUpdate = {};
2330
+ if (score !== undefined && score !== null) {
2331
+ feedbackUpdate["score"] = score;
2332
+ }
2333
+ if (value !== undefined && value !== null) {
2334
+ feedbackUpdate["value"] = value;
2335
+ }
2336
+ if (correction !== undefined && correction !== null) {
2337
+ feedbackUpdate["correction"] = correction;
2338
+ }
2339
+ if (comment !== undefined && comment !== null) {
2340
+ feedbackUpdate["comment"] = comment;
2341
+ }
2342
+ assertUuid(feedbackId);
2343
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/feedback/${feedbackId}`, {
2344
+ method: "PATCH",
2345
+ headers: { ...this.headers, "Content-Type": "application/json" },
2346
+ body: JSON.stringify(feedbackUpdate),
2347
+ signal: AbortSignal.timeout(this.timeout_ms),
2348
+ ...this.fetchOptions,
2349
+ });
2350
+ await raiseForStatus(response, "update feedback", true);
2351
+ }
2352
+ async readFeedback(feedbackId) {
2353
+ assertUuid(feedbackId);
2354
+ const path = `/feedback/${feedbackId}`;
2355
+ const response = await this._get(path);
2356
+ return response;
2357
+ }
2358
+ async deleteFeedback(feedbackId) {
2359
+ assertUuid(feedbackId);
2360
+ const path = `/feedback/${feedbackId}`;
2361
+ const response = await this.caller.call(_getFetchImplementation(), this.apiUrl + path, {
2362
+ method: "DELETE",
2363
+ headers: this.headers,
2364
+ signal: AbortSignal.timeout(this.timeout_ms),
2365
+ ...this.fetchOptions,
2366
+ });
2367
+ await raiseForStatus(response, `delete ${path}`);
2368
+ await response.json();
2369
+ }
2370
+ async *listFeedback({ runIds, feedbackKeys, feedbackSourceTypes, } = {}) {
2371
+ const queryParams = new URLSearchParams();
2372
+ if (runIds) {
2373
+ queryParams.append("run", runIds.join(","));
2374
+ }
2375
+ if (feedbackKeys) {
2376
+ for (const key of feedbackKeys) {
2377
+ queryParams.append("key", key);
2378
+ }
2379
+ }
2380
+ if (feedbackSourceTypes) {
2381
+ for (const type of feedbackSourceTypes) {
2382
+ queryParams.append("source", type);
2383
+ }
2384
+ }
2385
+ for await (const feedbacks of this._getPaginated("/feedback", queryParams)) {
2386
+ yield* feedbacks;
2387
+ }
2388
+ }
2389
+ /**
2390
+ * Creates a presigned feedback token and URL.
2391
+ *
2392
+ * The token can be used to authorize feedback metrics without
2393
+ * needing an API key. This is useful for giving browser-based
2394
+ * applications the ability to submit feedback without needing
2395
+ * to expose an API key.
2396
+ *
2397
+ * @param runId The ID of the run.
2398
+ * @param feedbackKey The feedback key.
2399
+ * @param options Additional options for the token.
2400
+ * @param options.expiration The expiration time for the token.
2401
+ *
2402
+ * @returns A promise that resolves to a FeedbackIngestToken.
2403
+ */
2404
+ async createPresignedFeedbackToken(runId, feedbackKey, { expiration, feedbackConfig, } = {}) {
2405
+ const body = {
2406
+ run_id: runId,
2407
+ feedback_key: feedbackKey,
2408
+ feedback_config: feedbackConfig,
2409
+ };
2410
+ if (expiration) {
2411
+ if (typeof expiration === "string") {
2412
+ body["expires_at"] = expiration;
2413
+ }
2414
+ else if (expiration?.hours || expiration?.minutes || expiration?.days) {
2415
+ body["expires_in"] = expiration;
2416
+ }
2417
+ }
2418
+ else {
2419
+ body["expires_in"] = {
2420
+ hours: 3,
2421
+ };
2422
+ }
2423
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/feedback/tokens`, {
2424
+ method: "POST",
2425
+ headers: { ...this.headers, "Content-Type": "application/json" },
2426
+ body: JSON.stringify(body),
2427
+ signal: AbortSignal.timeout(this.timeout_ms),
2428
+ ...this.fetchOptions,
2429
+ });
2430
+ const result = await response.json();
2431
+ return result;
2432
+ }
2433
+ async createComparativeExperiment({ name, experimentIds, referenceDatasetId, createdAt, description, metadata, id, }) {
2434
+ if (experimentIds.length === 0) {
2435
+ throw new Error("At least one experiment is required");
2436
+ }
2437
+ if (!referenceDatasetId) {
2438
+ referenceDatasetId = (await this.readProject({
2439
+ projectId: experimentIds[0],
2440
+ })).reference_dataset_id;
2441
+ }
2442
+ if (!referenceDatasetId == null) {
2443
+ throw new Error("A reference dataset is required");
2444
+ }
2445
+ const body = {
2446
+ id,
2447
+ name,
2448
+ experiment_ids: experimentIds,
2449
+ reference_dataset_id: referenceDatasetId,
2450
+ description,
2451
+ created_at: (createdAt ?? new Date())?.toISOString(),
2452
+ extra: {},
2453
+ };
2454
+ if (metadata)
2455
+ body.extra["metadata"] = metadata;
2456
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/datasets/comparative`, {
2457
+ method: "POST",
2458
+ headers: { ...this.headers, "Content-Type": "application/json" },
2459
+ body: JSON.stringify(body),
2460
+ signal: AbortSignal.timeout(this.timeout_ms),
2461
+ ...this.fetchOptions,
2462
+ });
2463
+ return await response.json();
2464
+ }
2465
+ /**
2466
+ * Retrieves a list of presigned feedback tokens for a given run ID.
2467
+ * @param runId The ID of the run.
2468
+ * @returns An async iterable of FeedbackIngestToken objects.
2469
+ */
2470
+ async *listPresignedFeedbackTokens(runId) {
2471
+ assertUuid(runId);
2472
+ const params = new URLSearchParams({ run_id: runId });
2473
+ for await (const tokens of this._getPaginated("/feedback/tokens", params)) {
2474
+ yield* tokens;
2475
+ }
2476
+ }
2477
+ _selectEvalResults(results) {
2478
+ let results_;
2479
+ if ("results" in results) {
2480
+ results_ = results.results;
2481
+ }
2482
+ else if (Array.isArray(results)) {
2483
+ results_ = results;
2484
+ }
2485
+ else {
2486
+ results_ = [results];
2487
+ }
2488
+ return results_;
2489
+ }
2490
+ async _logEvaluationFeedback(evaluatorResponse, run, sourceInfo) {
2491
+ const evalResults = this._selectEvalResults(evaluatorResponse);
2492
+ const feedbacks = [];
2493
+ for (const res of evalResults) {
2494
+ let sourceInfo_ = sourceInfo || {};
2495
+ if (res.evaluatorInfo) {
2496
+ sourceInfo_ = { ...res.evaluatorInfo, ...sourceInfo_ };
2497
+ }
2498
+ let runId_ = null;
2499
+ if (res.targetRunId) {
2500
+ runId_ = res.targetRunId;
2501
+ }
2502
+ else if (run) {
2503
+ runId_ = run.id;
2504
+ }
2505
+ feedbacks.push(await this.createFeedback(runId_, res.key, {
2506
+ score: res.score,
2507
+ value: res.value,
2508
+ comment: res.comment,
2509
+ correction: res.correction,
2510
+ sourceInfo: sourceInfo_,
2511
+ sourceRunId: res.sourceRunId,
2512
+ feedbackConfig: res.feedbackConfig,
2513
+ feedbackSourceType: "model",
2514
+ }));
2515
+ }
2516
+ return [evalResults, feedbacks];
2517
+ }
2518
+ async logEvaluationFeedback(evaluatorResponse, run, sourceInfo) {
2519
+ const [results] = await this._logEvaluationFeedback(evaluatorResponse, run, sourceInfo);
2520
+ return results;
2521
+ }
2522
+ /**
2523
+ * API for managing annotation queues
2524
+ */
2525
+ /**
2526
+ * List the annotation queues on the LangSmith API.
2527
+ * @param options - The options for listing annotation queues
2528
+ * @param options.queueIds - The IDs of the queues to filter by
2529
+ * @param options.name - The name of the queue to filter by
2530
+ * @param options.nameContains - The substring that the queue name should contain
2531
+ * @param options.limit - The maximum number of queues to return
2532
+ * @returns An iterator of AnnotationQueue objects
2533
+ */
2534
+ async *listAnnotationQueues(options = {}) {
2535
+ const { queueIds, name, nameContains, limit } = options;
2536
+ const params = new URLSearchParams();
2537
+ if (queueIds) {
2538
+ queueIds.forEach((id, i) => {
2539
+ assertUuid(id, `queueIds[${i}]`);
2540
+ params.append("ids", id);
2541
+ });
2542
+ }
2543
+ if (name)
2544
+ params.append("name", name);
2545
+ if (nameContains)
2546
+ params.append("name_contains", nameContains);
2547
+ params.append("limit", (limit !== undefined ? Math.min(limit, 100) : 100).toString());
2548
+ let count = 0;
2549
+ for await (const queues of this._getPaginated("/annotation-queues", params)) {
2550
+ yield* queues;
2551
+ count++;
2552
+ if (limit !== undefined && count >= limit)
2553
+ break;
2554
+ }
2555
+ }
2556
+ /**
2557
+ * Create an annotation queue on the LangSmith API.
2558
+ * @param options - The options for creating an annotation queue
2559
+ * @param options.name - The name of the annotation queue
2560
+ * @param options.description - The description of the annotation queue
2561
+ * @param options.queueId - The ID of the annotation queue
2562
+ * @returns The created AnnotationQueue object
2563
+ */
2564
+ async createAnnotationQueue(options) {
2565
+ const { name, description, queueId } = options;
2566
+ const body = {
2567
+ name,
2568
+ description,
2569
+ id: queueId || uuid.v4(),
2570
+ };
2571
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/annotation-queues`, {
2572
+ method: "POST",
2573
+ headers: { ...this.headers, "Content-Type": "application/json" },
2574
+ body: JSON.stringify(Object.fromEntries(Object.entries(body).filter(([_, v]) => v !== undefined))),
2575
+ signal: AbortSignal.timeout(this.timeout_ms),
2576
+ ...this.fetchOptions,
2577
+ });
2578
+ await raiseForStatus(response, "create annotation queue");
2579
+ const data = await response.json();
2580
+ return data;
2581
+ }
2582
+ /**
2583
+ * Read an annotation queue with the specified queue ID.
2584
+ * @param queueId - The ID of the annotation queue to read
2585
+ * @returns The AnnotationQueue object
2586
+ */
2587
+ async readAnnotationQueue(queueId) {
2588
+ // TODO: Replace when actual endpoint is added
2589
+ const queueIteratorResult = await this.listAnnotationQueues({
2590
+ queueIds: [queueId],
2591
+ }).next();
2592
+ if (queueIteratorResult.done) {
2593
+ throw new Error(`Annotation queue with ID ${queueId} not found`);
2594
+ }
2595
+ return queueIteratorResult.value;
2596
+ }
2597
+ /**
2598
+ * Update an annotation queue with the specified queue ID.
2599
+ * @param queueId - The ID of the annotation queue to update
2600
+ * @param options - The options for updating the annotation queue
2601
+ * @param options.name - The new name for the annotation queue
2602
+ * @param options.description - The new description for the annotation queue
2603
+ */
2604
+ async updateAnnotationQueue(queueId, options) {
2605
+ const { name, description } = options;
2606
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/annotation-queues/${assertUuid(queueId, "queueId")}`, {
2607
+ method: "PATCH",
2608
+ headers: { ...this.headers, "Content-Type": "application/json" },
2609
+ body: JSON.stringify({ name, description }),
2610
+ signal: AbortSignal.timeout(this.timeout_ms),
2611
+ ...this.fetchOptions,
2612
+ });
2613
+ await raiseForStatus(response, "update annotation queue");
2614
+ }
2615
+ /**
2616
+ * Delete an annotation queue with the specified queue ID.
2617
+ * @param queueId - The ID of the annotation queue to delete
2618
+ */
2619
+ async deleteAnnotationQueue(queueId) {
2620
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/annotation-queues/${assertUuid(queueId, "queueId")}`, {
2621
+ method: "DELETE",
2622
+ headers: { ...this.headers, Accept: "application/json" },
2623
+ signal: AbortSignal.timeout(this.timeout_ms),
2624
+ ...this.fetchOptions,
2625
+ });
2626
+ await raiseForStatus(response, "delete annotation queue");
2627
+ }
2628
+ /**
2629
+ * Add runs to an annotation queue with the specified queue ID.
2630
+ * @param queueId - The ID of the annotation queue
2631
+ * @param runIds - The IDs of the runs to be added to the annotation queue
2632
+ */
2633
+ async addRunsToAnnotationQueue(queueId, runIds) {
2634
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/annotation-queues/${assertUuid(queueId, "queueId")}/runs`, {
2635
+ method: "POST",
2636
+ headers: { ...this.headers, "Content-Type": "application/json" },
2637
+ body: JSON.stringify(runIds.map((id, i) => assertUuid(id, `runIds[${i}]`).toString())),
2638
+ signal: AbortSignal.timeout(this.timeout_ms),
2639
+ ...this.fetchOptions,
2640
+ });
2641
+ await raiseForStatus(response, "add runs to annotation queue");
2642
+ }
2643
+ /**
2644
+ * Get a run from an annotation queue at the specified index.
2645
+ * @param queueId - The ID of the annotation queue
2646
+ * @param index - The index of the run to retrieve
2647
+ * @returns A Promise that resolves to a RunWithAnnotationQueueInfo object
2648
+ * @throws {Error} If the run is not found at the given index or for other API-related errors
2649
+ */
2650
+ async getRunFromAnnotationQueue(queueId, index) {
2651
+ const baseUrl = `/annotation-queues/${assertUuid(queueId, "queueId")}/run`;
2652
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}${baseUrl}/${index}`, {
2653
+ method: "GET",
2654
+ headers: this.headers,
2655
+ signal: AbortSignal.timeout(this.timeout_ms),
2656
+ ...this.fetchOptions,
2657
+ });
2658
+ await raiseForStatus(response, "get run from annotation queue");
2659
+ return await response.json();
2660
+ }
2661
+ /**
2662
+ * Delete a run from an an annotation queue.
2663
+ * @param queueId - The ID of the annotation queue to delete the run from
2664
+ * @param queueRunId - The ID of the run to delete from the annotation queue
2665
+ */
2666
+ async deleteRunFromAnnotationQueue(queueId, queueRunId) {
2667
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/annotation-queues/${assertUuid(queueId, "queueId")}/runs/${assertUuid(queueRunId, "queueRunId")}`, {
2668
+ method: "DELETE",
2669
+ headers: { ...this.headers, Accept: "application/json" },
2670
+ signal: AbortSignal.timeout(this.timeout_ms),
2671
+ ...this.fetchOptions,
2672
+ });
2673
+ await raiseForStatus(response, "delete run from annotation queue");
2674
+ }
2675
+ /**
2676
+ * Get the size of an annotation queue.
2677
+ * @param queueId - The ID of the annotation queue
2678
+ */
2679
+ async getSizeFromAnnotationQueue(queueId) {
2680
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/annotation-queues/${assertUuid(queueId, "queueId")}/size`, {
2681
+ method: "GET",
2682
+ headers: this.headers,
2683
+ signal: AbortSignal.timeout(this.timeout_ms),
2684
+ ...this.fetchOptions,
2685
+ });
2686
+ await raiseForStatus(response, "get size from annotation queue");
2687
+ return await response.json();
2688
+ }
2689
+ async _currentTenantIsOwner(owner) {
2690
+ const settings = await this._getSettings();
2691
+ return owner == "-" || settings.tenant_handle === owner;
2692
+ }
2693
+ async _ownerConflictError(action, owner) {
2694
+ const settings = await this._getSettings();
2695
+ return new Error(`Cannot ${action} for another tenant.\n
2696
+ Current tenant: ${settings.tenant_handle}\n
2697
+ Requested tenant: ${owner}`);
2698
+ }
2699
+ async _getLatestCommitHash(promptOwnerAndName) {
2700
+ const res = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/commits/${promptOwnerAndName}/?limit=${1}&offset=${0}`, {
2701
+ method: "GET",
2702
+ headers: this.headers,
2703
+ signal: AbortSignal.timeout(this.timeout_ms),
2704
+ ...this.fetchOptions,
2705
+ });
2706
+ const json = await res.json();
2707
+ if (!res.ok) {
2708
+ const detail = typeof json.detail === "string"
2709
+ ? json.detail
2710
+ : JSON.stringify(json.detail);
2711
+ const error = new Error(`Error ${res.status}: ${res.statusText}\n${detail}`);
2712
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2713
+ error.statusCode = res.status;
2714
+ throw error;
2715
+ }
2716
+ if (json.commits.length === 0) {
2717
+ return undefined;
2718
+ }
2719
+ return json.commits[0].commit_hash;
2720
+ }
2721
+ async _likeOrUnlikePrompt(promptIdentifier, like) {
2722
+ const [owner, promptName, _] = parsePromptIdentifier(promptIdentifier);
2723
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/likes/${owner}/${promptName}`, {
2724
+ method: "POST",
2725
+ body: JSON.stringify({ like: like }),
2726
+ headers: { ...this.headers, "Content-Type": "application/json" },
2727
+ signal: AbortSignal.timeout(this.timeout_ms),
2728
+ ...this.fetchOptions,
2729
+ });
2730
+ await raiseForStatus(response, `${like ? "like" : "unlike"} prompt`);
2731
+ return await response.json();
2732
+ }
2733
+ async _getPromptUrl(promptIdentifier) {
2734
+ const [owner, promptName, commitHash] = parsePromptIdentifier(promptIdentifier);
2735
+ if (!(await this._currentTenantIsOwner(owner))) {
2736
+ if (commitHash !== "latest") {
2737
+ return `${this.getHostUrl()}/hub/${owner}/${promptName}/${commitHash.substring(0, 8)}`;
2738
+ }
2739
+ else {
2740
+ return `${this.getHostUrl()}/hub/${owner}/${promptName}`;
2741
+ }
2742
+ }
2743
+ else {
2744
+ const settings = await this._getSettings();
2745
+ if (commitHash !== "latest") {
2746
+ return `${this.getHostUrl()}/prompts/${promptName}/${commitHash.substring(0, 8)}?organizationId=${settings.id}`;
2747
+ }
2748
+ else {
2749
+ return `${this.getHostUrl()}/prompts/${promptName}?organizationId=${settings.id}`;
2750
+ }
2751
+ }
2752
+ }
2753
+ async promptExists(promptIdentifier) {
2754
+ const prompt = await this.getPrompt(promptIdentifier);
2755
+ return !!prompt;
2756
+ }
2757
+ async likePrompt(promptIdentifier) {
2758
+ return this._likeOrUnlikePrompt(promptIdentifier, true);
2759
+ }
2760
+ async unlikePrompt(promptIdentifier) {
2761
+ return this._likeOrUnlikePrompt(promptIdentifier, false);
2762
+ }
2763
+ async *listCommits(promptOwnerAndName) {
2764
+ for await (const commits of this._getPaginated(`/commits/${promptOwnerAndName}/`, new URLSearchParams(), (res) => res.commits)) {
2765
+ yield* commits;
2766
+ }
2767
+ }
2768
+ async *listPrompts(options) {
2769
+ const params = new URLSearchParams();
2770
+ params.append("sort_field", options?.sortField ?? "updated_at");
2771
+ params.append("sort_direction", "desc");
2772
+ params.append("is_archived", (!!options?.isArchived).toString());
2773
+ if (options?.isPublic !== undefined) {
2774
+ params.append("is_public", options.isPublic.toString());
2775
+ }
2776
+ if (options?.query) {
2777
+ params.append("query", options.query);
2778
+ }
2779
+ for await (const prompts of this._getPaginated("/repos", params, (res) => res.repos)) {
2780
+ yield* prompts;
2781
+ }
2782
+ }
2783
+ async getPrompt(promptIdentifier) {
2784
+ const [owner, promptName, _] = parsePromptIdentifier(promptIdentifier);
2785
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/repos/${owner}/${promptName}`, {
2786
+ method: "GET",
2787
+ headers: this.headers,
2788
+ signal: AbortSignal.timeout(this.timeout_ms),
2789
+ ...this.fetchOptions,
2790
+ });
2791
+ if (response.status === 404) {
2792
+ return null;
2793
+ }
2794
+ await raiseForStatus(response, "get prompt");
2795
+ const result = await response.json();
2796
+ if (result.repo) {
2797
+ return result.repo;
2798
+ }
2799
+ else {
2800
+ return null;
2801
+ }
2802
+ }
2803
+ async createPrompt(promptIdentifier, options) {
2804
+ const settings = await this._getSettings();
2805
+ if (options?.isPublic && !settings.tenant_handle) {
2806
+ throw new Error(`Cannot create a public prompt without first\n
2807
+ creating a LangChain Hub handle.
2808
+ You can add a handle by creating a public prompt at:\n
2809
+ https://smith.langchain.com/prompts`);
2810
+ }
2811
+ const [owner, promptName, _] = parsePromptIdentifier(promptIdentifier);
2812
+ if (!(await this._currentTenantIsOwner(owner))) {
2813
+ throw await this._ownerConflictError("create a prompt", owner);
2814
+ }
2815
+ const data = {
2816
+ repo_handle: promptName,
2817
+ ...(options?.description && { description: options.description }),
2818
+ ...(options?.readme && { readme: options.readme }),
2819
+ ...(options?.tags && { tags: options.tags }),
2820
+ is_public: !!options?.isPublic,
2821
+ };
2822
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/repos/`, {
2823
+ method: "POST",
2824
+ headers: { ...this.headers, "Content-Type": "application/json" },
2825
+ body: JSON.stringify(data),
2826
+ signal: AbortSignal.timeout(this.timeout_ms),
2827
+ ...this.fetchOptions,
2828
+ });
2829
+ await raiseForStatus(response, "create prompt");
2830
+ const { repo } = await response.json();
2831
+ return repo;
2832
+ }
2833
+ async createCommit(promptIdentifier, object, options) {
2834
+ if (!(await this.promptExists(promptIdentifier))) {
2835
+ throw new Error("Prompt does not exist, you must create it first.");
2836
+ }
2837
+ const [owner, promptName, _] = parsePromptIdentifier(promptIdentifier);
2838
+ const resolvedParentCommitHash = options?.parentCommitHash === "latest" || !options?.parentCommitHash
2839
+ ? await this._getLatestCommitHash(`${owner}/${promptName}`)
2840
+ : options?.parentCommitHash;
2841
+ const payload = {
2842
+ manifest: JSON.parse(JSON.stringify(object)),
2843
+ parent_commit: resolvedParentCommitHash,
2844
+ };
2845
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/commits/${owner}/${promptName}`, {
2846
+ method: "POST",
2847
+ headers: { ...this.headers, "Content-Type": "application/json" },
2848
+ body: JSON.stringify(payload),
2849
+ signal: AbortSignal.timeout(this.timeout_ms),
2850
+ ...this.fetchOptions,
2851
+ });
2852
+ await raiseForStatus(response, "create commit");
2853
+ const result = await response.json();
2854
+ return this._getPromptUrl(`${owner}/${promptName}${result.commit_hash ? `:${result.commit_hash}` : ""}`);
2855
+ }
2856
+ /**
2857
+ * Update examples with attachments using multipart form data.
2858
+ * @param updates List of ExampleUpdateWithAttachments objects to upsert
2859
+ * @returns Promise with the update response
2860
+ */
2861
+ async updateExamplesMultipart(datasetId, updates = []) {
2862
+ return this._updateExamplesMultipart(datasetId, updates);
2863
+ }
2864
+ async _updateExamplesMultipart(datasetId, updates = []) {
2865
+ if (!(await this._getMultiPartSupport())) {
2866
+ throw new Error("Your LangSmith version does not allow using the multipart examples endpoint, please update to the latest version.");
2867
+ }
2868
+ const formData = new FormData();
2869
+ for (const example of updates) {
2870
+ const exampleId = example.id;
2871
+ // Prepare the main example body
2872
+ const exampleBody = {
2873
+ ...(example.metadata && { metadata: example.metadata }),
2874
+ ...(example.split && { split: example.split }),
2875
+ };
2876
+ // Add main example data
2877
+ const stringifiedExample = serializePayloadForTracing(exampleBody);
2878
+ const exampleBlob = new Blob([stringifiedExample], {
2879
+ type: "application/json",
2880
+ });
2881
+ formData.append(exampleId, exampleBlob);
2882
+ // Add inputs if present
2883
+ if (example.inputs) {
2884
+ const stringifiedInputs = serializePayloadForTracing(example.inputs);
2885
+ const inputsBlob = new Blob([stringifiedInputs], {
2886
+ type: "application/json",
2887
+ });
2888
+ formData.append(`${exampleId}.inputs`, inputsBlob);
2889
+ }
2890
+ // Add outputs if present
2891
+ if (example.outputs) {
2892
+ const stringifiedOutputs = serializePayloadForTracing(example.outputs);
2893
+ const outputsBlob = new Blob([stringifiedOutputs], {
2894
+ type: "application/json",
2895
+ });
2896
+ formData.append(`${exampleId}.outputs`, outputsBlob);
2897
+ }
2898
+ // Add attachments if present
2899
+ if (example.attachments) {
2900
+ for (const [name, attachment] of Object.entries(example.attachments)) {
2901
+ let mimeType;
2902
+ let data;
2903
+ if (Array.isArray(attachment)) {
2904
+ [mimeType, data] = attachment;
2905
+ }
2906
+ else {
2907
+ mimeType = attachment.mimeType;
2908
+ data = attachment.data;
2909
+ }
2910
+ const attachmentBlob = new Blob([data], {
2911
+ type: `${mimeType}; length=${data.byteLength}`,
2912
+ });
2913
+ formData.append(`${exampleId}.attachment.${name}`, attachmentBlob);
2914
+ }
2915
+ }
2916
+ if (example.attachments_operations) {
2917
+ const stringifiedAttachmentsOperations = serializePayloadForTracing(example.attachments_operations);
2918
+ const attachmentsOperationsBlob = new Blob([stringifiedAttachmentsOperations], {
2919
+ type: "application/json",
2920
+ });
2921
+ formData.append(`${exampleId}.attachments_operations`, attachmentsOperationsBlob);
2922
+ }
2923
+ }
2924
+ const datasetIdToUse = datasetId ?? updates[0]?.dataset_id;
2925
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/v1/platform/datasets/${datasetIdToUse}/examples`, {
2926
+ method: "PATCH",
2927
+ headers: this.headers,
2928
+ body: formData,
2929
+ });
2930
+ const result = await response.json();
2931
+ return result;
2932
+ }
2933
+ /**
2934
+ * Upload examples with attachments using multipart form data.
2935
+ * @param uploads List of ExampleUploadWithAttachments objects to upload
2936
+ * @returns Promise with the upload response
2937
+ * @deprecated This method is deprecated and will be removed in future LangSmith versions, please use `createExamples` instead
2938
+ */
2939
+ async uploadExamplesMultipart(datasetId, uploads = []) {
2940
+ return this._uploadExamplesMultipart(datasetId, uploads);
2941
+ }
2942
+ async _uploadExamplesMultipart(datasetId, uploads = []) {
2943
+ if (!(await this._getMultiPartSupport())) {
2944
+ throw new Error("Your LangSmith version does not allow using the multipart examples endpoint, please update to the latest version.");
2945
+ }
2946
+ const formData = new FormData();
2947
+ for (const example of uploads) {
2948
+ const exampleId = (example.id ?? uuid.v4()).toString();
2949
+ // Prepare the main example body
2950
+ const exampleBody = {
2951
+ created_at: example.created_at,
2952
+ ...(example.metadata && { metadata: example.metadata }),
2953
+ ...(example.split && { split: example.split }),
2954
+ ...(example.source_run_id && { source_run_id: example.source_run_id }),
2955
+ ...(example.use_source_run_io && {
2956
+ use_source_run_io: example.use_source_run_io,
2957
+ }),
2958
+ ...(example.use_source_run_attachments && {
2959
+ use_source_run_attachments: example.use_source_run_attachments,
2960
+ }),
2961
+ };
2962
+ // Add main example data
2963
+ const stringifiedExample = serializePayloadForTracing(exampleBody);
2964
+ const exampleBlob = new Blob([stringifiedExample], {
2965
+ type: "application/json",
2966
+ });
2967
+ formData.append(exampleId, exampleBlob);
2968
+ // Add inputs if present
2969
+ if (example.inputs) {
2970
+ const stringifiedInputs = serializePayloadForTracing(example.inputs);
2971
+ const inputsBlob = new Blob([stringifiedInputs], {
2972
+ type: "application/json",
2973
+ });
2974
+ formData.append(`${exampleId}.inputs`, inputsBlob);
2975
+ }
2976
+ // Add outputs if present
2977
+ if (example.outputs) {
2978
+ const stringifiedOutputs = serializePayloadForTracing(example.outputs);
2979
+ const outputsBlob = new Blob([stringifiedOutputs], {
2980
+ type: "application/json",
2981
+ });
2982
+ formData.append(`${exampleId}.outputs`, outputsBlob);
2983
+ }
2984
+ // Add attachments if present
2985
+ if (example.attachments) {
2986
+ for (const [name, attachment] of Object.entries(example.attachments)) {
2987
+ let mimeType;
2988
+ let data;
2989
+ if (Array.isArray(attachment)) {
2990
+ [mimeType, data] = attachment;
2991
+ }
2992
+ else {
2993
+ mimeType = attachment.mimeType;
2994
+ data = attachment.data;
2995
+ }
2996
+ const attachmentBlob = new Blob([data], {
2997
+ type: `${mimeType}; length=${data.byteLength}`,
2998
+ });
2999
+ formData.append(`${exampleId}.attachment.${name}`, attachmentBlob);
3000
+ }
3001
+ }
3002
+ }
3003
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/v1/platform/datasets/${datasetId}/examples`, {
3004
+ method: "POST",
3005
+ headers: this.headers,
3006
+ body: formData,
3007
+ });
3008
+ const result = await response.json();
3009
+ return result;
3010
+ }
3011
+ async updatePrompt(promptIdentifier, options) {
3012
+ if (!(await this.promptExists(promptIdentifier))) {
3013
+ throw new Error("Prompt does not exist, you must create it first.");
3014
+ }
3015
+ const [owner, promptName] = parsePromptIdentifier(promptIdentifier);
3016
+ if (!(await this._currentTenantIsOwner(owner))) {
3017
+ throw await this._ownerConflictError("update a prompt", owner);
3018
+ }
3019
+ const payload = {};
3020
+ if (options?.description !== undefined)
3021
+ payload.description = options.description;
3022
+ if (options?.readme !== undefined)
3023
+ payload.readme = options.readme;
3024
+ if (options?.tags !== undefined)
3025
+ payload.tags = options.tags;
3026
+ if (options?.isPublic !== undefined)
3027
+ payload.is_public = options.isPublic;
3028
+ if (options?.isArchived !== undefined)
3029
+ payload.is_archived = options.isArchived;
3030
+ // Check if payload is empty
3031
+ if (Object.keys(payload).length === 0) {
3032
+ throw new Error("No valid update options provided");
3033
+ }
3034
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/repos/${owner}/${promptName}`, {
3035
+ method: "PATCH",
3036
+ body: JSON.stringify(payload),
3037
+ headers: {
3038
+ ...this.headers,
3039
+ "Content-Type": "application/json",
3040
+ },
3041
+ signal: AbortSignal.timeout(this.timeout_ms),
3042
+ ...this.fetchOptions,
3043
+ });
3044
+ await raiseForStatus(response, "update prompt");
3045
+ return response.json();
3046
+ }
3047
+ async deletePrompt(promptIdentifier) {
3048
+ if (!(await this.promptExists(promptIdentifier))) {
3049
+ throw new Error("Prompt does not exist, you must create it first.");
3050
+ }
3051
+ const [owner, promptName, _] = parsePromptIdentifier(promptIdentifier);
3052
+ if (!(await this._currentTenantIsOwner(owner))) {
3053
+ throw await this._ownerConflictError("delete a prompt", owner);
3054
+ }
3055
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/repos/${owner}/${promptName}`, {
3056
+ method: "DELETE",
3057
+ headers: this.headers,
3058
+ signal: AbortSignal.timeout(this.timeout_ms),
3059
+ ...this.fetchOptions,
3060
+ });
3061
+ return await response.json();
3062
+ }
3063
+ async pullPromptCommit(promptIdentifier, options) {
3064
+ const [owner, promptName, commitHash] = parsePromptIdentifier(promptIdentifier);
3065
+ const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/commits/${owner}/${promptName}/${commitHash}${options?.includeModel ? "?include_model=true" : ""}`, {
3066
+ method: "GET",
3067
+ headers: this.headers,
3068
+ signal: AbortSignal.timeout(this.timeout_ms),
3069
+ ...this.fetchOptions,
3070
+ });
3071
+ await raiseForStatus(response, "pull prompt commit");
3072
+ const result = await response.json();
3073
+ return {
3074
+ owner,
3075
+ repo: promptName,
3076
+ commit_hash: result.commit_hash,
3077
+ manifest: result.manifest,
3078
+ examples: result.examples,
3079
+ };
3080
+ }
3081
+ /**
3082
+ * This method should not be used directly, use `import { pull } from "langchain/hub"` instead.
3083
+ * Using this method directly returns the JSON string of the prompt rather than a LangChain object.
3084
+ * @private
3085
+ */
3086
+ async _pullPrompt(promptIdentifier, options) {
3087
+ const promptObject = await this.pullPromptCommit(promptIdentifier, {
3088
+ includeModel: options?.includeModel,
3089
+ });
3090
+ const prompt = JSON.stringify(promptObject.manifest);
3091
+ return prompt;
3092
+ }
3093
+ async pushPrompt(promptIdentifier, options) {
3094
+ // Create or update prompt metadata
3095
+ if (await this.promptExists(promptIdentifier)) {
3096
+ if (options && Object.keys(options).some((key) => key !== "object")) {
3097
+ await this.updatePrompt(promptIdentifier, {
3098
+ description: options?.description,
3099
+ readme: options?.readme,
3100
+ tags: options?.tags,
3101
+ isPublic: options?.isPublic,
3102
+ });
3103
+ }
3104
+ }
3105
+ else {
3106
+ await this.createPrompt(promptIdentifier, {
3107
+ description: options?.description,
3108
+ readme: options?.readme,
3109
+ tags: options?.tags,
3110
+ isPublic: options?.isPublic,
3111
+ });
3112
+ }
3113
+ if (!options?.object) {
3114
+ return await this._getPromptUrl(promptIdentifier);
3115
+ }
3116
+ // Create a commit with the new manifest
3117
+ const url = await this.createCommit(promptIdentifier, options?.object, {
3118
+ parentCommitHash: options?.parentCommitHash,
3119
+ });
3120
+ return url;
3121
+ }
3122
+ /**
3123
+ * Clone a public dataset to your own langsmith tenant.
3124
+ * This operation is idempotent. If you already have a dataset with the given name,
3125
+ * this function will do nothing.
3126
+
3127
+ * @param {string} tokenOrUrl The token of the public dataset to clone.
3128
+ * @param {Object} [options] Additional options for cloning the dataset.
3129
+ * @param {string} [options.sourceApiUrl] The URL of the langsmith server where the data is hosted. Defaults to the API URL of your current client.
3130
+ * @param {string} [options.datasetName] The name of the dataset to create in your tenant. Defaults to the name of the public dataset.
3131
+ * @returns {Promise<void>}
3132
+ */
3133
+ async clonePublicDataset(tokenOrUrl, options = {}) {
3134
+ const { sourceApiUrl = this.apiUrl, datasetName } = options;
3135
+ const [parsedApiUrl, tokenUuid] = this.parseTokenOrUrl(tokenOrUrl, sourceApiUrl);
3136
+ const sourceClient = new Client({
3137
+ apiUrl: parsedApiUrl,
3138
+ // Placeholder API key not needed anymore in most cases, but
3139
+ // some private deployments may have API key-based rate limiting
3140
+ // that would cause this to fail if we provide no value.
3141
+ apiKey: "placeholder",
3142
+ });
3143
+ const ds = await sourceClient.readSharedDataset(tokenUuid);
3144
+ const finalDatasetName = datasetName || ds.name;
3145
+ try {
3146
+ if (await this.hasDataset({ datasetId: finalDatasetName })) {
3147
+ console.log(`Dataset ${finalDatasetName} already exists in your tenant. Skipping.`);
3148
+ return;
3149
+ }
3150
+ }
3151
+ catch (_) {
3152
+ // `.hasDataset` will throw an error if the dataset does not exist.
3153
+ // no-op in that case
3154
+ }
3155
+ // Fetch examples first, then create the dataset
3156
+ const examples = await sourceClient.listSharedExamples(tokenUuid);
3157
+ const dataset = await this.createDataset(finalDatasetName, {
3158
+ description: ds.description,
3159
+ dataType: ds.data_type || "kv",
3160
+ inputsSchema: ds.inputs_schema_definition ?? undefined,
3161
+ outputsSchema: ds.outputs_schema_definition ?? undefined,
3162
+ });
3163
+ try {
3164
+ await this.createExamples({
3165
+ inputs: examples.map((e) => e.inputs),
3166
+ outputs: examples.flatMap((e) => (e.outputs ? [e.outputs] : [])),
3167
+ datasetId: dataset.id,
3168
+ });
3169
+ }
3170
+ catch (e) {
3171
+ console.error(`An error occurred while creating dataset ${finalDatasetName}. ` +
3172
+ "You should delete it manually.");
3173
+ throw e;
3174
+ }
3175
+ }
3176
+ parseTokenOrUrl(urlOrToken, apiUrl, numParts = 2, kind = "dataset") {
3177
+ // Try parsing as UUID
3178
+ try {
3179
+ assertUuid(urlOrToken); // Will throw if it's not a UUID.
3180
+ return [apiUrl, urlOrToken];
3181
+ }
3182
+ catch (_) {
3183
+ // no-op if it's not a uuid
3184
+ }
3185
+ // Parse as URL
3186
+ try {
3187
+ const parsedUrl = new URL(urlOrToken);
3188
+ const pathParts = parsedUrl.pathname
3189
+ .split("/")
3190
+ .filter((part) => part !== "");
3191
+ if (pathParts.length >= numParts) {
3192
+ const tokenUuid = pathParts[pathParts.length - numParts];
3193
+ return [apiUrl, tokenUuid];
3194
+ }
3195
+ else {
3196
+ throw new Error(`Invalid public ${kind} URL: ${urlOrToken}`);
3197
+ }
3198
+ }
3199
+ catch (error) {
3200
+ throw new Error(`Invalid public ${kind} URL or token: ${urlOrToken}`);
3201
+ }
3202
+ }
3203
+ /**
3204
+ * Awaits all pending trace batches. Useful for environments where
3205
+ * you need to be sure that all tracing requests finish before execution ends,
3206
+ * such as serverless environments.
3207
+ *
3208
+ * @example
3209
+ * ```
3210
+ * import { Client } from "langsmith";
3211
+ *
3212
+ * const client = new Client();
3213
+ *
3214
+ * try {
3215
+ * // Tracing happens here
3216
+ * ...
3217
+ * } finally {
3218
+ * await client.awaitPendingTraceBatches();
3219
+ * }
3220
+ * ```
3221
+ *
3222
+ * @returns A promise that resolves once all currently pending traces have sent.
3223
+ */
3224
+ awaitPendingTraceBatches() {
3225
+ if (this.manualFlushMode) {
3226
+ console.warn("[WARNING]: When tracing in manual flush mode, you must call `await client.flush()` manually to submit trace batches.");
3227
+ return Promise.resolve();
3228
+ }
3229
+ return Promise.all([
3230
+ ...this.autoBatchQueue.items.map(({ itemPromise }) => itemPromise),
3231
+ this.batchIngestCaller.queue.onIdle(),
3232
+ ]);
3233
+ }
3234
+ }
3235
+ function isExampleCreate(input) {
3236
+ return "dataset_id" in input || "dataset_name" in input;
3237
+ }