llama-stack-client 0.3.4-rc3 → 0.4.0-rc1

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 (573) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/README.md +19 -21
  3. package/error.d.ts.map +1 -1
  4. package/error.js +1 -0
  5. package/error.js.map +1 -1
  6. package/error.mjs.map +1 -1
  7. package/index.d.mts +23 -50
  8. package/index.d.ts +23 -50
  9. package/index.d.ts.map +1 -1
  10. package/index.js +20 -29
  11. package/index.js.map +1 -1
  12. package/index.mjs +18 -28
  13. package/index.mjs.map +1 -1
  14. package/lib/response-helpers.d.ts +23 -0
  15. package/lib/response-helpers.d.ts.map +1 -0
  16. package/lib/response-helpers.js +53 -0
  17. package/lib/response-helpers.js.map +1 -0
  18. package/lib/response-helpers.mjs +49 -0
  19. package/lib/response-helpers.mjs.map +1 -0
  20. package/package.json +1 -1
  21. package/pagination.d.ts.map +1 -1
  22. package/pagination.js +2 -4
  23. package/pagination.js.map +1 -1
  24. package/pagination.mjs +1 -4
  25. package/pagination.mjs.map +1 -1
  26. package/resource.d.ts.map +1 -1
  27. package/resource.js.map +1 -1
  28. package/resource.mjs.map +1 -1
  29. package/resources/alpha/alpha.d.ts +22 -0
  30. package/resources/alpha/alpha.d.ts.map +1 -0
  31. package/resources/alpha/alpha.js +57 -0
  32. package/resources/alpha/alpha.js.map +1 -0
  33. package/resources/alpha/alpha.mjs +30 -0
  34. package/resources/alpha/alpha.mjs.map +1 -0
  35. package/resources/{benchmarks.d.ts → alpha/benchmarks.d.ts} +25 -35
  36. package/resources/alpha/benchmarks.d.ts.map +1 -0
  37. package/resources/{benchmarks.js → alpha/benchmarks.js} +18 -4
  38. package/resources/alpha/benchmarks.js.map +1 -0
  39. package/resources/alpha/benchmarks.mjs +44 -0
  40. package/resources/alpha/benchmarks.mjs.map +1 -0
  41. package/resources/alpha/eval/eval.d.ts +160 -0
  42. package/resources/alpha/eval/eval.d.ts.map +1 -0
  43. package/resources/{eval → alpha/eval}/eval.js +7 -6
  44. package/resources/alpha/eval/eval.js.map +1 -0
  45. package/resources/{eval → alpha/eval}/eval.mjs +7 -5
  46. package/resources/alpha/eval/eval.mjs.map +1 -0
  47. package/resources/alpha/eval/index.d.ts +3 -0
  48. package/resources/alpha/eval/index.d.ts.map +1 -0
  49. package/resources/{eval → alpha/eval}/index.js +2 -1
  50. package/resources/alpha/eval/index.js.map +1 -0
  51. package/resources/{eval → alpha/eval}/index.mjs +2 -0
  52. package/resources/alpha/eval/index.mjs.map +1 -0
  53. package/resources/{eval → alpha/eval}/jobs.d.ts +2 -2
  54. package/resources/alpha/eval/jobs.d.ts.map +1 -0
  55. package/resources/{eval → alpha/eval}/jobs.js +6 -5
  56. package/resources/alpha/eval/jobs.js.map +1 -0
  57. package/resources/{eval → alpha/eval}/jobs.mjs +6 -4
  58. package/resources/alpha/eval/jobs.mjs.map +1 -0
  59. package/resources/alpha/eval.d.ts.map +1 -0
  60. package/resources/{eval.js → alpha/eval.js} +1 -0
  61. package/resources/alpha/eval.js.map +1 -0
  62. package/resources/alpha/eval.mjs.map +1 -0
  63. package/resources/alpha/index.d.ts +6 -0
  64. package/resources/alpha/index.d.ts.map +1 -0
  65. package/resources/alpha/index.js +21 -0
  66. package/resources/alpha/index.js.map +1 -0
  67. package/resources/alpha/index.mjs +13 -0
  68. package/resources/alpha/index.mjs.map +1 -0
  69. package/resources/alpha/inference.d.ts +85 -0
  70. package/resources/alpha/inference.d.ts.map +1 -0
  71. package/resources/{agents/steps.js → alpha/inference.js} +9 -8
  72. package/resources/alpha/inference.js.map +1 -0
  73. package/resources/alpha/inference.mjs +17 -0
  74. package/resources/alpha/inference.mjs.map +1 -0
  75. package/resources/alpha/post-training/index.d.ts +3 -0
  76. package/resources/alpha/post-training/index.d.ts.map +1 -0
  77. package/resources/{post-training → alpha/post-training}/index.js +2 -1
  78. package/resources/alpha/post-training/index.js.map +1 -0
  79. package/resources/{post-training → alpha/post-training}/index.mjs +2 -0
  80. package/resources/alpha/post-training/index.mjs.map +1 -0
  81. package/resources/alpha/post-training/job.d.ts +116 -0
  82. package/resources/alpha/post-training/job.d.ts.map +1 -0
  83. package/resources/{post-training → alpha/post-training}/job.js +7 -6
  84. package/resources/alpha/post-training/job.js.map +1 -0
  85. package/resources/{post-training → alpha/post-training}/job.mjs +7 -5
  86. package/resources/alpha/post-training/job.mjs.map +1 -0
  87. package/resources/alpha/post-training/post-training.d.ts +242 -0
  88. package/resources/alpha/post-training/post-training.d.ts.map +1 -0
  89. package/resources/{post-training → alpha/post-training}/post-training.js +5 -4
  90. package/resources/alpha/post-training/post-training.js.map +1 -0
  91. package/resources/{post-training → alpha/post-training}/post-training.mjs +5 -3
  92. package/resources/alpha/post-training/post-training.mjs.map +1 -0
  93. package/resources/alpha/post-training.d.ts.map +1 -0
  94. package/resources/{post-training.js → alpha/post-training.js} +2 -1
  95. package/resources/alpha/post-training.js.map +1 -0
  96. package/resources/{post-training.mjs → alpha/post-training.mjs} +2 -0
  97. package/resources/alpha/post-training.mjs.map +1 -0
  98. package/resources/alpha.d.ts +2 -0
  99. package/resources/alpha.d.ts.map +1 -0
  100. package/resources/alpha.js +25 -0
  101. package/resources/alpha.js.map +1 -0
  102. package/resources/alpha.mjs +9 -0
  103. package/resources/alpha.mjs.map +1 -0
  104. package/resources/batches.d.ts +322 -0
  105. package/resources/batches.d.ts.map +1 -0
  106. package/resources/batches.js +45 -0
  107. package/resources/batches.js.map +1 -0
  108. package/resources/batches.mjs +40 -0
  109. package/resources/batches.mjs.map +1 -0
  110. package/resources/beta/beta.d.ts +10 -0
  111. package/resources/beta/beta.d.ts.map +1 -0
  112. package/resources/{tool-runtime/tool-runtime.js → beta/beta.js} +10 -22
  113. package/resources/beta/beta.js.map +1 -0
  114. package/resources/beta/beta.mjs +18 -0
  115. package/resources/beta/beta.mjs.map +1 -0
  116. package/resources/beta/datasets.d.ts +257 -0
  117. package/resources/beta/datasets.d.ts.map +1 -0
  118. package/resources/{datasets.js → beta/datasets.js} +14 -9
  119. package/resources/beta/datasets.js.map +1 -0
  120. package/resources/{datasets.mjs → beta/datasets.mjs} +14 -8
  121. package/resources/beta/datasets.mjs.map +1 -0
  122. package/resources/beta/index.d.ts +3 -0
  123. package/resources/beta/index.d.ts.map +1 -0
  124. package/resources/beta/index.js +15 -0
  125. package/resources/beta/index.js.map +1 -0
  126. package/resources/beta/index.mjs +10 -0
  127. package/resources/beta/index.mjs.map +1 -0
  128. package/resources/beta.d.ts +2 -0
  129. package/resources/beta.d.ts.map +1 -0
  130. package/resources/{agents.js → beta.js} +4 -3
  131. package/resources/beta.js.map +1 -0
  132. package/resources/beta.mjs +9 -0
  133. package/resources/beta.mjs.map +1 -0
  134. package/resources/chat/chat.d.ts +73 -78
  135. package/resources/chat/chat.d.ts.map +1 -1
  136. package/resources/chat/chat.js +2 -2
  137. package/resources/chat/chat.js.map +1 -1
  138. package/resources/chat/chat.mjs +3 -2
  139. package/resources/chat/chat.mjs.map +1 -1
  140. package/resources/chat/completions.d.ts +756 -1402
  141. package/resources/chat/completions.d.ts.map +1 -1
  142. package/resources/chat/completions.js +8 -14
  143. package/resources/chat/completions.js.map +1 -1
  144. package/resources/chat/completions.mjs +7 -11
  145. package/resources/chat/completions.mjs.map +1 -1
  146. package/resources/chat/index.d.ts +1 -1
  147. package/resources/chat/index.d.ts.map +1 -1
  148. package/resources/chat/index.js +3 -3
  149. package/resources/chat/index.js.map +1 -1
  150. package/resources/chat/index.mjs +3 -1
  151. package/resources/chat/index.mjs.map +1 -1
  152. package/resources/chat.js +2 -1
  153. package/resources/chat.js.map +1 -1
  154. package/resources/chat.mjs +2 -0
  155. package/resources/chat.mjs.map +1 -1
  156. package/resources/completions.d.ts +52 -95
  157. package/resources/completions.d.ts.map +1 -1
  158. package/resources/completions.js +3 -6
  159. package/resources/completions.js.map +1 -1
  160. package/resources/completions.mjs +3 -5
  161. package/resources/completions.mjs.map +1 -1
  162. package/resources/conversations/conversations.d.ts +292 -0
  163. package/resources/conversations/conversations.d.ts.map +1 -0
  164. package/resources/conversations/conversations.js +78 -0
  165. package/resources/conversations/conversations.js.map +1 -0
  166. package/resources/conversations/conversations.mjs +51 -0
  167. package/resources/conversations/conversations.mjs.map +1 -0
  168. package/resources/conversations/index.d.ts +3 -0
  169. package/resources/conversations/index.d.ts.map +1 -0
  170. package/resources/conversations/index.js +16 -0
  171. package/resources/conversations/index.js.map +1 -0
  172. package/resources/conversations/index.mjs +10 -0
  173. package/resources/conversations/index.mjs.map +1 -0
  174. package/resources/conversations/items.d.ts +762 -0
  175. package/resources/conversations/items.d.ts.map +1 -0
  176. package/resources/conversations/items.js +51 -0
  177. package/resources/conversations/items.js.map +1 -0
  178. package/resources/conversations/items.mjs +46 -0
  179. package/resources/conversations/items.mjs.map +1 -0
  180. package/resources/conversations.d.ts +2 -0
  181. package/resources/conversations.d.ts.map +1 -0
  182. package/resources/conversations.js +25 -0
  183. package/resources/conversations.js.map +1 -0
  184. package/resources/conversations.mjs +9 -0
  185. package/resources/conversations.mjs.map +1 -0
  186. package/resources/embeddings.d.ts +10 -52
  187. package/resources/embeddings.d.ts.map +1 -1
  188. package/resources/embeddings.js +5 -2
  189. package/resources/embeddings.js.map +1 -1
  190. package/resources/embeddings.mjs +5 -1
  191. package/resources/embeddings.mjs.map +1 -1
  192. package/resources/files.d.ts +44 -54
  193. package/resources/files.d.ts.map +1 -1
  194. package/resources/files.js +18 -9
  195. package/resources/files.js.map +1 -1
  196. package/resources/files.mjs +18 -8
  197. package/resources/files.mjs.map +1 -1
  198. package/resources/index.d.ts +9 -13
  199. package/resources/index.d.ts.map +1 -1
  200. package/resources/index.js +15 -21
  201. package/resources/index.js.map +1 -1
  202. package/resources/index.mjs +9 -11
  203. package/resources/index.mjs.map +1 -1
  204. package/resources/inspect.d.ts +6 -32
  205. package/resources/inspect.d.ts.map +1 -1
  206. package/resources/inspect.js +6 -1
  207. package/resources/inspect.js.map +1 -1
  208. package/resources/inspect.mjs +6 -0
  209. package/resources/inspect.mjs.map +1 -1
  210. package/resources/models/index.d.ts +2 -2
  211. package/resources/models/index.d.ts.map +1 -1
  212. package/resources/models/index.js +2 -1
  213. package/resources/models/index.js.map +1 -1
  214. package/resources/models/index.mjs +2 -0
  215. package/resources/models/index.mjs.map +1 -1
  216. package/resources/models/models.d.ts +71 -31
  217. package/resources/models/models.d.ts.map +1 -1
  218. package/resources/models/models.js +13 -2
  219. package/resources/models/models.js.map +1 -1
  220. package/resources/models/models.mjs +13 -1
  221. package/resources/models/models.mjs.map +1 -1
  222. package/resources/models/openai.d.ts +2 -16
  223. package/resources/models/openai.d.ts.map +1 -1
  224. package/resources/models/openai.js +3 -2
  225. package/resources/models/openai.js.map +1 -1
  226. package/resources/models/openai.mjs +3 -1
  227. package/resources/models/openai.mjs.map +1 -1
  228. package/resources/models.js +2 -1
  229. package/resources/models.js.map +1 -1
  230. package/resources/models.mjs +2 -0
  231. package/resources/models.mjs.map +1 -1
  232. package/resources/moderations.d.ts +9 -35
  233. package/resources/moderations.d.ts.map +1 -1
  234. package/resources/moderations.js +5 -2
  235. package/resources/moderations.js.map +1 -1
  236. package/resources/moderations.mjs +5 -1
  237. package/resources/moderations.mjs.map +1 -1
  238. package/resources/prompts/index.d.ts +3 -0
  239. package/resources/prompts/index.d.ts.map +1 -0
  240. package/resources/prompts/index.js +15 -0
  241. package/resources/prompts/index.js.map +1 -0
  242. package/resources/prompts/index.mjs +10 -0
  243. package/resources/prompts/index.mjs.map +1 -0
  244. package/resources/prompts/prompts.d.ts +96 -0
  245. package/resources/prompts/prompts.d.ts.map +1 -0
  246. package/resources/{agents/agents.js → prompts/prompts.js} +43 -30
  247. package/resources/prompts/prompts.js.map +1 -0
  248. package/resources/prompts/prompts.mjs +66 -0
  249. package/resources/prompts/prompts.mjs.map +1 -0
  250. package/resources/prompts/versions.d.ts +12 -0
  251. package/resources/prompts/versions.d.ts.map +1 -0
  252. package/resources/prompts/versions.js +23 -0
  253. package/resources/prompts/versions.js.map +1 -0
  254. package/resources/prompts/versions.mjs +19 -0
  255. package/resources/prompts/versions.mjs.map +1 -0
  256. package/resources/prompts.d.ts +2 -0
  257. package/resources/prompts.d.ts.map +1 -0
  258. package/resources/prompts.js +25 -0
  259. package/resources/prompts.js.map +1 -0
  260. package/resources/prompts.mjs +9 -0
  261. package/resources/prompts.mjs.map +1 -0
  262. package/resources/providers.d.ts +4 -6
  263. package/resources/providers.d.ts.map +1 -1
  264. package/resources/providers.js +6 -1
  265. package/resources/providers.js.map +1 -1
  266. package/resources/providers.mjs +6 -0
  267. package/resources/providers.mjs.map +1 -1
  268. package/resources/responses/index.js +2 -1
  269. package/resources/responses/index.js.map +1 -1
  270. package/resources/responses/index.mjs +2 -0
  271. package/resources/responses/index.mjs.map +1 -1
  272. package/resources/responses/input-items.d.ts +190 -151
  273. package/resources/responses/input-items.d.ts.map +1 -1
  274. package/resources/responses/input-items.js +3 -2
  275. package/resources/responses/input-items.js.map +1 -1
  276. package/resources/responses/input-items.mjs +3 -1
  277. package/resources/responses/input-items.mjs.map +1 -1
  278. package/resources/responses/responses.d.ts +1387 -1449
  279. package/resources/responses/responses.d.ts.map +1 -1
  280. package/resources/responses/responses.js +8 -11
  281. package/resources/responses/responses.js.map +1 -1
  282. package/resources/responses/responses.mjs +8 -10
  283. package/resources/responses/responses.mjs.map +1 -1
  284. package/resources/responses.js +2 -1
  285. package/resources/responses.js.map +1 -1
  286. package/resources/responses.mjs +2 -0
  287. package/resources/responses.mjs.map +1 -1
  288. package/resources/routes.d.ts +7 -7
  289. package/resources/routes.d.ts.map +1 -1
  290. package/resources/routes.js +8 -6
  291. package/resources/routes.js.map +1 -1
  292. package/resources/routes.mjs +8 -5
  293. package/resources/routes.mjs.map +1 -1
  294. package/resources/safety.d.ts +144 -10
  295. package/resources/safety.d.ts.map +1 -1
  296. package/resources/safety.js +4 -1
  297. package/resources/safety.js.map +1 -1
  298. package/resources/safety.mjs +4 -0
  299. package/resources/safety.mjs.map +1 -1
  300. package/resources/scoring-functions.d.ts +120 -50
  301. package/resources/scoring-functions.d.ts.map +1 -1
  302. package/resources/scoring-functions.js +15 -1
  303. package/resources/scoring-functions.js.map +1 -1
  304. package/resources/scoring-functions.mjs +15 -0
  305. package/resources/scoring-functions.mjs.map +1 -1
  306. package/resources/scoring.d.ts +85 -26
  307. package/resources/scoring.d.ts.map +1 -1
  308. package/resources/scoring.js +2 -1
  309. package/resources/scoring.js.map +1 -1
  310. package/resources/scoring.mjs +2 -0
  311. package/resources/scoring.mjs.map +1 -1
  312. package/resources/shared.d.ts +125 -629
  313. package/resources/shared.d.ts.map +1 -1
  314. package/resources/shared.js +2 -0
  315. package/resources/shared.js.map +1 -1
  316. package/resources/shared.mjs +2 -0
  317. package/resources/shared.mjs.map +1 -1
  318. package/resources/shields.d.ts +19 -24
  319. package/resources/shields.d.ts.map +1 -1
  320. package/resources/shields.js +6 -1
  321. package/resources/shields.js.map +1 -1
  322. package/resources/shields.mjs +6 -0
  323. package/resources/shields.mjs.map +1 -1
  324. package/resources/tool-runtime.d.ts +151 -1
  325. package/resources/tool-runtime.d.ts.map +1 -1
  326. package/resources/tool-runtime.js +22 -16
  327. package/resources/tool-runtime.js.map +1 -1
  328. package/resources/tool-runtime.mjs +20 -1
  329. package/resources/tool-runtime.mjs.map +1 -1
  330. package/resources/toolgroups.d.ts +27 -37
  331. package/resources/toolgroups.d.ts.map +1 -1
  332. package/resources/toolgroups.js +10 -1
  333. package/resources/toolgroups.js.map +1 -1
  334. package/resources/toolgroups.mjs +10 -0
  335. package/resources/toolgroups.mjs.map +1 -1
  336. package/resources/tools.d.ts +9 -76
  337. package/resources/tools.d.ts.map +1 -1
  338. package/resources/tools.js +4 -1
  339. package/resources/tools.js.map +1 -1
  340. package/resources/tools.mjs +4 -0
  341. package/resources/tools.mjs.map +1 -1
  342. package/resources/vector-io.d.ts +272 -148
  343. package/resources/vector-io.d.ts.map +1 -1
  344. package/resources/vector-io.js +2 -1
  345. package/resources/vector-io.js.map +1 -1
  346. package/resources/vector-io.mjs +2 -0
  347. package/resources/vector-io.mjs.map +1 -1
  348. package/resources/vector-stores/file-batches.d.ts +111 -0
  349. package/resources/vector-stores/file-batches.d.ts.map +1 -0
  350. package/resources/vector-stores/file-batches.js +45 -0
  351. package/resources/vector-stores/file-batches.js.map +1 -0
  352. package/resources/vector-stores/file-batches.mjs +41 -0
  353. package/resources/vector-stores/file-batches.mjs.map +1 -0
  354. package/resources/vector-stores/files.d.ts +83 -135
  355. package/resources/vector-stores/files.d.ts.map +1 -1
  356. package/resources/vector-stores/files.js +15 -14
  357. package/resources/vector-stores/files.js.map +1 -1
  358. package/resources/vector-stores/files.mjs +15 -13
  359. package/resources/vector-stores/files.mjs.map +1 -1
  360. package/resources/vector-stores/index.d.ts +2 -1
  361. package/resources/vector-stores/index.d.ts.map +1 -1
  362. package/resources/vector-stores/index.js +5 -2
  363. package/resources/vector-stores/index.js.map +1 -1
  364. package/resources/vector-stores/index.mjs +3 -0
  365. package/resources/vector-stores/index.mjs.map +1 -1
  366. package/resources/vector-stores/vector-stores.d.ts +118 -217
  367. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  368. package/resources/vector-stores/vector-stores.js +18 -12
  369. package/resources/vector-stores/vector-stores.js.map +1 -1
  370. package/resources/vector-stores/vector-stores.mjs +18 -11
  371. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  372. package/resources/vector-stores.js +2 -1
  373. package/resources/vector-stores.js.map +1 -1
  374. package/resources/vector-stores.mjs +2 -0
  375. package/resources/vector-stores.mjs.map +1 -1
  376. package/src/error.ts +1 -0
  377. package/src/index.ts +82 -252
  378. package/src/lib/response-helpers.ts +60 -0
  379. package/src/pagination.ts +2 -5
  380. package/src/resource.ts +1 -0
  381. package/src/resources/alpha/alpha.ts +85 -0
  382. package/src/resources/{benchmarks.ts → alpha/benchmarks.ts} +36 -37
  383. package/src/resources/{eval → alpha/eval}/eval.ts +83 -65
  384. package/src/resources/{eval → alpha/eval}/index.ts +1 -2
  385. package/src/resources/{eval → alpha/eval}/jobs.ts +6 -6
  386. package/src/resources/{eval.ts → alpha/eval.ts} +1 -0
  387. package/src/resources/alpha/index.ts +34 -0
  388. package/src/resources/alpha/inference.ts +132 -0
  389. package/src/resources/{post-training → alpha/post-training}/index.ts +2 -2
  390. package/src/resources/alpha/post-training/job.ts +182 -0
  391. package/src/resources/alpha/post-training/post-training.ts +369 -0
  392. package/src/resources/{post-training.ts → alpha/post-training.ts} +1 -1
  393. package/src/resources/alpha.ts +9 -0
  394. package/src/resources/batches.ts +572 -0
  395. package/src/resources/beta/beta.ts +41 -0
  396. package/src/resources/beta/datasets.ts +350 -0
  397. package/src/resources/beta/index.ts +20 -0
  398. package/src/resources/{agents.ts → beta.ts} +2 -2
  399. package/src/resources/chat/chat.ts +82 -81
  400. package/src/resources/chat/completions.ts +874 -1484
  401. package/src/resources/chat/index.ts +1 -2
  402. package/src/resources/chat.ts +1 -1
  403. package/src/resources/completions.ts +57 -101
  404. package/src/resources/conversations/conversations.ts +455 -0
  405. package/src/resources/conversations/index.ts +25 -0
  406. package/src/resources/conversations/items.ts +1221 -0
  407. package/src/resources/conversations.ts +9 -0
  408. package/src/resources/embeddings.ts +14 -55
  409. package/src/resources/files.ts +54 -61
  410. package/src/resources/index.ts +33 -109
  411. package/src/resources/inspect.ts +7 -33
  412. package/src/resources/models/index.ts +4 -2
  413. package/src/resources/models/models.ts +79 -30
  414. package/src/resources/models/openai.ts +4 -24
  415. package/src/resources/models.ts +1 -1
  416. package/src/resources/moderations.ts +10 -36
  417. package/src/resources/prompts/index.ts +19 -0
  418. package/src/resources/prompts/prompts.ts +171 -0
  419. package/src/resources/prompts/versions.ts +26 -0
  420. package/src/resources/prompts.ts +9 -0
  421. package/src/resources/providers.ts +5 -7
  422. package/src/resources/responses/index.ts +1 -1
  423. package/src/resources/responses/input-items.ts +293 -161
  424. package/src/resources/responses/responses.ts +2112 -1632
  425. package/src/resources/responses.ts +1 -1
  426. package/src/resources/routes.ts +25 -10
  427. package/src/resources/safety.ts +199 -9
  428. package/src/resources/scoring-functions.ts +168 -52
  429. package/src/resources/scoring.ts +125 -22
  430. package/src/resources/shared.ts +141 -714
  431. package/src/resources/shields.ts +18 -23
  432. package/src/resources/tool-runtime.ts +210 -2
  433. package/src/resources/toolgroups.ts +26 -36
  434. package/src/resources/tools.ts +10 -94
  435. package/src/resources/vector-io.ts +323 -145
  436. package/src/resources/vector-stores/file-batches.ts +201 -0
  437. package/src/resources/vector-stores/files.ts +123 -143
  438. package/src/resources/vector-stores/index.ts +9 -1
  439. package/src/resources/vector-stores/vector-stores.ts +150 -216
  440. package/src/resources/vector-stores.ts +1 -1
  441. package/src/version.ts +1 -1
  442. package/version.d.ts +1 -1
  443. package/version.js +1 -1
  444. package/version.mjs +1 -1
  445. package/resources/agents/agents.d.ts +0 -246
  446. package/resources/agents/agents.d.ts.map +0 -1
  447. package/resources/agents/agents.js.map +0 -1
  448. package/resources/agents/agents.mjs +0 -52
  449. package/resources/agents/agents.mjs.map +0 -1
  450. package/resources/agents/index.d.ts +0 -5
  451. package/resources/agents/index.d.ts.map +0 -1
  452. package/resources/agents/index.js +0 -18
  453. package/resources/agents/index.js.map +0 -1
  454. package/resources/agents/index.mjs +0 -10
  455. package/resources/agents/index.mjs.map +0 -1
  456. package/resources/agents/session.d.ts +0 -98
  457. package/resources/agents/session.d.ts.map +0 -1
  458. package/resources/agents/session.js +0 -42
  459. package/resources/agents/session.js.map +0 -1
  460. package/resources/agents/session.mjs +0 -37
  461. package/resources/agents/session.mjs.map +0 -1
  462. package/resources/agents/steps.d.ts +0 -22
  463. package/resources/agents/steps.d.ts.map +0 -1
  464. package/resources/agents/steps.js.map +0 -1
  465. package/resources/agents/steps.mjs +0 -15
  466. package/resources/agents/steps.mjs.map +0 -1
  467. package/resources/agents/turn.d.ts +0 -461
  468. package/resources/agents/turn.d.ts.map +0 -1
  469. package/resources/agents/turn.js +0 -34
  470. package/resources/agents/turn.js.map +0 -1
  471. package/resources/agents/turn.mjs +0 -29
  472. package/resources/agents/turn.mjs.map +0 -1
  473. package/resources/agents.d.ts +0 -2
  474. package/resources/agents.d.ts.map +0 -1
  475. package/resources/agents.js.map +0 -1
  476. package/resources/agents.mjs +0 -7
  477. package/resources/agents.mjs.map +0 -1
  478. package/resources/benchmarks.d.ts.map +0 -1
  479. package/resources/benchmarks.js.map +0 -1
  480. package/resources/benchmarks.mjs +0 -31
  481. package/resources/benchmarks.mjs.map +0 -1
  482. package/resources/datasets.d.ts +0 -320
  483. package/resources/datasets.d.ts.map +0 -1
  484. package/resources/datasets.js.map +0 -1
  485. package/resources/datasets.mjs.map +0 -1
  486. package/resources/eval/eval.d.ts +0 -159
  487. package/resources/eval/eval.d.ts.map +0 -1
  488. package/resources/eval/eval.js.map +0 -1
  489. package/resources/eval/eval.mjs.map +0 -1
  490. package/resources/eval/index.d.ts +0 -3
  491. package/resources/eval/index.d.ts.map +0 -1
  492. package/resources/eval/index.js.map +0 -1
  493. package/resources/eval/index.mjs.map +0 -1
  494. package/resources/eval/jobs.d.ts.map +0 -1
  495. package/resources/eval/jobs.js.map +0 -1
  496. package/resources/eval/jobs.mjs.map +0 -1
  497. package/resources/eval.d.ts.map +0 -1
  498. package/resources/eval.js.map +0 -1
  499. package/resources/eval.mjs.map +0 -1
  500. package/resources/inference.d.ts +0 -580
  501. package/resources/inference.d.ts.map +0 -1
  502. package/resources/inference.js +0 -54
  503. package/resources/inference.js.map +0 -1
  504. package/resources/inference.mjs +0 -49
  505. package/resources/inference.mjs.map +0 -1
  506. package/resources/post-training/index.d.ts +0 -3
  507. package/resources/post-training/index.d.ts.map +0 -1
  508. package/resources/post-training/index.js.map +0 -1
  509. package/resources/post-training/index.mjs.map +0 -1
  510. package/resources/post-training/job.d.ts +0 -205
  511. package/resources/post-training/job.d.ts.map +0 -1
  512. package/resources/post-training/job.js.map +0 -1
  513. package/resources/post-training/job.mjs.map +0 -1
  514. package/resources/post-training/post-training.d.ts +0 -402
  515. package/resources/post-training/post-training.d.ts.map +0 -1
  516. package/resources/post-training/post-training.js.map +0 -1
  517. package/resources/post-training/post-training.mjs.map +0 -1
  518. package/resources/post-training.d.ts.map +0 -1
  519. package/resources/post-training.js.map +0 -1
  520. package/resources/post-training.mjs.map +0 -1
  521. package/resources/synthetic-data-generation.d.ts +0 -47
  522. package/resources/synthetic-data-generation.d.ts.map +0 -1
  523. package/resources/synthetic-data-generation.js +0 -20
  524. package/resources/synthetic-data-generation.js.map +0 -1
  525. package/resources/synthetic-data-generation.mjs +0 -15
  526. package/resources/synthetic-data-generation.mjs.map +0 -1
  527. package/resources/telemetry.d.ts +0 -519
  528. package/resources/telemetry.d.ts.map +0 -1
  529. package/resources/telemetry.js +0 -70
  530. package/resources/telemetry.js.map +0 -1
  531. package/resources/telemetry.mjs +0 -65
  532. package/resources/telemetry.mjs.map +0 -1
  533. package/resources/tool-runtime/index.d.ts +0 -3
  534. package/resources/tool-runtime/index.d.ts.map +0 -1
  535. package/resources/tool-runtime/index.js +0 -14
  536. package/resources/tool-runtime/index.js.map +0 -1
  537. package/resources/tool-runtime/index.mjs +0 -8
  538. package/resources/tool-runtime/index.mjs.map +0 -1
  539. package/resources/tool-runtime/rag-tool.d.ts +0 -45
  540. package/resources/tool-runtime/rag-tool.d.ts.map +0 -1
  541. package/resources/tool-runtime/rag-tool.js +0 -30
  542. package/resources/tool-runtime/rag-tool.js.map +0 -1
  543. package/resources/tool-runtime/rag-tool.mjs +0 -25
  544. package/resources/tool-runtime/rag-tool.mjs.map +0 -1
  545. package/resources/tool-runtime/tool-runtime.d.ts +0 -132
  546. package/resources/tool-runtime/tool-runtime.d.ts.map +0 -1
  547. package/resources/tool-runtime/tool-runtime.js.map +0 -1
  548. package/resources/tool-runtime/tool-runtime.mjs +0 -29
  549. package/resources/tool-runtime/tool-runtime.mjs.map +0 -1
  550. package/resources/vector-dbs.d.ts +0 -128
  551. package/resources/vector-dbs.d.ts.map +0 -1
  552. package/resources/vector-dbs.js +0 -41
  553. package/resources/vector-dbs.js.map +0 -1
  554. package/resources/vector-dbs.mjs +0 -36
  555. package/resources/vector-dbs.mjs.map +0 -1
  556. package/src/resources/agents/agents.ts +0 -372
  557. package/src/resources/agents/index.ts +0 -44
  558. package/src/resources/agents/session.ts +0 -169
  559. package/src/resources/agents/steps.ts +0 -47
  560. package/src/resources/agents/turn.ts +0 -638
  561. package/src/resources/datasets.ts +0 -413
  562. package/src/resources/inference.ts +0 -768
  563. package/src/resources/post-training/job.ts +0 -274
  564. package/src/resources/post-training/post-training.ts +0 -516
  565. package/src/resources/synthetic-data-generation.ts +0 -65
  566. package/src/resources/telemetry.ts +0 -692
  567. package/src/resources/tool-runtime/index.ts +0 -17
  568. package/src/resources/tool-runtime/rag-tool.ts +0 -69
  569. package/src/resources/tool-runtime/tool-runtime.ts +0 -191
  570. package/src/resources/vector-dbs.ts +0 -191
  571. /package/resources/{eval.d.ts → alpha/eval.d.ts} +0 -0
  572. /package/resources/{eval.mjs → alpha/eval.mjs} +0 -0
  573. /package/resources/{post-training.d.ts → alpha/post-training.d.ts} +0 -0
@@ -1,70 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Meta Platforms, Inc. and affiliates.
3
- // All rights reserved.
4
- //
5
- // This source code is licensed under the terms described in the LICENSE file in
6
- // the root directory of this source tree.
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.Telemetry = void 0;
9
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
10
- const resource_1 = require("../resource.js");
11
- class Telemetry extends resource_1.APIResource {
12
- /**
13
- * Get a span by its ID.
14
- */
15
- getSpan(traceId, spanId, options) {
16
- return this._client.get(`/v1/telemetry/traces/${traceId}/spans/${spanId}`, options);
17
- }
18
- /**
19
- * Get a span tree by its ID.
20
- */
21
- getSpanTree(spanId, body, options) {
22
- return this._client.post(`/v1/telemetry/spans/${spanId}/tree`, { body, ...options })._thenUnwrap((obj) => obj.data);
23
- }
24
- /**
25
- * Get a trace by its ID.
26
- */
27
- getTrace(traceId, options) {
28
- return this._client.get(`/v1/telemetry/traces/${traceId}`, options);
29
- }
30
- /**
31
- * Log an event.
32
- */
33
- logEvent(body, options) {
34
- return this._client.post('/v1/telemetry/events', {
35
- body,
36
- ...options,
37
- headers: { Accept: '*/*', ...options?.headers },
38
- });
39
- }
40
- /**
41
- * Query metrics.
42
- */
43
- queryMetrics(metricName, body, options) {
44
- return this._client.post(`/v1/telemetry/metrics/${metricName}`, { body, ...options })._thenUnwrap((obj) => obj.data);
45
- }
46
- /**
47
- * Query spans.
48
- */
49
- querySpans(body, options) {
50
- return this._client.post('/v1/telemetry/spans', { body, ...options })._thenUnwrap((obj) => obj.data);
51
- }
52
- /**
53
- * Query traces.
54
- */
55
- queryTraces(body, options) {
56
- return this._client.post('/v1/telemetry/traces', { body, ...options })._thenUnwrap((obj) => obj.data);
57
- }
58
- /**
59
- * Save spans to a dataset.
60
- */
61
- saveSpansToDataset(body, options) {
62
- return this._client.post('/v1/telemetry/spans/export', {
63
- body,
64
- ...options,
65
- headers: { Accept: '*/*', ...options?.headers },
66
- });
67
- }
68
- }
69
- exports.Telemetry = Telemetry;
70
- //# sourceMappingURL=telemetry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/resources/telemetry.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;;;AAE1C,sFAAsF;AAEtF,6CAA0C;AAG1C,MAAa,SAAU,SAAQ,sBAAW;IACxC;;OAEG;IACH,OAAO,CACL,OAAe,EACf,MAAc,EACd,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,OAAO,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAED;;OAEG;IACH,WAAW,CACT,MAAc,EACd,IAAgC,EAChC,OAA6B;QAE7B,OACE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,u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CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,kBAAkB,CAChB,IAAuC,EACvC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF;AArGD,8BAqGC"}
@@ -1,65 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
- // All rights reserved.
3
- //
4
- // This source code is licensed under the terms described in the LICENSE file in
5
- // the root directory of this source tree.
6
- import { APIResource } from "../resource.mjs";
7
- export class Telemetry extends APIResource {
8
- /**
9
- * Get a span by its ID.
10
- */
11
- getSpan(traceId, spanId, options) {
12
- return this._client.get(`/v1/telemetry/traces/${traceId}/spans/${spanId}`, options);
13
- }
14
- /**
15
- * Get a span tree by its ID.
16
- */
17
- getSpanTree(spanId, body, options) {
18
- return this._client.post(`/v1/telemetry/spans/${spanId}/tree`, { body, ...options })._thenUnwrap((obj) => obj.data);
19
- }
20
- /**
21
- * Get a trace by its ID.
22
- */
23
- getTrace(traceId, options) {
24
- return this._client.get(`/v1/telemetry/traces/${traceId}`, options);
25
- }
26
- /**
27
- * Log an event.
28
- */
29
- logEvent(body, options) {
30
- return this._client.post('/v1/telemetry/events', {
31
- body,
32
- ...options,
33
- headers: { Accept: '*/*', ...options?.headers },
34
- });
35
- }
36
- /**
37
- * Query metrics.
38
- */
39
- queryMetrics(metricName, body, options) {
40
- return this._client.post(`/v1/telemetry/metrics/${metricName}`, { body, ...options })._thenUnwrap((obj) => obj.data);
41
- }
42
- /**
43
- * Query spans.
44
- */
45
- querySpans(body, options) {
46
- return this._client.post('/v1/telemetry/spans', { body, ...options })._thenUnwrap((obj) => obj.data);
47
- }
48
- /**
49
- * Query traces.
50
- */
51
- queryTraces(body, options) {
52
- return this._client.post('/v1/telemetry/traces', { body, ...options })._thenUnwrap((obj) => obj.data);
53
- }
54
- /**
55
- * Save spans to a dataset.
56
- */
57
- saveSpansToDataset(body, options) {
58
- return this._client.post('/v1/telemetry/spans/export', {
59
- body,
60
- ...options,
61
- headers: { Accept: '*/*', ...options?.headers },
62
- });
63
- }
64
- }
65
- //# sourceMappingURL=telemetry.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"telemetry.mjs","sourceRoot":"","sources":["../src/resources/telemetry.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;OAInC,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,OAAO,CACL,OAAe,EACf,MAAc,EACd,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,OAAO,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAED;;OAEG;IACH,WAAW,CACT,MAAc,EACd,IAAgC,EAChC,OAA6B;QAE7B,OACE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,MAAM,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAG7E,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,IAA6B,EAAE,OAA6B;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,IA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, type ToolDef, type ToolInvocationResult, type ToolRuntimeListToolsResponse, type ToolRuntimeInvokeToolParams, type ToolRuntimeListToolsParams, } from "./tool-runtime.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/tool-runtime/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,EACL,WAAW,EACX,KAAK,OAAO,EACZ,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,GAChC,MAAM,gBAAgB,CAAC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Meta Platforms, Inc. and affiliates.
3
- // All rights reserved.
4
- //
5
- // This source code is licensed under the terms described in the LICENSE file in
6
- // the root directory of this source tree.
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ToolRuntime = exports.RagTool = void 0;
9
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
10
- var rag_tool_1 = require("./rag-tool.js");
11
- Object.defineProperty(exports, "RagTool", { enumerable: true, get: function () { return rag_tool_1.RagTool; } });
12
- var tool_runtime_1 = require("./tool-runtime.js");
13
- Object.defineProperty(exports, "ToolRuntime", { enumerable: true, get: function () { return tool_runtime_1.ToolRuntime; } });
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/tool-runtime/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;;;AAE1C,sFAAsF;AAEtF,0CAAwF;AAA/E,mGAAA,OAAO,OAAA;AAChB,kDAOwB;AANtB,2GAAA,WAAW,OAAA"}
@@ -1,8 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
- // All rights reserved.
3
- //
4
- // This source code is licensed under the terms described in the LICENSE file in
5
- // the root directory of this source tree.
6
- export { RagTool } from "./rag-tool.mjs";
7
- export { ToolRuntime, } from "./tool-runtime.mjs";
8
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/tool-runtime/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;OAInC,EAAE,OAAO,EAAqD;OAC9D,EACL,WAAW,GAMZ"}
@@ -1,45 +0,0 @@
1
- import { APIResource } from "../../resource.js";
2
- import * as Core from "../../core.js";
3
- import * as Shared from "../shared.js";
4
- export declare class RagTool extends APIResource {
5
- /**
6
- * Index documents so they can be used by the RAG system.
7
- */
8
- insert(body: RagToolInsertParams, options?: Core.RequestOptions): Core.APIPromise<void>;
9
- /**
10
- * Query the RAG system for context; typically invoked by the agent.
11
- */
12
- query(body: RagToolQueryParams, options?: Core.RequestOptions): Core.APIPromise<Shared.QueryResult>;
13
- }
14
- export interface RagToolInsertParams {
15
- /**
16
- * (Optional) Size in tokens for document chunking during indexing
17
- */
18
- chunk_size_in_tokens: number;
19
- /**
20
- * List of documents to index in the RAG system
21
- */
22
- documents: Array<Shared.Document>;
23
- /**
24
- * ID of the vector database to store the document embeddings
25
- */
26
- vector_db_id: string;
27
- }
28
- export interface RagToolQueryParams {
29
- /**
30
- * The query content to search for in the indexed documents
31
- */
32
- content: Shared.InterleavedContent;
33
- /**
34
- * List of vector database IDs to search within
35
- */
36
- vector_db_ids: Array<string>;
37
- /**
38
- * (Optional) Configuration parameters for the query operation
39
- */
40
- query_config?: Shared.QueryConfig;
41
- }
42
- export declare namespace RagTool {
43
- export { type RagToolInsertParams as RagToolInsertParams, type RagToolQueryParams as RagToolQueryParams };
44
- }
45
- //# sourceMappingURL=rag-tool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rag-tool.d.ts","sourceRoot":"","sources":["../../src/resources/tool-runtime/rag-tool.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAEpC,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAQvF;;OAEG;IACH,KAAK,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC;CAGpG;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAElC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,kBAAkB,CAAC;IAEnC;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CAC3G"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Meta Platforms, Inc. and affiliates.
3
- // All rights reserved.
4
- //
5
- // This source code is licensed under the terms described in the LICENSE file in
6
- // the root directory of this source tree.
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.RagTool = void 0;
9
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
10
- const resource_1 = require("../../resource.js");
11
- class RagTool extends resource_1.APIResource {
12
- /**
13
- * Index documents so they can be used by the RAG system.
14
- */
15
- insert(body, options) {
16
- return this._client.post('/v1/tool-runtime/rag-tool/insert', {
17
- body,
18
- ...options,
19
- headers: { Accept: '*/*', ...options?.headers },
20
- });
21
- }
22
- /**
23
- * Query the RAG system for context; typically invoked by the agent.
24
- */
25
- query(body, options) {
26
- return this._client.post('/v1/tool-runtime/rag-tool/query', { body, ...options });
27
- }
28
- }
29
- exports.RagTool = RagTool;
30
- //# sourceMappingURL=rag-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rag-tool.js","sourceRoot":"","sources":["../../src/resources/tool-runtime/rag-tool.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;;;AAE1C,sFAAsF;AAEtF,gDAA6C;AAI7C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE;YAC3D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAwB,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF;AAlBD,0BAkBC"}
@@ -1,25 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
- // All rights reserved.
3
- //
4
- // This source code is licensed under the terms described in the LICENSE file in
5
- // the root directory of this source tree.
6
- import { APIResource } from "../../resource.mjs";
7
- export class RagTool extends APIResource {
8
- /**
9
- * Index documents so they can be used by the RAG system.
10
- */
11
- insert(body, options) {
12
- return this._client.post('/v1/tool-runtime/rag-tool/insert', {
13
- body,
14
- ...options,
15
- headers: { Accept: '*/*', ...options?.headers },
16
- });
17
- }
18
- /**
19
- * Query the RAG system for context; typically invoked by the agent.
20
- */
21
- query(body, options) {
22
- return this._client.post('/v1/tool-runtime/rag-tool/query', { body, ...options });
23
- }
24
- }
25
- //# sourceMappingURL=rag-tool.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rag-tool.mjs","sourceRoot":"","sources":["../../src/resources/tool-runtime/rag-tool.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;OAInC,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE;YAC3D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAwB,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF"}
@@ -1,132 +0,0 @@
1
- import { APIResource } from "../../resource.js";
2
- import * as Core from "../../core.js";
3
- import * as Shared from "../shared.js";
4
- import * as RagToolAPI from "./rag-tool.js";
5
- import { RagTool, RagToolInsertParams, RagToolQueryParams } from "./rag-tool.js";
6
- export declare class ToolRuntime extends APIResource {
7
- ragTool: RagToolAPI.RagTool;
8
- /**
9
- * Run a tool with the given arguments.
10
- */
11
- invokeTool(body: ToolRuntimeInvokeToolParams, options?: Core.RequestOptions): Core.APIPromise<ToolInvocationResult>;
12
- /**
13
- * List all tools in the runtime.
14
- */
15
- listTools(query?: ToolRuntimeListToolsParams, options?: Core.RequestOptions): Core.APIPromise<ToolRuntimeListToolsResponse>;
16
- listTools(options?: Core.RequestOptions): Core.APIPromise<ToolRuntimeListToolsResponse>;
17
- }
18
- /**
19
- * Tool definition used in runtime contexts.
20
- */
21
- export interface ToolDef {
22
- /**
23
- * Name of the tool
24
- */
25
- name: string;
26
- /**
27
- * (Optional) Human-readable description of what the tool does
28
- */
29
- description?: string;
30
- /**
31
- * (Optional) Additional metadata about the tool
32
- */
33
- metadata?: {
34
- [key: string]: boolean | number | string | Array<unknown> | unknown | null;
35
- };
36
- /**
37
- * (Optional) List of parameters this tool accepts
38
- */
39
- parameters?: Array<ToolDef.Parameter>;
40
- }
41
- export declare namespace ToolDef {
42
- /**
43
- * Parameter definition for a tool.
44
- */
45
- interface Parameter {
46
- /**
47
- * Human-readable description of what the parameter does
48
- */
49
- description: string;
50
- /**
51
- * Name of the parameter
52
- */
53
- name: string;
54
- /**
55
- * Type of the parameter (e.g., string, integer)
56
- */
57
- parameter_type: string;
58
- /**
59
- * Whether this parameter is required for tool invocation
60
- */
61
- required: boolean;
62
- /**
63
- * (Optional) Default value for the parameter if not provided
64
- */
65
- default?: boolean | number | string | Array<unknown> | unknown | null;
66
- }
67
- }
68
- /**
69
- * Result of a tool invocation.
70
- */
71
- export interface ToolInvocationResult {
72
- /**
73
- * (Optional) The output content from the tool execution
74
- */
75
- content?: Shared.InterleavedContent;
76
- /**
77
- * (Optional) Numeric error code if the tool execution failed
78
- */
79
- error_code?: number;
80
- /**
81
- * (Optional) Error message if the tool execution failed
82
- */
83
- error_message?: string;
84
- /**
85
- * (Optional) Additional metadata about the tool execution
86
- */
87
- metadata?: {
88
- [key: string]: boolean | number | string | Array<unknown> | unknown | null;
89
- };
90
- }
91
- /**
92
- * List of tool definitions
93
- */
94
- export type ToolRuntimeListToolsResponse = Array<ToolDef>;
95
- export interface ToolRuntimeInvokeToolParams {
96
- /**
97
- * A dictionary of arguments to pass to the tool.
98
- */
99
- kwargs: {
100
- [key: string]: boolean | number | string | Array<unknown> | unknown | null;
101
- };
102
- /**
103
- * The name of the tool to invoke.
104
- */
105
- tool_name: string;
106
- }
107
- export interface ToolRuntimeListToolsParams {
108
- /**
109
- * The MCP endpoint to use for the tool group.
110
- */
111
- mcp_endpoint?: ToolRuntimeListToolsParams.McpEndpoint;
112
- /**
113
- * The ID of the tool group to list tools for.
114
- */
115
- tool_group_id?: string;
116
- }
117
- export declare namespace ToolRuntimeListToolsParams {
118
- /**
119
- * The MCP endpoint to use for the tool group.
120
- */
121
- interface McpEndpoint {
122
- /**
123
- * The URL string pointing to the resource
124
- */
125
- uri: string;
126
- }
127
- }
128
- export declare namespace ToolRuntime {
129
- export { type ToolDef as ToolDef, type ToolInvocationResult as ToolInvocationResult, type ToolRuntimeListToolsResponse as ToolRuntimeListToolsResponse, type ToolRuntimeInvokeToolParams as ToolRuntimeInvokeToolParams, type ToolRuntimeListToolsParams as ToolRuntimeListToolsParams, };
130
- export { RagTool as RagTool, type RagToolInsertParams as RagToolInsertParams, type RagToolQueryParams as RagToolQueryParams, };
131
- }
132
- //# sourceMappingURL=tool-runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-runtime.d.ts","sourceRoot":"","sources":["../../src/resources/tool-runtime/tool-runtime.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EA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OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-runtime.js","sourceRoot":"","sources":["../../src/resources/tool-runtime/tool-runtime.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1C,sFAAsF;AAEtF,gDAA6C;AAC7C,wCAA8C;AAG9C,0DAAyC;AACzC,4CAA8E;AAE9E,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiCrE,CAAC;IA/BC;;OAEG;IACH,UAAU,CACR,IAAiC,EACjC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAUD,SAAS,CACP,QAA0D,EAAE,EAC5D,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAClC;QACD,OACE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAGtE,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;CACF;AAlCD,kCAkCC;AA6HD,WAAW,CAAC,OAAO,GAAG,kBAAO,CAAC"}
@@ -1,29 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
- // All rights reserved.
3
- //
4
- // This source code is licensed under the terms described in the LICENSE file in
5
- // the root directory of this source tree.
6
- import { APIResource } from "../../resource.mjs";
7
- import { isRequestOptions } from "../../core.mjs";
8
- import * as RagToolAPI from "./rag-tool.mjs";
9
- import { RagTool } from "./rag-tool.mjs";
10
- export class ToolRuntime extends APIResource {
11
- constructor() {
12
- super(...arguments);
13
- this.ragTool = new RagToolAPI.RagTool(this._client);
14
- }
15
- /**
16
- * Run a tool with the given arguments.
17
- */
18
- invokeTool(body, options) {
19
- return this._client.post('/v1/tool-runtime/invoke', { body, ...options });
20
- }
21
- listTools(query = {}, options) {
22
- if (isRequestOptions(query)) {
23
- return this.listTools({}, query);
24
- }
25
- return this._client.get('/v1/tool-runtime/list-tools', { query, ...options })._thenUnwrap((obj) => obj.data);
26
- }
27
- }
28
- ToolRuntime.RagTool = RagTool;
29
- //# sourceMappingURL=tool-runtime.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-runtime.mjs","sourceRoot":"","sources":["../../src/resources/tool-runtime/tool-runtime.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;OAInC,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAGpB,KAAK,UAAU;OACf,EAAE,OAAO,EAA2C;AAE3D,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiCrE,CAAC;IA/BC;;OAEG;IACH,UAAU,CACR,IAAiC,EACjC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAUD,SAAS,CACP,QAA0D,EAAE,EAC5D,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAClC;QACD,OACE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAGtE,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;CACF;AA6HD,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC"}
@@ -1,128 +0,0 @@
1
- import { APIResource } from "../resource.js";
2
- import * as Core from "../core.js";
3
- export declare class VectorDBs extends APIResource {
4
- /**
5
- * Get a vector database by its identifier.
6
- */
7
- retrieve(vectorDBId: string, options?: Core.RequestOptions): Core.APIPromise<VectorDBRetrieveResponse>;
8
- /**
9
- * List all vector databases.
10
- */
11
- list(options?: Core.RequestOptions): Core.APIPromise<VectorDBListResponse>;
12
- /**
13
- * Register a vector database.
14
- */
15
- register(body: VectorDBRegisterParams, options?: Core.RequestOptions): Core.APIPromise<VectorDBRegisterResponse>;
16
- /**
17
- * Unregister a vector database.
18
- */
19
- unregister(vectorDBId: string, options?: Core.RequestOptions): Core.APIPromise<void>;
20
- }
21
- /**
22
- * Response from listing vector databases.
23
- */
24
- export interface ListVectorDBsResponse {
25
- /**
26
- * List of vector databases
27
- */
28
- data: VectorDBListResponse;
29
- }
30
- /**
31
- * Vector database resource for storing and querying vector embeddings.
32
- */
33
- export interface VectorDBRetrieveResponse {
34
- /**
35
- * Dimension of the embedding vectors
36
- */
37
- embedding_dimension: number;
38
- /**
39
- * Name of the embedding model to use for vector generation
40
- */
41
- embedding_model: string;
42
- identifier: string;
43
- provider_id: string;
44
- /**
45
- * Type of resource, always 'vector_db' for vector databases
46
- */
47
- type: 'vector_db';
48
- provider_resource_id?: string;
49
- vector_db_name?: string;
50
- }
51
- /**
52
- * List of vector databases
53
- */
54
- export type VectorDBListResponse = Array<VectorDBListResponse.VectorDBListResponseItem>;
55
- export declare namespace VectorDBListResponse {
56
- /**
57
- * Vector database resource for storing and querying vector embeddings.
58
- */
59
- interface VectorDBListResponseItem {
60
- /**
61
- * Dimension of the embedding vectors
62
- */
63
- embedding_dimension: number;
64
- /**
65
- * Name of the embedding model to use for vector generation
66
- */
67
- embedding_model: string;
68
- identifier: string;
69
- provider_id: string;
70
- /**
71
- * Type of resource, always 'vector_db' for vector databases
72
- */
73
- type: 'vector_db';
74
- provider_resource_id?: string;
75
- vector_db_name?: string;
76
- }
77
- }
78
- /**
79
- * Vector database resource for storing and querying vector embeddings.
80
- */
81
- export interface VectorDBRegisterResponse {
82
- /**
83
- * Dimension of the embedding vectors
84
- */
85
- embedding_dimension: number;
86
- /**
87
- * Name of the embedding model to use for vector generation
88
- */
89
- embedding_model: string;
90
- identifier: string;
91
- provider_id: string;
92
- /**
93
- * Type of resource, always 'vector_db' for vector databases
94
- */
95
- type: 'vector_db';
96
- provider_resource_id?: string;
97
- vector_db_name?: string;
98
- }
99
- export interface VectorDBRegisterParams {
100
- /**
101
- * The embedding model to use.
102
- */
103
- embedding_model: string;
104
- /**
105
- * The identifier of the vector database to register.
106
- */
107
- vector_db_id: string;
108
- /**
109
- * The dimension of the embedding model.
110
- */
111
- embedding_dimension?: number;
112
- /**
113
- * The identifier of the provider.
114
- */
115
- provider_id?: string;
116
- /**
117
- * The identifier of the vector database in the provider.
118
- */
119
- provider_vector_db_id?: string;
120
- /**
121
- * The name of the vector database.
122
- */
123
- vector_db_name?: string;
124
- }
125
- export declare namespace VectorDBs {
126
- export { type ListVectorDBsResponse as ListVectorDBsResponse, type VectorDBRetrieveResponse as VectorDBRetrieveResponse, type VectorDBListResponse as VectorDBListResponse, type VectorDBRegisterResponse as VectorDBRegisterResponse, type VectorDBRegisterParams as VectorDBRegisterParams, };
127
- }
128
- //# sourceMappingURL=vector-dbs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vector-dbs.d.ts","sourceRoot":"","sources":["../src/resources/vector-dbs.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAA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WAEG;QACH,eAAe,EAAE,MAAM,CAAC;QAExB,UAAU,EAAE,MAAM,CAAC;QAEnB,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,IAAI,EAAE,WAAW,CAAC;QAElB,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAE9B,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB;CACF;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAElB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Meta Platforms, Inc. and affiliates.
3
- // All rights reserved.
4
- //
5
- // This source code is licensed under the terms described in the LICENSE file in
6
- // the root directory of this source tree.
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.VectorDBs = void 0;
9
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
10
- const resource_1 = require("../resource.js");
11
- class VectorDBs extends resource_1.APIResource {
12
- /**
13
- * Get a vector database by its identifier.
14
- */
15
- retrieve(vectorDBId, options) {
16
- return this._client.get(`/v1/vector-dbs/${vectorDBId}`, options);
17
- }
18
- /**
19
- * List all vector databases.
20
- */
21
- list(options) {
22
- return this._client.get('/v1/vector-dbs', options)._thenUnwrap((obj) => obj.data);
23
- }
24
- /**
25
- * Register a vector database.
26
- */
27
- register(body, options) {
28
- return this._client.post('/v1/vector-dbs', { body, ...options });
29
- }
30
- /**
31
- * Unregister a vector database.
32
- */
33
- unregister(vectorDBId, options) {
34
- return this._client.delete(`/v1/vector-dbs/${vectorDBId}`, {
35
- ...options,
36
- headers: { Accept: '*/*', ...options?.headers },
37
- });
38
- }
39
- }
40
- exports.VectorDBs = VectorDBs;
41
- //# sourceMappingURL=vector-dbs.js.map