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
|
@@ -61,7 +61,7 @@ export class Eval extends APIResource {
|
|
|
61
61
|
*/
|
|
62
62
|
export interface BenchmarkConfig {
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* The candidate to evaluate
|
|
65
65
|
*/
|
|
66
66
|
eval_candidate: BenchmarkConfig.EvalCandidate;
|
|
67
67
|
|
|
@@ -85,13 +85,16 @@ export interface BenchmarkConfig {
|
|
|
85
85
|
|
|
86
86
|
export namespace BenchmarkConfig {
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
88
|
+
* The candidate to evaluate
|
|
89
89
|
*/
|
|
90
90
|
export interface EvalCandidate {
|
|
91
|
+
/**
|
|
92
|
+
* The model ID to evaluate
|
|
93
|
+
*/
|
|
91
94
|
model: string;
|
|
92
95
|
|
|
93
96
|
/**
|
|
94
|
-
*
|
|
97
|
+
* The sampling parameters for the model
|
|
95
98
|
*/
|
|
96
99
|
sampling_params: Shared.SamplingParams;
|
|
97
100
|
|
|
@@ -164,8 +167,14 @@ export namespace BenchmarkConfig {
|
|
|
164
167
|
* The response from an evaluation.
|
|
165
168
|
*/
|
|
166
169
|
export interface EvaluateResponse {
|
|
170
|
+
/**
|
|
171
|
+
* The generations from the evaluation
|
|
172
|
+
*/
|
|
167
173
|
generations: Array<{ [key: string]: unknown }>;
|
|
168
174
|
|
|
175
|
+
/**
|
|
176
|
+
* The scores from the evaluation. Each key in the dict is a scoring function name
|
|
177
|
+
*/
|
|
169
178
|
scores: { [key: string]: Shared.ScoringResult };
|
|
170
179
|
}
|
|
171
180
|
|
|
@@ -183,36 +192,48 @@ export interface Job {
|
|
|
183
192
|
|
|
184
193
|
export interface EvalEvaluateRowsParams {
|
|
185
194
|
/**
|
|
186
|
-
*
|
|
195
|
+
* The configuration for the benchmark
|
|
187
196
|
*/
|
|
188
197
|
benchmark_config: BenchmarkConfig;
|
|
189
198
|
|
|
199
|
+
/**
|
|
200
|
+
* The rows to evaluate
|
|
201
|
+
*/
|
|
190
202
|
input_rows: Array<{ [key: string]: unknown }>;
|
|
191
203
|
|
|
204
|
+
/**
|
|
205
|
+
* The scoring functions to use for the evaluation
|
|
206
|
+
*/
|
|
192
207
|
scoring_functions: Array<string>;
|
|
193
208
|
}
|
|
194
209
|
|
|
195
210
|
export interface EvalEvaluateRowsAlphaParams {
|
|
196
211
|
/**
|
|
197
|
-
*
|
|
212
|
+
* The configuration for the benchmark
|
|
198
213
|
*/
|
|
199
214
|
benchmark_config: BenchmarkConfig;
|
|
200
215
|
|
|
216
|
+
/**
|
|
217
|
+
* The rows to evaluate
|
|
218
|
+
*/
|
|
201
219
|
input_rows: Array<{ [key: string]: unknown }>;
|
|
202
220
|
|
|
221
|
+
/**
|
|
222
|
+
* The scoring functions to use for the evaluation
|
|
223
|
+
*/
|
|
203
224
|
scoring_functions: Array<string>;
|
|
204
225
|
}
|
|
205
226
|
|
|
206
227
|
export interface EvalRunEvalParams {
|
|
207
228
|
/**
|
|
208
|
-
*
|
|
229
|
+
* The configuration for the benchmark
|
|
209
230
|
*/
|
|
210
231
|
benchmark_config: BenchmarkConfig;
|
|
211
232
|
}
|
|
212
233
|
|
|
213
234
|
export interface EvalRunEvalAlphaParams {
|
|
214
235
|
/**
|
|
215
|
-
*
|
|
236
|
+
* The configuration for the benchmark
|
|
216
237
|
*/
|
|
217
238
|
benchmark_config: BenchmarkConfig;
|
|
218
239
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
//
|
|
7
7
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
8
8
|
|
|
9
|
+
export { Admin, type AdminListRoutesParams } from './admin';
|
|
9
10
|
export { Alpha } from './alpha';
|
|
10
11
|
export {
|
|
11
12
|
Benchmarks,
|
|
@@ -28,6 +29,7 @@ export { Inference, type InferenceRerankResponse, type InferenceRerankParams } f
|
|
|
28
29
|
export {
|
|
29
30
|
PostTraining,
|
|
30
31
|
type AlgorithmConfig,
|
|
32
|
+
type ListPostTrainingJobsResponse,
|
|
31
33
|
type PostTrainingJob,
|
|
32
34
|
type PostTrainingPreferenceOptimizeParams,
|
|
33
35
|
type PostTrainingSupervisedFineTuneParams,
|
|
@@ -25,6 +25,9 @@ export class Inference extends APIResource {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* List of rerank result objects, sorted by relevance score (descending).
|
|
30
|
+
*/
|
|
28
31
|
export type InferenceRerankResponse = Array<InferenceRerankResponse.InferenceRerankResponseItem>;
|
|
29
32
|
|
|
30
33
|
export namespace InferenceRerankResponse {
|
|
@@ -32,29 +35,47 @@ export namespace InferenceRerankResponse {
|
|
|
32
35
|
* A single rerank result from a reranking response.
|
|
33
36
|
*/
|
|
34
37
|
export interface InferenceRerankResponseItem {
|
|
38
|
+
/**
|
|
39
|
+
* The original index of the document in the input list.
|
|
40
|
+
*/
|
|
35
41
|
index: number;
|
|
36
42
|
|
|
43
|
+
/**
|
|
44
|
+
* The relevance score from the model output. Higher scores indicate greater
|
|
45
|
+
* relevance.
|
|
46
|
+
*/
|
|
37
47
|
relevance_score: number;
|
|
38
48
|
}
|
|
39
49
|
}
|
|
40
50
|
|
|
41
51
|
export interface InferenceRerankParams {
|
|
52
|
+
/**
|
|
53
|
+
* List of items to rerank. Each item can be a string, text content part, or image
|
|
54
|
+
* content part.
|
|
55
|
+
*/
|
|
42
56
|
items: Array<
|
|
43
57
|
| string
|
|
44
58
|
| InferenceRerankParams.OpenAIChatCompletionContentPartTextParam
|
|
45
59
|
| InferenceRerankParams.OpenAIChatCompletionContentPartImageParam
|
|
46
60
|
>;
|
|
47
61
|
|
|
62
|
+
/**
|
|
63
|
+
* The identifier of the reranking model to use.
|
|
64
|
+
*/
|
|
48
65
|
model: string;
|
|
49
66
|
|
|
50
67
|
/**
|
|
51
|
-
*
|
|
68
|
+
* The search query to rank items against. Can be a string, text content part, or
|
|
69
|
+
* image content part.
|
|
52
70
|
*/
|
|
53
71
|
query:
|
|
54
72
|
| string
|
|
55
73
|
| InferenceRerankParams.OpenAIChatCompletionContentPartTextParam
|
|
56
74
|
| InferenceRerankParams.OpenAIChatCompletionContentPartImageParam;
|
|
57
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Maximum number of results to return. Default: returns all.
|
|
78
|
+
*/
|
|
58
79
|
max_num_results?: number | null;
|
|
59
80
|
}
|
|
60
81
|
|
|
@@ -63,8 +84,14 @@ export namespace InferenceRerankParams {
|
|
|
63
84
|
* Text content part for OpenAI-compatible chat completion messages.
|
|
64
85
|
*/
|
|
65
86
|
export interface OpenAIChatCompletionContentPartTextParam {
|
|
87
|
+
/**
|
|
88
|
+
* The text content of the message.
|
|
89
|
+
*/
|
|
66
90
|
text: string;
|
|
67
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Must be 'text' to identify this as text content.
|
|
94
|
+
*/
|
|
68
95
|
type?: 'text';
|
|
69
96
|
}
|
|
70
97
|
|
|
@@ -73,21 +100,30 @@ export namespace InferenceRerankParams {
|
|
|
73
100
|
*/
|
|
74
101
|
export interface OpenAIChatCompletionContentPartImageParam {
|
|
75
102
|
/**
|
|
76
|
-
* Image URL specification
|
|
103
|
+
* Image URL specification and processing details.
|
|
77
104
|
*/
|
|
78
105
|
image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
|
|
79
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Must be 'image_url' to identify this as image content.
|
|
109
|
+
*/
|
|
80
110
|
type?: 'image_url';
|
|
81
111
|
}
|
|
82
112
|
|
|
83
113
|
export namespace OpenAIChatCompletionContentPartImageParam {
|
|
84
114
|
/**
|
|
85
|
-
* Image URL specification
|
|
115
|
+
* Image URL specification and processing details.
|
|
86
116
|
*/
|
|
87
117
|
export interface ImageURL {
|
|
118
|
+
/**
|
|
119
|
+
* URL of the image to include in the message.
|
|
120
|
+
*/
|
|
88
121
|
url: string;
|
|
89
122
|
|
|
90
|
-
|
|
123
|
+
/**
|
|
124
|
+
* Level of detail for image processing. Can be 'low', 'high', or 'auto'.
|
|
125
|
+
*/
|
|
126
|
+
detail?: 'low' | 'high' | 'auto' | null;
|
|
91
127
|
}
|
|
92
128
|
}
|
|
93
129
|
|
|
@@ -95,8 +131,14 @@ export namespace InferenceRerankParams {
|
|
|
95
131
|
* Text content part for OpenAI-compatible chat completion messages.
|
|
96
132
|
*/
|
|
97
133
|
export interface OpenAIChatCompletionContentPartTextParam {
|
|
134
|
+
/**
|
|
135
|
+
* The text content of the message.
|
|
136
|
+
*/
|
|
98
137
|
text: string;
|
|
99
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Must be 'text' to identify this as text content.
|
|
141
|
+
*/
|
|
100
142
|
type?: 'text';
|
|
101
143
|
}
|
|
102
144
|
|
|
@@ -105,21 +147,30 @@ export namespace InferenceRerankParams {
|
|
|
105
147
|
*/
|
|
106
148
|
export interface OpenAIChatCompletionContentPartImageParam {
|
|
107
149
|
/**
|
|
108
|
-
* Image URL specification
|
|
150
|
+
* Image URL specification and processing details.
|
|
109
151
|
*/
|
|
110
152
|
image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
|
|
111
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Must be 'image_url' to identify this as image content.
|
|
156
|
+
*/
|
|
112
157
|
type?: 'image_url';
|
|
113
158
|
}
|
|
114
159
|
|
|
115
160
|
export namespace OpenAIChatCompletionContentPartImageParam {
|
|
116
161
|
/**
|
|
117
|
-
* Image URL specification
|
|
162
|
+
* Image URL specification and processing details.
|
|
118
163
|
*/
|
|
119
164
|
export interface ImageURL {
|
|
165
|
+
/**
|
|
166
|
+
* URL of the image to include in the message.
|
|
167
|
+
*/
|
|
120
168
|
url: string;
|
|
121
169
|
|
|
122
|
-
|
|
170
|
+
/**
|
|
171
|
+
* Level of detail for image processing. Can be 'low', 'high', or 'auto'.
|
|
172
|
+
*/
|
|
173
|
+
detail?: 'low' | 'high' | 'auto' | null;
|
|
123
174
|
}
|
|
124
175
|
}
|
|
125
176
|
}
|
|
@@ -6,19 +6,11 @@
|
|
|
6
6
|
//
|
|
7
7
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
8
8
|
|
|
9
|
-
export {
|
|
10
|
-
Job,
|
|
11
|
-
type ListPostTrainingJobsResponse,
|
|
12
|
-
type JobListResponse,
|
|
13
|
-
type JobArtifactsResponse,
|
|
14
|
-
type JobStatusResponse,
|
|
15
|
-
type JobArtifactsParams,
|
|
16
|
-
type JobCancelParams,
|
|
17
|
-
type JobStatusParams,
|
|
18
|
-
} from './job';
|
|
9
|
+
export { Job, type JobListResponse, type JobArtifactsResponse, type JobStatusResponse } from './job';
|
|
19
10
|
export {
|
|
20
11
|
PostTraining,
|
|
21
12
|
type AlgorithmConfig,
|
|
13
|
+
type ListPostTrainingJobsResponse,
|
|
22
14
|
type PostTrainingJob,
|
|
23
15
|
type PostTrainingPreferenceOptimizeParams,
|
|
24
16
|
type PostTrainingSupervisedFineTuneParams,
|
|
@@ -23,16 +23,15 @@ export class Job extends APIResource {
|
|
|
23
23
|
/**
|
|
24
24
|
* Get the artifacts of a training job.
|
|
25
25
|
*/
|
|
26
|
-
artifacts(
|
|
27
|
-
return this._client.get('/v1alpha/post-training/job/artifacts',
|
|
26
|
+
artifacts(options?: Core.RequestOptions): Core.APIPromise<JobArtifactsResponse> {
|
|
27
|
+
return this._client.get('/v1alpha/post-training/job/artifacts', options);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Cancel a training job.
|
|
32
32
|
*/
|
|
33
|
-
cancel(
|
|
33
|
+
cancel(options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
34
34
|
return this._client.post('/v1alpha/post-training/job/cancel', {
|
|
35
|
-
body,
|
|
36
35
|
...options,
|
|
37
36
|
headers: { Accept: '*/*', ...options?.headers },
|
|
38
37
|
});
|
|
@@ -41,15 +40,11 @@ export class Job extends APIResource {
|
|
|
41
40
|
/**
|
|
42
41
|
* Get the status of a training job.
|
|
43
42
|
*/
|
|
44
|
-
status(
|
|
45
|
-
return this._client.get('/v1alpha/post-training/job/status',
|
|
43
|
+
status(options?: Core.RequestOptions): Core.APIPromise<JobStatusResponse> {
|
|
44
|
+
return this._client.get('/v1alpha/post-training/job/status', options);
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
export interface ListPostTrainingJobsResponse {
|
|
50
|
-
data: JobListResponse;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
48
|
export type JobListResponse = Array<PostTrainingAPI.PostTrainingJob>;
|
|
54
49
|
|
|
55
50
|
/**
|
|
@@ -157,26 +152,10 @@ export namespace JobStatusResponse {
|
|
|
157
152
|
}
|
|
158
153
|
}
|
|
159
154
|
|
|
160
|
-
export interface JobArtifactsParams {
|
|
161
|
-
job_uuid: string;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export interface JobCancelParams {
|
|
165
|
-
job_uuid: string;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export interface JobStatusParams {
|
|
169
|
-
job_uuid: string;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
155
|
export declare namespace Job {
|
|
173
156
|
export {
|
|
174
|
-
type ListPostTrainingJobsResponse as ListPostTrainingJobsResponse,
|
|
175
157
|
type JobListResponse as JobListResponse,
|
|
176
158
|
type JobArtifactsResponse as JobArtifactsResponse,
|
|
177
159
|
type JobStatusResponse as JobStatusResponse,
|
|
178
|
-
type JobArtifactsParams as JobArtifactsParams,
|
|
179
|
-
type JobCancelParams as JobCancelParams,
|
|
180
|
-
type JobStatusParams as JobStatusParams,
|
|
181
160
|
};
|
|
182
161
|
}
|
|
@@ -9,16 +9,7 @@
|
|
|
9
9
|
import { APIResource } from '../../../resource';
|
|
10
10
|
import * as Core from '../../../core';
|
|
11
11
|
import * as JobAPI from './job';
|
|
12
|
-
import {
|
|
13
|
-
Job,
|
|
14
|
-
JobArtifactsParams,
|
|
15
|
-
JobArtifactsResponse,
|
|
16
|
-
JobCancelParams,
|
|
17
|
-
JobListResponse,
|
|
18
|
-
JobStatusParams,
|
|
19
|
-
JobStatusResponse,
|
|
20
|
-
ListPostTrainingJobsResponse,
|
|
21
|
-
} from './job';
|
|
12
|
+
import { Job, JobArtifactsResponse, JobListResponse, JobStatusResponse } from './job';
|
|
22
13
|
|
|
23
14
|
export class PostTraining extends APIResource {
|
|
24
15
|
job: JobAPI.Job = new JobAPI.Job(this._client);
|
|
@@ -83,33 +74,49 @@ export namespace AlgorithmConfig {
|
|
|
83
74
|
}
|
|
84
75
|
}
|
|
85
76
|
|
|
77
|
+
export interface ListPostTrainingJobsResponse {
|
|
78
|
+
data: JobAPI.JobListResponse;
|
|
79
|
+
}
|
|
80
|
+
|
|
86
81
|
export interface PostTrainingJob {
|
|
87
82
|
job_uuid: string;
|
|
88
83
|
}
|
|
89
84
|
|
|
90
85
|
export interface PostTrainingPreferenceOptimizeParams {
|
|
91
86
|
/**
|
|
92
|
-
*
|
|
87
|
+
* The algorithm configuration.
|
|
93
88
|
*/
|
|
94
89
|
algorithm_config: PostTrainingPreferenceOptimizeParams.AlgorithmConfig;
|
|
95
90
|
|
|
91
|
+
/**
|
|
92
|
+
* The model to fine-tune.
|
|
93
|
+
*/
|
|
96
94
|
finetuned_model: string;
|
|
97
95
|
|
|
96
|
+
/**
|
|
97
|
+
* The hyperparam search configuration.
|
|
98
|
+
*/
|
|
98
99
|
hyperparam_search_config: { [key: string]: unknown };
|
|
99
100
|
|
|
101
|
+
/**
|
|
102
|
+
* The UUID of the job to create.
|
|
103
|
+
*/
|
|
100
104
|
job_uuid: string;
|
|
101
105
|
|
|
106
|
+
/**
|
|
107
|
+
* The logger configuration.
|
|
108
|
+
*/
|
|
102
109
|
logger_config: { [key: string]: unknown };
|
|
103
110
|
|
|
104
111
|
/**
|
|
105
|
-
*
|
|
112
|
+
* The training configuration.
|
|
106
113
|
*/
|
|
107
114
|
training_config: PostTrainingPreferenceOptimizeParams.TrainingConfig;
|
|
108
115
|
}
|
|
109
116
|
|
|
110
117
|
export namespace PostTrainingPreferenceOptimizeParams {
|
|
111
118
|
/**
|
|
112
|
-
*
|
|
119
|
+
* The algorithm configuration.
|
|
113
120
|
*/
|
|
114
121
|
export interface AlgorithmConfig {
|
|
115
122
|
beta: number;
|
|
@@ -118,7 +125,7 @@ export namespace PostTrainingPreferenceOptimizeParams {
|
|
|
118
125
|
}
|
|
119
126
|
|
|
120
127
|
/**
|
|
121
|
-
*
|
|
128
|
+
* The training configuration.
|
|
122
129
|
*/
|
|
123
130
|
export interface TrainingConfig {
|
|
124
131
|
n_epochs: number;
|
|
@@ -202,36 +209,48 @@ export namespace PostTrainingPreferenceOptimizeParams {
|
|
|
202
209
|
}
|
|
203
210
|
|
|
204
211
|
export interface PostTrainingSupervisedFineTuneParams {
|
|
212
|
+
/**
|
|
213
|
+
* The hyperparam search configuration.
|
|
214
|
+
*/
|
|
205
215
|
hyperparam_search_config: { [key: string]: unknown };
|
|
206
216
|
|
|
217
|
+
/**
|
|
218
|
+
* The UUID of the job to create.
|
|
219
|
+
*/
|
|
207
220
|
job_uuid: string;
|
|
208
221
|
|
|
222
|
+
/**
|
|
223
|
+
* The logger configuration.
|
|
224
|
+
*/
|
|
209
225
|
logger_config: { [key: string]: unknown };
|
|
210
226
|
|
|
211
227
|
/**
|
|
212
|
-
*
|
|
228
|
+
* The training configuration.
|
|
213
229
|
*/
|
|
214
230
|
training_config: PostTrainingSupervisedFineTuneParams.TrainingConfig;
|
|
215
231
|
|
|
216
232
|
/**
|
|
217
|
-
*
|
|
233
|
+
* The algorithm configuration.
|
|
218
234
|
*/
|
|
219
235
|
algorithm_config?:
|
|
220
236
|
| PostTrainingSupervisedFineTuneParams.LoraFinetuningConfig
|
|
221
237
|
| PostTrainingSupervisedFineTuneParams.QatFinetuningConfig
|
|
222
238
|
| null;
|
|
223
239
|
|
|
240
|
+
/**
|
|
241
|
+
* The directory to save checkpoint(s) to.
|
|
242
|
+
*/
|
|
224
243
|
checkpoint_dir?: string | null;
|
|
225
244
|
|
|
226
245
|
/**
|
|
227
|
-
* Model descriptor for training if not in provider config
|
|
246
|
+
* Model descriptor for training if not in provider config
|
|
228
247
|
*/
|
|
229
248
|
model?: string | null;
|
|
230
249
|
}
|
|
231
250
|
|
|
232
251
|
export namespace PostTrainingSupervisedFineTuneParams {
|
|
233
252
|
/**
|
|
234
|
-
*
|
|
253
|
+
* The training configuration.
|
|
235
254
|
*/
|
|
236
255
|
export interface TrainingConfig {
|
|
237
256
|
n_epochs: number;
|
|
@@ -351,6 +370,7 @@ PostTraining.Job = Job;
|
|
|
351
370
|
export declare namespace PostTraining {
|
|
352
371
|
export {
|
|
353
372
|
type AlgorithmConfig as AlgorithmConfig,
|
|
373
|
+
type ListPostTrainingJobsResponse as ListPostTrainingJobsResponse,
|
|
354
374
|
type PostTrainingJob as PostTrainingJob,
|
|
355
375
|
type PostTrainingPreferenceOptimizeParams as PostTrainingPreferenceOptimizeParams,
|
|
356
376
|
type PostTrainingSupervisedFineTuneParams as PostTrainingSupervisedFineTuneParams,
|
|
@@ -358,12 +378,8 @@ export declare namespace PostTraining {
|
|
|
358
378
|
|
|
359
379
|
export {
|
|
360
380
|
Job as Job,
|
|
361
|
-
type ListPostTrainingJobsResponse as ListPostTrainingJobsResponse,
|
|
362
381
|
type JobListResponse as JobListResponse,
|
|
363
382
|
type JobArtifactsResponse as JobArtifactsResponse,
|
|
364
383
|
type JobStatusResponse as JobStatusResponse,
|
|
365
|
-
type JobArtifactsParams as JobArtifactsParams,
|
|
366
|
-
type JobCancelParams as JobCancelParams,
|
|
367
|
-
type JobStatusParams as JobStatusParams,
|
|
368
384
|
};
|
|
369
385
|
}
|