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