llama-stack-client 0.0.35 → 0.1.0

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 (490) hide show
  1. package/LICENSE +22 -201
  2. package/README.md +60 -26
  3. package/core.d.ts +7 -7
  4. package/core.d.ts.map +1 -1
  5. package/core.js +35 -16
  6. package/core.js.map +1 -1
  7. package/core.mjs +32 -14
  8. package/core.mjs.map +1 -1
  9. package/error.d.ts +18 -24
  10. package/error.d.ts.map +1 -1
  11. package/error.js +1 -31
  12. package/error.js.map +1 -1
  13. package/error.mjs +1 -31
  14. package/error.mjs.map +1 -1
  15. package/index.d.mts +100 -121
  16. package/index.d.ts +100 -121
  17. package/index.d.ts.map +1 -1
  18. package/index.js +90 -44
  19. package/index.js.map +1 -1
  20. package/index.mjs +74 -43
  21. package/index.mjs.map +1 -1
  22. package/internal/decoders/jsonl.d.ts +12 -0
  23. package/internal/decoders/jsonl.d.ts.map +1 -0
  24. package/internal/decoders/jsonl.js +35 -0
  25. package/internal/decoders/jsonl.js.map +1 -0
  26. package/internal/decoders/jsonl.mjs +31 -0
  27. package/internal/decoders/jsonl.mjs.map +1 -0
  28. package/internal/decoders/line.d.ts +20 -0
  29. package/internal/decoders/line.d.ts.map +1 -0
  30. package/internal/decoders/line.js +88 -0
  31. package/internal/decoders/line.js.map +1 -0
  32. package/internal/decoders/line.mjs +84 -0
  33. package/internal/decoders/line.mjs.map +1 -0
  34. package/internal/qs/formats.d.ts +6 -0
  35. package/internal/qs/formats.d.ts.map +1 -0
  36. package/internal/qs/formats.js +11 -0
  37. package/internal/qs/formats.js.map +1 -0
  38. package/internal/qs/formats.mjs +8 -0
  39. package/internal/qs/formats.mjs.map +1 -0
  40. package/internal/qs/index.d.ts +10 -0
  41. package/internal/qs/index.d.ts.map +1 -0
  42. package/internal/qs/index.js +14 -0
  43. package/internal/qs/index.js.map +1 -0
  44. package/internal/qs/index.mjs +10 -0
  45. package/internal/qs/index.mjs.map +1 -0
  46. package/internal/qs/stringify.d.ts +3 -0
  47. package/internal/qs/stringify.d.ts.map +1 -0
  48. package/internal/qs/stringify.js +280 -0
  49. package/internal/qs/stringify.js.map +1 -0
  50. package/internal/qs/stringify.mjs +276 -0
  51. package/internal/qs/stringify.mjs.map +1 -0
  52. package/internal/qs/types.d.ts +57 -0
  53. package/internal/qs/types.d.ts.map +1 -0
  54. package/internal/qs/types.js +3 -0
  55. package/internal/qs/types.js.map +1 -0
  56. package/internal/qs/types.mjs +2 -0
  57. package/internal/qs/types.mjs.map +1 -0
  58. package/internal/qs/utils.d.ts +14 -0
  59. package/internal/qs/utils.d.ts.map +1 -0
  60. package/internal/qs/utils.js +229 -0
  61. package/internal/qs/utils.js.map +1 -0
  62. package/internal/qs/utils.mjs +217 -0
  63. package/internal/qs/utils.mjs.map +1 -0
  64. package/internal/stream-utils.d.ts +8 -0
  65. package/internal/stream-utils.d.ts.map +1 -0
  66. package/internal/stream-utils.js +39 -0
  67. package/internal/stream-utils.js.map +1 -0
  68. package/internal/stream-utils.mjs +35 -0
  69. package/internal/stream-utils.mjs.map +1 -0
  70. package/package.json +8 -6
  71. package/resources/agents/agents.d.ts +22 -187
  72. package/resources/agents/agents.d.ts.map +1 -1
  73. package/resources/agents/agents.js +15 -32
  74. package/resources/agents/agents.js.map +1 -1
  75. package/resources/agents/agents.mjs +15 -32
  76. package/resources/agents/agents.mjs.map +1 -1
  77. package/resources/agents/index.d.ts +4 -4
  78. package/resources/agents/index.d.ts.map +1 -1
  79. package/resources/agents/index.js +7 -7
  80. package/resources/agents/index.js.map +1 -1
  81. package/resources/agents/index.mjs +3 -3
  82. package/resources/agents/index.mjs.map +1 -1
  83. package/resources/agents/session.d.ts +28 -0
  84. package/resources/agents/session.d.ts.map +1 -0
  85. package/resources/agents/session.js +25 -0
  86. package/resources/agents/session.js.map +1 -0
  87. package/resources/agents/session.mjs +21 -0
  88. package/resources/agents/session.mjs.map +1 -0
  89. package/resources/agents/steps.d.ts +3 -24
  90. package/resources/agents/steps.d.ts.map +1 -1
  91. package/resources/agents/steps.js +2 -14
  92. package/resources/agents/steps.js.map +1 -1
  93. package/resources/agents/steps.mjs +2 -14
  94. package/resources/agents/steps.mjs.map +1 -1
  95. package/resources/agents/turn.d.ts +169 -0
  96. package/resources/agents/turn.d.ts.map +1 -0
  97. package/resources/agents/turn.js +19 -0
  98. package/resources/agents/turn.js.map +1 -0
  99. package/resources/agents/turn.mjs +15 -0
  100. package/resources/agents/turn.mjs.map +1 -0
  101. package/resources/batch-inference.d.ts +17 -64
  102. package/resources/batch-inference.d.ts.map +1 -1
  103. package/resources/batch-inference.js +4 -26
  104. package/resources/batch-inference.js.map +1 -1
  105. package/resources/batch-inference.mjs +4 -26
  106. package/resources/batch-inference.mjs.map +1 -1
  107. package/resources/datasetio.d.ts +25 -0
  108. package/resources/datasetio.d.ts.map +1 -0
  109. package/resources/datasetio.js +19 -0
  110. package/resources/datasetio.js.map +1 -0
  111. package/resources/datasetio.mjs +15 -0
  112. package/resources/datasetio.mjs.map +1 -0
  113. package/resources/datasets.d.ts +45 -46
  114. package/resources/datasets.d.ts.map +1 -1
  115. package/resources/datasets.js +11 -35
  116. package/resources/datasets.js.map +1 -1
  117. package/resources/datasets.mjs +11 -35
  118. package/resources/datasets.mjs.map +1 -1
  119. package/resources/eval/eval.d.ts +59 -0
  120. package/resources/eval/eval.d.ts.map +1 -0
  121. package/resources/{inference/embeddings.js → eval/eval.js} +16 -20
  122. package/resources/eval/eval.js.map +1 -0
  123. package/resources/eval/eval.mjs +18 -0
  124. package/resources/eval/eval.mjs.map +1 -0
  125. package/resources/eval/index.d.ts +3 -0
  126. package/resources/eval/index.d.ts.map +1 -0
  127. package/resources/eval/index.js +9 -0
  128. package/resources/eval/index.js.map +1 -0
  129. package/resources/eval/index.mjs +4 -0
  130. package/resources/eval/index.mjs.map +1 -0
  131. package/resources/eval/jobs.d.ts +13 -0
  132. package/resources/eval/jobs.d.ts.map +1 -0
  133. package/resources/eval/jobs.js +21 -0
  134. package/resources/eval/jobs.js.map +1 -0
  135. package/resources/eval/jobs.mjs +17 -0
  136. package/resources/eval/jobs.mjs.map +1 -0
  137. package/resources/eval-tasks.d.ts +32 -0
  138. package/resources/eval-tasks.d.ts.map +1 -0
  139. package/resources/eval-tasks.js +22 -0
  140. package/resources/eval-tasks.js.map +1 -0
  141. package/resources/eval-tasks.mjs +18 -0
  142. package/resources/eval-tasks.mjs.map +1 -0
  143. package/resources/index.d.ts +23 -15
  144. package/resources/index.d.ts.map +1 -1
  145. package/resources/index.js +33 -17
  146. package/resources/index.js.map +1 -1
  147. package/resources/index.mjs +19 -11
  148. package/resources/index.mjs.map +1 -1
  149. package/resources/inference.d.ts +241 -0
  150. package/resources/inference.d.ts.map +1 -0
  151. package/resources/inference.js +29 -0
  152. package/resources/inference.js.map +1 -0
  153. package/resources/inference.mjs +25 -0
  154. package/resources/inference.mjs.map +1 -0
  155. package/resources/inspect.d.ts +26 -0
  156. package/resources/inspect.d.ts.map +1 -0
  157. package/resources/inspect.js +15 -0
  158. package/resources/inspect.js.map +1 -0
  159. package/resources/inspect.mjs +11 -0
  160. package/resources/inspect.mjs.map +1 -0
  161. package/resources/models.d.ts +21 -36
  162. package/resources/models.d.ts.map +1 -1
  163. package/resources/models.js +11 -27
  164. package/resources/models.js.map +1 -1
  165. package/resources/models.mjs +11 -27
  166. package/resources/models.mjs.map +1 -1
  167. package/resources/post-training/index.d.ts +2 -2
  168. package/resources/post-training/index.d.ts.map +1 -1
  169. package/resources/post-training/index.js +3 -3
  170. package/resources/post-training/index.js.map +1 -1
  171. package/resources/post-training/index.mjs +1 -1
  172. package/resources/post-training/index.mjs.map +1 -1
  173. package/resources/post-training/job.d.ts +40 -0
  174. package/resources/post-training/job.d.ts.map +1 -0
  175. package/resources/post-training/job.js +25 -0
  176. package/resources/post-training/job.js.map +1 -0
  177. package/resources/post-training/job.mjs +21 -0
  178. package/resources/post-training/job.mjs.map +1 -0
  179. package/resources/post-training/post-training.d.ts +95 -142
  180. package/resources/post-training/post-training.d.ts.map +1 -1
  181. package/resources/post-training/post-training.js +8 -29
  182. package/resources/post-training/post-training.js.map +1 -1
  183. package/resources/post-training/post-training.mjs +8 -29
  184. package/resources/post-training/post-training.mjs.map +1 -1
  185. package/resources/providers.d.ts +14 -0
  186. package/resources/providers.d.ts.map +1 -0
  187. package/resources/providers.js +12 -0
  188. package/resources/providers.js.map +1 -0
  189. package/resources/providers.mjs +8 -0
  190. package/resources/providers.mjs.map +1 -0
  191. package/resources/routes.d.ts +14 -0
  192. package/resources/routes.d.ts.map +1 -0
  193. package/resources/routes.js +12 -0
  194. package/resources/routes.js.map +1 -0
  195. package/resources/routes.mjs +8 -0
  196. package/resources/routes.mjs.map +1 -0
  197. package/resources/safety.d.ts +6 -29
  198. package/resources/safety.d.ts.map +1 -1
  199. package/resources/safety.js +2 -14
  200. package/resources/safety.js.map +1 -1
  201. package/resources/safety.mjs +2 -14
  202. package/resources/safety.mjs.map +1 -1
  203. package/resources/scoring-functions.d.ts +53 -0
  204. package/resources/scoring-functions.d.ts.map +1 -0
  205. package/resources/scoring-functions.js +22 -0
  206. package/resources/scoring-functions.js.map +1 -0
  207. package/resources/scoring-functions.mjs +18 -0
  208. package/resources/scoring-functions.mjs.map +1 -0
  209. package/resources/scoring.d.ts +28 -0
  210. package/resources/scoring.d.ts.map +1 -0
  211. package/resources/scoring.js +15 -0
  212. package/resources/scoring.js.map +1 -0
  213. package/resources/scoring.mjs +11 -0
  214. package/resources/scoring.mjs.map +1 -0
  215. package/resources/shared.d.ts +338 -14
  216. package/resources/shared.d.ts.map +1 -1
  217. package/resources/shields.d.ts +18 -32
  218. package/resources/shields.d.ts.map +1 -1
  219. package/resources/shields.js +7 -29
  220. package/resources/shields.js.map +1 -1
  221. package/resources/shields.mjs +7 -29
  222. package/resources/shields.mjs.map +1 -1
  223. package/resources/synthetic-data-generation.d.ts +7 -24
  224. package/resources/synthetic-data-generation.d.ts.map +1 -1
  225. package/resources/synthetic-data-generation.js +5 -17
  226. package/resources/synthetic-data-generation.js.map +1 -1
  227. package/resources/synthetic-data-generation.mjs +3 -15
  228. package/resources/synthetic-data-generation.mjs.map +1 -1
  229. package/resources/telemetry.d.ts +95 -35
  230. package/resources/telemetry.d.ts.map +1 -1
  231. package/resources/telemetry.js +29 -22
  232. package/resources/telemetry.js.map +1 -1
  233. package/resources/telemetry.mjs +29 -22
  234. package/resources/telemetry.mjs.map +1 -1
  235. package/resources/tool-runtime/index.d.ts +3 -0
  236. package/resources/tool-runtime/index.d.ts.map +1 -0
  237. package/resources/tool-runtime/index.js +9 -0
  238. package/resources/tool-runtime/index.js.map +1 -0
  239. package/resources/tool-runtime/index.mjs +4 -0
  240. package/resources/tool-runtime/index.mjs.map +1 -0
  241. package/resources/tool-runtime/rag-tool.d.ts +27 -0
  242. package/resources/tool-runtime/rag-tool.d.ts.map +1 -0
  243. package/resources/tool-runtime/rag-tool.js +25 -0
  244. package/resources/tool-runtime/rag-tool.js.map +1 -0
  245. package/resources/tool-runtime/rag-tool.mjs +21 -0
  246. package/resources/tool-runtime/rag-tool.mjs.map +1 -0
  247. package/resources/tool-runtime/tool-runtime.d.ts +48 -0
  248. package/resources/tool-runtime/tool-runtime.d.ts.map +1 -0
  249. package/resources/{evaluate/evaluate.js → tool-runtime/tool-runtime.js} +29 -18
  250. package/resources/tool-runtime/tool-runtime.js.map +1 -0
  251. package/resources/tool-runtime/tool-runtime.mjs +33 -0
  252. package/resources/tool-runtime/tool-runtime.mjs.map +1 -0
  253. package/resources/toolgroups.d.ts +40 -0
  254. package/resources/toolgroups.d.ts.map +1 -0
  255. package/resources/toolgroups.js +37 -0
  256. package/resources/toolgroups.js.map +1 -0
  257. package/resources/toolgroups.mjs +33 -0
  258. package/resources/toolgroups.mjs.map +1 -0
  259. package/resources/tools.d.ts +41 -0
  260. package/resources/tools.d.ts.map +1 -0
  261. package/resources/tools.js +19 -0
  262. package/resources/tools.js.map +1 -0
  263. package/resources/tools.mjs +15 -0
  264. package/resources/tools.mjs.map +1 -0
  265. package/resources/vector-dbs.d.ts +59 -0
  266. package/resources/vector-dbs.d.ts.map +1 -0
  267. package/resources/vector-dbs.js +24 -0
  268. package/resources/vector-dbs.js.map +1 -0
  269. package/resources/vector-dbs.mjs +20 -0
  270. package/resources/vector-dbs.mjs.map +1 -0
  271. package/resources/vector-io.d.ts +37 -0
  272. package/resources/vector-io.d.ts.map +1 -0
  273. package/resources/vector-io.js +19 -0
  274. package/resources/vector-io.js.map +1 -0
  275. package/resources/vector-io.mjs +15 -0
  276. package/resources/vector-io.mjs.map +1 -0
  277. package/src/core.ts +46 -24
  278. package/src/error.ts +25 -41
  279. package/src/index.ts +437 -155
  280. package/src/internal/decoders/jsonl.ts +41 -0
  281. package/src/internal/decoders/line.ts +114 -0
  282. package/src/internal/qs/LICENSE.md +13 -0
  283. package/src/internal/qs/README.md +3 -0
  284. package/src/internal/qs/formats.ts +9 -0
  285. package/src/internal/qs/index.ts +13 -0
  286. package/src/internal/qs/stringify.ts +388 -0
  287. package/src/internal/qs/types.ts +71 -0
  288. package/src/internal/qs/utils.ts +265 -0
  289. package/src/internal/stream-utils.ts +32 -0
  290. package/src/resources/agents/agents.ts +72 -299
  291. package/src/resources/agents/index.ts +24 -27
  292. package/src/resources/agents/session.ts +73 -0
  293. package/src/resources/agents/steps.ts +14 -40
  294. package/src/resources/agents/turn.ts +292 -0
  295. package/src/resources/batch-inference.ts +30 -95
  296. package/src/resources/datasetio.ts +53 -0
  297. package/src/resources/datasets.ts +87 -81
  298. package/src/resources/eval/eval.ts +104 -0
  299. package/src/resources/eval/index.ts +12 -0
  300. package/src/resources/eval/jobs.ts +36 -0
  301. package/src/resources/eval-tasks.ts +69 -0
  302. package/src/resources/index.ts +141 -65
  303. package/src/resources/inference.ts +346 -0
  304. package/src/resources/inspect.ts +47 -0
  305. package/src/resources/models.ts +46 -66
  306. package/src/resources/post-training/index.ts +14 -14
  307. package/src/resources/post-training/job.ts +84 -0
  308. package/src/resources/post-training/post-training.ts +151 -182
  309. package/src/resources/providers.ts +26 -0
  310. package/src/resources/routes.ts +23 -0
  311. package/src/resources/safety.ts +8 -47
  312. package/src/resources/scoring-functions.ts +108 -0
  313. package/src/resources/scoring.ts +52 -0
  314. package/src/resources/shared.ts +462 -14
  315. package/src/resources/shields.ts +37 -64
  316. package/src/resources/synthetic-data-generation.ts +13 -40
  317. package/src/resources/telemetry.ts +229 -65
  318. package/src/resources/tool-runtime/index.ts +10 -0
  319. package/src/resources/tool-runtime/rag-tool.ts +45 -0
  320. package/src/resources/tool-runtime/tool-runtime.ts +106 -0
  321. package/src/resources/toolgroups.ts +80 -0
  322. package/src/resources/tools.ts +81 -0
  323. package/src/resources/vector-dbs.ts +121 -0
  324. package/src/resources/vector-io.ts +65 -0
  325. package/src/streaming.ts +6 -148
  326. package/src/version.ts +1 -1
  327. package/streaming.d.ts +0 -7
  328. package/streaming.d.ts.map +1 -1
  329. package/streaming.js +8 -123
  330. package/streaming.js.map +1 -1
  331. package/streaming.mjs +4 -118
  332. package/streaming.mjs.map +1 -1
  333. package/version.d.ts +1 -1
  334. package/version.d.ts.map +1 -1
  335. package/version.js +1 -1
  336. package/version.js.map +1 -1
  337. package/version.mjs +1 -1
  338. package/version.mjs.map +1 -1
  339. package/resources/agents/sessions.d.ts +0 -76
  340. package/resources/agents/sessions.d.ts.map +0 -1
  341. package/resources/agents/sessions.js +0 -52
  342. package/resources/agents/sessions.js.map +0 -1
  343. package/resources/agents/sessions.mjs +0 -48
  344. package/resources/agents/sessions.mjs.map +0 -1
  345. package/resources/agents/turns.d.ts +0 -133
  346. package/resources/agents/turns.d.ts.map +0 -1
  347. package/resources/agents/turns.js +0 -38
  348. package/resources/agents/turns.js.map +0 -1
  349. package/resources/agents/turns.mjs +0 -34
  350. package/resources/agents/turns.mjs.map +0 -1
  351. package/resources/evaluate/evaluate.d.ts +0 -29
  352. package/resources/evaluate/evaluate.d.ts.map +0 -1
  353. package/resources/evaluate/evaluate.js.map +0 -1
  354. package/resources/evaluate/evaluate.mjs +0 -22
  355. package/resources/evaluate/evaluate.mjs.map +0 -1
  356. package/resources/evaluate/index.d.ts +0 -6
  357. package/resources/evaluate/index.d.ts.map +0 -1
  358. package/resources/evaluate/index.js +0 -15
  359. package/resources/evaluate/index.js.map +0 -1
  360. package/resources/evaluate/index.mjs +0 -7
  361. package/resources/evaluate/index.mjs.map +0 -1
  362. package/resources/evaluate/jobs/artifacts.d.ts +0 -22
  363. package/resources/evaluate/jobs/artifacts.d.ts.map +0 -1
  364. package/resources/evaluate/jobs/artifacts.js +0 -24
  365. package/resources/evaluate/jobs/artifacts.js.map +0 -1
  366. package/resources/evaluate/jobs/artifacts.mjs +0 -20
  367. package/resources/evaluate/jobs/artifacts.mjs.map +0 -1
  368. package/resources/evaluate/jobs/index.d.ts +0 -5
  369. package/resources/evaluate/jobs/index.d.ts.map +0 -1
  370. package/resources/evaluate/jobs/index.js +0 -13
  371. package/resources/evaluate/jobs/index.js.map +0 -1
  372. package/resources/evaluate/jobs/index.mjs +0 -6
  373. package/resources/evaluate/jobs/index.mjs.map +0 -1
  374. package/resources/evaluate/jobs/jobs.d.ts +0 -56
  375. package/resources/evaluate/jobs/jobs.d.ts.map +0 -1
  376. package/resources/evaluate/jobs/jobs.js +0 -76
  377. package/resources/evaluate/jobs/jobs.js.map +0 -1
  378. package/resources/evaluate/jobs/jobs.mjs +0 -49
  379. package/resources/evaluate/jobs/jobs.mjs.map +0 -1
  380. package/resources/evaluate/jobs/logs.d.ts +0 -22
  381. package/resources/evaluate/jobs/logs.d.ts.map +0 -1
  382. package/resources/evaluate/jobs/logs.js +0 -24
  383. package/resources/evaluate/jobs/logs.js.map +0 -1
  384. package/resources/evaluate/jobs/logs.mjs +0 -20
  385. package/resources/evaluate/jobs/logs.mjs.map +0 -1
  386. package/resources/evaluate/jobs/status.d.ts +0 -22
  387. package/resources/evaluate/jobs/status.d.ts.map +0 -1
  388. package/resources/evaluate/jobs/status.js +0 -24
  389. package/resources/evaluate/jobs/status.js.map +0 -1
  390. package/resources/evaluate/jobs/status.mjs +0 -20
  391. package/resources/evaluate/jobs/status.mjs.map +0 -1
  392. package/resources/evaluate/question-answering.d.ts +0 -22
  393. package/resources/evaluate/question-answering.d.ts.map +0 -1
  394. package/resources/evaluate/question-answering.js +0 -24
  395. package/resources/evaluate/question-answering.js.map +0 -1
  396. package/resources/evaluate/question-answering.mjs +0 -20
  397. package/resources/evaluate/question-answering.mjs.map +0 -1
  398. package/resources/evaluate/summarization.d.ts +0 -4
  399. package/resources/evaluate/summarization.d.ts.map +0 -1
  400. package/resources/evaluate/summarization.js +0 -9
  401. package/resources/evaluate/summarization.js.map +0 -1
  402. package/resources/evaluate/summarization.mjs +0 -5
  403. package/resources/evaluate/summarization.mjs.map +0 -1
  404. package/resources/evaluate/text-generation.d.ts +0 -4
  405. package/resources/evaluate/text-generation.d.ts.map +0 -1
  406. package/resources/evaluate/text-generation.js +0 -9
  407. package/resources/evaluate/text-generation.js.map +0 -1
  408. package/resources/evaluate/text-generation.mjs +0 -5
  409. package/resources/evaluate/text-generation.mjs.map +0 -1
  410. package/resources/evaluations.d.ts +0 -35
  411. package/resources/evaluations.d.ts.map +0 -1
  412. package/resources/evaluations.js +0 -37
  413. package/resources/evaluations.js.map +0 -1
  414. package/resources/evaluations.mjs +0 -33
  415. package/resources/evaluations.mjs.map +0 -1
  416. package/resources/inference/embeddings.d.ts +0 -29
  417. package/resources/inference/embeddings.d.ts.map +0 -1
  418. package/resources/inference/embeddings.js.map +0 -1
  419. package/resources/inference/embeddings.mjs +0 -22
  420. package/resources/inference/embeddings.mjs.map +0 -1
  421. package/resources/inference/index.d.ts +0 -3
  422. package/resources/inference/index.d.ts.map +0 -1
  423. package/resources/inference/index.js +0 -9
  424. package/resources/inference/index.js.map +0 -1
  425. package/resources/inference/index.mjs +0 -4
  426. package/resources/inference/index.mjs.map +0 -1
  427. package/resources/inference/inference.d.ts +0 -172
  428. package/resources/inference/inference.d.ts.map +0 -1
  429. package/resources/inference/inference.js +0 -67
  430. package/resources/inference/inference.js.map +0 -1
  431. package/resources/inference/inference.mjs +0 -40
  432. package/resources/inference/inference.mjs.map +0 -1
  433. package/resources/memory/documents.d.ts +0 -49
  434. package/resources/memory/documents.d.ts.map +0 -1
  435. package/resources/memory/documents.js +0 -39
  436. package/resources/memory/documents.js.map +0 -1
  437. package/resources/memory/documents.mjs +0 -35
  438. package/resources/memory/documents.mjs.map +0 -1
  439. package/resources/memory/index.d.ts +0 -3
  440. package/resources/memory/index.d.ts.map +0 -1
  441. package/resources/memory/index.js +0 -9
  442. package/resources/memory/index.js.map +0 -1
  443. package/resources/memory/index.mjs +0 -4
  444. package/resources/memory/index.mjs.map +0 -1
  445. package/resources/memory/memory.d.ts +0 -158
  446. package/resources/memory/memory.d.ts.map +0 -1
  447. package/resources/memory/memory.js +0 -137
  448. package/resources/memory/memory.js.map +0 -1
  449. package/resources/memory/memory.mjs +0 -110
  450. package/resources/memory/memory.mjs.map +0 -1
  451. package/resources/memory-banks.d.ts +0 -42
  452. package/resources/memory-banks.d.ts.map +0 -1
  453. package/resources/memory-banks.js +0 -40
  454. package/resources/memory-banks.js.map +0 -1
  455. package/resources/memory-banks.mjs +0 -36
  456. package/resources/memory-banks.mjs.map +0 -1
  457. package/resources/post-training/jobs.d.ts +0 -91
  458. package/resources/post-training/jobs.d.ts.map +0 -1
  459. package/resources/post-training/jobs.js +0 -80
  460. package/resources/post-training/jobs.js.map +0 -1
  461. package/resources/post-training/jobs.mjs +0 -76
  462. package/resources/post-training/jobs.mjs.map +0 -1
  463. package/resources/reward-scoring.d.ts +0 -47
  464. package/resources/reward-scoring.d.ts.map +0 -1
  465. package/resources/reward-scoring.js +0 -24
  466. package/resources/reward-scoring.js.map +0 -1
  467. package/resources/reward-scoring.mjs +0 -20
  468. package/resources/reward-scoring.mjs.map +0 -1
  469. package/src/resources/agents/sessions.ts +0 -135
  470. package/src/resources/agents/turns.ts +0 -231
  471. package/src/resources/evaluate/evaluate.ts +0 -35
  472. package/src/resources/evaluate/index.ts +0 -14
  473. package/src/resources/evaluate/jobs/artifacts.ts +0 -42
  474. package/src/resources/evaluate/jobs/index.ts +0 -13
  475. package/src/resources/evaluate/jobs/jobs.ts +0 -99
  476. package/src/resources/evaluate/jobs/logs.ts +0 -42
  477. package/src/resources/evaluate/jobs/status.ts +0 -42
  478. package/src/resources/evaluate/question-answering.ts +0 -42
  479. package/src/resources/evaluate/summarization.ts +0 -5
  480. package/src/resources/evaluate/text-generation.ts +0 -5
  481. package/src/resources/evaluations.ts +0 -73
  482. package/src/resources/inference/embeddings.ts +0 -48
  483. package/src/resources/inference/index.ts +0 -15
  484. package/src/resources/inference/inference.ts +0 -268
  485. package/src/resources/memory/documents.ts +0 -92
  486. package/src/resources/memory/index.ts +0 -23
  487. package/src/resources/memory/memory.ts +0 -297
  488. package/src/resources/memory-banks.ts +0 -84
  489. package/src/resources/post-training/jobs.ts +0 -192
  490. package/src/resources/reward-scoring.ts +0 -82
@@ -1,26 +1,319 @@
1
- export interface Attachment {
2
- content: string | Array<string>;
3
- mime_type: string;
1
+ import * as Shared from "./shared.js";
2
+ import * as InferenceAPI from "./inference.js";
3
+ import * as ToolRuntimeAPI from "./tool-runtime/tool-runtime.js";
4
+ export interface AgentConfig {
5
+ enable_session_persistence: boolean;
6
+ instructions: string;
7
+ max_infer_iters: number;
8
+ model: string;
9
+ client_tools?: Array<ToolRuntimeAPI.ToolDef>;
10
+ input_shields?: Array<string>;
11
+ output_shields?: Array<string>;
12
+ response_format?: ResponseFormat;
13
+ sampling_params?: SamplingParams;
14
+ tool_choice?: 'auto' | 'required';
15
+ tool_prompt_format?: 'json' | 'function_tag' | 'python_list';
16
+ toolgroups?: Array<string | AgentConfig.UnionMember1>;
17
+ }
18
+ export declare namespace AgentConfig {
19
+ interface UnionMember1 {
20
+ args: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
21
+ name: string;
22
+ }
4
23
  }
5
24
  export interface BatchCompletion {
6
- completion_message_batch: Array<CompletionMessage>;
25
+ batch: Array<InferenceAPI.CompletionResponse>;
26
+ }
27
+ export interface ChatCompletionResponse {
28
+ /**
29
+ * The complete response message
30
+ */
31
+ completion_message: CompletionMessage;
32
+ /**
33
+ * Optional log probabilities for generated tokens
34
+ */
35
+ logprobs?: Array<InferenceAPI.TokenLogProbs>;
7
36
  }
8
37
  export interface CompletionMessage {
9
- content: string | Array<string>;
38
+ /**
39
+ * The content of the model's response
40
+ */
41
+ content: InterleavedContent;
42
+ /**
43
+ * Must be "assistant" to identify this as the model's response
44
+ */
10
45
  role: 'assistant';
46
+ /**
47
+ * Reason why the model stopped generating. Options are: -
48
+ * `StopReason.end_of_turn`: The model finished generating the entire response. -
49
+ * `StopReason.end_of_message`: The model finished generating but generated a
50
+ * partial response -- usually, a tool call. The user may call the tool and
51
+ * continue the conversation with the tool's response. -
52
+ * `StopReason.out_of_tokens`: The model ran out of token budget.
53
+ */
11
54
  stop_reason: 'end_of_turn' | 'end_of_message' | 'out_of_tokens';
55
+ /**
56
+ * List of tool calls. Each tool call is a ToolCall object.
57
+ */
12
58
  tool_calls: Array<ToolCall>;
13
59
  }
60
+ export type ContentDelta = ContentDelta.TextDelta | ContentDelta.ImageDelta | ContentDelta.ToolCallDelta;
61
+ export declare namespace ContentDelta {
62
+ interface TextDelta {
63
+ text: string;
64
+ type: 'text';
65
+ }
66
+ interface ImageDelta {
67
+ image: string;
68
+ type: 'image';
69
+ }
70
+ interface ToolCallDelta {
71
+ parse_status: 'started' | 'in_progress' | 'failed' | 'succeeded';
72
+ tool_call: string | Shared.ToolCall;
73
+ type: 'tool_call';
74
+ }
75
+ }
76
+ export interface Document {
77
+ content: string | Document.ImageContentItem | Document.TextContentItem | Array<InterleavedContentItem> | URL;
78
+ document_id: string;
79
+ metadata: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
80
+ mime_type?: string;
81
+ }
82
+ export declare namespace Document {
83
+ interface ImageContentItem {
84
+ /**
85
+ * Image as a base64 encoded string or an URL
86
+ */
87
+ image: ImageContentItem.Image;
88
+ /**
89
+ * Discriminator type of the content item. Always "image"
90
+ */
91
+ type: 'image';
92
+ }
93
+ namespace ImageContentItem {
94
+ /**
95
+ * Image as a base64 encoded string or an URL
96
+ */
97
+ interface Image {
98
+ /**
99
+ * base64 encoded image data as string
100
+ */
101
+ data?: string;
102
+ /**
103
+ * A URL of the image or data URL in the format of data:image/{type};base64,{data}.
104
+ * Note that URL could have length limits.
105
+ */
106
+ url?: Shared.URL;
107
+ }
108
+ }
109
+ interface TextContentItem {
110
+ /**
111
+ * Text content
112
+ */
113
+ text: string;
114
+ /**
115
+ * Discriminator type of the content item. Always "text"
116
+ */
117
+ type: 'text';
118
+ }
119
+ }
120
+ export type InterleavedContent = string | InterleavedContent.ImageContentItem | InterleavedContent.TextContentItem | Array<InterleavedContentItem>;
121
+ export declare namespace InterleavedContent {
122
+ interface ImageContentItem {
123
+ /**
124
+ * Image as a base64 encoded string or an URL
125
+ */
126
+ image: ImageContentItem.Image;
127
+ /**
128
+ * Discriminator type of the content item. Always "image"
129
+ */
130
+ type: 'image';
131
+ }
132
+ namespace ImageContentItem {
133
+ /**
134
+ * Image as a base64 encoded string or an URL
135
+ */
136
+ interface Image {
137
+ /**
138
+ * base64 encoded image data as string
139
+ */
140
+ data?: string;
141
+ /**
142
+ * A URL of the image or data URL in the format of data:image/{type};base64,{data}.
143
+ * Note that URL could have length limits.
144
+ */
145
+ url?: Shared.URL;
146
+ }
147
+ }
148
+ interface TextContentItem {
149
+ /**
150
+ * Text content
151
+ */
152
+ text: string;
153
+ /**
154
+ * Discriminator type of the content item. Always "text"
155
+ */
156
+ type: 'text';
157
+ }
158
+ }
159
+ export type InterleavedContentItem = InterleavedContentItem.ImageContentItem | InterleavedContentItem.TextContentItem;
160
+ export declare namespace InterleavedContentItem {
161
+ interface ImageContentItem {
162
+ /**
163
+ * Image as a base64 encoded string or an URL
164
+ */
165
+ image: ImageContentItem.Image;
166
+ /**
167
+ * Discriminator type of the content item. Always "image"
168
+ */
169
+ type: 'image';
170
+ }
171
+ namespace ImageContentItem {
172
+ /**
173
+ * Image as a base64 encoded string or an URL
174
+ */
175
+ interface Image {
176
+ /**
177
+ * base64 encoded image data as string
178
+ */
179
+ data?: string;
180
+ /**
181
+ * A URL of the image or data URL in the format of data:image/{type};base64,{data}.
182
+ * Note that URL could have length limits.
183
+ */
184
+ url?: Shared.URL;
185
+ }
186
+ }
187
+ interface TextContentItem {
188
+ /**
189
+ * Text content
190
+ */
191
+ text: string;
192
+ /**
193
+ * Discriminator type of the content item. Always "text"
194
+ */
195
+ type: 'text';
196
+ }
197
+ }
198
+ export type Message = UserMessage | SystemMessage | ToolResponseMessage | CompletionMessage;
199
+ export type ParamType = ParamType.StringType | ParamType.NumberType | ParamType.BooleanType | ParamType.ArrayType | ParamType.ObjectType | ParamType.JsonType | ParamType.UnionType | ParamType.ChatCompletionInputType | ParamType.CompletionInputType | ParamType.AgentTurnInputType;
200
+ export declare namespace ParamType {
201
+ interface StringType {
202
+ type: 'string';
203
+ }
204
+ interface NumberType {
205
+ type: 'number';
206
+ }
207
+ interface BooleanType {
208
+ type: 'boolean';
209
+ }
210
+ interface ArrayType {
211
+ type: 'array';
212
+ }
213
+ interface ObjectType {
214
+ type: 'object';
215
+ }
216
+ interface JsonType {
217
+ type: 'json';
218
+ }
219
+ interface UnionType {
220
+ type: 'union';
221
+ }
222
+ interface ChatCompletionInputType {
223
+ type: 'chat_completion_input';
224
+ }
225
+ interface CompletionInputType {
226
+ type: 'completion_input';
227
+ }
228
+ interface AgentTurnInputType {
229
+ type: 'agent_turn_input';
230
+ }
231
+ }
232
+ export interface QueryConfig {
233
+ max_chunks: number;
234
+ max_tokens_in_context: number;
235
+ query_generator_config: QueryGeneratorConfig;
236
+ }
237
+ export type QueryGeneratorConfig = QueryGeneratorConfig.DefaultRagQueryGeneratorConfig | QueryGeneratorConfig.LlmragQueryGeneratorConfig;
238
+ export declare namespace QueryGeneratorConfig {
239
+ interface DefaultRagQueryGeneratorConfig {
240
+ separator: string;
241
+ type: 'default';
242
+ }
243
+ interface LlmragQueryGeneratorConfig {
244
+ model: string;
245
+ template: string;
246
+ type: 'llm';
247
+ }
248
+ }
249
+ export interface QueryResult {
250
+ content?: InterleavedContent;
251
+ }
252
+ export type ResponseFormat = ResponseFormat.JsonSchemaResponseFormat | ResponseFormat.GrammarResponseFormat;
253
+ export declare namespace ResponseFormat {
254
+ interface JsonSchemaResponseFormat {
255
+ /**
256
+ * The JSON schema the response should conform to. In a Python SDK, this is often a
257
+ * `pydantic` model.
258
+ */
259
+ json_schema: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
260
+ /**
261
+ * Must be "json_schema" to identify this format type
262
+ */
263
+ type: 'json_schema';
264
+ }
265
+ interface GrammarResponseFormat {
266
+ /**
267
+ * The BNF grammar specification the response should conform to
268
+ */
269
+ bnf: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
270
+ /**
271
+ * Must be "grammar" to identify this format type
272
+ */
273
+ type: 'grammar';
274
+ }
275
+ }
276
+ export interface ReturnType {
277
+ type: 'string' | 'number' | 'boolean' | 'array' | 'object' | 'json' | 'union' | 'chat_completion_input' | 'completion_input' | 'agent_turn_input';
278
+ }
279
+ export interface SafetyViolation {
280
+ metadata: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
281
+ violation_level: 'info' | 'warn' | 'error';
282
+ user_message?: string;
283
+ }
14
284
  export interface SamplingParams {
15
- strategy: 'greedy' | 'top_p' | 'top_k';
285
+ strategy: SamplingParams.GreedySamplingStrategy | SamplingParams.TopPSamplingStrategy | SamplingParams.TopKSamplingStrategy;
16
286
  max_tokens?: number;
17
287
  repetition_penalty?: number;
18
- temperature?: number;
19
- top_k?: number;
20
- top_p?: number;
288
+ }
289
+ export declare namespace SamplingParams {
290
+ interface GreedySamplingStrategy {
291
+ type: 'greedy';
292
+ }
293
+ interface TopPSamplingStrategy {
294
+ type: 'top_p';
295
+ temperature?: number;
296
+ top_p?: number;
297
+ }
298
+ interface TopKSamplingStrategy {
299
+ top_k: number;
300
+ type: 'top_k';
301
+ }
302
+ }
303
+ export interface ScoringResult {
304
+ aggregated_results: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
305
+ score_rows: Array<Record<string, boolean | number | string | Array<unknown> | unknown | null>>;
21
306
  }
22
307
  export interface SystemMessage {
23
- content: string | Array<string>;
308
+ /**
309
+ * The content of the "system prompt". If multiple system messages are provided,
310
+ * they are concatenated. The underlying Llama Stack code may also add other system
311
+ * messages (for example, for formatting tool definitions).
312
+ */
313
+ content: InterleavedContent;
314
+ /**
315
+ * Must be "system" to identify this as a system message
316
+ */
24
317
  role: 'system';
25
318
  }
26
319
  export interface ToolCall {
@@ -28,15 +321,46 @@ export interface ToolCall {
28
321
  call_id: string;
29
322
  tool_name: 'brave_search' | 'wolfram_alpha' | 'photogen' | 'code_interpreter' | (string & {});
30
323
  }
324
+ export interface ToolParamDefinition {
325
+ param_type: string;
326
+ default?: boolean | number | string | Array<unknown> | unknown | null;
327
+ description?: string;
328
+ required?: boolean;
329
+ }
31
330
  export interface ToolResponseMessage {
331
+ /**
332
+ * Unique identifier for the tool call this response is for
333
+ */
32
334
  call_id: string;
33
- content: string | Array<string>;
34
- role: 'ipython';
335
+ /**
336
+ * The response content from the tool
337
+ */
338
+ content: InterleavedContent;
339
+ /**
340
+ * Must be "tool" to identify this as a tool response
341
+ */
342
+ role: 'tool';
343
+ /**
344
+ * Name of the tool that was called
345
+ */
35
346
  tool_name: 'brave_search' | 'wolfram_alpha' | 'photogen' | 'code_interpreter' | (string & {});
36
347
  }
348
+ export interface URL {
349
+ uri: string;
350
+ }
37
351
  export interface UserMessage {
38
- content: string | Array<string>;
352
+ /**
353
+ * The content of the message, which can include text and other media
354
+ */
355
+ content: InterleavedContent;
356
+ /**
357
+ * Must be "user" to identify this as a user message
358
+ */
39
359
  role: 'user';
40
- context?: string | Array<string>;
360
+ /**
361
+ * (Optional) This field is used internally by Llama Stack to pass RAG context.
362
+ * This field may be removed in the API in the future.
363
+ */
364
+ context?: InterleavedContent;
41
365
  }
42
366
  //# sourceMappingURL=shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAEhC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,wBAAwB,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAEhC,IAAI,EAAE,WAAW,CAAC;IAElB,WAAW,EAAE,aAAa,GAAG,gBAAgB,GAAG,eAAe,CAAC;IAEhE,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;IAEvC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAEhC,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,MAAM,CACf,MAAM,EACJ,MAAM,GACN,MAAM,GACN,OAAO,GACP,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,GACvC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,GAChD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,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,kBAAkB,CAAC;IAE5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,cAAc,GAAG,eAAe,GAAG,UAAU,GAAG,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CAC/F;AAED,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,EAAE,kBAAkB,CAAC;IAE5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B"}
@@ -1,42 +1,28 @@
1
1
  import { APIResource } from "../resource.js";
2
2
  import * as Core from "../core.js";
3
- import * as ShieldsAPI from "./shields.js";
4
3
  export declare class Shields extends APIResource {
5
- list(params?: ShieldListParams, options?: Core.RequestOptions): Core.APIPromise<ShieldSpec>;
6
- list(options?: Core.RequestOptions): Core.APIPromise<ShieldSpec>;
7
- get(params: ShieldGetParams, options?: Core.RequestOptions): Core.APIPromise<ShieldSpec | null>;
4
+ retrieve(identifier: string, options?: Core.RequestOptions): Core.APIPromise<Shield | null>;
5
+ list(options?: Core.RequestOptions): Core.APIPromise<ShieldListResponse>;
6
+ register(body: ShieldRegisterParams, options?: Core.RequestOptions): Core.APIPromise<Shield>;
8
7
  }
9
- export interface ShieldSpec {
10
- provider_config: ShieldSpec.ProviderConfig;
11
- shield_type: string;
8
+ export interface ListShieldsResponse {
9
+ data: Array<Shield>;
12
10
  }
13
- export declare namespace ShieldSpec {
14
- interface ProviderConfig {
15
- config: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
16
- provider_id: string;
17
- }
11
+ export interface Shield {
12
+ identifier: string;
13
+ provider_id: string;
14
+ provider_resource_id: string;
15
+ type: 'shield';
16
+ params?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
18
17
  }
19
- export interface ShieldListParams {
20
- /**
21
- * JSON-encoded provider data which will be made available to the adapter servicing
22
- * the API
23
- */
24
- 'X-LlamaStack-ProviderData'?: string;
25
- }
26
- export interface ShieldGetParams {
27
- /**
28
- * Query param:
29
- */
30
- shield_type: string;
31
- /**
32
- * Header param: JSON-encoded provider data which will be made available to the
33
- * adapter servicing the API
34
- */
35
- 'X-LlamaStack-ProviderData'?: string;
18
+ export type ShieldListResponse = Array<Shield>;
19
+ export interface ShieldRegisterParams {
20
+ shield_id: string;
21
+ params?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
22
+ provider_id?: string;
23
+ provider_shield_id?: string;
36
24
  }
37
25
  export declare namespace Shields {
38
- export import ShieldSpec = ShieldsAPI.ShieldSpec;
39
- export import ShieldListParams = ShieldsAPI.ShieldListParams;
40
- export import ShieldGetParams = ShieldsAPI.ShieldGetParams;
26
+ export { type ListShieldsResponse as ListShieldsResponse, type Shield as Shield, type ShieldListResponse as ShieldListResponse, type ShieldRegisterParams as ShieldRegisterParams, };
41
27
  }
42
28
  //# sourceMappingURL=shields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shields.d.ts","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,UAAU,MAAM,WAAW,CAAC;AAExC,qBAAa,OAAQ,SAAQ,WAAW;IACtC,IAAI,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;IAC3F,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,UA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 0;
5
5
  const resource_1 = require("../resource.js");
6
- const core_1 = require("../core.js");
7
6
  class Shields extends resource_1.APIResource {
8
- list(params = {}, options) {
9
- if ((0, core_1.isRequestOptions)(params)) {
10
- return this.list({}, params);
11
- }
12
- const { 'X-LlamaStack-ProviderData': xLlamaStackProviderData } = params;
13
- return this._client.get('/shields/list', {
14
- ...options,
15
- headers: {
16
- ...(xLlamaStackProviderData != null ?
17
- { 'X-LlamaStack-ProviderData': xLlamaStackProviderData }
18
- : undefined),
19
- ...options?.headers,
20
- },
21
- });
7
+ retrieve(identifier, options) {
8
+ return this._client.get(`/v1/shields/${identifier}`, options);
22
9
  }
23
- get(params, options) {
24
- const { 'X-LlamaStack-ProviderData': xLlamaStackProviderData, ...query } = params;
25
- return this._client.get('/shields/get', {
26
- query,
27
- ...options,
28
- headers: {
29
- ...(xLlamaStackProviderData != null ?
30
- { 'X-LlamaStack-ProviderData': xLlamaStackProviderData }
31
- : undefined),
32
- ...options?.headers,
33
- },
34
- });
10
+ list(options) {
11
+ return this._client.get('/v1/shields', options)._thenUnwrap((obj) => obj.data);
12
+ }
13
+ register(body, options) {
14
+ return this._client.post('/v1/shields', { body, ...options });
35
15
  }
36
16
  }
37
17
  exports.Shields = Shields;
38
- (function (Shields) {
39
- })(Shields = exports.Shields || (exports.Shields = {}));
40
18
  //# sourceMappingURL=shields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shields.js","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAI3C,MAAa,OAAQ,SAAQ,sBAAW;IAGtC,IAAI,CACF,SAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,MAAM,CAAC,EAAE;YAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;SAC9B;QACD,MAAM,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,GAAG,MA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GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF;AAdD,0BAcC"}
@@ -1,36 +1,14 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../resource.mjs";
3
- import { isRequestOptions } from "../core.mjs";
4
3
  export class Shields extends APIResource {
5
- list(params = {}, options) {
6
- if (isRequestOptions(params)) {
7
- return this.list({}, params);
8
- }
9
- const { 'X-LlamaStack-ProviderData': xLlamaStackProviderData } = params;
10
- return this._client.get('/shields/list', {
11
- ...options,
12
- headers: {
13
- ...(xLlamaStackProviderData != null ?
14
- { 'X-LlamaStack-ProviderData': xLlamaStackProviderData }
15
- : undefined),
16
- ...options?.headers,
17
- },
18
- });
4
+ retrieve(identifier, options) {
5
+ return this._client.get(`/v1/shields/${identifier}`, options);
19
6
  }
20
- get(params, options) {
21
- const { 'X-LlamaStack-ProviderData': xLlamaStackProviderData, ...query } = params;
22
- return this._client.get('/shields/get', {
23
- query,
24
- ...options,
25
- headers: {
26
- ...(xLlamaStackProviderData != null ?
27
- { 'X-LlamaStack-ProviderData': xLlamaStackProviderData }
28
- : undefined),
29
- ...options?.headers,
30
- },
31
- });
7
+ list(options) {
8
+ return this._client.get('/v1/shields', options)._thenUnwrap((obj) => obj.data);
9
+ }
10
+ register(body, options) {
11
+ return this._client.post('/v1/shields', { body, ...options });
32
12
  }
33
13
  }
34
- (function (Shields) {
35
- })(Shields || (Shields = {}));
36
14
  //# sourceMappingURL=shields.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"shields.mjs","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAA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E,OAA6B;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,CAAC,OAA6B;QAChC,OACE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CACxC,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -1,36 +1,19 @@
1
1
  import { APIResource } from "../resource.js";
2
2
  import * as Core from "../core.js";
3
- import * as SyntheticDataGenerationAPI from "./synthetic-data-generation.js";
4
- import * as RewardScoringAPI from "./reward-scoring.js";
5
3
  import * as Shared from "./shared.js";
6
- export declare class SyntheticDataGenerationResource extends APIResource {
7
- generate(params: SyntheticDataGenerationGenerateParams, options?: Core.RequestOptions): Core.APIPromise<SyntheticDataGeneration>;
4
+ export declare class SyntheticDataGeneration extends APIResource {
5
+ generate(body: SyntheticDataGenerationGenerateParams, options?: Core.RequestOptions): Core.APIPromise<SyntheticDataGenerationResponse>;
8
6
  }
9
- export interface SyntheticDataGeneration {
10
- synthetic_data: Array<RewardScoringAPI.ScoredDialogGenerations>;
7
+ export interface SyntheticDataGenerationResponse {
8
+ synthetic_data: Array<Record<string, boolean | number | string | Array<unknown> | unknown | null>>;
11
9
  statistics?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
12
10
  }
13
11
  export interface SyntheticDataGenerationGenerateParams {
14
- /**
15
- * Body param:
16
- */
17
- dialogs: Array<Shared.UserMessage | Shared.SystemMessage | Shared.ToolResponseMessage | Shared.CompletionMessage>;
18
- /**
19
- * Body param:
20
- */
12
+ dialogs: Array<Shared.Message>;
21
13
  filtering_function: 'none' | 'random' | 'top_k' | 'top_p' | 'top_k_top_p' | 'sigmoid';
22
- /**
23
- * Body param:
24
- */
25
14
  model?: string;
26
- /**
27
- * Header param: JSON-encoded provider data which will be made available to the
28
- * adapter servicing the API
29
- */
30
- 'X-LlamaStack-ProviderData'?: string;
31
15
  }
32
- export declare namespace SyntheticDataGenerationResource {
33
- export import SyntheticDataGeneration = SyntheticDataGenerationAPI.SyntheticDataGeneration;
34
- export import SyntheticDataGenerationGenerateParams = SyntheticDataGenerationAPI.SyntheticDataGenerationGenerateParams;
16
+ export declare namespace SyntheticDataGeneration {
17
+ export { type SyntheticDataGenerationResponse as SyntheticDataGenerationResponse, type SyntheticDataGenerationGenerateParams as SyntheticDataGenerationGenerateParams, };
35
18
  }
36
19
  //# sourceMappingURL=synthetic-data-generation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"synthetic-data-generation.d.ts","sourceRoot":"","sources":["../src/resources/synthetic-data-generation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,0BAA0B,MAAM,6BAA6B,CAAC;AAC1E,OAAO,KAAK,gBAAgB,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,qBAAa,+BAAgC,SAAQ,WAAW;IAC9D,QAAQ,CACN,MAAM,EAAE,qCAAqC,EAC7C,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC;CAa5C;AAED,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;IAEhE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,G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