llama-stack-client 0.4.0-rc1 → 0.4.0-rc3
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/README.md +33 -22
- package/index.d.mts +12 -6
- package/index.d.ts +12 -6
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +7 -1
- package/resources/alpha/admin.d.ts +41 -0
- package/resources/alpha/admin.d.ts.map +1 -0
- package/resources/alpha/admin.js +46 -0
- package/resources/alpha/admin.js.map +1 -0
- package/resources/alpha/admin.mjs +42 -0
- package/resources/alpha/admin.mjs.map +1 -0
- package/resources/alpha/alpha.d.ts +6 -2
- package/resources/alpha/alpha.d.ts.map +1 -1
- package/resources/alpha/alpha.js +4 -0
- package/resources/alpha/alpha.js.map +1 -1
- package/resources/alpha/alpha.mjs +4 -0
- package/resources/alpha/alpha.mjs.map +1 -1
- package/resources/alpha/benchmarks.d.ts +37 -1
- package/resources/alpha/benchmarks.d.ts.map +1 -1
- package/resources/alpha/index.d.ts +2 -1
- package/resources/alpha/index.d.ts.map +1 -1
- package/resources/alpha/index.js +3 -1
- package/resources/alpha/index.js.map +1 -1
- package/resources/alpha/index.mjs +1 -0
- package/resources/alpha/index.mjs.map +1 -1
- package/resources/alpha/post-training/index.d.ts +2 -2
- package/resources/alpha/post-training/index.d.ts.map +1 -1
- package/resources/alpha/post-training/index.js.map +1 -1
- package/resources/alpha/post-training/index.mjs.map +1 -1
- package/resources/alpha/post-training/job.d.ts +1 -4
- package/resources/alpha/post-training/job.d.ts.map +1 -1
- package/resources/alpha/post-training/post-training.d.ts +6 -3
- package/resources/alpha/post-training/post-training.d.ts.map +1 -1
- package/resources/alpha/post-training/post-training.js.map +1 -1
- package/resources/alpha/post-training/post-training.mjs.map +1 -1
- package/resources/beta/datasets.d.ts +89 -8
- package/resources/beta/datasets.d.ts.map +1 -1
- package/resources/chat/chat.d.ts +2 -2
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/completions.d.ts +6 -6
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/completions.d.ts +2 -2
- package/resources/completions.d.ts.map +1 -1
- package/resources/conversations/conversations.d.ts +32 -4
- package/resources/conversations/conversations.d.ts.map +1 -1
- package/resources/conversations/conversations.js.map +1 -1
- package/resources/conversations/conversations.mjs.map +1 -1
- package/resources/conversations/items.d.ts +124 -12
- package/resources/conversations/items.d.ts.map +1 -1
- package/resources/conversations/items.js.map +1 -1
- package/resources/conversations/items.mjs.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/inspect.d.ts +3 -45
- package/resources/inspect.d.ts.map +1 -1
- package/resources/inspect.js +0 -4
- package/resources/inspect.js.map +1 -1
- package/resources/inspect.mjs +0 -4
- package/resources/inspect.mjs.map +1 -1
- package/resources/providers.d.ts +5 -12
- package/resources/providers.d.ts.map +1 -1
- package/resources/providers.js +0 -4
- package/resources/providers.js.map +1 -1
- package/resources/providers.mjs +0 -4
- package/resources/providers.mjs.map +1 -1
- package/resources/responses/input-items.d.ts +64 -8
- package/resources/responses/input-items.d.ts.map +1 -1
- package/resources/responses/responses.d.ts +479 -31
- 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 -9
- package/resources/routes.d.ts.map +1 -1
- package/resources/routes.js.map +1 -1
- package/resources/routes.mjs.map +1 -1
- package/resources/shared.d.ts +86 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/index.ts +11 -16
- package/src/resources/alpha/admin.ts +84 -0
- package/src/resources/alpha/alpha.ts +8 -0
- package/src/resources/alpha/benchmarks.ts +37 -1
- package/src/resources/alpha/index.ts +2 -0
- package/src/resources/alpha/post-training/index.ts +1 -1
- package/src/resources/alpha/post-training/job.ts +0 -5
- package/src/resources/alpha/post-training/post-training.ts +5 -2
- package/src/resources/beta/datasets.ts +89 -8
- package/src/resources/chat/chat.ts +4 -4
- package/src/resources/chat/completions.ts +12 -12
- package/src/resources/completions.ts +4 -4
- package/src/resources/conversations/conversations.ts +43 -7
- package/src/resources/conversations/items.ts +165 -21
- package/src/resources/index.ts +3 -3
- package/src/resources/inspect.ts +3 -57
- package/src/resources/providers.ts +5 -16
- package/src/resources/responses/input-items.ts +86 -14
- package/src/resources/responses/responses.ts +654 -45
- package/src/resources/routes.ts +10 -14
- package/src/resources/shared.ts +95 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
8
8
|
|
|
9
9
|
import { APIResource } from '../../resource';
|
|
10
|
+
import * as AdminAPI from './admin';
|
|
11
|
+
import { Admin, AdminListRoutesParams } from './admin';
|
|
10
12
|
import * as BenchmarksAPI from './benchmarks';
|
|
11
13
|
import {
|
|
12
14
|
Benchmark,
|
|
@@ -31,6 +33,7 @@ import {
|
|
|
31
33
|
import * as PostTrainingAPI from './post-training/post-training';
|
|
32
34
|
import {
|
|
33
35
|
AlgorithmConfig,
|
|
36
|
+
ListPostTrainingJobsResponse,
|
|
34
37
|
PostTraining,
|
|
35
38
|
PostTrainingJob,
|
|
36
39
|
PostTrainingPreferenceOptimizeParams,
|
|
@@ -42,12 +45,14 @@ export class Alpha extends APIResource {
|
|
|
42
45
|
postTraining: PostTrainingAPI.PostTraining = new PostTrainingAPI.PostTraining(this._client);
|
|
43
46
|
benchmarks: BenchmarksAPI.Benchmarks = new BenchmarksAPI.Benchmarks(this._client);
|
|
44
47
|
eval: EvalAPI.Eval = new EvalAPI.Eval(this._client);
|
|
48
|
+
admin: AdminAPI.Admin = new AdminAPI.Admin(this._client);
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
Alpha.Inference = Inference;
|
|
48
52
|
Alpha.PostTraining = PostTraining;
|
|
49
53
|
Alpha.Benchmarks = Benchmarks;
|
|
50
54
|
Alpha.Eval = Eval;
|
|
55
|
+
Alpha.Admin = Admin;
|
|
51
56
|
|
|
52
57
|
export declare namespace Alpha {
|
|
53
58
|
export {
|
|
@@ -59,6 +64,7 @@ export declare namespace Alpha {
|
|
|
59
64
|
export {
|
|
60
65
|
PostTraining as PostTraining,
|
|
61
66
|
type AlgorithmConfig as AlgorithmConfig,
|
|
67
|
+
type ListPostTrainingJobsResponse as ListPostTrainingJobsResponse,
|
|
62
68
|
type PostTrainingJob as PostTrainingJob,
|
|
63
69
|
type PostTrainingPreferenceOptimizeParams as PostTrainingPreferenceOptimizeParams,
|
|
64
70
|
type PostTrainingSupervisedFineTuneParams as PostTrainingSupervisedFineTuneParams,
|
|
@@ -82,4 +88,6 @@ export declare namespace Alpha {
|
|
|
82
88
|
type EvalRunEvalParams as EvalRunEvalParams,
|
|
83
89
|
type EvalRunEvalAlphaParams as EvalRunEvalAlphaParams,
|
|
84
90
|
};
|
|
91
|
+
|
|
92
|
+
export { Admin as Admin, type AdminListRoutesParams as AdminListRoutesParams };
|
|
85
93
|
}
|
|
@@ -59,6 +59,9 @@ export class Benchmarks extends APIResource {
|
|
|
59
59
|
* A benchmark resource for evaluating model performance.
|
|
60
60
|
*/
|
|
61
61
|
export interface Benchmark {
|
|
62
|
+
/**
|
|
63
|
+
* Identifier of the dataset to use for the benchmark evaluation.
|
|
64
|
+
*/
|
|
62
65
|
dataset_id: string;
|
|
63
66
|
|
|
64
67
|
/**
|
|
@@ -71,10 +74,13 @@ export interface Benchmark {
|
|
|
71
74
|
*/
|
|
72
75
|
provider_id: string;
|
|
73
76
|
|
|
77
|
+
/**
|
|
78
|
+
* List of scoring function identifiers to apply during evaluation.
|
|
79
|
+
*/
|
|
74
80
|
scoring_functions: Array<string>;
|
|
75
81
|
|
|
76
82
|
/**
|
|
77
|
-
* Metadata for this evaluation task
|
|
83
|
+
* Metadata for this evaluation task.
|
|
78
84
|
*/
|
|
79
85
|
metadata?: { [key: string]: unknown };
|
|
80
86
|
|
|
@@ -83,26 +89,56 @@ export interface Benchmark {
|
|
|
83
89
|
*/
|
|
84
90
|
provider_resource_id?: string | null;
|
|
85
91
|
|
|
92
|
+
/**
|
|
93
|
+
* The resource type, always benchmark.
|
|
94
|
+
*/
|
|
86
95
|
type?: 'benchmark';
|
|
87
96
|
}
|
|
88
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Response containing a list of benchmark objects.
|
|
100
|
+
*/
|
|
89
101
|
export interface ListBenchmarksResponse {
|
|
102
|
+
/**
|
|
103
|
+
* List of benchmark objects.
|
|
104
|
+
*/
|
|
90
105
|
data: BenchmarkListResponse;
|
|
91
106
|
}
|
|
92
107
|
|
|
108
|
+
/**
|
|
109
|
+
* List of benchmark objects.
|
|
110
|
+
*/
|
|
93
111
|
export type BenchmarkListResponse = Array<Benchmark>;
|
|
94
112
|
|
|
95
113
|
export interface BenchmarkRegisterParams {
|
|
114
|
+
/**
|
|
115
|
+
* The ID of the benchmark to register.
|
|
116
|
+
*/
|
|
96
117
|
benchmark_id: string;
|
|
97
118
|
|
|
119
|
+
/**
|
|
120
|
+
* The ID of the dataset to use for the benchmark.
|
|
121
|
+
*/
|
|
98
122
|
dataset_id: string;
|
|
99
123
|
|
|
124
|
+
/**
|
|
125
|
+
* The scoring functions to use for the benchmark.
|
|
126
|
+
*/
|
|
100
127
|
scoring_functions: Array<string>;
|
|
101
128
|
|
|
129
|
+
/**
|
|
130
|
+
* The metadata to use for the benchmark.
|
|
131
|
+
*/
|
|
102
132
|
metadata?: { [key: string]: unknown } | null;
|
|
103
133
|
|
|
134
|
+
/**
|
|
135
|
+
* The ID of the provider benchmark to use for the benchmark.
|
|
136
|
+
*/
|
|
104
137
|
provider_benchmark_id?: string | null;
|
|
105
138
|
|
|
139
|
+
/**
|
|
140
|
+
* The ID of the provider to use for the benchmark.
|
|
141
|
+
*/
|
|
106
142
|
provider_id?: string | null;
|
|
107
143
|
}
|
|
108
144
|
|
|
@@ -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,
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
export {
|
|
10
10
|
Job,
|
|
11
|
-
type ListPostTrainingJobsResponse,
|
|
12
11
|
type JobListResponse,
|
|
13
12
|
type JobArtifactsResponse,
|
|
14
13
|
type JobStatusResponse,
|
|
@@ -19,6 +18,7 @@ export {
|
|
|
19
18
|
export {
|
|
20
19
|
PostTraining,
|
|
21
20
|
type AlgorithmConfig,
|
|
21
|
+
type ListPostTrainingJobsResponse,
|
|
22
22
|
type PostTrainingJob,
|
|
23
23
|
type PostTrainingPreferenceOptimizeParams,
|
|
24
24
|
type PostTrainingSupervisedFineTuneParams,
|
|
@@ -46,10 +46,6 @@ export class Job extends APIResource {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export interface ListPostTrainingJobsResponse {
|
|
50
|
-
data: JobListResponse;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
49
|
export type JobListResponse = Array<PostTrainingAPI.PostTrainingJob>;
|
|
54
50
|
|
|
55
51
|
/**
|
|
@@ -171,7 +167,6 @@ export interface JobStatusParams {
|
|
|
171
167
|
|
|
172
168
|
export declare namespace Job {
|
|
173
169
|
export {
|
|
174
|
-
type ListPostTrainingJobsResponse as ListPostTrainingJobsResponse,
|
|
175
170
|
type JobListResponse as JobListResponse,
|
|
176
171
|
type JobArtifactsResponse as JobArtifactsResponse,
|
|
177
172
|
type JobStatusResponse as JobStatusResponse,
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
JobListResponse,
|
|
18
18
|
JobStatusParams,
|
|
19
19
|
JobStatusResponse,
|
|
20
|
-
ListPostTrainingJobsResponse,
|
|
21
20
|
} from './job';
|
|
22
21
|
|
|
23
22
|
export class PostTraining extends APIResource {
|
|
@@ -83,6 +82,10 @@ export namespace AlgorithmConfig {
|
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
|
|
85
|
+
export interface ListPostTrainingJobsResponse {
|
|
86
|
+
data: JobAPI.JobListResponse;
|
|
87
|
+
}
|
|
88
|
+
|
|
86
89
|
export interface PostTrainingJob {
|
|
87
90
|
job_uuid: string;
|
|
88
91
|
}
|
|
@@ -351,6 +354,7 @@ PostTraining.Job = Job;
|
|
|
351
354
|
export declare namespace PostTraining {
|
|
352
355
|
export {
|
|
353
356
|
type AlgorithmConfig as AlgorithmConfig,
|
|
357
|
+
type ListPostTrainingJobsResponse as ListPostTrainingJobsResponse,
|
|
354
358
|
type PostTrainingJob as PostTrainingJob,
|
|
355
359
|
type PostTrainingPreferenceOptimizeParams as PostTrainingPreferenceOptimizeParams,
|
|
356
360
|
type PostTrainingSupervisedFineTuneParams as PostTrainingSupervisedFineTuneParams,
|
|
@@ -358,7 +362,6 @@ export declare namespace PostTraining {
|
|
|
358
362
|
|
|
359
363
|
export {
|
|
360
364
|
Job as Job,
|
|
361
|
-
type ListPostTrainingJobsResponse as ListPostTrainingJobsResponse,
|
|
362
365
|
type JobListResponse as JobListResponse,
|
|
363
366
|
type JobArtifactsResponse as JobArtifactsResponse,
|
|
364
367
|
type JobStatusResponse as JobStatusResponse,
|
|
@@ -101,6 +101,9 @@ export class Datasets extends APIResource {
|
|
|
101
101
|
* Response from listing datasets.
|
|
102
102
|
*/
|
|
103
103
|
export interface ListDatasetsResponse {
|
|
104
|
+
/**
|
|
105
|
+
* List of datasets
|
|
106
|
+
*/
|
|
104
107
|
data: DatasetListResponse;
|
|
105
108
|
}
|
|
106
109
|
|
|
@@ -119,12 +122,12 @@ export interface DatasetRetrieveResponse {
|
|
|
119
122
|
provider_id: string;
|
|
120
123
|
|
|
121
124
|
/**
|
|
122
|
-
* Purpose of the dataset
|
|
125
|
+
* Purpose of the dataset indicating its intended use
|
|
123
126
|
*/
|
|
124
127
|
purpose: 'post-training/messages' | 'eval/question-answer' | 'eval/messages-answer';
|
|
125
128
|
|
|
126
129
|
/**
|
|
127
|
-
*
|
|
130
|
+
* Data source configuration for the dataset
|
|
128
131
|
*/
|
|
129
132
|
source: DatasetRetrieveResponse.UriDataSource | DatasetRetrieveResponse.RowsDataSource;
|
|
130
133
|
|
|
@@ -138,6 +141,9 @@ export interface DatasetRetrieveResponse {
|
|
|
138
141
|
*/
|
|
139
142
|
provider_resource_id?: string | null;
|
|
140
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Type of resource, always 'dataset' for datasets
|
|
146
|
+
*/
|
|
141
147
|
type?: 'dataset';
|
|
142
148
|
}
|
|
143
149
|
|
|
@@ -146,8 +152,16 @@ export namespace DatasetRetrieveResponse {
|
|
|
146
152
|
* A dataset that can be obtained from a URI.
|
|
147
153
|
*/
|
|
148
154
|
export interface UriDataSource {
|
|
155
|
+
/**
|
|
156
|
+
* The dataset can be obtained from a URI. E.g.
|
|
157
|
+
* "https://mywebsite.com/mydata.jsonl", "lsfs://mydata.jsonl",
|
|
158
|
+
* "data:csv;base64,{base64_content}"
|
|
159
|
+
*/
|
|
149
160
|
uri: string;
|
|
150
161
|
|
|
162
|
+
/**
|
|
163
|
+
* The type of data source.
|
|
164
|
+
*/
|
|
151
165
|
type?: 'uri';
|
|
152
166
|
}
|
|
153
167
|
|
|
@@ -155,12 +169,22 @@ export namespace DatasetRetrieveResponse {
|
|
|
155
169
|
* A dataset stored in rows.
|
|
156
170
|
*/
|
|
157
171
|
export interface RowsDataSource {
|
|
172
|
+
/**
|
|
173
|
+
* The dataset is stored in rows. E.g. [{"messages": [{"role": "user", "content":
|
|
174
|
+
* "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]}]
|
|
175
|
+
*/
|
|
158
176
|
rows: Array<{ [key: string]: unknown }>;
|
|
159
177
|
|
|
178
|
+
/**
|
|
179
|
+
* The type of data source.
|
|
180
|
+
*/
|
|
160
181
|
type?: 'rows';
|
|
161
182
|
}
|
|
162
183
|
}
|
|
163
184
|
|
|
185
|
+
/**
|
|
186
|
+
* List of datasets
|
|
187
|
+
*/
|
|
164
188
|
export type DatasetListResponse = Array<DatasetListResponse.DatasetListResponseItem>;
|
|
165
189
|
|
|
166
190
|
export namespace DatasetListResponse {
|
|
@@ -179,12 +203,12 @@ export namespace DatasetListResponse {
|
|
|
179
203
|
provider_id: string;
|
|
180
204
|
|
|
181
205
|
/**
|
|
182
|
-
* Purpose of the dataset
|
|
206
|
+
* Purpose of the dataset indicating its intended use
|
|
183
207
|
*/
|
|
184
208
|
purpose: 'post-training/messages' | 'eval/question-answer' | 'eval/messages-answer';
|
|
185
209
|
|
|
186
210
|
/**
|
|
187
|
-
*
|
|
211
|
+
* Data source configuration for the dataset
|
|
188
212
|
*/
|
|
189
213
|
source: DatasetListResponseItem.UriDataSource | DatasetListResponseItem.RowsDataSource;
|
|
190
214
|
|
|
@@ -198,6 +222,9 @@ export namespace DatasetListResponse {
|
|
|
198
222
|
*/
|
|
199
223
|
provider_resource_id?: string | null;
|
|
200
224
|
|
|
225
|
+
/**
|
|
226
|
+
* Type of resource, always 'dataset' for datasets
|
|
227
|
+
*/
|
|
201
228
|
type?: 'dataset';
|
|
202
229
|
}
|
|
203
230
|
|
|
@@ -206,8 +233,16 @@ export namespace DatasetListResponse {
|
|
|
206
233
|
* A dataset that can be obtained from a URI.
|
|
207
234
|
*/
|
|
208
235
|
export interface UriDataSource {
|
|
236
|
+
/**
|
|
237
|
+
* The dataset can be obtained from a URI. E.g.
|
|
238
|
+
* "https://mywebsite.com/mydata.jsonl", "lsfs://mydata.jsonl",
|
|
239
|
+
* "data:csv;base64,{base64_content}"
|
|
240
|
+
*/
|
|
209
241
|
uri: string;
|
|
210
242
|
|
|
243
|
+
/**
|
|
244
|
+
* The type of data source.
|
|
245
|
+
*/
|
|
211
246
|
type?: 'uri';
|
|
212
247
|
}
|
|
213
248
|
|
|
@@ -215,8 +250,15 @@ export namespace DatasetListResponse {
|
|
|
215
250
|
* A dataset stored in rows.
|
|
216
251
|
*/
|
|
217
252
|
export interface RowsDataSource {
|
|
253
|
+
/**
|
|
254
|
+
* The dataset is stored in rows. E.g. [{"messages": [{"role": "user", "content":
|
|
255
|
+
* "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]}]
|
|
256
|
+
*/
|
|
218
257
|
rows: Array<{ [key: string]: unknown }>;
|
|
219
258
|
|
|
259
|
+
/**
|
|
260
|
+
* The type of data source.
|
|
261
|
+
*/
|
|
220
262
|
type?: 'rows';
|
|
221
263
|
}
|
|
222
264
|
}
|
|
@@ -248,12 +290,12 @@ export interface DatasetRegisterResponse {
|
|
|
248
290
|
provider_id: string;
|
|
249
291
|
|
|
250
292
|
/**
|
|
251
|
-
* Purpose of the dataset
|
|
293
|
+
* Purpose of the dataset indicating its intended use
|
|
252
294
|
*/
|
|
253
295
|
purpose: 'post-training/messages' | 'eval/question-answer' | 'eval/messages-answer';
|
|
254
296
|
|
|
255
297
|
/**
|
|
256
|
-
*
|
|
298
|
+
* Data source configuration for the dataset
|
|
257
299
|
*/
|
|
258
300
|
source: DatasetRegisterResponse.UriDataSource | DatasetRegisterResponse.RowsDataSource;
|
|
259
301
|
|
|
@@ -267,6 +309,9 @@ export interface DatasetRegisterResponse {
|
|
|
267
309
|
*/
|
|
268
310
|
provider_resource_id?: string | null;
|
|
269
311
|
|
|
312
|
+
/**
|
|
313
|
+
* Type of resource, always 'dataset' for datasets
|
|
314
|
+
*/
|
|
270
315
|
type?: 'dataset';
|
|
271
316
|
}
|
|
272
317
|
|
|
@@ -275,8 +320,16 @@ export namespace DatasetRegisterResponse {
|
|
|
275
320
|
* A dataset that can be obtained from a URI.
|
|
276
321
|
*/
|
|
277
322
|
export interface UriDataSource {
|
|
323
|
+
/**
|
|
324
|
+
* The dataset can be obtained from a URI. E.g.
|
|
325
|
+
* "https://mywebsite.com/mydata.jsonl", "lsfs://mydata.jsonl",
|
|
326
|
+
* "data:csv;base64,{base64_content}"
|
|
327
|
+
*/
|
|
278
328
|
uri: string;
|
|
279
329
|
|
|
330
|
+
/**
|
|
331
|
+
* The type of data source.
|
|
332
|
+
*/
|
|
280
333
|
type?: 'uri';
|
|
281
334
|
}
|
|
282
335
|
|
|
@@ -284,8 +337,15 @@ export namespace DatasetRegisterResponse {
|
|
|
284
337
|
* A dataset stored in rows.
|
|
285
338
|
*/
|
|
286
339
|
export interface RowsDataSource {
|
|
340
|
+
/**
|
|
341
|
+
* The dataset is stored in rows. E.g. [{"messages": [{"role": "user", "content":
|
|
342
|
+
* "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]}]
|
|
343
|
+
*/
|
|
287
344
|
rows: Array<{ [key: string]: unknown }>;
|
|
288
345
|
|
|
346
|
+
/**
|
|
347
|
+
* The type of data source.
|
|
348
|
+
*/
|
|
289
349
|
type?: 'rows';
|
|
290
350
|
}
|
|
291
351
|
}
|
|
@@ -302,17 +362,23 @@ export interface DatasetIterrowsParams {
|
|
|
302
362
|
|
|
303
363
|
export interface DatasetRegisterParams {
|
|
304
364
|
/**
|
|
305
|
-
*
|
|
365
|
+
* The purpose of the dataset.
|
|
306
366
|
*/
|
|
307
367
|
purpose: 'post-training/messages' | 'eval/question-answer' | 'eval/messages-answer';
|
|
308
368
|
|
|
309
369
|
/**
|
|
310
|
-
*
|
|
370
|
+
* The data source of the dataset.
|
|
311
371
|
*/
|
|
312
372
|
source: DatasetRegisterParams.UriDataSource | DatasetRegisterParams.RowsDataSource;
|
|
313
373
|
|
|
374
|
+
/**
|
|
375
|
+
* The ID of the dataset. If not provided, an ID will be generated.
|
|
376
|
+
*/
|
|
314
377
|
dataset_id?: string | null;
|
|
315
378
|
|
|
379
|
+
/**
|
|
380
|
+
* The metadata for the dataset.
|
|
381
|
+
*/
|
|
316
382
|
metadata?: { [key: string]: unknown } | null;
|
|
317
383
|
}
|
|
318
384
|
|
|
@@ -321,8 +387,16 @@ export namespace DatasetRegisterParams {
|
|
|
321
387
|
* A dataset that can be obtained from a URI.
|
|
322
388
|
*/
|
|
323
389
|
export interface UriDataSource {
|
|
390
|
+
/**
|
|
391
|
+
* The dataset can be obtained from a URI. E.g.
|
|
392
|
+
* "https://mywebsite.com/mydata.jsonl", "lsfs://mydata.jsonl",
|
|
393
|
+
* "data:csv;base64,{base64_content}"
|
|
394
|
+
*/
|
|
324
395
|
uri: string;
|
|
325
396
|
|
|
397
|
+
/**
|
|
398
|
+
* The type of data source.
|
|
399
|
+
*/
|
|
326
400
|
type?: 'uri';
|
|
327
401
|
}
|
|
328
402
|
|
|
@@ -330,8 +404,15 @@ export namespace DatasetRegisterParams {
|
|
|
330
404
|
* A dataset stored in rows.
|
|
331
405
|
*/
|
|
332
406
|
export interface RowsDataSource {
|
|
407
|
+
/**
|
|
408
|
+
* The dataset is stored in rows. E.g. [{"messages": [{"role": "user", "content":
|
|
409
|
+
* "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]}]
|
|
410
|
+
*/
|
|
333
411
|
rows: Array<{ [key: string]: unknown }>;
|
|
334
412
|
|
|
413
|
+
/**
|
|
414
|
+
* The type of data source.
|
|
415
|
+
*/
|
|
335
416
|
type?: 'rows';
|
|
336
417
|
}
|
|
337
418
|
}
|
|
@@ -132,9 +132,9 @@ export namespace ChatCompletionChunk {
|
|
|
132
132
|
|
|
133
133
|
logprob: number;
|
|
134
134
|
|
|
135
|
-
top_logprobs: Array<Content.TopLogprob>;
|
|
136
|
-
|
|
137
135
|
bytes?: Array<number> | null;
|
|
136
|
+
|
|
137
|
+
top_logprobs?: Array<Content.TopLogprob> | null;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
export namespace Content {
|
|
@@ -166,9 +166,9 @@ export namespace ChatCompletionChunk {
|
|
|
166
166
|
|
|
167
167
|
logprob: number;
|
|
168
168
|
|
|
169
|
-
top_logprobs: Array<Refusal.TopLogprob>;
|
|
170
|
-
|
|
171
169
|
bytes?: Array<number> | null;
|
|
170
|
+
|
|
171
|
+
top_logprobs?: Array<Refusal.TopLogprob> | null;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
export namespace Refusal {
|
|
@@ -326,9 +326,9 @@ export namespace CompletionCreateResponse {
|
|
|
326
326
|
|
|
327
327
|
logprob: number;
|
|
328
328
|
|
|
329
|
-
top_logprobs: Array<Content.TopLogprob>;
|
|
330
|
-
|
|
331
329
|
bytes?: Array<number> | null;
|
|
330
|
+
|
|
331
|
+
top_logprobs?: Array<Content.TopLogprob> | null;
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
export namespace Content {
|
|
@@ -360,9 +360,9 @@ export namespace CompletionCreateResponse {
|
|
|
360
360
|
|
|
361
361
|
logprob: number;
|
|
362
362
|
|
|
363
|
-
top_logprobs: Array<Refusal.TopLogprob>;
|
|
364
|
-
|
|
365
363
|
bytes?: Array<number> | null;
|
|
364
|
+
|
|
365
|
+
top_logprobs?: Array<Refusal.TopLogprob> | null;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
export namespace Refusal {
|
|
@@ -686,9 +686,9 @@ export namespace CompletionRetrieveResponse {
|
|
|
686
686
|
|
|
687
687
|
logprob: number;
|
|
688
688
|
|
|
689
|
-
top_logprobs: Array<Content.TopLogprob>;
|
|
690
|
-
|
|
691
689
|
bytes?: Array<number> | null;
|
|
690
|
+
|
|
691
|
+
top_logprobs?: Array<Content.TopLogprob> | null;
|
|
692
692
|
}
|
|
693
693
|
|
|
694
694
|
export namespace Content {
|
|
@@ -720,9 +720,9 @@ export namespace CompletionRetrieveResponse {
|
|
|
720
720
|
|
|
721
721
|
logprob: number;
|
|
722
722
|
|
|
723
|
-
top_logprobs: Array<Refusal.TopLogprob>;
|
|
724
|
-
|
|
725
723
|
bytes?: Array<number> | null;
|
|
724
|
+
|
|
725
|
+
top_logprobs?: Array<Refusal.TopLogprob> | null;
|
|
726
726
|
}
|
|
727
727
|
|
|
728
728
|
export namespace Refusal {
|
|
@@ -1251,9 +1251,9 @@ export namespace CompletionListResponse {
|
|
|
1251
1251
|
|
|
1252
1252
|
logprob: number;
|
|
1253
1253
|
|
|
1254
|
-
top_logprobs: Array<Content.TopLogprob>;
|
|
1255
|
-
|
|
1256
1254
|
bytes?: Array<number> | null;
|
|
1255
|
+
|
|
1256
|
+
top_logprobs?: Array<Content.TopLogprob> | null;
|
|
1257
1257
|
}
|
|
1258
1258
|
|
|
1259
1259
|
export namespace Content {
|
|
@@ -1285,9 +1285,9 @@ export namespace CompletionListResponse {
|
|
|
1285
1285
|
|
|
1286
1286
|
logprob: number;
|
|
1287
1287
|
|
|
1288
|
-
top_logprobs: Array<Refusal.TopLogprob>;
|
|
1289
|
-
|
|
1290
1288
|
bytes?: Array<number> | null;
|
|
1289
|
+
|
|
1290
|
+
top_logprobs?: Array<Refusal.TopLogprob> | null;
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
1293
|
export namespace Refusal {
|
|
@@ -107,9 +107,9 @@ export namespace CompletionCreateResponse {
|
|
|
107
107
|
|
|
108
108
|
logprob: number;
|
|
109
109
|
|
|
110
|
-
top_logprobs: Array<Content.TopLogprob>;
|
|
111
|
-
|
|
112
110
|
bytes?: Array<number> | null;
|
|
111
|
+
|
|
112
|
+
top_logprobs?: Array<Content.TopLogprob> | null;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
export namespace Content {
|
|
@@ -141,9 +141,9 @@ export namespace CompletionCreateResponse {
|
|
|
141
141
|
|
|
142
142
|
logprob: number;
|
|
143
143
|
|
|
144
|
-
top_logprobs: Array<Refusal.TopLogprob>;
|
|
145
|
-
|
|
146
144
|
bytes?: Array<number> | null;
|
|
145
|
+
|
|
146
|
+
top_logprobs?: Array<Refusal.TopLogprob> | null;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
export namespace Refusal {
|
|
@@ -149,7 +149,7 @@ export namespace ConversationCreateParams {
|
|
|
149
149
|
| OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile
|
|
150
150
|
>
|
|
151
151
|
| Array<
|
|
152
|
-
| OpenAIResponseMessageInput.
|
|
152
|
+
| OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput
|
|
153
153
|
| OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal
|
|
154
154
|
>;
|
|
155
155
|
|
|
@@ -200,20 +200,22 @@ export namespace ConversationCreateParams {
|
|
|
200
200
|
type?: 'input_file';
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
export interface
|
|
203
|
+
export interface OpenAIResponseOutputMessageContentOutputTextInput {
|
|
204
204
|
text: string;
|
|
205
205
|
|
|
206
206
|
annotations?: Array<
|
|
207
|
-
|
|
|
208
|
-
|
|
|
209
|
-
|
|
|
210
|
-
|
|
|
207
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation
|
|
208
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation
|
|
209
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation
|
|
210
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath
|
|
211
211
|
>;
|
|
212
212
|
|
|
213
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
|
|
214
|
+
|
|
213
215
|
type?: 'output_text';
|
|
214
216
|
}
|
|
215
217
|
|
|
216
|
-
export namespace
|
|
218
|
+
export namespace OpenAIResponseOutputMessageContentOutputTextInput {
|
|
217
219
|
/**
|
|
218
220
|
* File citation annotation for referencing specific files in response content.
|
|
219
221
|
*/
|
|
@@ -263,6 +265,40 @@ export namespace ConversationCreateParams {
|
|
|
263
265
|
|
|
264
266
|
type?: 'file_path';
|
|
265
267
|
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
271
|
+
* response.
|
|
272
|
+
*
|
|
273
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
274
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
275
|
+
*/
|
|
276
|
+
export interface Logprob {
|
|
277
|
+
token: string;
|
|
278
|
+
|
|
279
|
+
logprob: number;
|
|
280
|
+
|
|
281
|
+
bytes?: Array<number> | null;
|
|
282
|
+
|
|
283
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export namespace Logprob {
|
|
287
|
+
/**
|
|
288
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
289
|
+
* response.
|
|
290
|
+
*
|
|
291
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
292
|
+
* probability of the token
|
|
293
|
+
*/
|
|
294
|
+
export interface TopLogprob {
|
|
295
|
+
token: string;
|
|
296
|
+
|
|
297
|
+
logprob: number;
|
|
298
|
+
|
|
299
|
+
bytes?: Array<number> | null;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
266
302
|
}
|
|
267
303
|
|
|
268
304
|
/**
|