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.
- package/.github/workflows/ci.yml +4 -4
- package/.github/workflows/release-doctor.yml +1 -1
- package/.release-please-manifest.json +1 -1
- package/.stats.yml +4 -4
- package/CHANGELOG.md +41 -0
- package/LICENSE +1 -1
- package/README.md +41 -27
- package/api.md +32 -25
- package/dist/CHANGELOG.md +41 -0
- package/dist/LICENSE +1 -1
- package/dist/README.md +41 -27
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +5 -0
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +5 -0
- package/dist/core.mjs.map +1 -1
- package/dist/index.d.mts +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/resources/alpha/admin.d.ts +41 -0
- package/dist/resources/alpha/admin.d.ts.map +1 -0
- package/dist/resources/alpha/admin.js +46 -0
- package/dist/resources/alpha/admin.js.map +1 -0
- package/dist/resources/alpha/admin.mjs +42 -0
- package/dist/resources/alpha/admin.mjs.map +1 -0
- package/dist/resources/alpha/alpha.d.ts +8 -4
- package/dist/resources/alpha/alpha.d.ts.map +1 -1
- package/dist/resources/alpha/alpha.js +6 -2
- package/dist/resources/alpha/alpha.js.map +1 -1
- package/dist/resources/alpha/alpha.mjs +6 -2
- package/dist/resources/alpha/alpha.mjs.map +1 -1
- package/dist/resources/alpha/benchmarks.d.ts +37 -1
- package/dist/resources/alpha/benchmarks.d.ts.map +1 -1
- package/dist/resources/alpha/eval/eval.d.ts +28 -7
- package/dist/resources/alpha/eval/eval.d.ts.map +1 -1
- package/dist/resources/alpha/eval/eval.js.map +1 -1
- package/dist/resources/alpha/eval/eval.mjs.map +1 -1
- package/dist/resources/alpha/index.d.ts +2 -1
- package/dist/resources/alpha/index.d.ts.map +1 -1
- package/dist/resources/alpha/index.js +3 -1
- package/dist/resources/alpha/index.js.map +1 -1
- package/dist/resources/alpha/index.mjs +1 -0
- package/dist/resources/alpha/index.mjs.map +1 -1
- package/dist/resources/alpha/inference.d.ts +58 -7
- package/dist/resources/alpha/inference.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/index.d.ts +2 -2
- package/dist/resources/alpha/post-training/index.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/index.js.map +1 -1
- package/dist/resources/alpha/post-training/index.mjs +1 -1
- package/dist/resources/alpha/post-training/index.mjs.map +1 -1
- package/dist/resources/alpha/post-training/job.d.ts +4 -16
- package/dist/resources/alpha/post-training/job.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/job.js +5 -6
- package/dist/resources/alpha/post-training/job.js.map +1 -1
- package/dist/resources/alpha/post-training/job.mjs +5 -6
- package/dist/resources/alpha/post-training/job.mjs.map +1 -1
- package/dist/resources/alpha/post-training/post-training.d.ts +38 -11
- package/dist/resources/alpha/post-training/post-training.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/post-training.js.map +1 -1
- package/dist/resources/alpha/post-training/post-training.mjs +1 -1
- package/dist/resources/alpha/post-training/post-training.mjs.map +1 -1
- package/dist/resources/beta/datasets.d.ts +102 -8
- package/dist/resources/beta/datasets.d.ts.map +1 -1
- package/dist/resources/chat/chat.d.ts +119 -17
- package/dist/resources/chat/chat.d.ts.map +1 -1
- package/dist/resources/chat/chat.js.map +1 -1
- package/dist/resources/chat/chat.mjs.map +1 -1
- package/dist/resources/chat/completions.d.ts +1130 -73
- package/dist/resources/chat/completions.d.ts.map +1 -1
- package/dist/resources/chat/completions.js +0 -2
- package/dist/resources/chat/completions.js.map +1 -1
- package/dist/resources/chat/completions.mjs +0 -2
- package/dist/resources/chat/completions.mjs.map +1 -1
- package/dist/resources/completions.d.ts +135 -26
- package/dist/resources/completions.d.ts.map +1 -1
- package/dist/resources/completions.js.map +1 -1
- package/dist/resources/completions.mjs.map +1 -1
- package/dist/resources/conversations/conversations.d.ts +56 -12
- package/dist/resources/conversations/conversations.d.ts.map +1 -1
- package/dist/resources/conversations/conversations.js +0 -8
- package/dist/resources/conversations/conversations.js.map +1 -1
- package/dist/resources/conversations/conversations.mjs +0 -8
- package/dist/resources/conversations/conversations.mjs.map +1 -1
- package/dist/resources/conversations/items.d.ts +364 -81
- package/dist/resources/conversations/items.d.ts.map +1 -1
- package/dist/resources/conversations/items.js +0 -6
- package/dist/resources/conversations/items.js.map +1 -1
- package/dist/resources/conversations/items.mjs +0 -6
- package/dist/resources/conversations/items.mjs.map +1 -1
- package/dist/resources/embeddings.d.ts +46 -8
- package/dist/resources/embeddings.d.ts.map +1 -1
- package/dist/resources/embeddings.js +0 -2
- package/dist/resources/embeddings.js.map +1 -1
- package/dist/resources/embeddings.mjs +0 -2
- package/dist/resources/embeddings.mjs.map +1 -1
- package/dist/resources/files.d.ts +58 -31
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +4 -16
- package/dist/resources/files.js.map +1 -1
- package/dist/resources/files.mjs +4 -16
- package/dist/resources/files.mjs.map +1 -1
- package/dist/resources/index.d.ts +3 -3
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/index.mjs.map +1 -1
- package/dist/resources/inspect.d.ts +3 -45
- package/dist/resources/inspect.d.ts.map +1 -1
- package/dist/resources/inspect.js +0 -4
- package/dist/resources/inspect.js.map +1 -1
- package/dist/resources/inspect.mjs +0 -4
- package/dist/resources/inspect.mjs.map +1 -1
- package/dist/resources/models/models.d.ts +21 -6
- package/dist/resources/models/models.d.ts.map +1 -1
- package/dist/resources/models/models.js +0 -6
- package/dist/resources/models/models.js.map +1 -1
- package/dist/resources/models/models.mjs +0 -6
- package/dist/resources/models/models.mjs.map +1 -1
- package/dist/resources/moderations.d.ts +38 -5
- package/dist/resources/moderations.d.ts.map +1 -1
- package/dist/resources/moderations.js +1 -3
- package/dist/resources/moderations.js.map +1 -1
- package/dist/resources/moderations.mjs +1 -3
- package/dist/resources/moderations.mjs.map +1 -1
- package/dist/resources/prompts/prompts.d.ts +24 -10
- package/dist/resources/prompts/prompts.d.ts.map +1 -1
- package/dist/resources/prompts/prompts.js +2 -10
- package/dist/resources/prompts/prompts.js.map +1 -1
- package/dist/resources/prompts/prompts.mjs +2 -10
- package/dist/resources/prompts/prompts.mjs.map +1 -1
- package/dist/resources/prompts/versions.d.ts +0 -2
- package/dist/resources/prompts/versions.d.ts.map +1 -1
- package/dist/resources/prompts/versions.js +0 -2
- package/dist/resources/prompts/versions.js.map +1 -1
- package/dist/resources/prompts/versions.mjs +0 -2
- package/dist/resources/prompts/versions.mjs.map +1 -1
- package/dist/resources/providers.d.ts +5 -12
- package/dist/resources/providers.d.ts.map +1 -1
- package/dist/resources/providers.js +0 -4
- package/dist/resources/providers.js.map +1 -1
- package/dist/resources/providers.mjs +0 -4
- package/dist/resources/providers.mjs.map +1 -1
- package/dist/resources/responses/input-items.d.ts +108 -9
- package/dist/resources/responses/input-items.d.ts.map +1 -1
- package/dist/resources/responses/responses.d.ts +881 -124
- package/dist/resources/responses/responses.d.ts.map +1 -1
- package/dist/resources/responses/responses.js.map +1 -1
- package/dist/resources/responses/responses.mjs.map +1 -1
- package/dist/resources/routes.d.ts +10 -9
- package/dist/resources/routes.d.ts.map +1 -1
- package/dist/resources/routes.js.map +1 -1
- package/dist/resources/routes.mjs.map +1 -1
- package/dist/resources/safety.d.ts +131 -9
- package/dist/resources/safety.d.ts.map +1 -1
- package/dist/resources/safety.js +1 -3
- package/dist/resources/safety.js.map +1 -1
- package/dist/resources/safety.mjs +1 -3
- package/dist/resources/safety.mjs.map +1 -1
- package/dist/resources/scoring-functions.d.ts +23 -1
- package/dist/resources/scoring-functions.d.ts.map +1 -1
- package/dist/resources/scoring.d.ts +24 -0
- package/dist/resources/scoring.d.ts.map +1 -1
- package/dist/resources/shared.d.ts +139 -7
- package/dist/resources/shared.d.ts.map +1 -1
- package/dist/resources/shields.d.ts +21 -0
- package/dist/resources/shields.d.ts.map +1 -1
- package/dist/resources/vector-io.d.ts +75 -58
- package/dist/resources/vector-io.d.ts.map +1 -1
- package/dist/resources/vector-io.js +1 -1
- package/dist/resources/vector-io.mjs +1 -1
- package/dist/resources/vector-stores/file-batches.d.ts +13 -7
- package/dist/resources/vector-stores/file-batches.d.ts.map +1 -1
- package/dist/resources/vector-stores/file-batches.js +3 -6
- package/dist/resources/vector-stores/file-batches.js.map +1 -1
- package/dist/resources/vector-stores/file-batches.mjs +3 -6
- package/dist/resources/vector-stores/file-batches.mjs.map +1 -1
- package/dist/resources/vector-stores/files.d.ts +31 -9
- package/dist/resources/vector-stores/files.d.ts.map +1 -1
- package/dist/resources/vector-stores/files.js +4 -4
- package/dist/resources/vector-stores/files.js.map +1 -1
- package/dist/resources/vector-stores/files.mjs +4 -4
- package/dist/resources/vector-stores/files.mjs.map +1 -1
- package/dist/resources/vector-stores/vector-stores.d.ts +87 -13
- package/dist/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/dist/resources/vector-stores/vector-stores.js +5 -10
- package/dist/resources/vector-stores/vector-stores.js.map +1 -1
- package/dist/resources/vector-stores/vector-stores.mjs +5 -10
- package/dist/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/dist/src/core.ts +6 -0
- package/dist/src/index.ts +11 -16
- package/dist/src/resources/alpha/admin.ts +84 -0
- package/dist/src/resources/alpha/alpha.ts +16 -8
- package/dist/src/resources/alpha/benchmarks.ts +37 -1
- package/dist/src/resources/alpha/eval/eval.ts +28 -7
- package/dist/src/resources/alpha/index.ts +2 -0
- package/dist/src/resources/alpha/inference.ts +58 -7
- package/dist/src/resources/alpha/post-training/index.ts +2 -10
- package/dist/src/resources/alpha/post-training/job.ts +5 -26
- package/dist/src/resources/alpha/post-training/post-training.ts +38 -22
- package/dist/src/resources/beta/datasets.ts +103 -8
- package/dist/src/resources/chat/chat.ts +122 -20
- package/dist/src/resources/chat/completions.ts +1138 -79
- package/dist/src/resources/completions.ts +137 -28
- package/dist/src/resources/conversations/conversations.ts +67 -15
- package/dist/src/resources/conversations/items.ts +479 -110
- package/dist/src/resources/embeddings.ts +46 -8
- package/dist/src/resources/files.ts +58 -31
- package/dist/src/resources/index.ts +3 -3
- package/dist/src/resources/inspect.ts +3 -57
- package/dist/src/resources/models/models.ts +21 -6
- package/dist/src/resources/moderations.ts +38 -5
- package/dist/src/resources/prompts/prompts.ts +26 -12
- package/dist/src/resources/prompts/versions.ts +0 -2
- package/dist/src/resources/providers.ts +5 -16
- package/dist/src/resources/responses/input-items.ts +138 -15
- package/dist/src/resources/responses/responses.ts +1076 -196
- package/dist/src/resources/routes.ts +10 -14
- package/dist/src/resources/safety.ts +131 -8
- package/dist/src/resources/scoring-functions.ts +23 -1
- package/dist/src/resources/scoring.ts +24 -0
- package/dist/src/resources/shared.ts +148 -7
- package/dist/src/resources/shields.ts +21 -0
- package/dist/src/resources/vector-io.ts +95 -78
- package/dist/src/resources/vector-stores/file-batches.ts +13 -7
- package/dist/src/resources/vector-stores/files.ts +31 -11
- package/dist/src/resources/vector-stores/vector-stores.ts +89 -15
- package/dist/src/version.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
- package/src/core.ts +6 -0
- package/src/index.ts +11 -16
- package/src/resources/alpha/admin.ts +84 -0
- package/src/resources/alpha/alpha.ts +16 -8
- package/src/resources/alpha/benchmarks.ts +37 -1
- package/src/resources/alpha/eval/eval.ts +28 -7
- package/src/resources/alpha/index.ts +2 -0
- package/src/resources/alpha/inference.ts +58 -7
- package/src/resources/alpha/post-training/index.ts +2 -10
- package/src/resources/alpha/post-training/job.ts +5 -26
- package/src/resources/alpha/post-training/post-training.ts +38 -22
- package/src/resources/beta/datasets.ts +103 -8
- package/src/resources/chat/chat.ts +122 -20
- package/src/resources/chat/completions.ts +1138 -79
- package/src/resources/completions.ts +137 -28
- package/src/resources/conversations/conversations.ts +67 -15
- package/src/resources/conversations/items.ts +479 -110
- package/src/resources/embeddings.ts +46 -8
- package/src/resources/files.ts +58 -31
- package/src/resources/index.ts +3 -3
- package/src/resources/inspect.ts +3 -57
- package/src/resources/models/models.ts +21 -6
- package/src/resources/moderations.ts +38 -5
- package/src/resources/prompts/prompts.ts +26 -12
- package/src/resources/prompts/versions.ts +0 -2
- package/src/resources/providers.ts +5 -16
- package/src/resources/responses/input-items.ts +138 -15
- package/src/resources/responses/responses.ts +1076 -196
- package/src/resources/routes.ts +10 -14
- package/src/resources/safety.ts +131 -8
- package/src/resources/scoring-functions.ts +23 -1
- package/src/resources/scoring.ts +24 -0
- package/src/resources/shared.ts +148 -7
- package/src/resources/shields.ts +21 -0
- package/src/resources/vector-io.ts +95 -78
- package/src/resources/vector-stores/file-batches.ts +13 -7
- package/src/resources/vector-stores/files.ts +31 -11
- package/src/resources/vector-stores/vector-stores.ts +89 -15
- package/src/version.ts +1 -1
- package/tests/api-resources/alpha/admin.test.ts +111 -0
- package/tests/api-resources/alpha/eval/eval.test.ts +40 -20
- package/tests/api-resources/alpha/inference.test.ts +1 -1
- package/tests/api-resources/alpha/post-training/job.test.ts +21 -12
- package/tests/api-resources/alpha/post-training/post-training.test.ts +12 -2
- package/tests/api-resources/beta/datasets.test.ts +9 -3
- package/tests/api-resources/chat/completions.test.ts +20 -7
- package/tests/api-resources/completions.test.ts +5 -5
- package/tests/api-resources/conversations/items.test.ts +22 -3
- package/tests/api-resources/embeddings.test.ts +2 -2
- package/tests/api-resources/files.test.ts +6 -1
- package/tests/api-resources/responses/input-items.test.ts +7 -1
- package/tests/api-resources/responses/responses.test.ts +19 -5
- package/tests/api-resources/safety.test.ts +9 -5
- package/tests/api-resources/tool-runtime.test.ts +9 -2
- package/tests/api-resources/vector-io.test.ts +13 -4
- package/tests/api-resources/vector-stores/file-batches.test.ts +7 -1
- package/tests/api-resources/vector-stores/files.test.ts +7 -1
- package/tests/api-resources/vector-stores/vector-stores.test.ts +14 -2
package/src/resources/shared.ts
CHANGED
|
@@ -6,6 +6,19 @@
|
|
|
6
6
|
//
|
|
7
7
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
8
8
|
|
|
9
|
+
import * as ProvidersAPI from './providers';
|
|
10
|
+
import * as RoutesAPI from './routes';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Health status information for the service.
|
|
14
|
+
*/
|
|
15
|
+
export interface HealthInfo {
|
|
16
|
+
/**
|
|
17
|
+
* The health status of the service
|
|
18
|
+
*/
|
|
19
|
+
status: 'OK' | 'Error' | 'Not Implemented';
|
|
20
|
+
}
|
|
21
|
+
|
|
9
22
|
/**
|
|
10
23
|
* A image content item
|
|
11
24
|
*/
|
|
@@ -158,6 +171,26 @@ export namespace InterleavedContentItem {
|
|
|
158
171
|
}
|
|
159
172
|
}
|
|
160
173
|
|
|
174
|
+
/**
|
|
175
|
+
* Response containing a list of all available providers.
|
|
176
|
+
*/
|
|
177
|
+
export interface ListProvidersResponse {
|
|
178
|
+
/**
|
|
179
|
+
* List of provider information objects
|
|
180
|
+
*/
|
|
181
|
+
data: ProvidersAPI.ProviderListResponse;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Response containing a list of all available API routes.
|
|
186
|
+
*/
|
|
187
|
+
export interface ListRoutesResponse {
|
|
188
|
+
/**
|
|
189
|
+
* List of available API routes
|
|
190
|
+
*/
|
|
191
|
+
data: RoutesAPI.RouteListResponse;
|
|
192
|
+
}
|
|
193
|
+
|
|
161
194
|
/**
|
|
162
195
|
* Parameter type for string values.
|
|
163
196
|
*/
|
|
@@ -237,33 +270,102 @@ export namespace ParamType {
|
|
|
237
270
|
}
|
|
238
271
|
}
|
|
239
272
|
|
|
273
|
+
/**
|
|
274
|
+
* Information about a registered provider including its configuration and health
|
|
275
|
+
* status.
|
|
276
|
+
*/
|
|
277
|
+
export interface ProviderInfo {
|
|
278
|
+
/**
|
|
279
|
+
* The API name this provider implements
|
|
280
|
+
*/
|
|
281
|
+
api: string;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Configuration parameters for the provider
|
|
285
|
+
*/
|
|
286
|
+
config: { [key: string]: unknown };
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Current health status of the provider
|
|
290
|
+
*/
|
|
291
|
+
health: { [key: string]: unknown };
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Unique identifier for the provider
|
|
295
|
+
*/
|
|
296
|
+
provider_id: string;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* The type of provider implementation
|
|
300
|
+
*/
|
|
301
|
+
provider_type: string;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Information about an API route including its path, method, and implementing
|
|
306
|
+
* providers.
|
|
307
|
+
*/
|
|
308
|
+
export interface RouteInfo {
|
|
309
|
+
/**
|
|
310
|
+
* The HTTP method for the route
|
|
311
|
+
*/
|
|
312
|
+
method: string;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* List of provider types implementing this route
|
|
316
|
+
*/
|
|
317
|
+
provider_types: Array<string>;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* The API route path
|
|
321
|
+
*/
|
|
322
|
+
route: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
240
325
|
/**
|
|
241
326
|
* Details of a safety violation detected by content moderation.
|
|
242
327
|
*/
|
|
243
328
|
export interface SafetyViolation {
|
|
244
329
|
/**
|
|
245
|
-
* Severity level of
|
|
330
|
+
* Severity level of the violation
|
|
246
331
|
*/
|
|
247
332
|
violation_level: 'info' | 'warn' | 'error';
|
|
248
333
|
|
|
334
|
+
/**
|
|
335
|
+
* Additional metadata including specific violation codes
|
|
336
|
+
*/
|
|
249
337
|
metadata?: { [key: string]: unknown };
|
|
250
338
|
|
|
339
|
+
/**
|
|
340
|
+
* Message to convey to the user about the violation
|
|
341
|
+
*/
|
|
251
342
|
user_message?: string | null;
|
|
252
343
|
}
|
|
253
344
|
|
|
254
345
|
/**
|
|
255
|
-
* Sampling parameters.
|
|
346
|
+
* Sampling parameters for text generation.
|
|
256
347
|
*/
|
|
257
348
|
export interface SamplingParams {
|
|
349
|
+
/**
|
|
350
|
+
* The maximum number of tokens that can be generated in the completion. The token
|
|
351
|
+
* count of your prompt plus max_tokens cannot exceed the model's context length.
|
|
352
|
+
*/
|
|
258
353
|
max_tokens?: number | null;
|
|
259
354
|
|
|
355
|
+
/**
|
|
356
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
|
357
|
+
* whether they appear in the text so far.
|
|
358
|
+
*/
|
|
260
359
|
repetition_penalty?: number | null;
|
|
261
360
|
|
|
361
|
+
/**
|
|
362
|
+
* Up to 4 sequences where the API will stop generating further tokens. The
|
|
363
|
+
* returned text will not contain the stop sequence.
|
|
364
|
+
*/
|
|
262
365
|
stop?: Array<string> | null;
|
|
263
366
|
|
|
264
367
|
/**
|
|
265
|
-
*
|
|
266
|
-
* step.
|
|
368
|
+
* The sampling strategy to use.
|
|
267
369
|
*/
|
|
268
370
|
strategy?:
|
|
269
371
|
| SamplingParams.GreedySamplingStrategy
|
|
@@ -277,6 +379,9 @@ export namespace SamplingParams {
|
|
|
277
379
|
* step.
|
|
278
380
|
*/
|
|
279
381
|
export interface GreedySamplingStrategy {
|
|
382
|
+
/**
|
|
383
|
+
* Must be 'greedy' to identify this sampling strategy.
|
|
384
|
+
*/
|
|
280
385
|
type?: 'greedy';
|
|
281
386
|
}
|
|
282
387
|
|
|
@@ -285,10 +390,19 @@ export namespace SamplingParams {
|
|
|
285
390
|
* with cumulative probability >= p.
|
|
286
391
|
*/
|
|
287
392
|
export interface TopPSamplingStrategy {
|
|
288
|
-
|
|
393
|
+
/**
|
|
394
|
+
* Controls randomness in sampling. Higher values increase randomness.
|
|
395
|
+
*/
|
|
396
|
+
temperature: number;
|
|
289
397
|
|
|
290
|
-
|
|
398
|
+
/**
|
|
399
|
+
* Cumulative probability threshold for nucleus sampling.
|
|
400
|
+
*/
|
|
401
|
+
top_p?: number;
|
|
291
402
|
|
|
403
|
+
/**
|
|
404
|
+
* Must be 'top_p' to identify this sampling strategy.
|
|
405
|
+
*/
|
|
292
406
|
type?: 'top_p';
|
|
293
407
|
}
|
|
294
408
|
|
|
@@ -296,8 +410,14 @@ export namespace SamplingParams {
|
|
|
296
410
|
* Top-k sampling strategy that restricts sampling to the k most likely tokens.
|
|
297
411
|
*/
|
|
298
412
|
export interface TopKSamplingStrategy {
|
|
413
|
+
/**
|
|
414
|
+
* Number of top tokens to consider for sampling. Must be at least 1.
|
|
415
|
+
*/
|
|
299
416
|
top_k: number;
|
|
300
417
|
|
|
418
|
+
/**
|
|
419
|
+
* Must be 'top_k' to identify this sampling strategy.
|
|
420
|
+
*/
|
|
301
421
|
type?: 'top_k';
|
|
302
422
|
}
|
|
303
423
|
}
|
|
@@ -306,8 +426,14 @@ export namespace SamplingParams {
|
|
|
306
426
|
* A scoring result for a single row.
|
|
307
427
|
*/
|
|
308
428
|
export interface ScoringResult {
|
|
429
|
+
/**
|
|
430
|
+
* Map of metric name to aggregated value
|
|
431
|
+
*/
|
|
309
432
|
aggregated_results: { [key: string]: unknown };
|
|
310
433
|
|
|
434
|
+
/**
|
|
435
|
+
* The scoring result for each row. Each row is a map of column name to value.
|
|
436
|
+
*/
|
|
311
437
|
score_rows: Array<{ [key: string]: unknown }>;
|
|
312
438
|
}
|
|
313
439
|
|
|
@@ -316,7 +442,9 @@ export interface ScoringResult {
|
|
|
316
442
|
*/
|
|
317
443
|
export interface SystemMessage {
|
|
318
444
|
/**
|
|
319
|
-
*
|
|
445
|
+
* The content of the 'system prompt'. If multiple system messages are provided,
|
|
446
|
+
* they are concatenated. The underlying Llama Stack code may also add other system
|
|
447
|
+
* messages.
|
|
320
448
|
*/
|
|
321
449
|
content:
|
|
322
450
|
| string
|
|
@@ -324,6 +452,9 @@ export interface SystemMessage {
|
|
|
324
452
|
| SystemMessage.TextContentItem
|
|
325
453
|
| Array<SystemMessage.ImageContentItemInput | SystemMessage.TextContentItem>;
|
|
326
454
|
|
|
455
|
+
/**
|
|
456
|
+
* Must be 'system' to identify this as a system message.
|
|
457
|
+
*/
|
|
327
458
|
role?: 'system';
|
|
328
459
|
}
|
|
329
460
|
|
|
@@ -416,3 +547,13 @@ export namespace SystemMessage {
|
|
|
416
547
|
type?: 'text';
|
|
417
548
|
}
|
|
418
549
|
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Version information for the service.
|
|
553
|
+
*/
|
|
554
|
+
export interface VersionInfo {
|
|
555
|
+
/**
|
|
556
|
+
* The version string of the service
|
|
557
|
+
*/
|
|
558
|
+
version: string;
|
|
559
|
+
}
|
package/src/resources/shields.ts
CHANGED
|
@@ -48,7 +48,13 @@ export class Shields extends APIResource {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Response containing a list of all shields.
|
|
53
|
+
*/
|
|
51
54
|
export interface ListShieldsResponse {
|
|
55
|
+
/**
|
|
56
|
+
* List of shield objects
|
|
57
|
+
*/
|
|
52
58
|
data: ShieldListResponse;
|
|
53
59
|
}
|
|
54
60
|
|
|
@@ -76,15 +82,30 @@ export interface Shield {
|
|
|
76
82
|
type?: 'shield';
|
|
77
83
|
}
|
|
78
84
|
|
|
85
|
+
/**
|
|
86
|
+
* List of shield objects
|
|
87
|
+
*/
|
|
79
88
|
export type ShieldListResponse = Array<Shield>;
|
|
80
89
|
|
|
81
90
|
export interface ShieldRegisterParams {
|
|
91
|
+
/**
|
|
92
|
+
* The identifier of the shield to register.
|
|
93
|
+
*/
|
|
82
94
|
shield_id: string;
|
|
83
95
|
|
|
96
|
+
/**
|
|
97
|
+
* The parameters of the shield.
|
|
98
|
+
*/
|
|
84
99
|
params?: { [key: string]: unknown } | null;
|
|
85
100
|
|
|
101
|
+
/**
|
|
102
|
+
* The identifier of the provider.
|
|
103
|
+
*/
|
|
86
104
|
provider_id?: string | null;
|
|
87
105
|
|
|
106
|
+
/**
|
|
107
|
+
* The identifier of the shield in the provider.
|
|
108
|
+
*/
|
|
88
109
|
provider_shield_id?: string | null;
|
|
89
110
|
}
|
|
90
111
|
|
|
@@ -11,7 +11,7 @@ import * as Core from '../core';
|
|
|
11
11
|
|
|
12
12
|
export class VectorIo extends APIResource {
|
|
13
13
|
/**
|
|
14
|
-
* Insert chunks into a vector database.
|
|
14
|
+
* Insert embedded chunks into a vector database.
|
|
15
15
|
*/
|
|
16
16
|
insert(body: VectorIoInsertParams, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
17
17
|
return this._client.post('/v1/vector-io/insert', {
|
|
@@ -40,11 +40,22 @@ export interface QueryChunksResponse {
|
|
|
40
40
|
|
|
41
41
|
export namespace QueryChunksResponse {
|
|
42
42
|
/**
|
|
43
|
-
* A chunk of content
|
|
43
|
+
* A chunk of content with its embedding vector for vector database operations.
|
|
44
|
+
* Inherits all fields from Chunk and adds embedding-related fields.
|
|
44
45
|
*/
|
|
45
46
|
export interface Chunk {
|
|
46
47
|
chunk_id: string;
|
|
47
48
|
|
|
49
|
+
/**
|
|
50
|
+
* `ChunkMetadata` is backend metadata for a `Chunk` that is used to store
|
|
51
|
+
* additional information about the chunk that will not be used in the context
|
|
52
|
+
* during inference, but is required for backend functionality. The `ChunkMetadata`
|
|
53
|
+
* is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not
|
|
54
|
+
* expected to change after. Use `Chunk.metadata` for metadata that will be used in
|
|
55
|
+
* the context during inference.
|
|
56
|
+
*/
|
|
57
|
+
chunk_metadata: Chunk.ChunkMetadata;
|
|
58
|
+
|
|
48
59
|
/**
|
|
49
60
|
* A image content item
|
|
50
61
|
*/
|
|
@@ -54,6 +65,16 @@ export namespace QueryChunksResponse {
|
|
|
54
65
|
| Chunk.TextContentItem
|
|
55
66
|
| Array<Chunk.ImageContentItemOutput | Chunk.TextContentItem>;
|
|
56
67
|
|
|
68
|
+
embedding: Array<number>;
|
|
69
|
+
|
|
70
|
+
embedding_dimension: number;
|
|
71
|
+
|
|
72
|
+
embedding_model: string;
|
|
73
|
+
|
|
74
|
+
metadata?: { [key: string]: unknown };
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export namespace Chunk {
|
|
57
78
|
/**
|
|
58
79
|
* `ChunkMetadata` is backend metadata for a `Chunk` that is used to store
|
|
59
80
|
* additional information about the chunk that will not be used in the context
|
|
@@ -62,14 +83,26 @@ export namespace QueryChunksResponse {
|
|
|
62
83
|
* expected to change after. Use `Chunk.metadata` for metadata that will be used in
|
|
63
84
|
* the context during inference.
|
|
64
85
|
*/
|
|
65
|
-
|
|
86
|
+
export interface ChunkMetadata {
|
|
87
|
+
chunk_id?: string | null;
|
|
66
88
|
|
|
67
|
-
|
|
89
|
+
chunk_tokenizer?: string | null;
|
|
68
90
|
|
|
69
|
-
|
|
70
|
-
|
|
91
|
+
chunk_window?: string | null;
|
|
92
|
+
|
|
93
|
+
content_token_count?: number | null;
|
|
94
|
+
|
|
95
|
+
created_timestamp?: number | null;
|
|
96
|
+
|
|
97
|
+
document_id?: string | null;
|
|
98
|
+
|
|
99
|
+
metadata_token_count?: number | null;
|
|
100
|
+
|
|
101
|
+
source?: string | null;
|
|
102
|
+
|
|
103
|
+
updated_timestamp?: number | null;
|
|
104
|
+
}
|
|
71
105
|
|
|
72
|
-
export namespace Chunk {
|
|
73
106
|
/**
|
|
74
107
|
* A image content item
|
|
75
108
|
*/
|
|
@@ -157,56 +190,44 @@ export namespace QueryChunksResponse {
|
|
|
157
190
|
|
|
158
191
|
type?: 'text';
|
|
159
192
|
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* `ChunkMetadata` is backend metadata for a `Chunk` that is used to store
|
|
163
|
-
* additional information about the chunk that will not be used in the context
|
|
164
|
-
* during inference, but is required for backend functionality. The `ChunkMetadata`
|
|
165
|
-
* is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not
|
|
166
|
-
* expected to change after. Use `Chunk.metadata` for metadata that will be used in
|
|
167
|
-
* the context during inference.
|
|
168
|
-
*/
|
|
169
|
-
export interface ChunkMetadata {
|
|
170
|
-
chunk_embedding_dimension?: number | null;
|
|
171
|
-
|
|
172
|
-
chunk_embedding_model?: string | null;
|
|
173
|
-
|
|
174
|
-
chunk_id?: string | null;
|
|
175
|
-
|
|
176
|
-
chunk_tokenizer?: string | null;
|
|
177
|
-
|
|
178
|
-
chunk_window?: string | null;
|
|
179
|
-
|
|
180
|
-
content_token_count?: number | null;
|
|
181
|
-
|
|
182
|
-
created_timestamp?: number | null;
|
|
183
|
-
|
|
184
|
-
document_id?: string | null;
|
|
185
|
-
|
|
186
|
-
metadata_token_count?: number | null;
|
|
187
|
-
|
|
188
|
-
source?: string | null;
|
|
189
|
-
|
|
190
|
-
updated_timestamp?: number | null;
|
|
191
|
-
}
|
|
192
193
|
}
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
export interface VectorIoInsertParams {
|
|
197
|
+
/**
|
|
198
|
+
* The list of embedded chunks to insert.
|
|
199
|
+
*/
|
|
196
200
|
chunks: Array<VectorIoInsertParams.Chunk>;
|
|
197
201
|
|
|
202
|
+
/**
|
|
203
|
+
* The ID of the vector store to insert chunks into.
|
|
204
|
+
*/
|
|
198
205
|
vector_store_id: string;
|
|
199
206
|
|
|
207
|
+
/**
|
|
208
|
+
* Time-to-live in seconds for the inserted chunks.
|
|
209
|
+
*/
|
|
200
210
|
ttl_seconds?: number | null;
|
|
201
211
|
}
|
|
202
212
|
|
|
203
213
|
export namespace VectorIoInsertParams {
|
|
204
214
|
/**
|
|
205
|
-
* A chunk of content
|
|
215
|
+
* A chunk of content with its embedding vector for vector database operations.
|
|
216
|
+
* Inherits all fields from Chunk and adds embedding-related fields.
|
|
206
217
|
*/
|
|
207
218
|
export interface Chunk {
|
|
208
219
|
chunk_id: string;
|
|
209
220
|
|
|
221
|
+
/**
|
|
222
|
+
* `ChunkMetadata` is backend metadata for a `Chunk` that is used to store
|
|
223
|
+
* additional information about the chunk that will not be used in the context
|
|
224
|
+
* during inference, but is required for backend functionality. The `ChunkMetadata`
|
|
225
|
+
* is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not
|
|
226
|
+
* expected to change after. Use `Chunk.metadata` for metadata that will be used in
|
|
227
|
+
* the context during inference.
|
|
228
|
+
*/
|
|
229
|
+
chunk_metadata: Chunk.ChunkMetadata;
|
|
230
|
+
|
|
210
231
|
/**
|
|
211
232
|
* A image content item
|
|
212
233
|
*/
|
|
@@ -216,6 +237,16 @@ export namespace VectorIoInsertParams {
|
|
|
216
237
|
| Chunk.TextContentItem
|
|
217
238
|
| Array<Chunk.ImageContentItemInput | Chunk.TextContentItem>;
|
|
218
239
|
|
|
240
|
+
embedding: Array<number>;
|
|
241
|
+
|
|
242
|
+
embedding_dimension: number;
|
|
243
|
+
|
|
244
|
+
embedding_model: string;
|
|
245
|
+
|
|
246
|
+
metadata?: { [key: string]: unknown };
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export namespace Chunk {
|
|
219
250
|
/**
|
|
220
251
|
* `ChunkMetadata` is backend metadata for a `Chunk` that is used to store
|
|
221
252
|
* additional information about the chunk that will not be used in the context
|
|
@@ -224,14 +255,26 @@ export namespace VectorIoInsertParams {
|
|
|
224
255
|
* expected to change after. Use `Chunk.metadata` for metadata that will be used in
|
|
225
256
|
* the context during inference.
|
|
226
257
|
*/
|
|
227
|
-
|
|
258
|
+
export interface ChunkMetadata {
|
|
259
|
+
chunk_id?: string | null;
|
|
228
260
|
|
|
229
|
-
|
|
261
|
+
chunk_tokenizer?: string | null;
|
|
230
262
|
|
|
231
|
-
|
|
232
|
-
|
|
263
|
+
chunk_window?: string | null;
|
|
264
|
+
|
|
265
|
+
content_token_count?: number | null;
|
|
266
|
+
|
|
267
|
+
created_timestamp?: number | null;
|
|
268
|
+
|
|
269
|
+
document_id?: string | null;
|
|
270
|
+
|
|
271
|
+
metadata_token_count?: number | null;
|
|
272
|
+
|
|
273
|
+
source?: string | null;
|
|
274
|
+
|
|
275
|
+
updated_timestamp?: number | null;
|
|
276
|
+
}
|
|
233
277
|
|
|
234
|
-
export namespace Chunk {
|
|
235
278
|
/**
|
|
236
279
|
* A image content item
|
|
237
280
|
*/
|
|
@@ -319,44 +362,12 @@ export namespace VectorIoInsertParams {
|
|
|
319
362
|
|
|
320
363
|
type?: 'text';
|
|
321
364
|
}
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* `ChunkMetadata` is backend metadata for a `Chunk` that is used to store
|
|
325
|
-
* additional information about the chunk that will not be used in the context
|
|
326
|
-
* during inference, but is required for backend functionality. The `ChunkMetadata`
|
|
327
|
-
* is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not
|
|
328
|
-
* expected to change after. Use `Chunk.metadata` for metadata that will be used in
|
|
329
|
-
* the context during inference.
|
|
330
|
-
*/
|
|
331
|
-
export interface ChunkMetadata {
|
|
332
|
-
chunk_embedding_dimension?: number | null;
|
|
333
|
-
|
|
334
|
-
chunk_embedding_model?: string | null;
|
|
335
|
-
|
|
336
|
-
chunk_id?: string | null;
|
|
337
|
-
|
|
338
|
-
chunk_tokenizer?: string | null;
|
|
339
|
-
|
|
340
|
-
chunk_window?: string | null;
|
|
341
|
-
|
|
342
|
-
content_token_count?: number | null;
|
|
343
|
-
|
|
344
|
-
created_timestamp?: number | null;
|
|
345
|
-
|
|
346
|
-
document_id?: string | null;
|
|
347
|
-
|
|
348
|
-
metadata_token_count?: number | null;
|
|
349
|
-
|
|
350
|
-
source?: string | null;
|
|
351
|
-
|
|
352
|
-
updated_timestamp?: number | null;
|
|
353
|
-
}
|
|
354
365
|
}
|
|
355
366
|
}
|
|
356
367
|
|
|
357
368
|
export interface VectorIoQueryParams {
|
|
358
369
|
/**
|
|
359
|
-
*
|
|
370
|
+
* The query content to search for.
|
|
360
371
|
*/
|
|
361
372
|
query:
|
|
362
373
|
| string
|
|
@@ -364,8 +375,14 @@ export interface VectorIoQueryParams {
|
|
|
364
375
|
| VectorIoQueryParams.TextContentItem
|
|
365
376
|
| Array<VectorIoQueryParams.ImageContentItemInput | VectorIoQueryParams.TextContentItem>;
|
|
366
377
|
|
|
378
|
+
/**
|
|
379
|
+
* The ID of the vector store to query.
|
|
380
|
+
*/
|
|
367
381
|
vector_store_id: string;
|
|
368
382
|
|
|
383
|
+
/**
|
|
384
|
+
* Additional query parameters.
|
|
385
|
+
*/
|
|
369
386
|
params?: { [key: string]: unknown } | null;
|
|
370
387
|
}
|
|
371
388
|
|
|
@@ -15,10 +15,7 @@ import { type OpenAICursorPageParams } from '../../pagination';
|
|
|
15
15
|
|
|
16
16
|
export class FileBatches extends APIResource {
|
|
17
17
|
/**
|
|
18
|
-
* Create a vector store file batch.
|
|
19
|
-
*
|
|
20
|
-
* Generate an OpenAI-compatible vector store file batch for the given vector
|
|
21
|
-
* store.
|
|
18
|
+
* Create a vector store file batch (OpenAI-compatible).
|
|
22
19
|
*/
|
|
23
20
|
create(
|
|
24
21
|
vectorStoreId: string,
|
|
@@ -29,7 +26,7 @@ export class FileBatches extends APIResource {
|
|
|
29
26
|
}
|
|
30
27
|
|
|
31
28
|
/**
|
|
32
|
-
* Retrieve a vector store file batch.
|
|
29
|
+
* Retrieve a vector store file batch (OpenAI-compatible).
|
|
33
30
|
*/
|
|
34
31
|
retrieve(
|
|
35
32
|
vectorStoreId: string,
|
|
@@ -40,7 +37,7 @@ export class FileBatches extends APIResource {
|
|
|
40
37
|
}
|
|
41
38
|
|
|
42
39
|
/**
|
|
43
|
-
*
|
|
40
|
+
* Cancel a vector store file batch (OpenAI-compatible).
|
|
44
41
|
*/
|
|
45
42
|
cancel(
|
|
46
43
|
vectorStoreId: string,
|
|
@@ -51,7 +48,7 @@ export class FileBatches extends APIResource {
|
|
|
51
48
|
}
|
|
52
49
|
|
|
53
50
|
/**
|
|
54
|
-
*
|
|
51
|
+
* List files in a vector store file batch (OpenAI-compatible).
|
|
55
52
|
*/
|
|
56
53
|
listFiles(
|
|
57
54
|
vectorStoreId: string,
|
|
@@ -182,10 +179,19 @@ export namespace FileBatchCreateParams {
|
|
|
182
179
|
}
|
|
183
180
|
|
|
184
181
|
export interface FileBatchListFilesParams extends OpenAICursorPageParams {
|
|
182
|
+
/**
|
|
183
|
+
* Pagination cursor (before).
|
|
184
|
+
*/
|
|
185
185
|
before?: string | null;
|
|
186
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Filter by file status.
|
|
189
|
+
*/
|
|
187
190
|
filter?: string | null;
|
|
188
191
|
|
|
192
|
+
/**
|
|
193
|
+
* Sort order by created_at: asc or desc.
|
|
194
|
+
*/
|
|
189
195
|
order?: string | null;
|
|
190
196
|
}
|
|
191
197
|
|