llama-stack-client 0.2.16 → 0.2.17-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +4 -198
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/package.json +2 -6
- package/resources/agents/agents.d.ts +29 -2
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/session.d.ts +18 -0
- package/resources/agents/session.d.ts.map +1 -1
- package/resources/agents/steps.d.ts +4 -1
- package/resources/agents/steps.d.ts.map +1 -1
- package/resources/agents/turn.d.ts +113 -8
- package/resources/agents/turn.d.ts.map +1 -1
- package/resources/benchmarks.d.ts +15 -0
- package/resources/benchmarks.d.ts.map +1 -1
- package/resources/chat/chat.d.ts +24 -0
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +648 -6
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/datasets.d.ts +42 -6
- package/resources/datasets.d.ts.map +1 -1
- package/resources/eval/eval.d.ts +9 -0
- package/resources/eval/eval.d.ts.map +1 -1
- package/resources/eval/eval.js.map +1 -1
- package/resources/eval/eval.mjs.map +1 -1
- package/resources/files.d.ts +9 -0
- package/resources/files.d.ts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/inference.d.ts +36 -0
- package/resources/inference.d.ts.map +1 -1
- package/resources/inspect.d.ts +45 -1
- package/resources/inspect.d.ts.map +1 -1
- package/resources/inspect.js +1 -1
- package/resources/inspect.mjs +1 -1
- package/resources/models.d.ts +21 -0
- package/resources/models.d.ts.map +1 -1
- package/resources/post-training/job.d.ts +95 -2
- package/resources/post-training/job.d.ts.map +1 -1
- package/resources/post-training/post-training.d.ts +206 -0
- package/resources/post-training/post-training.d.ts.map +1 -1
- package/resources/post-training/post-training.js.map +1 -1
- package/resources/post-training/post-training.mjs.map +1 -1
- package/resources/providers.d.ts +9 -0
- package/resources/providers.d.ts.map +1 -1
- package/resources/responses/input-items.d.ts +114 -0
- package/resources/responses/input-items.d.ts.map +1 -1
- package/resources/responses/responses.d.ts +1265 -12
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/routes.d.ts +10 -1
- package/resources/routes.d.ts.map +1 -1
- package/resources/routes.js +1 -1
- package/resources/routes.mjs +1 -1
- package/resources/safety.d.ts +72 -1
- package/resources/safety.d.ts.map +1 -1
- package/resources/safety.js +6 -0
- package/resources/safety.js.map +1 -1
- package/resources/safety.mjs +6 -0
- package/resources/safety.mjs.map +1 -1
- package/resources/scoring-functions.d.ts +51 -0
- package/resources/scoring-functions.d.ts.map +1 -1
- package/resources/scoring.d.ts +9 -0
- package/resources/scoring.d.ts.map +1 -1
- package/resources/shared.d.ts +209 -3
- package/resources/shared.d.ts.map +1 -1
- package/resources/shields.d.ts +7 -1
- package/resources/shields.d.ts.map +1 -1
- package/resources/synthetic-data-generation.d.ts +18 -1
- package/resources/synthetic-data-generation.d.ts.map +1 -1
- package/resources/synthetic-data-generation.js +3 -0
- package/resources/synthetic-data-generation.js.map +1 -1
- package/resources/synthetic-data-generation.mjs +3 -0
- package/resources/synthetic-data-generation.mjs.map +1 -1
- package/resources/telemetry.d.ts +214 -0
- package/resources/telemetry.d.ts.map +1 -1
- package/resources/tool-runtime/rag-tool.d.ts +16 -4
- package/resources/tool-runtime/rag-tool.d.ts.map +1 -1
- package/resources/tool-runtime/rag-tool.js +2 -2
- package/resources/tool-runtime/rag-tool.mjs +2 -2
- package/resources/tool-runtime/tool-runtime.d.ts +52 -1
- package/resources/tool-runtime/tool-runtime.d.ts.map +1 -1
- package/resources/tool-runtime/tool-runtime.js.map +1 -1
- package/resources/tool-runtime/tool-runtime.mjs.map +1 -1
- package/resources/toolgroups.d.ts +30 -0
- package/resources/toolgroups.d.ts.map +1 -1
- package/resources/tools.d.ts +45 -0
- package/resources/tools.d.ts.map +1 -1
- package/resources/vector-dbs.d.ts +45 -0
- package/resources/vector-dbs.d.ts.map +1 -1
- package/resources/vector-io.d.ts +9 -0
- package/resources/vector-io.d.ts.map +1 -1
- package/resources/vector-stores/files.d.ts +149 -1
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +121 -1
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/src/index.ts +9 -1
- package/src/resources/agents/agents.ts +29 -2
- package/src/resources/agents/session.ts +18 -0
- package/src/resources/agents/steps.ts +4 -1
- package/src/resources/agents/turn.ts +113 -8
- package/src/resources/benchmarks.ts +15 -0
- package/src/resources/chat/chat.ts +24 -0
- package/src/resources/chat/completions.ts +678 -0
- package/src/resources/datasets.ts +42 -6
- package/src/resources/eval/eval.ts +9 -0
- package/src/resources/files.ts +9 -0
- package/src/resources/index.ts +7 -1
- package/src/resources/inference.ts +36 -0
- package/src/resources/inspect.ts +45 -1
- package/src/resources/models.ts +21 -0
- package/src/resources/post-training/job.ts +95 -2
- package/src/resources/post-training/post-training.ts +206 -0
- package/src/resources/providers.ts +9 -0
- package/src/resources/responses/input-items.ts +114 -0
- package/src/resources/responses/responses.ts +1265 -12
- package/src/resources/routes.ts +10 -1
- package/src/resources/safety.ts +83 -1
- package/src/resources/scoring-functions.ts +51 -0
- package/src/resources/scoring.ts +9 -0
- package/src/resources/shared.ts +209 -3
- package/src/resources/shields.ts +7 -1
- package/src/resources/synthetic-data-generation.ts +18 -1
- package/src/resources/telemetry.ts +214 -0
- package/src/resources/tool-runtime/rag-tool.ts +16 -4
- package/src/resources/tool-runtime/tool-runtime.ts +52 -1
- package/src/resources/toolgroups.ts +30 -0
- package/src/resources/tools.ts +45 -0
- package/src/resources/vector-dbs.ts +45 -0
- package/src/resources/vector-io.ts +9 -0
- package/src/resources/vector-stores/files.ts +149 -1
- package/src/resources/vector-stores/vector-stores.ts +121 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -5,6 +5,9 @@ import * as Core from '../core';
|
|
|
5
5
|
import * as Shared from './shared';
|
|
6
6
|
|
|
7
7
|
export class SyntheticDataGeneration extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Generate synthetic data based on input dialogs and apply filtering.
|
|
10
|
+
*/
|
|
8
11
|
generate(
|
|
9
12
|
body: SyntheticDataGenerationGenerateParams,
|
|
10
13
|
options?: Core.RequestOptions,
|
|
@@ -18,19 +21,33 @@ export class SyntheticDataGeneration extends APIResource {
|
|
|
18
21
|
* tuples that pass the threshold.
|
|
19
22
|
*/
|
|
20
23
|
export interface SyntheticDataGenerationResponse {
|
|
24
|
+
/**
|
|
25
|
+
* List of generated synthetic data samples that passed the filtering criteria
|
|
26
|
+
*/
|
|
21
27
|
synthetic_data: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
22
28
|
|
|
29
|
+
/**
|
|
30
|
+
* (Optional) Statistical information about the generation process and filtering
|
|
31
|
+
* results
|
|
32
|
+
*/
|
|
23
33
|
statistics?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
24
34
|
}
|
|
25
35
|
|
|
26
36
|
export interface SyntheticDataGenerationGenerateParams {
|
|
37
|
+
/**
|
|
38
|
+
* List of conversation messages to use as input for synthetic data generation
|
|
39
|
+
*/
|
|
27
40
|
dialogs: Array<Shared.Message>;
|
|
28
41
|
|
|
29
42
|
/**
|
|
30
|
-
*
|
|
43
|
+
* Type of filtering to apply to generated synthetic data samples
|
|
31
44
|
*/
|
|
32
45
|
filtering_function: 'none' | 'random' | 'top_k' | 'top_p' | 'top_k_top_p' | 'sigmoid';
|
|
33
46
|
|
|
47
|
+
/**
|
|
48
|
+
* (Optional) The identifier of the model to use. The model must be registered with
|
|
49
|
+
* Llama Stack and available via the /models endpoint
|
|
50
|
+
*/
|
|
34
51
|
model?: string;
|
|
35
52
|
}
|
|
36
53
|
|
|
@@ -91,152 +91,366 @@ export class Telemetry extends APIResource {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* An unstructured log event containing a simple text message.
|
|
96
|
+
*/
|
|
94
97
|
export type Event = Event.UnstructuredLogEvent | Event.MetricEvent | Event.StructuredLogEvent;
|
|
95
98
|
|
|
96
99
|
export namespace Event {
|
|
100
|
+
/**
|
|
101
|
+
* An unstructured log event containing a simple text message.
|
|
102
|
+
*/
|
|
97
103
|
export interface UnstructuredLogEvent {
|
|
104
|
+
/**
|
|
105
|
+
* The log message text
|
|
106
|
+
*/
|
|
98
107
|
message: string;
|
|
99
108
|
|
|
109
|
+
/**
|
|
110
|
+
* The severity level of the log message
|
|
111
|
+
*/
|
|
100
112
|
severity: 'verbose' | 'debug' | 'info' | 'warn' | 'error' | 'critical';
|
|
101
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Unique identifier for the span this event belongs to
|
|
116
|
+
*/
|
|
102
117
|
span_id: string;
|
|
103
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Timestamp when the event occurred
|
|
121
|
+
*/
|
|
104
122
|
timestamp: string;
|
|
105
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Unique identifier for the trace this event belongs to
|
|
126
|
+
*/
|
|
106
127
|
trace_id: string;
|
|
107
128
|
|
|
129
|
+
/**
|
|
130
|
+
* Event type identifier set to UNSTRUCTURED_LOG
|
|
131
|
+
*/
|
|
108
132
|
type: 'unstructured_log';
|
|
109
133
|
|
|
134
|
+
/**
|
|
135
|
+
* (Optional) Key-value pairs containing additional metadata about the event
|
|
136
|
+
*/
|
|
110
137
|
attributes?: { [key: string]: string | number | boolean | null };
|
|
111
138
|
}
|
|
112
139
|
|
|
140
|
+
/**
|
|
141
|
+
* A metric event containing a measured value.
|
|
142
|
+
*/
|
|
113
143
|
export interface MetricEvent {
|
|
144
|
+
/**
|
|
145
|
+
* The name of the metric being measured
|
|
146
|
+
*/
|
|
114
147
|
metric: string;
|
|
115
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Unique identifier for the span this event belongs to
|
|
151
|
+
*/
|
|
116
152
|
span_id: string;
|
|
117
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Timestamp when the event occurred
|
|
156
|
+
*/
|
|
118
157
|
timestamp: string;
|
|
119
158
|
|
|
159
|
+
/**
|
|
160
|
+
* Unique identifier for the trace this event belongs to
|
|
161
|
+
*/
|
|
120
162
|
trace_id: string;
|
|
121
163
|
|
|
164
|
+
/**
|
|
165
|
+
* Event type identifier set to METRIC
|
|
166
|
+
*/
|
|
122
167
|
type: 'metric';
|
|
123
168
|
|
|
169
|
+
/**
|
|
170
|
+
* The unit of measurement for the metric value
|
|
171
|
+
*/
|
|
124
172
|
unit: string;
|
|
125
173
|
|
|
174
|
+
/**
|
|
175
|
+
* The numeric value of the metric measurement
|
|
176
|
+
*/
|
|
126
177
|
value: number;
|
|
127
178
|
|
|
179
|
+
/**
|
|
180
|
+
* (Optional) Key-value pairs containing additional metadata about the event
|
|
181
|
+
*/
|
|
128
182
|
attributes?: { [key: string]: string | number | boolean | null };
|
|
129
183
|
}
|
|
130
184
|
|
|
185
|
+
/**
|
|
186
|
+
* A structured log event containing typed payload data.
|
|
187
|
+
*/
|
|
131
188
|
export interface StructuredLogEvent {
|
|
189
|
+
/**
|
|
190
|
+
* The structured payload data for the log event
|
|
191
|
+
*/
|
|
132
192
|
payload: StructuredLogEvent.SpanStartPayload | StructuredLogEvent.SpanEndPayload;
|
|
133
193
|
|
|
194
|
+
/**
|
|
195
|
+
* Unique identifier for the span this event belongs to
|
|
196
|
+
*/
|
|
134
197
|
span_id: string;
|
|
135
198
|
|
|
199
|
+
/**
|
|
200
|
+
* Timestamp when the event occurred
|
|
201
|
+
*/
|
|
136
202
|
timestamp: string;
|
|
137
203
|
|
|
204
|
+
/**
|
|
205
|
+
* Unique identifier for the trace this event belongs to
|
|
206
|
+
*/
|
|
138
207
|
trace_id: string;
|
|
139
208
|
|
|
209
|
+
/**
|
|
210
|
+
* Event type identifier set to STRUCTURED_LOG
|
|
211
|
+
*/
|
|
140
212
|
type: 'structured_log';
|
|
141
213
|
|
|
214
|
+
/**
|
|
215
|
+
* (Optional) Key-value pairs containing additional metadata about the event
|
|
216
|
+
*/
|
|
142
217
|
attributes?: { [key: string]: string | number | boolean | null };
|
|
143
218
|
}
|
|
144
219
|
|
|
145
220
|
export namespace StructuredLogEvent {
|
|
221
|
+
/**
|
|
222
|
+
* Payload for a span start event.
|
|
223
|
+
*/
|
|
146
224
|
export interface SpanStartPayload {
|
|
225
|
+
/**
|
|
226
|
+
* Human-readable name describing the operation this span represents
|
|
227
|
+
*/
|
|
147
228
|
name: string;
|
|
148
229
|
|
|
230
|
+
/**
|
|
231
|
+
* Payload type identifier set to SPAN_START
|
|
232
|
+
*/
|
|
149
233
|
type: 'span_start';
|
|
150
234
|
|
|
235
|
+
/**
|
|
236
|
+
* (Optional) Unique identifier for the parent span, if this is a child span
|
|
237
|
+
*/
|
|
151
238
|
parent_span_id?: string;
|
|
152
239
|
}
|
|
153
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Payload for a span end event.
|
|
243
|
+
*/
|
|
154
244
|
export interface SpanEndPayload {
|
|
245
|
+
/**
|
|
246
|
+
* The final status of the span indicating success or failure
|
|
247
|
+
*/
|
|
155
248
|
status: 'ok' | 'error';
|
|
156
249
|
|
|
250
|
+
/**
|
|
251
|
+
* Payload type identifier set to SPAN_END
|
|
252
|
+
*/
|
|
157
253
|
type: 'span_end';
|
|
158
254
|
}
|
|
159
255
|
}
|
|
160
256
|
}
|
|
161
257
|
|
|
258
|
+
/**
|
|
259
|
+
* A condition for filtering query results.
|
|
260
|
+
*/
|
|
162
261
|
export interface QueryCondition {
|
|
262
|
+
/**
|
|
263
|
+
* The attribute key to filter on
|
|
264
|
+
*/
|
|
163
265
|
key: string;
|
|
164
266
|
|
|
267
|
+
/**
|
|
268
|
+
* The comparison operator to apply
|
|
269
|
+
*/
|
|
165
270
|
op: 'eq' | 'ne' | 'gt' | 'lt';
|
|
166
271
|
|
|
272
|
+
/**
|
|
273
|
+
* The value to compare against
|
|
274
|
+
*/
|
|
167
275
|
value: boolean | number | string | Array<unknown> | unknown | null;
|
|
168
276
|
}
|
|
169
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Response containing a list of spans.
|
|
280
|
+
*/
|
|
170
281
|
export interface QuerySpansResponse {
|
|
282
|
+
/**
|
|
283
|
+
* List of spans matching the query criteria
|
|
284
|
+
*/
|
|
171
285
|
data: TelemetryQuerySpansResponse;
|
|
172
286
|
}
|
|
173
287
|
|
|
288
|
+
/**
|
|
289
|
+
* A span that includes status information.
|
|
290
|
+
*/
|
|
174
291
|
export interface SpanWithStatus {
|
|
292
|
+
/**
|
|
293
|
+
* Human-readable name describing the operation this span represents
|
|
294
|
+
*/
|
|
175
295
|
name: string;
|
|
176
296
|
|
|
297
|
+
/**
|
|
298
|
+
* Unique identifier for the span
|
|
299
|
+
*/
|
|
177
300
|
span_id: string;
|
|
178
301
|
|
|
302
|
+
/**
|
|
303
|
+
* Timestamp when the operation began
|
|
304
|
+
*/
|
|
179
305
|
start_time: string;
|
|
180
306
|
|
|
307
|
+
/**
|
|
308
|
+
* Unique identifier for the trace this span belongs to
|
|
309
|
+
*/
|
|
181
310
|
trace_id: string;
|
|
182
311
|
|
|
312
|
+
/**
|
|
313
|
+
* (Optional) Key-value pairs containing additional metadata about the span
|
|
314
|
+
*/
|
|
183
315
|
attributes?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
184
316
|
|
|
317
|
+
/**
|
|
318
|
+
* (Optional) Timestamp when the operation finished, if completed
|
|
319
|
+
*/
|
|
185
320
|
end_time?: string;
|
|
186
321
|
|
|
322
|
+
/**
|
|
323
|
+
* (Optional) Unique identifier for the parent span, if this is a child span
|
|
324
|
+
*/
|
|
187
325
|
parent_span_id?: string;
|
|
188
326
|
|
|
327
|
+
/**
|
|
328
|
+
* (Optional) The current status of the span
|
|
329
|
+
*/
|
|
189
330
|
status?: 'ok' | 'error';
|
|
190
331
|
}
|
|
191
332
|
|
|
333
|
+
/**
|
|
334
|
+
* A trace representing the complete execution path of a request across multiple
|
|
335
|
+
* operations.
|
|
336
|
+
*/
|
|
192
337
|
export interface Trace {
|
|
338
|
+
/**
|
|
339
|
+
* Unique identifier for the root span that started this trace
|
|
340
|
+
*/
|
|
193
341
|
root_span_id: string;
|
|
194
342
|
|
|
343
|
+
/**
|
|
344
|
+
* Timestamp when the trace began
|
|
345
|
+
*/
|
|
195
346
|
start_time: string;
|
|
196
347
|
|
|
348
|
+
/**
|
|
349
|
+
* Unique identifier for the trace
|
|
350
|
+
*/
|
|
197
351
|
trace_id: string;
|
|
198
352
|
|
|
353
|
+
/**
|
|
354
|
+
* (Optional) Timestamp when the trace finished, if completed
|
|
355
|
+
*/
|
|
199
356
|
end_time?: string;
|
|
200
357
|
}
|
|
201
358
|
|
|
359
|
+
/**
|
|
360
|
+
* A span representing a single operation within a trace.
|
|
361
|
+
*/
|
|
202
362
|
export interface TelemetryGetSpanResponse {
|
|
363
|
+
/**
|
|
364
|
+
* Human-readable name describing the operation this span represents
|
|
365
|
+
*/
|
|
203
366
|
name: string;
|
|
204
367
|
|
|
368
|
+
/**
|
|
369
|
+
* Unique identifier for the span
|
|
370
|
+
*/
|
|
205
371
|
span_id: string;
|
|
206
372
|
|
|
373
|
+
/**
|
|
374
|
+
* Timestamp when the operation began
|
|
375
|
+
*/
|
|
207
376
|
start_time: string;
|
|
208
377
|
|
|
378
|
+
/**
|
|
379
|
+
* Unique identifier for the trace this span belongs to
|
|
380
|
+
*/
|
|
209
381
|
trace_id: string;
|
|
210
382
|
|
|
383
|
+
/**
|
|
384
|
+
* (Optional) Key-value pairs containing additional metadata about the span
|
|
385
|
+
*/
|
|
211
386
|
attributes?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
212
387
|
|
|
388
|
+
/**
|
|
389
|
+
* (Optional) Timestamp when the operation finished, if completed
|
|
390
|
+
*/
|
|
213
391
|
end_time?: string;
|
|
214
392
|
|
|
393
|
+
/**
|
|
394
|
+
* (Optional) Unique identifier for the parent span, if this is a child span
|
|
395
|
+
*/
|
|
215
396
|
parent_span_id?: string;
|
|
216
397
|
}
|
|
217
398
|
|
|
399
|
+
/**
|
|
400
|
+
* Dictionary mapping span IDs to spans with status information
|
|
401
|
+
*/
|
|
218
402
|
export type TelemetryGetSpanTreeResponse = { [key: string]: SpanWithStatus };
|
|
219
403
|
|
|
404
|
+
/**
|
|
405
|
+
* List of spans matching the query criteria
|
|
406
|
+
*/
|
|
220
407
|
export type TelemetryQuerySpansResponse = Array<TelemetryQuerySpansResponse.TelemetryQuerySpansResponseItem>;
|
|
221
408
|
|
|
222
409
|
export namespace TelemetryQuerySpansResponse {
|
|
410
|
+
/**
|
|
411
|
+
* A span representing a single operation within a trace.
|
|
412
|
+
*/
|
|
223
413
|
export interface TelemetryQuerySpansResponseItem {
|
|
414
|
+
/**
|
|
415
|
+
* Human-readable name describing the operation this span represents
|
|
416
|
+
*/
|
|
224
417
|
name: string;
|
|
225
418
|
|
|
419
|
+
/**
|
|
420
|
+
* Unique identifier for the span
|
|
421
|
+
*/
|
|
226
422
|
span_id: string;
|
|
227
423
|
|
|
424
|
+
/**
|
|
425
|
+
* Timestamp when the operation began
|
|
426
|
+
*/
|
|
228
427
|
start_time: string;
|
|
229
428
|
|
|
429
|
+
/**
|
|
430
|
+
* Unique identifier for the trace this span belongs to
|
|
431
|
+
*/
|
|
230
432
|
trace_id: string;
|
|
231
433
|
|
|
434
|
+
/**
|
|
435
|
+
* (Optional) Key-value pairs containing additional metadata about the span
|
|
436
|
+
*/
|
|
232
437
|
attributes?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
233
438
|
|
|
439
|
+
/**
|
|
440
|
+
* (Optional) Timestamp when the operation finished, if completed
|
|
441
|
+
*/
|
|
234
442
|
end_time?: string;
|
|
235
443
|
|
|
444
|
+
/**
|
|
445
|
+
* (Optional) Unique identifier for the parent span, if this is a child span
|
|
446
|
+
*/
|
|
236
447
|
parent_span_id?: string;
|
|
237
448
|
}
|
|
238
449
|
}
|
|
239
450
|
|
|
451
|
+
/**
|
|
452
|
+
* List of traces matching the query criteria
|
|
453
|
+
*/
|
|
240
454
|
export type TelemetryQueryTracesResponse = Array<Trace>;
|
|
241
455
|
|
|
242
456
|
export interface TelemetryGetSpanTreeParams {
|
|
@@ -6,7 +6,7 @@ import * as Shared from '../shared';
|
|
|
6
6
|
|
|
7
7
|
export class RagTool extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Index documents so they can be used by the RAG system
|
|
9
|
+
* Index documents so they can be used by the RAG system.
|
|
10
10
|
*/
|
|
11
11
|
insert(body: RagToolInsertParams, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
12
12
|
return this._client.post('/v1/tool-runtime/rag-tool/insert', {
|
|
@@ -17,7 +17,7 @@ export class RagTool extends APIResource {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Query the RAG system for context; typically invoked by the agent
|
|
20
|
+
* Query the RAG system for context; typically invoked by the agent.
|
|
21
21
|
*/
|
|
22
22
|
query(body: RagToolQueryParams, options?: Core.RequestOptions): Core.APIPromise<Shared.QueryResult> {
|
|
23
23
|
return this._client.post('/v1/tool-runtime/rag-tool/query', { body, ...options });
|
|
@@ -25,23 +25,35 @@ export class RagTool extends APIResource {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export interface RagToolInsertParams {
|
|
28
|
+
/**
|
|
29
|
+
* (Optional) Size in tokens for document chunking during indexing
|
|
30
|
+
*/
|
|
28
31
|
chunk_size_in_tokens: number;
|
|
29
32
|
|
|
33
|
+
/**
|
|
34
|
+
* List of documents to index in the RAG system
|
|
35
|
+
*/
|
|
30
36
|
documents: Array<Shared.Document>;
|
|
31
37
|
|
|
38
|
+
/**
|
|
39
|
+
* ID of the vector database to store the document embeddings
|
|
40
|
+
*/
|
|
32
41
|
vector_db_id: string;
|
|
33
42
|
}
|
|
34
43
|
|
|
35
44
|
export interface RagToolQueryParams {
|
|
36
45
|
/**
|
|
37
|
-
*
|
|
46
|
+
* The query content to search for in the indexed documents
|
|
38
47
|
*/
|
|
39
48
|
content: Shared.InterleavedContent;
|
|
40
49
|
|
|
50
|
+
/**
|
|
51
|
+
* List of vector database IDs to search within
|
|
52
|
+
*/
|
|
41
53
|
vector_db_ids: Array<string>;
|
|
42
54
|
|
|
43
55
|
/**
|
|
44
|
-
* Configuration for the
|
|
56
|
+
* (Optional) Configuration parameters for the query operation
|
|
45
57
|
*/
|
|
46
58
|
query_config?: Shared.QueryConfig;
|
|
47
59
|
}
|
|
@@ -43,43 +43,91 @@ export class ToolRuntime extends APIResource {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Tool definition used in runtime contexts.
|
|
48
|
+
*/
|
|
46
49
|
export interface ToolDef {
|
|
50
|
+
/**
|
|
51
|
+
* Name of the tool
|
|
52
|
+
*/
|
|
47
53
|
name: string;
|
|
48
54
|
|
|
55
|
+
/**
|
|
56
|
+
* (Optional) Human-readable description of what the tool does
|
|
57
|
+
*/
|
|
49
58
|
description?: string;
|
|
50
59
|
|
|
60
|
+
/**
|
|
61
|
+
* (Optional) Additional metadata about the tool
|
|
62
|
+
*/
|
|
51
63
|
metadata?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
52
64
|
|
|
65
|
+
/**
|
|
66
|
+
* (Optional) List of parameters this tool accepts
|
|
67
|
+
*/
|
|
53
68
|
parameters?: Array<ToolDef.Parameter>;
|
|
54
69
|
}
|
|
55
70
|
|
|
56
71
|
export namespace ToolDef {
|
|
72
|
+
/**
|
|
73
|
+
* Parameter definition for a tool.
|
|
74
|
+
*/
|
|
57
75
|
export interface Parameter {
|
|
76
|
+
/**
|
|
77
|
+
* Human-readable description of what the parameter does
|
|
78
|
+
*/
|
|
58
79
|
description: string;
|
|
59
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Name of the parameter
|
|
83
|
+
*/
|
|
60
84
|
name: string;
|
|
61
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Type of the parameter (e.g., string, integer)
|
|
88
|
+
*/
|
|
62
89
|
parameter_type: string;
|
|
63
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Whether this parameter is required for tool invocation
|
|
93
|
+
*/
|
|
64
94
|
required: boolean;
|
|
65
95
|
|
|
96
|
+
/**
|
|
97
|
+
* (Optional) Default value for the parameter if not provided
|
|
98
|
+
*/
|
|
66
99
|
default?: boolean | number | string | Array<unknown> | unknown | null;
|
|
67
100
|
}
|
|
68
101
|
}
|
|
69
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Result of a tool invocation.
|
|
105
|
+
*/
|
|
70
106
|
export interface ToolInvocationResult {
|
|
71
107
|
/**
|
|
72
|
-
*
|
|
108
|
+
* (Optional) The output content from the tool execution
|
|
73
109
|
*/
|
|
74
110
|
content?: Shared.InterleavedContent;
|
|
75
111
|
|
|
112
|
+
/**
|
|
113
|
+
* (Optional) Numeric error code if the tool execution failed
|
|
114
|
+
*/
|
|
76
115
|
error_code?: number;
|
|
77
116
|
|
|
117
|
+
/**
|
|
118
|
+
* (Optional) Error message if the tool execution failed
|
|
119
|
+
*/
|
|
78
120
|
error_message?: string;
|
|
79
121
|
|
|
122
|
+
/**
|
|
123
|
+
* (Optional) Additional metadata about the tool execution
|
|
124
|
+
*/
|
|
80
125
|
metadata?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
81
126
|
}
|
|
82
127
|
|
|
128
|
+
/**
|
|
129
|
+
* List of tool definitions
|
|
130
|
+
*/
|
|
83
131
|
export type ToolRuntimeListToolsResponse = Array<ToolDef>;
|
|
84
132
|
|
|
85
133
|
export interface ToolRuntimeInvokeToolParams {
|
|
@@ -111,6 +159,9 @@ export namespace ToolRuntimeListToolsParams {
|
|
|
111
159
|
* The MCP endpoint to use for the tool group.
|
|
112
160
|
*/
|
|
113
161
|
export interface McpEndpoint {
|
|
162
|
+
/**
|
|
163
|
+
* The URL string pointing to the resource
|
|
164
|
+
*/
|
|
114
165
|
uri: string;
|
|
115
166
|
}
|
|
116
167
|
}
|
|
@@ -42,30 +42,57 @@ export class Toolgroups extends APIResource {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Response containing a list of tool groups.
|
|
47
|
+
*/
|
|
45
48
|
export interface ListToolGroupsResponse {
|
|
49
|
+
/**
|
|
50
|
+
* List of tool groups
|
|
51
|
+
*/
|
|
46
52
|
data: ToolgroupListResponse;
|
|
47
53
|
}
|
|
48
54
|
|
|
55
|
+
/**
|
|
56
|
+
* A group of related tools managed together.
|
|
57
|
+
*/
|
|
49
58
|
export interface ToolGroup {
|
|
50
59
|
identifier: string;
|
|
51
60
|
|
|
52
61
|
provider_id: string;
|
|
53
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Type of resource, always 'tool_group'
|
|
65
|
+
*/
|
|
54
66
|
type: 'tool_group';
|
|
55
67
|
|
|
68
|
+
/**
|
|
69
|
+
* (Optional) Additional arguments for the tool group
|
|
70
|
+
*/
|
|
56
71
|
args?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
57
72
|
|
|
73
|
+
/**
|
|
74
|
+
* (Optional) Model Context Protocol endpoint for remote tools
|
|
75
|
+
*/
|
|
58
76
|
mcp_endpoint?: ToolGroup.McpEndpoint;
|
|
59
77
|
|
|
60
78
|
provider_resource_id?: string;
|
|
61
79
|
}
|
|
62
80
|
|
|
63
81
|
export namespace ToolGroup {
|
|
82
|
+
/**
|
|
83
|
+
* (Optional) Model Context Protocol endpoint for remote tools
|
|
84
|
+
*/
|
|
64
85
|
export interface McpEndpoint {
|
|
86
|
+
/**
|
|
87
|
+
* The URL string pointing to the resource
|
|
88
|
+
*/
|
|
65
89
|
uri: string;
|
|
66
90
|
}
|
|
67
91
|
}
|
|
68
92
|
|
|
93
|
+
/**
|
|
94
|
+
* List of tool groups
|
|
95
|
+
*/
|
|
69
96
|
export type ToolgroupListResponse = Array<ToolGroup>;
|
|
70
97
|
|
|
71
98
|
export interface ToolgroupRegisterParams {
|
|
@@ -95,6 +122,9 @@ export namespace ToolgroupRegisterParams {
|
|
|
95
122
|
* The MCP endpoint to use for the tool group.
|
|
96
123
|
*/
|
|
97
124
|
export interface McpEndpoint {
|
|
125
|
+
/**
|
|
126
|
+
* The URL string pointing to the resource
|
|
127
|
+
*/
|
|
98
128
|
uri: string;
|
|
99
129
|
}
|
|
100
130
|
}
|