llama-stack-client 0.2.7 → 0.2.8-rc2

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 (199) hide show
  1. package/index.d.mts +3 -0
  2. package/index.d.ts +3 -0
  3. package/index.d.ts.map +1 -1
  4. package/index.js +3 -0
  5. package/index.js.map +1 -1
  6. package/index.mjs +3 -0
  7. package/index.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/agents/agents.d.ts +13 -1
  10. package/resources/agents/agents.d.ts.map +1 -1
  11. package/resources/agents/agents.js +1 -1
  12. package/resources/agents/agents.js.map +1 -1
  13. package/resources/agents/agents.mjs +1 -1
  14. package/resources/agents/agents.mjs.map +1 -1
  15. package/resources/agents/session.d.ts +1 -1
  16. package/resources/agents/session.js +1 -1
  17. package/resources/agents/session.mjs +1 -1
  18. package/resources/benchmarks.d.ts +28 -1
  19. package/resources/benchmarks.d.ts.map +1 -1
  20. package/resources/benchmarks.js +9 -0
  21. package/resources/benchmarks.js.map +1 -1
  22. package/resources/benchmarks.mjs +9 -0
  23. package/resources/benchmarks.mjs.map +1 -1
  24. package/resources/chat/chat.d.ts +2 -2
  25. package/resources/chat/chat.d.ts.map +1 -1
  26. package/resources/chat/chat.js.map +1 -1
  27. package/resources/chat/chat.mjs.map +1 -1
  28. package/resources/chat/completions.d.ts +1015 -29
  29. package/resources/chat/completions.d.ts.map +1 -1
  30. package/resources/chat/completions.js +13 -0
  31. package/resources/chat/completions.js.map +1 -1
  32. package/resources/chat/completions.mjs +13 -0
  33. package/resources/chat/completions.mjs.map +1 -1
  34. package/resources/chat/index.d.ts +1 -1
  35. package/resources/chat/index.d.ts.map +1 -1
  36. package/resources/chat/index.js.map +1 -1
  37. package/resources/chat/index.mjs.map +1 -1
  38. package/resources/completions.d.ts +18 -18
  39. package/resources/datasets.d.ts +16 -7
  40. package/resources/datasets.d.ts.map +1 -1
  41. package/resources/datasets.js +9 -0
  42. package/resources/datasets.js.map +1 -1
  43. package/resources/datasets.mjs +9 -0
  44. package/resources/datasets.mjs.map +1 -1
  45. package/resources/index.d.ts +1 -0
  46. package/resources/index.d.ts.map +1 -1
  47. package/resources/index.js +3 -1
  48. package/resources/index.js.map +1 -1
  49. package/resources/index.mjs +1 -0
  50. package/resources/index.mjs.map +1 -1
  51. package/resources/inference.d.ts +51 -12
  52. package/resources/inference.d.ts.map +1 -1
  53. package/resources/inference.js +6 -0
  54. package/resources/inference.js.map +1 -1
  55. package/resources/inference.mjs +6 -0
  56. package/resources/inference.mjs.map +1 -1
  57. package/resources/inspect.d.ts +6 -0
  58. package/resources/inspect.d.ts.map +1 -1
  59. package/resources/inspect.js +6 -0
  60. package/resources/inspect.js.map +1 -1
  61. package/resources/inspect.mjs +6 -0
  62. package/resources/inspect.mjs.map +1 -1
  63. package/resources/models.d.ts +28 -1
  64. package/resources/models.d.ts.map +1 -1
  65. package/resources/models.js +12 -0
  66. package/resources/models.js.map +1 -1
  67. package/resources/models.mjs +12 -0
  68. package/resources/models.mjs.map +1 -1
  69. package/resources/post-training/job.d.ts +21 -0
  70. package/resources/post-training/job.d.ts.map +1 -1
  71. package/resources/post-training/job.js +12 -0
  72. package/resources/post-training/job.js.map +1 -1
  73. package/resources/post-training/job.mjs +12 -0
  74. package/resources/post-training/job.mjs.map +1 -1
  75. package/resources/post-training/post-training.d.ts +54 -0
  76. package/resources/post-training/post-training.d.ts.map +1 -1
  77. package/resources/post-training/post-training.js +6 -0
  78. package/resources/post-training/post-training.js.map +1 -1
  79. package/resources/post-training/post-training.mjs +6 -0
  80. package/resources/post-training/post-training.mjs.map +1 -1
  81. package/resources/providers.d.ts +6 -0
  82. package/resources/providers.d.ts.map +1 -1
  83. package/resources/providers.js +6 -0
  84. package/resources/providers.js.map +1 -1
  85. package/resources/providers.mjs +6 -0
  86. package/resources/providers.mjs.map +1 -1
  87. package/resources/responses.d.ts +360 -0
  88. package/resources/responses.d.ts.map +1 -0
  89. package/resources/responses.js +29 -0
  90. package/resources/responses.js.map +1 -0
  91. package/resources/responses.mjs +25 -0
  92. package/resources/responses.mjs.map +1 -0
  93. package/resources/routes.d.ts +3 -0
  94. package/resources/routes.d.ts.map +1 -1
  95. package/resources/routes.js +3 -0
  96. package/resources/routes.js.map +1 -1
  97. package/resources/routes.mjs +3 -0
  98. package/resources/routes.mjs.map +1 -1
  99. package/resources/safety.d.ts +12 -0
  100. package/resources/safety.d.ts.map +1 -1
  101. package/resources/safety.js +3 -0
  102. package/resources/safety.js.map +1 -1
  103. package/resources/safety.mjs +3 -0
  104. package/resources/safety.mjs.map +1 -1
  105. package/resources/scoring-functions.d.ts +31 -6
  106. package/resources/scoring-functions.d.ts.map +1 -1
  107. package/resources/scoring-functions.js +9 -0
  108. package/resources/scoring-functions.js.map +1 -1
  109. package/resources/scoring-functions.mjs +9 -0
  110. package/resources/scoring-functions.mjs.map +1 -1
  111. package/resources/scoring.d.ts +12 -0
  112. package/resources/scoring.d.ts.map +1 -1
  113. package/resources/scoring.js +3 -0
  114. package/resources/scoring.js.map +1 -1
  115. package/resources/scoring.mjs +3 -0
  116. package/resources/scoring.mjs.map +1 -1
  117. package/resources/shared.d.ts +23 -0
  118. package/resources/shared.d.ts.map +1 -1
  119. package/resources/shields.d.ts +22 -1
  120. package/resources/shields.d.ts.map +1 -1
  121. package/resources/shields.js +9 -0
  122. package/resources/shields.js.map +1 -1
  123. package/resources/shields.mjs +9 -0
  124. package/resources/shields.mjs.map +1 -1
  125. package/resources/telemetry.d.ts +66 -0
  126. package/resources/telemetry.d.ts.map +1 -1
  127. package/resources/telemetry.js +21 -0
  128. package/resources/telemetry.js.map +1 -1
  129. package/resources/telemetry.mjs +21 -0
  130. package/resources/telemetry.mjs.map +1 -1
  131. package/resources/tool-runtime/rag-tool.d.ts +3 -0
  132. package/resources/tool-runtime/rag-tool.d.ts.map +1 -1
  133. package/resources/tool-runtime/tool-runtime.d.ts +19 -1
  134. package/resources/tool-runtime/tool-runtime.d.ts.map +1 -1
  135. package/resources/tool-runtime/tool-runtime.js +1 -1
  136. package/resources/tool-runtime/tool-runtime.js.map +1 -1
  137. package/resources/tool-runtime/tool-runtime.mjs +1 -1
  138. package/resources/tool-runtime/tool-runtime.mjs.map +1 -1
  139. package/resources/toolgroups.d.ts +22 -4
  140. package/resources/toolgroups.d.ts.map +1 -1
  141. package/resources/toolgroups.js +6 -3
  142. package/resources/toolgroups.js.map +1 -1
  143. package/resources/toolgroups.mjs +6 -3
  144. package/resources/toolgroups.mjs.map +1 -1
  145. package/resources/tools.d.ts +8 -2
  146. package/resources/tools.d.ts.map +1 -1
  147. package/resources/tools.js +3 -0
  148. package/resources/tools.js.map +1 -1
  149. package/resources/tools.mjs +3 -0
  150. package/resources/tools.mjs.map +1 -1
  151. package/resources/vector-dbs.d.ts +30 -3
  152. package/resources/vector-dbs.d.ts.map +1 -1
  153. package/resources/vector-dbs.js +12 -0
  154. package/resources/vector-dbs.js.map +1 -1
  155. package/resources/vector-dbs.mjs +12 -0
  156. package/resources/vector-dbs.mjs.map +1 -1
  157. package/resources/vector-io.d.ts +22 -1
  158. package/resources/vector-io.d.ts.map +1 -1
  159. package/resources/vector-io.js +6 -0
  160. package/resources/vector-io.js.map +1 -1
  161. package/resources/vector-io.mjs +6 -0
  162. package/resources/vector-io.mjs.map +1 -1
  163. package/src/index.ts +23 -0
  164. package/src/resources/agents/agents.ts +13 -1
  165. package/src/resources/agents/session.ts +1 -1
  166. package/src/resources/benchmarks.ts +29 -2
  167. package/src/resources/chat/chat.ts +6 -0
  168. package/src/resources/chat/completions.ts +1429 -35
  169. package/src/resources/chat/index.ts +3 -0
  170. package/src/resources/completions.ts +18 -18
  171. package/src/resources/datasets.ts +19 -10
  172. package/src/resources/index.ts +10 -0
  173. package/src/resources/inference.ts +51 -12
  174. package/src/resources/inspect.ts +6 -0
  175. package/src/resources/models.ts +29 -2
  176. package/src/resources/post-training/job.ts +21 -0
  177. package/src/resources/post-training/post-training.ts +54 -0
  178. package/src/resources/providers.ts +6 -0
  179. package/src/resources/responses.ts +624 -0
  180. package/src/resources/routes.ts +3 -0
  181. package/src/resources/safety.ts +12 -0
  182. package/src/resources/scoring-functions.ts +40 -15
  183. package/src/resources/scoring.ts +12 -0
  184. package/src/resources/shared.ts +25 -0
  185. package/src/resources/shields.ts +23 -2
  186. package/src/resources/telemetry.ts +66 -0
  187. package/src/resources/tool-runtime/rag-tool.ts +3 -0
  188. package/src/resources/tool-runtime/tool-runtime.ts +19 -1
  189. package/src/resources/toolgroups.ts +23 -5
  190. package/src/resources/tools.ts +9 -3
  191. package/src/resources/vector-dbs.ts +33 -6
  192. package/src/resources/vector-io.ts +22 -1
  193. package/src/version.ts +1 -1
  194. package/version.d.ts +1 -1
  195. package/version.d.ts.map +1 -1
  196. package/version.js +1 -1
  197. package/version.js.map +1 -1
  198. package/version.mjs +1 -1
  199. package/version.mjs.map +1 -1
@@ -5,10 +5,16 @@ import * as Core from '../core';
5
5
  import * as Shared from './shared';
6
6
 
7
7
  export class ScoringFunctions extends APIResource {
8
+ /**
9
+ * Get a scoring function by its ID.
10
+ */
8
11
  retrieve(scoringFnId: string, options?: Core.RequestOptions): Core.APIPromise<ScoringFn> {
9
12
  return this._client.get(`/v1/scoring-functions/${scoringFnId}`, options);
10
13
  }
11
14
 
15
+ /**
16
+ * List all scoring functions.
17
+ */
12
18
  list(options?: Core.RequestOptions): Core.APIPromise<ScoringFunctionListResponse> {
13
19
  return (
14
20
  this._client.get('/v1/scoring-functions', options) as Core.APIPromise<{
@@ -17,6 +23,9 @@ export class ScoringFunctions extends APIResource {
17
23
  )._thenUnwrap((obj) => obj.data);
18
24
  }
19
25
 
26
+ /**
27
+ * Register a scoring function.
28
+ */
20
29
  register(body: ScoringFunctionRegisterParams, options?: Core.RequestOptions): Core.APIPromise<void> {
21
30
  return this._client.post('/v1/scoring-functions', {
22
31
  body,
@@ -37,8 +46,6 @@ export interface ScoringFn {
37
46
 
38
47
  provider_id: string;
39
48
 
40
- provider_resource_id: string;
41
-
42
49
  return_type: Shared.ReturnType;
43
50
 
44
51
  type: 'scoring_function';
@@ -46,6 +53,8 @@ export interface ScoringFn {
46
53
  description?: string;
47
54
 
48
55
  params?: ScoringFnParams;
56
+
57
+ provider_resource_id?: string;
49
58
  }
50
59
 
51
60
  export type ScoringFnParams =
@@ -55,51 +64,67 @@ export type ScoringFnParams =
55
64
 
56
65
  export namespace ScoringFnParams {
57
66
  export interface LlmAsJudgeScoringFnParams {
58
- judge_model: string;
59
-
60
- type: 'llm_as_judge';
61
-
62
- aggregation_functions?: Array<
67
+ aggregation_functions: Array<
63
68
  'average' | 'weighted_average' | 'median' | 'categorical_count' | 'accuracy'
64
69
  >;
65
70
 
66
- judge_score_regexes?: Array<string>;
71
+ judge_model: string;
72
+
73
+ judge_score_regexes: Array<string>;
74
+
75
+ type: 'llm_as_judge';
67
76
 
68
77
  prompt_template?: string;
69
78
  }
70
79
 
71
80
  export interface RegexParserScoringFnParams {
72
- type: 'regex_parser';
73
-
74
- aggregation_functions?: Array<
81
+ aggregation_functions: Array<
75
82
  'average' | 'weighted_average' | 'median' | 'categorical_count' | 'accuracy'
76
83
  >;
77
84
 
78
- parsing_regexes?: Array<string>;
85
+ parsing_regexes: Array<string>;
86
+
87
+ type: 'regex_parser';
79
88
  }
80
89
 
81
90
  export interface BasicScoringFnParams {
82
- type: 'basic';
83
-
84
- aggregation_functions?: Array<
91
+ aggregation_functions: Array<
85
92
  'average' | 'weighted_average' | 'median' | 'categorical_count' | 'accuracy'
86
93
  >;
94
+
95
+ type: 'basic';
87
96
  }
88
97
  }
89
98
 
90
99
  export type ScoringFunctionListResponse = Array<ScoringFn>;
91
100
 
92
101
  export interface ScoringFunctionRegisterParams {
102
+ /**
103
+ * The description of the scoring function.
104
+ */
93
105
  description: string;
94
106
 
95
107
  return_type: Shared.ReturnType;
96
108
 
109
+ /**
110
+ * The ID of the scoring function to register.
111
+ */
97
112
  scoring_fn_id: string;
98
113
 
114
+ /**
115
+ * The parameters for the scoring function for benchmark eval, these can be
116
+ * overridden for app eval.
117
+ */
99
118
  params?: ScoringFnParams;
100
119
 
120
+ /**
121
+ * The ID of the provider to use for the scoring function.
122
+ */
101
123
  provider_id?: string;
102
124
 
125
+ /**
126
+ * The ID of the provider scoring function to use for the scoring function.
127
+ */
103
128
  provider_scoring_fn_id?: string;
104
129
  }
105
130
 
@@ -13,6 +13,9 @@ export class Scoring extends APIResource {
13
13
  return this._client.post('/v1/scoring/score', { body, ...options });
14
14
  }
15
15
 
16
+ /**
17
+ * Score a batch of rows.
18
+ */
16
19
  scoreBatch(
17
20
  body: ScoringScoreBatchParams,
18
21
  options?: Core.RequestOptions,
@@ -50,10 +53,19 @@ export interface ScoringScoreParams {
50
53
  }
51
54
 
52
55
  export interface ScoringScoreBatchParams {
56
+ /**
57
+ * The ID of the dataset to score.
58
+ */
53
59
  dataset_id: string;
54
60
 
61
+ /**
62
+ * Whether to save the results to a dataset.
63
+ */
55
64
  save_results_dataset: boolean;
56
65
 
66
+ /**
67
+ * The scoring functions to use for the scoring.
68
+ */
57
69
  scoring_functions: Record<string, ScoringFunctionsAPI.ScoringFnParams | null>;
58
70
  }
59
71
 
@@ -479,12 +479,37 @@ export namespace ParamType {
479
479
  }
480
480
  }
481
481
 
482
+ /**
483
+ * Configuration for the RAG query generation.
484
+ */
482
485
  export interface QueryConfig {
486
+ /**
487
+ * Template for formatting each retrieved chunk in the context. Available
488
+ * placeholders: {index} (1-based chunk ordinal), {chunk.content} (chunk content
489
+ * string), {metadata} (chunk metadata dict). Default: "Result {index}\nContent:
490
+ * {chunk.content}\nMetadata: {metadata}\n"
491
+ */
492
+ chunk_template: string;
493
+
494
+ /**
495
+ * Maximum number of chunks to retrieve.
496
+ */
483
497
  max_chunks: number;
484
498
 
499
+ /**
500
+ * Maximum number of tokens in the context.
501
+ */
485
502
  max_tokens_in_context: number;
486
503
 
504
+ /**
505
+ * Configuration for the query generator.
506
+ */
487
507
  query_generator_config: QueryGeneratorConfig;
508
+
509
+ /**
510
+ * Search mode for retrieval—either "vector" or "keyword". Default "vector".
511
+ */
512
+ mode?: string;
488
513
  }
489
514
 
490
515
  export type QueryGeneratorConfig =
@@ -4,16 +4,25 @@ import { APIResource } from '../resource';
4
4
  import * as Core from '../core';
5
5
 
6
6
  export class Shields extends APIResource {
7
+ /**
8
+ * Get a shield by its identifier.
9
+ */
7
10
  retrieve(identifier: string, options?: Core.RequestOptions): Core.APIPromise<Shield> {
8
11
  return this._client.get(`/v1/shields/${identifier}`, options);
9
12
  }
10
13
 
14
+ /**
15
+ * List all shields.
16
+ */
11
17
  list(options?: Core.RequestOptions): Core.APIPromise<ShieldListResponse> {
12
18
  return (
13
19
  this._client.get('/v1/shields', options) as Core.APIPromise<{ data: ShieldListResponse }>
14
20
  )._thenUnwrap((obj) => obj.data);
15
21
  }
16
22
 
23
+ /**
24
+ * Register a shield.
25
+ */
17
26
  register(body: ShieldRegisterParams, options?: Core.RequestOptions): Core.APIPromise<Shield> {
18
27
  return this._client.post('/v1/shields', { body, ...options });
19
28
  }
@@ -31,22 +40,34 @@ export interface Shield {
31
40
 
32
41
  provider_id: string;
33
42
 
34
- provider_resource_id: string;
35
-
36
43
  type: 'shield';
37
44
 
38
45
  params?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
46
+
47
+ provider_resource_id?: string;
39
48
  }
40
49
 
41
50
  export type ShieldListResponse = Array<Shield>;
42
51
 
43
52
  export interface ShieldRegisterParams {
53
+ /**
54
+ * The identifier of the shield to register.
55
+ */
44
56
  shield_id: string;
45
57
 
58
+ /**
59
+ * The parameters of the shield.
60
+ */
46
61
  params?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
47
62
 
63
+ /**
64
+ * The identifier of the provider.
65
+ */
48
66
  provider_id?: string;
49
67
 
68
+ /**
69
+ * The identifier of the shield in the provider.
70
+ */
50
71
  provider_shield_id?: string;
51
72
  }
52
73
 
@@ -4,6 +4,9 @@ import { APIResource } from '../resource';
4
4
  import * as Core from '../core';
5
5
 
6
6
  export class Telemetry extends APIResource {
7
+ /**
8
+ * Get a span by its ID.
9
+ */
7
10
  getSpan(
8
11
  traceId: string,
9
12
  spanId: string,
@@ -12,6 +15,9 @@ export class Telemetry extends APIResource {
12
15
  return this._client.get(`/v1/telemetry/traces/${traceId}/spans/${spanId}`, options);
13
16
  }
14
17
 
18
+ /**
19
+ * Get a span tree by its ID.
20
+ */
15
21
  getSpanTree(
16
22
  spanId: string,
17
23
  body: TelemetryGetSpanTreeParams,
@@ -24,10 +30,16 @@ export class Telemetry extends APIResource {
24
30
  )._thenUnwrap((obj) => obj.data);
25
31
  }
26
32
 
33
+ /**
34
+ * Get a trace by its ID.
35
+ */
27
36
  getTrace(traceId: string, options?: Core.RequestOptions): Core.APIPromise<Trace> {
28
37
  return this._client.get(`/v1/telemetry/traces/${traceId}`, options);
29
38
  }
30
39
 
40
+ /**
41
+ * Log an event.
42
+ */
31
43
  logEvent(body: TelemetryLogEventParams, options?: Core.RequestOptions): Core.APIPromise<void> {
32
44
  return this._client.post('/v1/telemetry/events', {
33
45
  body,
@@ -36,6 +48,9 @@ export class Telemetry extends APIResource {
36
48
  });
37
49
  }
38
50
 
51
+ /**
52
+ * Query spans.
53
+ */
39
54
  querySpans(
40
55
  body: TelemetryQuerySpansParams,
41
56
  options?: Core.RequestOptions,
@@ -47,6 +62,9 @@ export class Telemetry extends APIResource {
47
62
  )._thenUnwrap((obj) => obj.data);
48
63
  }
49
64
 
65
+ /**
66
+ * Query traces.
67
+ */
50
68
  queryTraces(
51
69
  body: TelemetryQueryTracesParams,
52
70
  options?: Core.RequestOptions,
@@ -58,6 +76,9 @@ export class Telemetry extends APIResource {
58
76
  )._thenUnwrap((obj) => obj.data);
59
77
  }
60
78
 
79
+ /**
80
+ * Save spans to a dataset.
81
+ */
61
82
  saveSpansToDataset(
62
83
  body: TelemetrySaveSpansToDatasetParams,
63
84
  options?: Core.RequestOptions,
@@ -219,42 +240,87 @@ export namespace TelemetryQuerySpansResponse {
219
240
  export type TelemetryQueryTracesResponse = Array<Trace>;
220
241
 
221
242
  export interface TelemetryGetSpanTreeParams {
243
+ /**
244
+ * The attributes to return in the tree.
245
+ */
222
246
  attributes_to_return?: Array<string>;
223
247
 
248
+ /**
249
+ * The maximum depth of the tree.
250
+ */
224
251
  max_depth?: number;
225
252
  }
226
253
 
227
254
  export interface TelemetryLogEventParams {
255
+ /**
256
+ * The event to log.
257
+ */
228
258
  event: Event;
229
259
 
260
+ /**
261
+ * The time to live of the event.
262
+ */
230
263
  ttl_seconds: number;
231
264
  }
232
265
 
233
266
  export interface TelemetryQuerySpansParams {
267
+ /**
268
+ * The attribute filters to apply to the spans.
269
+ */
234
270
  attribute_filters: Array<QueryCondition>;
235
271
 
272
+ /**
273
+ * The attributes to return in the spans.
274
+ */
236
275
  attributes_to_return: Array<string>;
237
276
 
277
+ /**
278
+ * The maximum depth of the tree.
279
+ */
238
280
  max_depth?: number;
239
281
  }
240
282
 
241
283
  export interface TelemetryQueryTracesParams {
284
+ /**
285
+ * The attribute filters to apply to the traces.
286
+ */
242
287
  attribute_filters?: Array<QueryCondition>;
243
288
 
289
+ /**
290
+ * The limit of traces to return.
291
+ */
244
292
  limit?: number;
245
293
 
294
+ /**
295
+ * The offset of the traces to return.
296
+ */
246
297
  offset?: number;
247
298
 
299
+ /**
300
+ * The order by of the traces to return.
301
+ */
248
302
  order_by?: Array<string>;
249
303
  }
250
304
 
251
305
  export interface TelemetrySaveSpansToDatasetParams {
306
+ /**
307
+ * The attribute filters to apply to the spans.
308
+ */
252
309
  attribute_filters: Array<QueryCondition>;
253
310
 
311
+ /**
312
+ * The attributes to save to the dataset.
313
+ */
254
314
  attributes_to_save: Array<string>;
255
315
 
316
+ /**
317
+ * The ID of the dataset to save the spans to.
318
+ */
256
319
  dataset_id: string;
257
320
 
321
+ /**
322
+ * The maximum depth of the tree.
323
+ */
258
324
  max_depth?: number;
259
325
  }
260
326
 
@@ -40,6 +40,9 @@ export interface RagToolQueryParams {
40
40
 
41
41
  vector_db_ids: Array<string>;
42
42
 
43
+ /**
44
+ * Configuration for the RAG query generation.
45
+ */
43
46
  query_config?: Shared.QueryConfig;
44
47
  }
45
48
 
@@ -11,7 +11,7 @@ export class ToolRuntime extends APIResource {
11
11
  ragTool: RagToolAPI.RagTool = new RagToolAPI.RagTool(this._client);
12
12
 
13
13
  /**
14
- * Run a tool with the given arguments
14
+ * Run a tool with the given arguments.
15
15
  */
16
16
  invokeTool(
17
17
  body: ToolRuntimeInvokeToolParams,
@@ -20,6 +20,9 @@ export class ToolRuntime extends APIResource {
20
20
  return this._client.post('/v1/tool-runtime/invoke', { body, ...options });
21
21
  }
22
22
 
23
+ /**
24
+ * List all tools in the runtime.
25
+ */
23
26
  listTools(
24
27
  query?: ToolRuntimeListToolsParams,
25
28
  options?: Core.RequestOptions,
@@ -80,18 +83,33 @@ export interface ToolInvocationResult {
80
83
  export type ToolRuntimeListToolsResponse = Array<ToolDef>;
81
84
 
82
85
  export interface ToolRuntimeInvokeToolParams {
86
+ /**
87
+ * A dictionary of arguments to pass to the tool.
88
+ */
83
89
  kwargs: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
84
90
 
91
+ /**
92
+ * The name of the tool to invoke.
93
+ */
85
94
  tool_name: string;
86
95
  }
87
96
 
88
97
  export interface ToolRuntimeListToolsParams {
98
+ /**
99
+ * The MCP endpoint to use for the tool group.
100
+ */
89
101
  mcp_endpoint?: ToolRuntimeListToolsParams.McpEndpoint;
90
102
 
103
+ /**
104
+ * The ID of the tool group to list tools for.
105
+ */
91
106
  tool_group_id?: string;
92
107
  }
93
108
 
94
109
  export namespace ToolRuntimeListToolsParams {
110
+ /**
111
+ * The MCP endpoint to use for the tool group.
112
+ */
95
113
  export interface McpEndpoint {
96
114
  uri: string;
97
115
  }
@@ -5,7 +5,7 @@ import * as Core from '../core';
5
5
 
6
6
  export class Toolgroups extends APIResource {
7
7
  /**
8
- * List tool groups with optional provider
8
+ * List tool groups with optional provider.
9
9
  */
10
10
  list(options?: Core.RequestOptions): Core.APIPromise<ToolgroupListResponse> {
11
11
  return (
@@ -13,12 +13,15 @@ export class Toolgroups extends APIResource {
13
13
  )._thenUnwrap((obj) => obj.data);
14
14
  }
15
15
 
16
+ /**
17
+ * Get a tool group by its ID.
18
+ */
16
19
  get(toolgroupId: string, options?: Core.RequestOptions): Core.APIPromise<ToolGroup> {
17
20
  return this._client.get(`/v1/toolgroups/${toolgroupId}`, options);
18
21
  }
19
22
 
20
23
  /**
21
- * Register a tool group
24
+ * Register a tool group.
22
25
  */
23
26
  register(body: ToolgroupRegisterParams, options?: Core.RequestOptions): Core.APIPromise<void> {
24
27
  return this._client.post('/v1/toolgroups', {
@@ -29,7 +32,7 @@ export class Toolgroups extends APIResource {
29
32
  }
30
33
 
31
34
  /**
32
- * Unregister a tool group
35
+ * Unregister a tool group.
33
36
  */
34
37
  unregister(toolgroupId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
35
38
  return this._client.delete(`/v1/toolgroups/${toolgroupId}`, {
@@ -48,13 +51,13 @@ export interface ToolGroup {
48
51
 
49
52
  provider_id: string;
50
53
 
51
- provider_resource_id: string;
52
-
53
54
  type: 'tool_group';
54
55
 
55
56
  args?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
56
57
 
57
58
  mcp_endpoint?: ToolGroup.McpEndpoint;
59
+
60
+ provider_resource_id?: string;
58
61
  }
59
62
 
60
63
  export namespace ToolGroup {
@@ -66,16 +69,31 @@ export namespace ToolGroup {
66
69
  export type ToolgroupListResponse = Array<ToolGroup>;
67
70
 
68
71
  export interface ToolgroupRegisterParams {
72
+ /**
73
+ * The ID of the provider to use for the tool group.
74
+ */
69
75
  provider_id: string;
70
76
 
77
+ /**
78
+ * The ID of the tool group to register.
79
+ */
71
80
  toolgroup_id: string;
72
81
 
82
+ /**
83
+ * A dictionary of arguments to pass to the tool group.
84
+ */
73
85
  args?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
74
86
 
87
+ /**
88
+ * The MCP endpoint to use for the tool group.
89
+ */
75
90
  mcp_endpoint?: ToolgroupRegisterParams.McpEndpoint;
76
91
  }
77
92
 
78
93
  export namespace ToolgroupRegisterParams {
94
+ /**
95
+ * The MCP endpoint to use for the tool group.
96
+ */
79
97
  export interface McpEndpoint {
80
98
  uri: string;
81
99
  }
@@ -6,7 +6,7 @@ import * as Core from '../core';
6
6
 
7
7
  export class Tools extends APIResource {
8
8
  /**
9
- * List tools with optional tool group
9
+ * List tools with optional tool group.
10
10
  */
11
11
  list(query?: ToolListParams, options?: Core.RequestOptions): Core.APIPromise<ToolListResponse>;
12
12
  list(options?: Core.RequestOptions): Core.APIPromise<ToolListResponse>;
@@ -22,6 +22,9 @@ export class Tools extends APIResource {
22
22
  )._thenUnwrap((obj) => obj.data);
23
23
  }
24
24
 
25
+ /**
26
+ * Get a tool by its name.
27
+ */
25
28
  get(toolName: string, options?: Core.RequestOptions): Core.APIPromise<Tool> {
26
29
  return this._client.get(`/v1/tools/${toolName}`, options);
27
30
  }
@@ -40,8 +43,6 @@ export interface Tool {
40
43
 
41
44
  provider_id: string;
42
45
 
43
- provider_resource_id: string;
44
-
45
46
  tool_host: 'distribution' | 'client' | 'model_context_protocol';
46
47
 
47
48
  toolgroup_id: string;
@@ -49,6 +50,8 @@ export interface Tool {
49
50
  type: 'tool';
50
51
 
51
52
  metadata?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
53
+
54
+ provider_resource_id?: string;
52
55
  }
53
56
 
54
57
  export namespace Tool {
@@ -68,6 +71,9 @@ export namespace Tool {
68
71
  export type ToolListResponse = Array<Tool>;
69
72
 
70
73
  export interface ToolListParams {
74
+ /**
75
+ * The ID of the tool group to list tools for.
76
+ */
71
77
  toolgroup_id?: string;
72
78
  }
73
79
 
@@ -4,16 +4,25 @@ import { APIResource } from '../resource';
4
4
  import * as Core from '../core';
5
5
 
6
6
  export class VectorDBs extends APIResource {
7
+ /**
8
+ * Get a vector database by its identifier.
9
+ */
7
10
  retrieve(vectorDBId: string, options?: Core.RequestOptions): Core.APIPromise<VectorDBRetrieveResponse> {
8
11
  return this._client.get(`/v1/vector-dbs/${vectorDBId}`, options);
9
12
  }
10
13
 
14
+ /**
15
+ * List all vector databases.
16
+ */
11
17
  list(options?: Core.RequestOptions): Core.APIPromise<VectorDBListResponse> {
12
18
  return (
13
19
  this._client.get('/v1/vector-dbs', options) as Core.APIPromise<{ data: VectorDBListResponse }>
14
20
  )._thenUnwrap((obj) => obj.data);
15
21
  }
16
22
 
23
+ /**
24
+ * Register a vector database.
25
+ */
17
26
  register(
18
27
  body: VectorDBRegisterParams,
19
28
  options?: Core.RequestOptions,
@@ -21,6 +30,9 @@ export class VectorDBs extends APIResource {
21
30
  return this._client.post('/v1/vector-dbs', { body, ...options });
22
31
  }
23
32
 
33
+ /**
34
+ * Unregister a vector database.
35
+ */
24
36
  unregister(vectorDBId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
25
37
  return this._client.delete(`/v1/vector-dbs/${vectorDBId}`, {
26
38
  ...options,
@@ -42,9 +54,9 @@ export interface VectorDBRetrieveResponse {
42
54
 
43
55
  provider_id: string;
44
56
 
45
- provider_resource_id: string;
46
-
47
57
  type: 'vector_db';
58
+
59
+ provider_resource_id?: string;
48
60
  }
49
61
 
50
62
  export type VectorDBListResponse = Array<VectorDBListResponse.VectorDBListResponseItem>;
@@ -59,9 +71,9 @@ export namespace VectorDBListResponse {
59
71
 
60
72
  provider_id: string;
61
73
 
62
- provider_resource_id: string;
63
-
64
74
  type: 'vector_db';
75
+
76
+ provider_resource_id?: string;
65
77
  }
66
78
  }
67
79
 
@@ -74,20 +86,35 @@ export interface VectorDBRegisterResponse {
74
86
 
75
87
  provider_id: string;
76
88
 
77
- provider_resource_id: string;
78
-
79
89
  type: 'vector_db';
90
+
91
+ provider_resource_id?: string;
80
92
  }
81
93
 
82
94
  export interface VectorDBRegisterParams {
95
+ /**
96
+ * The embedding model to use.
97
+ */
83
98
  embedding_model: string;
84
99
 
100
+ /**
101
+ * The identifier of the vector database to register.
102
+ */
85
103
  vector_db_id: string;
86
104
 
105
+ /**
106
+ * The dimension of the embedding model.
107
+ */
87
108
  embedding_dimension?: number;
88
109
 
110
+ /**
111
+ * The identifier of the provider.
112
+ */
89
113
  provider_id?: string;
90
114
 
115
+ /**
116
+ * The identifier of the vector database in the provider.
117
+ */
91
118
  provider_vector_db_id?: string;
92
119
  }
93
120