llama-stack-client 0.4.4 → 0.4.5

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 (291) hide show
  1. package/.github/workflows/ci.yml +4 -4
  2. package/.github/workflows/release-doctor.yml +1 -1
  3. package/.release-please-manifest.json +1 -1
  4. package/.stats.yml +4 -4
  5. package/CHANGELOG.md +41 -0
  6. package/LICENSE +1 -1
  7. package/README.md +41 -27
  8. package/api.md +32 -25
  9. package/dist/CHANGELOG.md +41 -0
  10. package/dist/LICENSE +1 -1
  11. package/dist/README.md +41 -27
  12. package/dist/core.d.ts.map +1 -1
  13. package/dist/core.js +5 -0
  14. package/dist/core.js.map +1 -1
  15. package/dist/core.mjs +5 -0
  16. package/dist/core.mjs.map +1 -1
  17. package/dist/index.d.mts +12 -6
  18. package/dist/index.d.ts +12 -6
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/package.json +1 -1
  23. package/dist/resources/alpha/admin.d.ts +41 -0
  24. package/dist/resources/alpha/admin.d.ts.map +1 -0
  25. package/dist/resources/alpha/admin.js +46 -0
  26. package/dist/resources/alpha/admin.js.map +1 -0
  27. package/dist/resources/alpha/admin.mjs +42 -0
  28. package/dist/resources/alpha/admin.mjs.map +1 -0
  29. package/dist/resources/alpha/alpha.d.ts +8 -4
  30. package/dist/resources/alpha/alpha.d.ts.map +1 -1
  31. package/dist/resources/alpha/alpha.js +6 -2
  32. package/dist/resources/alpha/alpha.js.map +1 -1
  33. package/dist/resources/alpha/alpha.mjs +6 -2
  34. package/dist/resources/alpha/alpha.mjs.map +1 -1
  35. package/dist/resources/alpha/benchmarks.d.ts +37 -1
  36. package/dist/resources/alpha/benchmarks.d.ts.map +1 -1
  37. package/dist/resources/alpha/eval/eval.d.ts +28 -7
  38. package/dist/resources/alpha/eval/eval.d.ts.map +1 -1
  39. package/dist/resources/alpha/eval/eval.js.map +1 -1
  40. package/dist/resources/alpha/eval/eval.mjs.map +1 -1
  41. package/dist/resources/alpha/index.d.ts +2 -1
  42. package/dist/resources/alpha/index.d.ts.map +1 -1
  43. package/dist/resources/alpha/index.js +3 -1
  44. package/dist/resources/alpha/index.js.map +1 -1
  45. package/dist/resources/alpha/index.mjs +1 -0
  46. package/dist/resources/alpha/index.mjs.map +1 -1
  47. package/dist/resources/alpha/inference.d.ts +58 -7
  48. package/dist/resources/alpha/inference.d.ts.map +1 -1
  49. package/dist/resources/alpha/post-training/index.d.ts +2 -2
  50. package/dist/resources/alpha/post-training/index.d.ts.map +1 -1
  51. package/dist/resources/alpha/post-training/index.js.map +1 -1
  52. package/dist/resources/alpha/post-training/index.mjs +1 -1
  53. package/dist/resources/alpha/post-training/index.mjs.map +1 -1
  54. package/dist/resources/alpha/post-training/job.d.ts +4 -16
  55. package/dist/resources/alpha/post-training/job.d.ts.map +1 -1
  56. package/dist/resources/alpha/post-training/job.js +5 -6
  57. package/dist/resources/alpha/post-training/job.js.map +1 -1
  58. package/dist/resources/alpha/post-training/job.mjs +5 -6
  59. package/dist/resources/alpha/post-training/job.mjs.map +1 -1
  60. package/dist/resources/alpha/post-training/post-training.d.ts +38 -11
  61. package/dist/resources/alpha/post-training/post-training.d.ts.map +1 -1
  62. package/dist/resources/alpha/post-training/post-training.js.map +1 -1
  63. package/dist/resources/alpha/post-training/post-training.mjs +1 -1
  64. package/dist/resources/alpha/post-training/post-training.mjs.map +1 -1
  65. package/dist/resources/beta/datasets.d.ts +102 -8
  66. package/dist/resources/beta/datasets.d.ts.map +1 -1
  67. package/dist/resources/chat/chat.d.ts +119 -17
  68. package/dist/resources/chat/chat.d.ts.map +1 -1
  69. package/dist/resources/chat/chat.js.map +1 -1
  70. package/dist/resources/chat/chat.mjs.map +1 -1
  71. package/dist/resources/chat/completions.d.ts +1130 -73
  72. package/dist/resources/chat/completions.d.ts.map +1 -1
  73. package/dist/resources/chat/completions.js +0 -2
  74. package/dist/resources/chat/completions.js.map +1 -1
  75. package/dist/resources/chat/completions.mjs +0 -2
  76. package/dist/resources/chat/completions.mjs.map +1 -1
  77. package/dist/resources/completions.d.ts +135 -26
  78. package/dist/resources/completions.d.ts.map +1 -1
  79. package/dist/resources/completions.js.map +1 -1
  80. package/dist/resources/completions.mjs.map +1 -1
  81. package/dist/resources/conversations/conversations.d.ts +56 -12
  82. package/dist/resources/conversations/conversations.d.ts.map +1 -1
  83. package/dist/resources/conversations/conversations.js +0 -8
  84. package/dist/resources/conversations/conversations.js.map +1 -1
  85. package/dist/resources/conversations/conversations.mjs +0 -8
  86. package/dist/resources/conversations/conversations.mjs.map +1 -1
  87. package/dist/resources/conversations/items.d.ts +364 -81
  88. package/dist/resources/conversations/items.d.ts.map +1 -1
  89. package/dist/resources/conversations/items.js +0 -6
  90. package/dist/resources/conversations/items.js.map +1 -1
  91. package/dist/resources/conversations/items.mjs +0 -6
  92. package/dist/resources/conversations/items.mjs.map +1 -1
  93. package/dist/resources/embeddings.d.ts +46 -8
  94. package/dist/resources/embeddings.d.ts.map +1 -1
  95. package/dist/resources/embeddings.js +0 -2
  96. package/dist/resources/embeddings.js.map +1 -1
  97. package/dist/resources/embeddings.mjs +0 -2
  98. package/dist/resources/embeddings.mjs.map +1 -1
  99. package/dist/resources/files.d.ts +58 -31
  100. package/dist/resources/files.d.ts.map +1 -1
  101. package/dist/resources/files.js +4 -16
  102. package/dist/resources/files.js.map +1 -1
  103. package/dist/resources/files.mjs +4 -16
  104. package/dist/resources/files.mjs.map +1 -1
  105. package/dist/resources/index.d.ts +3 -3
  106. package/dist/resources/index.d.ts.map +1 -1
  107. package/dist/resources/index.js.map +1 -1
  108. package/dist/resources/index.mjs.map +1 -1
  109. package/dist/resources/inspect.d.ts +3 -45
  110. package/dist/resources/inspect.d.ts.map +1 -1
  111. package/dist/resources/inspect.js +0 -4
  112. package/dist/resources/inspect.js.map +1 -1
  113. package/dist/resources/inspect.mjs +0 -4
  114. package/dist/resources/inspect.mjs.map +1 -1
  115. package/dist/resources/models/models.d.ts +21 -6
  116. package/dist/resources/models/models.d.ts.map +1 -1
  117. package/dist/resources/models/models.js +0 -6
  118. package/dist/resources/models/models.js.map +1 -1
  119. package/dist/resources/models/models.mjs +0 -6
  120. package/dist/resources/models/models.mjs.map +1 -1
  121. package/dist/resources/moderations.d.ts +38 -5
  122. package/dist/resources/moderations.d.ts.map +1 -1
  123. package/dist/resources/moderations.js +1 -3
  124. package/dist/resources/moderations.js.map +1 -1
  125. package/dist/resources/moderations.mjs +1 -3
  126. package/dist/resources/moderations.mjs.map +1 -1
  127. package/dist/resources/prompts/prompts.d.ts +24 -10
  128. package/dist/resources/prompts/prompts.d.ts.map +1 -1
  129. package/dist/resources/prompts/prompts.js +2 -10
  130. package/dist/resources/prompts/prompts.js.map +1 -1
  131. package/dist/resources/prompts/prompts.mjs +2 -10
  132. package/dist/resources/prompts/prompts.mjs.map +1 -1
  133. package/dist/resources/prompts/versions.d.ts +0 -2
  134. package/dist/resources/prompts/versions.d.ts.map +1 -1
  135. package/dist/resources/prompts/versions.js +0 -2
  136. package/dist/resources/prompts/versions.js.map +1 -1
  137. package/dist/resources/prompts/versions.mjs +0 -2
  138. package/dist/resources/prompts/versions.mjs.map +1 -1
  139. package/dist/resources/providers.d.ts +5 -12
  140. package/dist/resources/providers.d.ts.map +1 -1
  141. package/dist/resources/providers.js +0 -4
  142. package/dist/resources/providers.js.map +1 -1
  143. package/dist/resources/providers.mjs +0 -4
  144. package/dist/resources/providers.mjs.map +1 -1
  145. package/dist/resources/responses/input-items.d.ts +108 -9
  146. package/dist/resources/responses/input-items.d.ts.map +1 -1
  147. package/dist/resources/responses/responses.d.ts +881 -124
  148. package/dist/resources/responses/responses.d.ts.map +1 -1
  149. package/dist/resources/responses/responses.js.map +1 -1
  150. package/dist/resources/responses/responses.mjs.map +1 -1
  151. package/dist/resources/routes.d.ts +10 -9
  152. package/dist/resources/routes.d.ts.map +1 -1
  153. package/dist/resources/routes.js.map +1 -1
  154. package/dist/resources/routes.mjs.map +1 -1
  155. package/dist/resources/safety.d.ts +131 -9
  156. package/dist/resources/safety.d.ts.map +1 -1
  157. package/dist/resources/safety.js +1 -3
  158. package/dist/resources/safety.js.map +1 -1
  159. package/dist/resources/safety.mjs +1 -3
  160. package/dist/resources/safety.mjs.map +1 -1
  161. package/dist/resources/scoring-functions.d.ts +23 -1
  162. package/dist/resources/scoring-functions.d.ts.map +1 -1
  163. package/dist/resources/scoring.d.ts +24 -0
  164. package/dist/resources/scoring.d.ts.map +1 -1
  165. package/dist/resources/shared.d.ts +139 -7
  166. package/dist/resources/shared.d.ts.map +1 -1
  167. package/dist/resources/shields.d.ts +21 -0
  168. package/dist/resources/shields.d.ts.map +1 -1
  169. package/dist/resources/vector-io.d.ts +75 -58
  170. package/dist/resources/vector-io.d.ts.map +1 -1
  171. package/dist/resources/vector-io.js +1 -1
  172. package/dist/resources/vector-io.mjs +1 -1
  173. package/dist/resources/vector-stores/file-batches.d.ts +13 -7
  174. package/dist/resources/vector-stores/file-batches.d.ts.map +1 -1
  175. package/dist/resources/vector-stores/file-batches.js +3 -6
  176. package/dist/resources/vector-stores/file-batches.js.map +1 -1
  177. package/dist/resources/vector-stores/file-batches.mjs +3 -6
  178. package/dist/resources/vector-stores/file-batches.mjs.map +1 -1
  179. package/dist/resources/vector-stores/files.d.ts +31 -9
  180. package/dist/resources/vector-stores/files.d.ts.map +1 -1
  181. package/dist/resources/vector-stores/files.js +4 -4
  182. package/dist/resources/vector-stores/files.js.map +1 -1
  183. package/dist/resources/vector-stores/files.mjs +4 -4
  184. package/dist/resources/vector-stores/files.mjs.map +1 -1
  185. package/dist/resources/vector-stores/vector-stores.d.ts +87 -13
  186. package/dist/resources/vector-stores/vector-stores.d.ts.map +1 -1
  187. package/dist/resources/vector-stores/vector-stores.js +5 -10
  188. package/dist/resources/vector-stores/vector-stores.js.map +1 -1
  189. package/dist/resources/vector-stores/vector-stores.mjs +5 -10
  190. package/dist/resources/vector-stores/vector-stores.mjs.map +1 -1
  191. package/dist/src/core.ts +6 -0
  192. package/dist/src/index.ts +11 -16
  193. package/dist/src/resources/alpha/admin.ts +84 -0
  194. package/dist/src/resources/alpha/alpha.ts +16 -8
  195. package/dist/src/resources/alpha/benchmarks.ts +37 -1
  196. package/dist/src/resources/alpha/eval/eval.ts +28 -7
  197. package/dist/src/resources/alpha/index.ts +2 -0
  198. package/dist/src/resources/alpha/inference.ts +58 -7
  199. package/dist/src/resources/alpha/post-training/index.ts +2 -10
  200. package/dist/src/resources/alpha/post-training/job.ts +5 -26
  201. package/dist/src/resources/alpha/post-training/post-training.ts +38 -22
  202. package/dist/src/resources/beta/datasets.ts +103 -8
  203. package/dist/src/resources/chat/chat.ts +122 -20
  204. package/dist/src/resources/chat/completions.ts +1138 -79
  205. package/dist/src/resources/completions.ts +137 -28
  206. package/dist/src/resources/conversations/conversations.ts +67 -15
  207. package/dist/src/resources/conversations/items.ts +479 -110
  208. package/dist/src/resources/embeddings.ts +46 -8
  209. package/dist/src/resources/files.ts +58 -31
  210. package/dist/src/resources/index.ts +3 -3
  211. package/dist/src/resources/inspect.ts +3 -57
  212. package/dist/src/resources/models/models.ts +21 -6
  213. package/dist/src/resources/moderations.ts +38 -5
  214. package/dist/src/resources/prompts/prompts.ts +26 -12
  215. package/dist/src/resources/prompts/versions.ts +0 -2
  216. package/dist/src/resources/providers.ts +5 -16
  217. package/dist/src/resources/responses/input-items.ts +138 -15
  218. package/dist/src/resources/responses/responses.ts +1076 -196
  219. package/dist/src/resources/routes.ts +10 -14
  220. package/dist/src/resources/safety.ts +131 -8
  221. package/dist/src/resources/scoring-functions.ts +23 -1
  222. package/dist/src/resources/scoring.ts +24 -0
  223. package/dist/src/resources/shared.ts +148 -7
  224. package/dist/src/resources/shields.ts +21 -0
  225. package/dist/src/resources/vector-io.ts +95 -78
  226. package/dist/src/resources/vector-stores/file-batches.ts +13 -7
  227. package/dist/src/resources/vector-stores/files.ts +31 -11
  228. package/dist/src/resources/vector-stores/vector-stores.ts +89 -15
  229. package/dist/src/version.ts +1 -1
  230. package/dist/version.d.ts +1 -1
  231. package/dist/version.js +1 -1
  232. package/dist/version.mjs +1 -1
  233. package/package.json +1 -1
  234. package/src/core.ts +6 -0
  235. package/src/index.ts +11 -16
  236. package/src/resources/alpha/admin.ts +84 -0
  237. package/src/resources/alpha/alpha.ts +16 -8
  238. package/src/resources/alpha/benchmarks.ts +37 -1
  239. package/src/resources/alpha/eval/eval.ts +28 -7
  240. package/src/resources/alpha/index.ts +2 -0
  241. package/src/resources/alpha/inference.ts +58 -7
  242. package/src/resources/alpha/post-training/index.ts +2 -10
  243. package/src/resources/alpha/post-training/job.ts +5 -26
  244. package/src/resources/alpha/post-training/post-training.ts +38 -22
  245. package/src/resources/beta/datasets.ts +103 -8
  246. package/src/resources/chat/chat.ts +122 -20
  247. package/src/resources/chat/completions.ts +1138 -79
  248. package/src/resources/completions.ts +137 -28
  249. package/src/resources/conversations/conversations.ts +67 -15
  250. package/src/resources/conversations/items.ts +479 -110
  251. package/src/resources/embeddings.ts +46 -8
  252. package/src/resources/files.ts +58 -31
  253. package/src/resources/index.ts +3 -3
  254. package/src/resources/inspect.ts +3 -57
  255. package/src/resources/models/models.ts +21 -6
  256. package/src/resources/moderations.ts +38 -5
  257. package/src/resources/prompts/prompts.ts +26 -12
  258. package/src/resources/prompts/versions.ts +0 -2
  259. package/src/resources/providers.ts +5 -16
  260. package/src/resources/responses/input-items.ts +138 -15
  261. package/src/resources/responses/responses.ts +1076 -196
  262. package/src/resources/routes.ts +10 -14
  263. package/src/resources/safety.ts +131 -8
  264. package/src/resources/scoring-functions.ts +23 -1
  265. package/src/resources/scoring.ts +24 -0
  266. package/src/resources/shared.ts +148 -7
  267. package/src/resources/shields.ts +21 -0
  268. package/src/resources/vector-io.ts +95 -78
  269. package/src/resources/vector-stores/file-batches.ts +13 -7
  270. package/src/resources/vector-stores/files.ts +31 -11
  271. package/src/resources/vector-stores/vector-stores.ts +89 -15
  272. package/src/version.ts +1 -1
  273. package/tests/api-resources/alpha/admin.test.ts +111 -0
  274. package/tests/api-resources/alpha/eval/eval.test.ts +40 -20
  275. package/tests/api-resources/alpha/inference.test.ts +1 -1
  276. package/tests/api-resources/alpha/post-training/job.test.ts +21 -12
  277. package/tests/api-resources/alpha/post-training/post-training.test.ts +12 -2
  278. package/tests/api-resources/beta/datasets.test.ts +9 -3
  279. package/tests/api-resources/chat/completions.test.ts +20 -7
  280. package/tests/api-resources/completions.test.ts +5 -5
  281. package/tests/api-resources/conversations/items.test.ts +22 -3
  282. package/tests/api-resources/embeddings.test.ts +2 -2
  283. package/tests/api-resources/files.test.ts +6 -1
  284. package/tests/api-resources/responses/input-items.test.ts +7 -1
  285. package/tests/api-resources/responses/responses.test.ts +19 -5
  286. package/tests/api-resources/safety.test.ts +9 -5
  287. package/tests/api-resources/tool-runtime.test.ts +9 -2
  288. package/tests/api-resources/vector-io.test.ts +13 -4
  289. package/tests/api-resources/vector-stores/file-batches.test.ts +7 -1
  290. package/tests/api-resources/vector-stores/files.test.ts +7 -1
  291. package/tests/api-resources/vector-stores/vector-stores.test.ts +14 -2
@@ -49,7 +49,10 @@ describe('resource datasets', () => {
49
49
  });
50
50
 
51
51
  test('appendrows: only required params', async () => {
52
- const responsePromise = client.beta.datasets.appendrows('dataset_id', { rows: [{ foo: 'bar' }] });
52
+ const responsePromise = client.beta.datasets.appendrows('dataset_id', {
53
+ body_dataset_id: 'dataset_id',
54
+ rows: [{ foo: 'bar' }],
55
+ });
53
56
  const rawResponse = await responsePromise.asResponse();
54
57
  expect(rawResponse).toBeInstanceOf(Response);
55
58
  const response = await responsePromise;
@@ -60,7 +63,10 @@ describe('resource datasets', () => {
60
63
  });
61
64
 
62
65
  test('appendrows: required and optional params', async () => {
63
- const response = await client.beta.datasets.appendrows('dataset_id', { rows: [{ foo: 'bar' }] });
66
+ const response = await client.beta.datasets.appendrows('dataset_id', {
67
+ body_dataset_id: 'dataset_id',
68
+ rows: [{ foo: 'bar' }],
69
+ });
64
70
  });
65
71
 
66
72
  test('iterrows', async () => {
@@ -95,7 +101,7 @@ describe('resource datasets', () => {
95
101
  test('register: only required params', async () => {
96
102
  const responsePromise = client.beta.datasets.register({
97
103
  purpose: 'post-training/messages',
98
- source: { uri: 'uri' },
104
+ source: { uri: 'uri', type: 'uri' },
99
105
  });
100
106
  const rawResponse = await responsePromise.asResponse();
101
107
  expect(rawResponse).toBeInstanceOf(Response);
@@ -28,19 +28,27 @@ describe('resource completions', () => {
28
28
 
29
29
  test('create: required and optional params', async () => {
30
30
  const response = await client.chat.completions.create({
31
- messages: [{ content: 'string', name: 'name', role: 'user' }],
31
+ messages: [
32
+ {
33
+ content: 'string',
34
+ name: 'name',
35
+ role: 'user',
36
+ },
37
+ ],
32
38
  model: 'model',
33
- frequency_penalty: 0,
39
+ frequency_penalty: -2,
34
40
  function_call: 'string',
35
41
  functions: [{ foo: 'bar' }],
36
42
  logit_bias: { foo: 0 },
37
43
  logprobs: true,
38
- max_completion_tokens: 0,
39
- max_tokens: 0,
40
- n: 0,
44
+ max_completion_tokens: 1,
45
+ max_tokens: 1,
46
+ n: 1,
41
47
  parallel_tool_calls: true,
42
- presence_penalty: 0,
48
+ presence_penalty: -2,
49
+ reasoning_effort: 'none',
43
50
  response_format: { type: 'text' },
51
+ safety_identifier: 'safety_identifier',
44
52
  seed: 0,
45
53
  stop: 'string',
46
54
  stream: false,
@@ -94,7 +102,12 @@ describe('resource completions', () => {
94
102
  // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
95
103
  await expect(
96
104
  client.chat.completions.list(
97
- { after: 'after', limit: 0, model: 'model', order: 'asc' },
105
+ {
106
+ after: 'after',
107
+ limit: 0,
108
+ model: 'model',
109
+ order: 'asc',
110
+ },
98
111
  { path: '/_stainless_unknown_path' },
99
112
  ),
100
113
  ).rejects.toThrow(LlamaStackClient.NotFoundError);
@@ -27,14 +27,14 @@ describe('resource completions', () => {
27
27
  const response = await client.completions.create({
28
28
  model: 'model',
29
29
  prompt: 'string',
30
- best_of: 0,
30
+ best_of: 1,
31
31
  echo: true,
32
- frequency_penalty: 0,
32
+ frequency_penalty: -2,
33
33
  logit_bias: { foo: 0 },
34
34
  logprobs: true,
35
- max_tokens: 0,
36
- n: 0,
37
- presence_penalty: 0,
35
+ max_tokens: 1,
36
+ n: 1,
37
+ presence_penalty: -2,
38
38
  seed: 0,
39
39
  stop: 'string',
40
40
  stream: false,
@@ -14,7 +14,13 @@ const client = new LlamaStackClient({ baseURL: process.env['TEST_API_BASE_URL']
14
14
  describe('resource items', () => {
15
15
  test('create: only required params', async () => {
16
16
  const responsePromise = client.conversations.items.create('conversation_id', {
17
- items: [{ content: 'string', role: 'system', type: 'message' }],
17
+ items: [
18
+ {
19
+ content: 'string',
20
+ role: 'system',
21
+ type: 'message',
22
+ },
23
+ ],
18
24
  });
19
25
  const rawResponse = await responsePromise.asResponse();
20
26
  expect(rawResponse).toBeInstanceOf(Response);
@@ -27,7 +33,15 @@ describe('resource items', () => {
27
33
 
28
34
  test('create: required and optional params', async () => {
29
35
  const response = await client.conversations.items.create('conversation_id', {
30
- items: [{ content: 'string', role: 'system', id: 'id', status: 'status', type: 'message' }],
36
+ items: [
37
+ {
38
+ content: 'string',
39
+ role: 'system',
40
+ id: 'id',
41
+ status: 'status',
42
+ type: 'message',
43
+ },
44
+ ],
31
45
  });
32
46
  });
33
47
 
@@ -54,7 +68,12 @@ describe('resource items', () => {
54
68
  await expect(
55
69
  client.conversations.items.list(
56
70
  'conversation_id',
57
- { after: 'after', include: ['web_search_call.action.sources'], limit: 0, order: 'asc' },
71
+ {
72
+ after: 'after',
73
+ include: ['web_search_call.action.sources'],
74
+ limit: 0,
75
+ order: 'asc',
76
+ },
58
77
  { path: '/_stainless_unknown_path' },
59
78
  ),
60
79
  ).rejects.toThrow(LlamaStackClient.NotFoundError);
@@ -27,8 +27,8 @@ describe('resource embeddings', () => {
27
27
  const response = await client.embeddings.create({
28
28
  input: 'string',
29
29
  model: 'model',
30
- dimensions: 0,
31
- encoding_format: 'encoding_format',
30
+ dimensions: 1,
31
+ encoding_format: 'float',
32
32
  user: 'user',
33
33
  });
34
34
  });
@@ -74,7 +74,12 @@ describe('resource files', () => {
74
74
  // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
75
75
  await expect(
76
76
  client.files.list(
77
- { after: 'after', limit: 0, order: 'asc', purpose: 'assistants' },
77
+ {
78
+ after: 'after',
79
+ limit: 0,
80
+ order: 'asc',
81
+ purpose: 'assistants',
82
+ },
78
83
  { path: '/_stainless_unknown_path' },
79
84
  ),
80
85
  ).rejects.toThrow(LlamaStackClient.NotFoundError);
@@ -35,7 +35,13 @@ describe('resource inputItems', () => {
35
35
  await expect(
36
36
  client.responses.inputItems.list(
37
37
  'response_id',
38
- { after: 'after', before: 'before', include: ['string'], limit: 0, order: 'asc' },
38
+ {
39
+ after: 'after',
40
+ before: 'before',
41
+ include: ['web_search_call.action.sources'],
42
+ limit: 0,
43
+ order: 'asc',
44
+ },
39
45
  { path: '/_stainless_unknown_path' },
40
46
  ),
41
47
  ).rejects.toThrow(LlamaStackClient.NotFoundError);
@@ -28,14 +28,22 @@ describe('resource responses', () => {
28
28
  input: 'string',
29
29
  model: 'model',
30
30
  conversation: 'conversation',
31
- include: ['string'],
31
+ guardrails: ['string'],
32
+ include: ['web_search_call.action.sources'],
32
33
  instructions: 'instructions',
33
- max_infer_iters: 0,
34
- max_tool_calls: 0,
34
+ max_infer_iters: 1,
35
+ max_output_tokens: 16,
36
+ max_tool_calls: 1,
35
37
  metadata: { foo: 'string' },
36
38
  parallel_tool_calls: true,
37
39
  previous_response_id: 'previous_response_id',
38
- prompt: { id: 'id', variables: { foo: { text: 'text', type: 'input_text' } }, version: 'version' },
40
+ prompt: {
41
+ id: 'id',
42
+ variables: { foo: { text: 'text', type: 'input_text' } },
43
+ version: 'version',
44
+ },
45
+ reasoning: { effort: 'none' },
46
+ safety_identifier: 'safety_identifier',
39
47
  store: true,
40
48
  stream: false,
41
49
  temperature: 0,
@@ -48,6 +56,7 @@ describe('resource responses', () => {
48
56
  type: 'text',
49
57
  },
50
58
  },
59
+ tool_choice: 'auto',
51
60
  tools: [{ search_context_size: 'S?oC"high', type: 'web_search' }],
52
61
  });
53
62
  });
@@ -92,7 +101,12 @@ describe('resource responses', () => {
92
101
  // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
93
102
  await expect(
94
103
  client.responses.list(
95
- { after: 'after', limit: 0, model: 'model', order: 'asc' },
104
+ {
105
+ after: 'after',
106
+ limit: 0,
107
+ model: 'model',
108
+ order: 'asc',
109
+ },
96
110
  { path: '/_stainless_unknown_path' },
97
111
  ),
98
112
  ).rejects.toThrow(LlamaStackClient.NotFoundError);
@@ -15,8 +15,7 @@ describe('resource safety', () => {
15
15
  test('runShield: only required params', async () => {
16
16
  const responsePromise = client.safety.runShield({
17
17
  messages: [{ content: 'string', role: 'user' }],
18
- params: { foo: 'bar' },
19
- shield_id: 'shield_id',
18
+ shield_id: 'x',
20
19
  });
21
20
  const rawResponse = await responsePromise.asResponse();
22
21
  expect(rawResponse).toBeInstanceOf(Response);
@@ -29,9 +28,14 @@ describe('resource safety', () => {
29
28
 
30
29
  test('runShield: required and optional params', async () => {
31
30
  const response = await client.safety.runShield({
32
- messages: [{ content: 'string', name: 'name', role: 'user' }],
33
- params: { foo: 'bar' },
34
- shield_id: 'shield_id',
31
+ messages: [
32
+ {
33
+ content: 'string',
34
+ name: 'name',
35
+ role: 'user',
36
+ },
37
+ ],
38
+ shield_id: 'x',
35
39
  });
36
40
  });
37
41
  });
@@ -13,7 +13,10 @@ const client = new LlamaStackClient({ baseURL: process.env['TEST_API_BASE_URL']
13
13
 
14
14
  describe('resource toolRuntime', () => {
15
15
  test('invokeTool: only required params', async () => {
16
- const responsePromise = client.toolRuntime.invokeTool({ kwargs: { foo: 'bar' }, tool_name: 'tool_name' });
16
+ const responsePromise = client.toolRuntime.invokeTool({
17
+ kwargs: { foo: 'bar' },
18
+ tool_name: 'tool_name',
19
+ });
17
20
  const rawResponse = await responsePromise.asResponse();
18
21
  expect(rawResponse).toBeInstanceOf(Response);
19
22
  const response = await responsePromise;
@@ -53,7 +56,11 @@ describe('resource toolRuntime', () => {
53
56
  // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
54
57
  await expect(
55
58
  client.toolRuntime.listTools(
56
- { authorization: 'authorization', mcp_endpoint: { uri: 'uri' }, tool_group_id: 'tool_group_id' },
59
+ {
60
+ authorization: 'authorization',
61
+ mcp_endpoint: { uri: 'uri' },
62
+ tool_group_id: 'tool_group_id',
63
+ },
57
64
  { path: '/_stainless_unknown_path' },
58
65
  ),
59
66
  ).rejects.toThrow(LlamaStackClient.NotFoundError);
@@ -14,7 +14,16 @@ const client = new LlamaStackClient({ baseURL: process.env['TEST_API_BASE_URL']
14
14
  describe('resource vectorIo', () => {
15
15
  test('insert: only required params', async () => {
16
16
  const responsePromise = client.vectorIo.insert({
17
- chunks: [{ chunk_id: 'chunk_id', content: 'string' }],
17
+ chunks: [
18
+ {
19
+ chunk_id: 'chunk_id',
20
+ chunk_metadata: {},
21
+ content: 'string',
22
+ embedding: [0],
23
+ embedding_dimension: 0,
24
+ embedding_model: 'embedding_model',
25
+ },
26
+ ],
18
27
  vector_store_id: 'vector_store_id',
19
28
  });
20
29
  const rawResponse = await responsePromise.asResponse();
@@ -31,10 +40,7 @@ describe('resource vectorIo', () => {
31
40
  chunks: [
32
41
  {
33
42
  chunk_id: 'chunk_id',
34
- content: 'string',
35
43
  chunk_metadata: {
36
- chunk_embedding_dimension: 0,
37
- chunk_embedding_model: 'chunk_embedding_model',
38
44
  chunk_id: 'chunk_id',
39
45
  chunk_tokenizer: 'chunk_tokenizer',
40
46
  chunk_window: 'chunk_window',
@@ -45,7 +51,10 @@ describe('resource vectorIo', () => {
45
51
  source: 'source',
46
52
  updated_timestamp: 0,
47
53
  },
54
+ content: 'string',
48
55
  embedding: [0],
56
+ embedding_dimension: 0,
57
+ embedding_model: 'embedding_model',
49
58
  metadata: { foo: 'bar' },
50
59
  },
51
60
  ],
@@ -99,7 +99,13 @@ describe('resource fileBatches', () => {
99
99
  client.vectorStores.fileBatches.listFiles(
100
100
  'vector_store_id',
101
101
  'batch_id',
102
- { after: 'after', before: 'before', filter: 'filter', limit: 0, order: 'order' },
102
+ {
103
+ after: 'after',
104
+ before: 'before',
105
+ filter: 'filter',
106
+ limit: 0,
107
+ order: 'order',
108
+ },
103
109
  { path: '/_stainless_unknown_path' },
104
110
  ),
105
111
  ).rejects.toThrow(LlamaStackClient.NotFoundError);
@@ -91,7 +91,13 @@ describe('resource files', () => {
91
91
  await expect(
92
92
  client.vectorStores.files.list(
93
93
  'vector_store_id',
94
- { after: 'after', before: 'before', filter: 'completed', limit: 0, order: 'order' },
94
+ {
95
+ after: 'after',
96
+ before: 'before',
97
+ filter: 'completed',
98
+ limit: 0,
99
+ order: 'order',
100
+ },
95
101
  { path: '/_stainless_unknown_path' },
96
102
  ),
97
103
  ).rejects.toThrow(LlamaStackClient.NotFoundError);
@@ -74,7 +74,12 @@ describe('resource vectorStores', () => {
74
74
  // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
75
75
  await expect(
76
76
  client.vectorStores.list(
77
- { after: 'after', before: 'before', limit: 0, order: 'order' },
77
+ {
78
+ after: 'after',
79
+ before: 'before',
80
+ limit: 0,
81
+ order: 'order',
82
+ },
78
83
  { path: '/_stainless_unknown_path' },
79
84
  ),
80
85
  ).rejects.toThrow(LlamaStackClient.NotFoundError);
@@ -114,7 +119,14 @@ describe('resource vectorStores', () => {
114
119
  query: 'string',
115
120
  filters: { foo: 'bar' },
116
121
  max_num_results: 0,
117
- ranking_options: { ranker: 'ranker', score_threshold: 0 },
122
+ ranking_options: {
123
+ alpha: 0,
124
+ impact_factor: 0,
125
+ model: 'model',
126
+ ranker: 'ranker',
127
+ score_threshold: 0,
128
+ weights: { foo: 0 },
129
+ },
118
130
  rewrite_query: true,
119
131
  search_mode: 'search_mode',
120
132
  });