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
|
@@ -37,32 +37,74 @@ export class PostTraining extends APIResource {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Configuration for Low-Rank Adaptation (LoRA) fine-tuning.
|
|
42
|
+
*/
|
|
40
43
|
export type AlgorithmConfig = AlgorithmConfig.LoraFinetuningConfig | AlgorithmConfig.QatFinetuningConfig;
|
|
41
44
|
|
|
42
45
|
export namespace AlgorithmConfig {
|
|
46
|
+
/**
|
|
47
|
+
* Configuration for Low-Rank Adaptation (LoRA) fine-tuning.
|
|
48
|
+
*/
|
|
43
49
|
export interface LoraFinetuningConfig {
|
|
50
|
+
/**
|
|
51
|
+
* LoRA scaling parameter that controls adaptation strength
|
|
52
|
+
*/
|
|
44
53
|
alpha: number;
|
|
45
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Whether to apply LoRA to MLP layers
|
|
57
|
+
*/
|
|
46
58
|
apply_lora_to_mlp: boolean;
|
|
47
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Whether to apply LoRA to output projection layers
|
|
62
|
+
*/
|
|
48
63
|
apply_lora_to_output: boolean;
|
|
49
64
|
|
|
65
|
+
/**
|
|
66
|
+
* List of attention module names to apply LoRA to
|
|
67
|
+
*/
|
|
50
68
|
lora_attn_modules: Array<string>;
|
|
51
69
|
|
|
70
|
+
/**
|
|
71
|
+
* Rank of the LoRA adaptation (lower rank = fewer parameters)
|
|
72
|
+
*/
|
|
52
73
|
rank: number;
|
|
53
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Algorithm type identifier, always "LoRA"
|
|
77
|
+
*/
|
|
54
78
|
type: 'LoRA';
|
|
55
79
|
|
|
80
|
+
/**
|
|
81
|
+
* (Optional) Whether to quantize the base model weights
|
|
82
|
+
*/
|
|
56
83
|
quantize_base?: boolean;
|
|
57
84
|
|
|
85
|
+
/**
|
|
86
|
+
* (Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation)
|
|
87
|
+
*/
|
|
58
88
|
use_dora?: boolean;
|
|
59
89
|
}
|
|
60
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Configuration for Quantization-Aware Training (QAT) fine-tuning.
|
|
93
|
+
*/
|
|
61
94
|
export interface QatFinetuningConfig {
|
|
95
|
+
/**
|
|
96
|
+
* Size of groups for grouped quantization
|
|
97
|
+
*/
|
|
62
98
|
group_size: number;
|
|
63
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Name of the quantization algorithm to use
|
|
102
|
+
*/
|
|
64
103
|
quantizer_name: string;
|
|
65
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Algorithm type identifier, always "QAT"
|
|
107
|
+
*/
|
|
66
108
|
type: 'QAT';
|
|
67
109
|
}
|
|
68
110
|
}
|
|
@@ -118,8 +160,14 @@ export namespace PostTrainingPreferenceOptimizeParams {
|
|
|
118
160
|
* The algorithm configuration.
|
|
119
161
|
*/
|
|
120
162
|
export interface AlgorithmConfig {
|
|
163
|
+
/**
|
|
164
|
+
* Temperature parameter for the DPO loss
|
|
165
|
+
*/
|
|
121
166
|
beta: number;
|
|
122
167
|
|
|
168
|
+
/**
|
|
169
|
+
* The type of loss function to use for DPO
|
|
170
|
+
*/
|
|
123
171
|
loss_type: 'sigmoid' | 'hinge' | 'ipo' | 'kto_pair';
|
|
124
172
|
}
|
|
125
173
|
|
|
@@ -127,57 +175,136 @@ export namespace PostTrainingPreferenceOptimizeParams {
|
|
|
127
175
|
* The training configuration.
|
|
128
176
|
*/
|
|
129
177
|
export interface TrainingConfig {
|
|
178
|
+
/**
|
|
179
|
+
* Number of steps to accumulate gradients before updating
|
|
180
|
+
*/
|
|
130
181
|
gradient_accumulation_steps: number;
|
|
131
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Maximum number of steps to run per epoch
|
|
185
|
+
*/
|
|
132
186
|
max_steps_per_epoch: number;
|
|
133
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Number of training epochs to run
|
|
190
|
+
*/
|
|
134
191
|
n_epochs: number;
|
|
135
192
|
|
|
193
|
+
/**
|
|
194
|
+
* (Optional) Configuration for data loading and formatting
|
|
195
|
+
*/
|
|
136
196
|
data_config?: TrainingConfig.DataConfig;
|
|
137
197
|
|
|
198
|
+
/**
|
|
199
|
+
* (Optional) Data type for model parameters (bf16, fp16, fp32)
|
|
200
|
+
*/
|
|
138
201
|
dtype?: string;
|
|
139
202
|
|
|
203
|
+
/**
|
|
204
|
+
* (Optional) Configuration for memory and compute optimizations
|
|
205
|
+
*/
|
|
140
206
|
efficiency_config?: TrainingConfig.EfficiencyConfig;
|
|
141
207
|
|
|
208
|
+
/**
|
|
209
|
+
* (Optional) Maximum number of validation steps per epoch
|
|
210
|
+
*/
|
|
142
211
|
max_validation_steps?: number;
|
|
143
212
|
|
|
213
|
+
/**
|
|
214
|
+
* (Optional) Configuration for the optimization algorithm
|
|
215
|
+
*/
|
|
144
216
|
optimizer_config?: TrainingConfig.OptimizerConfig;
|
|
145
217
|
}
|
|
146
218
|
|
|
147
219
|
export namespace TrainingConfig {
|
|
220
|
+
/**
|
|
221
|
+
* (Optional) Configuration for data loading and formatting
|
|
222
|
+
*/
|
|
148
223
|
export interface DataConfig {
|
|
224
|
+
/**
|
|
225
|
+
* Number of samples per training batch
|
|
226
|
+
*/
|
|
149
227
|
batch_size: number;
|
|
150
228
|
|
|
229
|
+
/**
|
|
230
|
+
* Format of the dataset (instruct or dialog)
|
|
231
|
+
*/
|
|
151
232
|
data_format: 'instruct' | 'dialog';
|
|
152
233
|
|
|
234
|
+
/**
|
|
235
|
+
* Unique identifier for the training dataset
|
|
236
|
+
*/
|
|
153
237
|
dataset_id: string;
|
|
154
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Whether to shuffle the dataset during training
|
|
241
|
+
*/
|
|
155
242
|
shuffle: boolean;
|
|
156
243
|
|
|
244
|
+
/**
|
|
245
|
+
* (Optional) Whether to pack multiple samples into a single sequence for
|
|
246
|
+
* efficiency
|
|
247
|
+
*/
|
|
157
248
|
packed?: boolean;
|
|
158
249
|
|
|
250
|
+
/**
|
|
251
|
+
* (Optional) Whether to compute loss on input tokens as well as output tokens
|
|
252
|
+
*/
|
|
159
253
|
train_on_input?: boolean;
|
|
160
254
|
|
|
255
|
+
/**
|
|
256
|
+
* (Optional) Unique identifier for the validation dataset
|
|
257
|
+
*/
|
|
161
258
|
validation_dataset_id?: string;
|
|
162
259
|
}
|
|
163
260
|
|
|
261
|
+
/**
|
|
262
|
+
* (Optional) Configuration for memory and compute optimizations
|
|
263
|
+
*/
|
|
164
264
|
export interface EfficiencyConfig {
|
|
265
|
+
/**
|
|
266
|
+
* (Optional) Whether to use activation checkpointing to reduce memory usage
|
|
267
|
+
*/
|
|
165
268
|
enable_activation_checkpointing?: boolean;
|
|
166
269
|
|
|
270
|
+
/**
|
|
271
|
+
* (Optional) Whether to offload activations to CPU to save GPU memory
|
|
272
|
+
*/
|
|
167
273
|
enable_activation_offloading?: boolean;
|
|
168
274
|
|
|
275
|
+
/**
|
|
276
|
+
* (Optional) Whether to offload FSDP parameters to CPU
|
|
277
|
+
*/
|
|
169
278
|
fsdp_cpu_offload?: boolean;
|
|
170
279
|
|
|
280
|
+
/**
|
|
281
|
+
* (Optional) Whether to use memory-efficient FSDP wrapping
|
|
282
|
+
*/
|
|
171
283
|
memory_efficient_fsdp_wrap?: boolean;
|
|
172
284
|
}
|
|
173
285
|
|
|
286
|
+
/**
|
|
287
|
+
* (Optional) Configuration for the optimization algorithm
|
|
288
|
+
*/
|
|
174
289
|
export interface OptimizerConfig {
|
|
290
|
+
/**
|
|
291
|
+
* Learning rate for the optimizer
|
|
292
|
+
*/
|
|
175
293
|
lr: number;
|
|
176
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Number of steps for learning rate warmup
|
|
297
|
+
*/
|
|
177
298
|
num_warmup_steps: number;
|
|
178
299
|
|
|
300
|
+
/**
|
|
301
|
+
* Type of optimizer to use (adam, adamw, or sgd)
|
|
302
|
+
*/
|
|
179
303
|
optimizer_type: 'adam' | 'adamw' | 'sgd';
|
|
180
304
|
|
|
305
|
+
/**
|
|
306
|
+
* Weight decay coefficient for regularization
|
|
307
|
+
*/
|
|
181
308
|
weight_decay: number;
|
|
182
309
|
}
|
|
183
310
|
}
|
|
@@ -225,57 +352,136 @@ export namespace PostTrainingSupervisedFineTuneParams {
|
|
|
225
352
|
* The training configuration.
|
|
226
353
|
*/
|
|
227
354
|
export interface TrainingConfig {
|
|
355
|
+
/**
|
|
356
|
+
* Number of steps to accumulate gradients before updating
|
|
357
|
+
*/
|
|
228
358
|
gradient_accumulation_steps: number;
|
|
229
359
|
|
|
360
|
+
/**
|
|
361
|
+
* Maximum number of steps to run per epoch
|
|
362
|
+
*/
|
|
230
363
|
max_steps_per_epoch: number;
|
|
231
364
|
|
|
365
|
+
/**
|
|
366
|
+
* Number of training epochs to run
|
|
367
|
+
*/
|
|
232
368
|
n_epochs: number;
|
|
233
369
|
|
|
370
|
+
/**
|
|
371
|
+
* (Optional) Configuration for data loading and formatting
|
|
372
|
+
*/
|
|
234
373
|
data_config?: TrainingConfig.DataConfig;
|
|
235
374
|
|
|
375
|
+
/**
|
|
376
|
+
* (Optional) Data type for model parameters (bf16, fp16, fp32)
|
|
377
|
+
*/
|
|
236
378
|
dtype?: string;
|
|
237
379
|
|
|
380
|
+
/**
|
|
381
|
+
* (Optional) Configuration for memory and compute optimizations
|
|
382
|
+
*/
|
|
238
383
|
efficiency_config?: TrainingConfig.EfficiencyConfig;
|
|
239
384
|
|
|
385
|
+
/**
|
|
386
|
+
* (Optional) Maximum number of validation steps per epoch
|
|
387
|
+
*/
|
|
240
388
|
max_validation_steps?: number;
|
|
241
389
|
|
|
390
|
+
/**
|
|
391
|
+
* (Optional) Configuration for the optimization algorithm
|
|
392
|
+
*/
|
|
242
393
|
optimizer_config?: TrainingConfig.OptimizerConfig;
|
|
243
394
|
}
|
|
244
395
|
|
|
245
396
|
export namespace TrainingConfig {
|
|
397
|
+
/**
|
|
398
|
+
* (Optional) Configuration for data loading and formatting
|
|
399
|
+
*/
|
|
246
400
|
export interface DataConfig {
|
|
401
|
+
/**
|
|
402
|
+
* Number of samples per training batch
|
|
403
|
+
*/
|
|
247
404
|
batch_size: number;
|
|
248
405
|
|
|
406
|
+
/**
|
|
407
|
+
* Format of the dataset (instruct or dialog)
|
|
408
|
+
*/
|
|
249
409
|
data_format: 'instruct' | 'dialog';
|
|
250
410
|
|
|
411
|
+
/**
|
|
412
|
+
* Unique identifier for the training dataset
|
|
413
|
+
*/
|
|
251
414
|
dataset_id: string;
|
|
252
415
|
|
|
416
|
+
/**
|
|
417
|
+
* Whether to shuffle the dataset during training
|
|
418
|
+
*/
|
|
253
419
|
shuffle: boolean;
|
|
254
420
|
|
|
421
|
+
/**
|
|
422
|
+
* (Optional) Whether to pack multiple samples into a single sequence for
|
|
423
|
+
* efficiency
|
|
424
|
+
*/
|
|
255
425
|
packed?: boolean;
|
|
256
426
|
|
|
427
|
+
/**
|
|
428
|
+
* (Optional) Whether to compute loss on input tokens as well as output tokens
|
|
429
|
+
*/
|
|
257
430
|
train_on_input?: boolean;
|
|
258
431
|
|
|
432
|
+
/**
|
|
433
|
+
* (Optional) Unique identifier for the validation dataset
|
|
434
|
+
*/
|
|
259
435
|
validation_dataset_id?: string;
|
|
260
436
|
}
|
|
261
437
|
|
|
438
|
+
/**
|
|
439
|
+
* (Optional) Configuration for memory and compute optimizations
|
|
440
|
+
*/
|
|
262
441
|
export interface EfficiencyConfig {
|
|
442
|
+
/**
|
|
443
|
+
* (Optional) Whether to use activation checkpointing to reduce memory usage
|
|
444
|
+
*/
|
|
263
445
|
enable_activation_checkpointing?: boolean;
|
|
264
446
|
|
|
447
|
+
/**
|
|
448
|
+
* (Optional) Whether to offload activations to CPU to save GPU memory
|
|
449
|
+
*/
|
|
265
450
|
enable_activation_offloading?: boolean;
|
|
266
451
|
|
|
452
|
+
/**
|
|
453
|
+
* (Optional) Whether to offload FSDP parameters to CPU
|
|
454
|
+
*/
|
|
267
455
|
fsdp_cpu_offload?: boolean;
|
|
268
456
|
|
|
457
|
+
/**
|
|
458
|
+
* (Optional) Whether to use memory-efficient FSDP wrapping
|
|
459
|
+
*/
|
|
269
460
|
memory_efficient_fsdp_wrap?: boolean;
|
|
270
461
|
}
|
|
271
462
|
|
|
463
|
+
/**
|
|
464
|
+
* (Optional) Configuration for the optimization algorithm
|
|
465
|
+
*/
|
|
272
466
|
export interface OptimizerConfig {
|
|
467
|
+
/**
|
|
468
|
+
* Learning rate for the optimizer
|
|
469
|
+
*/
|
|
273
470
|
lr: number;
|
|
274
471
|
|
|
472
|
+
/**
|
|
473
|
+
* Number of steps for learning rate warmup
|
|
474
|
+
*/
|
|
275
475
|
num_warmup_steps: number;
|
|
276
476
|
|
|
477
|
+
/**
|
|
478
|
+
* Type of optimizer to use (adam, adamw, or sgd)
|
|
479
|
+
*/
|
|
277
480
|
optimizer_type: 'adam' | 'adamw' | 'sgd';
|
|
278
481
|
|
|
482
|
+
/**
|
|
483
|
+
* Weight decay coefficient for regularization
|
|
484
|
+
*/
|
|
279
485
|
weight_decay: number;
|
|
280
486
|
}
|
|
281
487
|
}
|
|
@@ -22,10 +22,19 @@ export class Providers extends APIResource {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Response containing a list of all available providers.
|
|
27
|
+
*/
|
|
25
28
|
export interface ListProvidersResponse {
|
|
29
|
+
/**
|
|
30
|
+
* List of provider information objects
|
|
31
|
+
*/
|
|
26
32
|
data: ProviderListResponse;
|
|
27
33
|
}
|
|
28
34
|
|
|
35
|
+
/**
|
|
36
|
+
* List of provider information objects
|
|
37
|
+
*/
|
|
29
38
|
export type ProviderListResponse = Array<InspectAPI.ProviderInfo>;
|
|
30
39
|
|
|
31
40
|
export declare namespace Providers {
|
|
@@ -26,7 +26,13 @@ export class InputItems extends APIResource {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* List container for OpenAI response input items.
|
|
31
|
+
*/
|
|
29
32
|
export interface InputItemListResponse {
|
|
33
|
+
/**
|
|
34
|
+
* List of input items
|
|
35
|
+
*/
|
|
30
36
|
data: Array<
|
|
31
37
|
| InputItemListResponse.OpenAIResponseOutputMessageWebSearchToolCall
|
|
32
38
|
| InputItemListResponse.OpenAIResponseOutputMessageFileSearchToolCall
|
|
@@ -35,41 +41,95 @@ export interface InputItemListResponse {
|
|
|
35
41
|
| InputItemListResponse.OpenAIResponseMessage
|
|
36
42
|
>;
|
|
37
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Object type identifier, always "list"
|
|
46
|
+
*/
|
|
38
47
|
object: 'list';
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
export namespace InputItemListResponse {
|
|
51
|
+
/**
|
|
52
|
+
* Web search tool call output message for OpenAI responses.
|
|
53
|
+
*/
|
|
42
54
|
export interface OpenAIResponseOutputMessageWebSearchToolCall {
|
|
55
|
+
/**
|
|
56
|
+
* Unique identifier for this tool call
|
|
57
|
+
*/
|
|
43
58
|
id: string;
|
|
44
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Current status of the web search operation
|
|
62
|
+
*/
|
|
45
63
|
status: string;
|
|
46
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Tool call type identifier, always "web_search_call"
|
|
67
|
+
*/
|
|
47
68
|
type: 'web_search_call';
|
|
48
69
|
}
|
|
49
70
|
|
|
71
|
+
/**
|
|
72
|
+
* File search tool call output message for OpenAI responses.
|
|
73
|
+
*/
|
|
50
74
|
export interface OpenAIResponseOutputMessageFileSearchToolCall {
|
|
75
|
+
/**
|
|
76
|
+
* Unique identifier for this tool call
|
|
77
|
+
*/
|
|
51
78
|
id: string;
|
|
52
79
|
|
|
80
|
+
/**
|
|
81
|
+
* List of search queries executed
|
|
82
|
+
*/
|
|
53
83
|
queries: Array<string>;
|
|
54
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Current status of the file search operation
|
|
87
|
+
*/
|
|
55
88
|
status: string;
|
|
56
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Tool call type identifier, always "file_search_call"
|
|
92
|
+
*/
|
|
57
93
|
type: 'file_search_call';
|
|
58
94
|
|
|
95
|
+
/**
|
|
96
|
+
* (Optional) Search results returned by the file search operation
|
|
97
|
+
*/
|
|
59
98
|
results?: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
60
99
|
}
|
|
61
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Function tool call output message for OpenAI responses.
|
|
103
|
+
*/
|
|
62
104
|
export interface OpenAIResponseOutputMessageFunctionToolCall {
|
|
105
|
+
/**
|
|
106
|
+
* JSON string containing the function arguments
|
|
107
|
+
*/
|
|
63
108
|
arguments: string;
|
|
64
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Unique identifier for the function call
|
|
112
|
+
*/
|
|
65
113
|
call_id: string;
|
|
66
114
|
|
|
115
|
+
/**
|
|
116
|
+
* Name of the function being called
|
|
117
|
+
*/
|
|
67
118
|
name: string;
|
|
68
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Tool call type identifier, always "function_call"
|
|
122
|
+
*/
|
|
69
123
|
type: 'function_call';
|
|
70
124
|
|
|
125
|
+
/**
|
|
126
|
+
* (Optional) Additional identifier for the tool call
|
|
127
|
+
*/
|
|
71
128
|
id?: string;
|
|
72
129
|
|
|
130
|
+
/**
|
|
131
|
+
* (Optional) Current status of the function call execution
|
|
132
|
+
*/
|
|
73
133
|
status?: string;
|
|
74
134
|
}
|
|
75
135
|
|
|
@@ -113,17 +173,38 @@ export namespace InputItemListResponse {
|
|
|
113
173
|
}
|
|
114
174
|
|
|
115
175
|
export namespace OpenAIResponseMessage {
|
|
176
|
+
/**
|
|
177
|
+
* Text content for input messages in OpenAI response format.
|
|
178
|
+
*/
|
|
116
179
|
export interface OpenAIResponseInputMessageContentText {
|
|
180
|
+
/**
|
|
181
|
+
* The text content of the input message
|
|
182
|
+
*/
|
|
117
183
|
text: string;
|
|
118
184
|
|
|
185
|
+
/**
|
|
186
|
+
* Content type identifier, always "input_text"
|
|
187
|
+
*/
|
|
119
188
|
type: 'input_text';
|
|
120
189
|
}
|
|
121
190
|
|
|
191
|
+
/**
|
|
192
|
+
* Image content for input messages in OpenAI response format.
|
|
193
|
+
*/
|
|
122
194
|
export interface OpenAIResponseInputMessageContentImage {
|
|
195
|
+
/**
|
|
196
|
+
* Level of detail for image processing, can be "low", "high", or "auto"
|
|
197
|
+
*/
|
|
123
198
|
detail: 'low' | 'high' | 'auto';
|
|
124
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Content type identifier, always "input_image"
|
|
202
|
+
*/
|
|
125
203
|
type: 'input_image';
|
|
126
204
|
|
|
205
|
+
/**
|
|
206
|
+
* (Optional) URL of the image content
|
|
207
|
+
*/
|
|
127
208
|
image_url?: string;
|
|
128
209
|
}
|
|
129
210
|
|
|
@@ -141,25 +222,58 @@ export namespace InputItemListResponse {
|
|
|
141
222
|
}
|
|
142
223
|
|
|
143
224
|
export namespace UnionMember2 {
|
|
225
|
+
/**
|
|
226
|
+
* File citation annotation for referencing specific files in response content.
|
|
227
|
+
*/
|
|
144
228
|
export interface OpenAIResponseAnnotationFileCitation {
|
|
229
|
+
/**
|
|
230
|
+
* Unique identifier of the referenced file
|
|
231
|
+
*/
|
|
145
232
|
file_id: string;
|
|
146
233
|
|
|
234
|
+
/**
|
|
235
|
+
* Name of the referenced file
|
|
236
|
+
*/
|
|
147
237
|
filename: string;
|
|
148
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Position index of the citation within the content
|
|
241
|
+
*/
|
|
149
242
|
index: number;
|
|
150
243
|
|
|
244
|
+
/**
|
|
245
|
+
* Annotation type identifier, always "file_citation"
|
|
246
|
+
*/
|
|
151
247
|
type: 'file_citation';
|
|
152
248
|
}
|
|
153
249
|
|
|
250
|
+
/**
|
|
251
|
+
* URL citation annotation for referencing external web resources.
|
|
252
|
+
*/
|
|
154
253
|
export interface OpenAIResponseAnnotationCitation {
|
|
254
|
+
/**
|
|
255
|
+
* End position of the citation span in the content
|
|
256
|
+
*/
|
|
155
257
|
end_index: number;
|
|
156
258
|
|
|
259
|
+
/**
|
|
260
|
+
* Start position of the citation span in the content
|
|
261
|
+
*/
|
|
157
262
|
start_index: number;
|
|
158
263
|
|
|
264
|
+
/**
|
|
265
|
+
* Title of the referenced web resource
|
|
266
|
+
*/
|
|
159
267
|
title: string;
|
|
160
268
|
|
|
269
|
+
/**
|
|
270
|
+
* Annotation type identifier, always "url_citation"
|
|
271
|
+
*/
|
|
161
272
|
type: 'url_citation';
|
|
162
273
|
|
|
274
|
+
/**
|
|
275
|
+
* URL of the referenced web resource
|
|
276
|
+
*/
|
|
163
277
|
url: string;
|
|
164
278
|
}
|
|
165
279
|
|