@@ -128,28 +128,10 @@ export class Datasets extends APIResource {
128128 datasetID : string ,
129129 params : DatasetInsertEntryParams ,
130130 options ?: RequestOptions ,
131- ) : APIPromise < string > {
131+ ) : APIPromise < DatasetInsertEntryResponse > {
132132 const { body } = params ;
133133 return this . _client . post ( path `/datasets/${ datasetID } /insert-entry` , { body : body , ...options } ) ;
134134 }
135-
136- /**
137- * Upload a JSONL file to a dataset.
138- *
139- * Accepts a JSONL (JSON Lines) file where each line is a valid JSON object. Each
140- * entry is stored in S3 and a JSON schema is automatically generated from all
141- * entries using GenSON. The dataset status will be updated to READY.
142- */
143- uploadJSONL (
144- datasetID : string ,
145- body : DatasetUploadJSONLParams ,
146- options ?: RequestOptions ,
147- ) : APIPromise < DatasetUploadJSONLResponse > {
148- return this . _client . post (
149- path `/datasets/${ datasetID } /upload-jsonl` ,
150- multipartFormRequestOptions ( { body, ...options } , this . _client ) ,
151- ) ;
152- }
153135}
154136
155137/**
@@ -207,9 +189,20 @@ export interface DatasetGenerateValidatorsResponse {
207189 validators : Array < string > ;
208190}
209191
210- export type DatasetInsertEntryResponse = string ;
192+ /**
193+ * Response model for inserting an entry into a dataset.
194+ */
195+ export interface DatasetInsertEntryResponse {
196+ /**
197+ * The ID of the inserted entry
198+ */
199+ entry_id : string ;
211200
212- export type DatasetUploadJSONLResponse = { [ key : string ] : unknown } ;
201+ /**
202+ * The storage bytes of the inserted entry
203+ */
204+ storage_bytes : number ;
205+ }
213206
214207export interface DatasetCreateParams {
215208 /**
@@ -288,10 +281,6 @@ export interface DatasetInsertEntryParams {
288281 body : { [ key : string ] : unknown } ;
289282}
290283
291- export interface DatasetUploadJSONLParams {
292- file : Uploadable ;
293- }
294-
295284Datasets . Generations = Generations ;
296285
297286export declare namespace Datasets {
@@ -304,15 +293,13 @@ export declare namespace Datasets {
304293 type DatasetGenerateSchemaResponse as DatasetGenerateSchemaResponse ,
305294 type DatasetGenerateValidatorsResponse as DatasetGenerateValidatorsResponse ,
306295 type DatasetInsertEntryResponse as DatasetInsertEntryResponse ,
307- type DatasetUploadJSONLResponse as DatasetUploadJSONLResponse ,
308296 type DatasetCreateParams as DatasetCreateParams ,
309297 type DatasetUpdateParams as DatasetUpdateParams ,
310298 type DatasetListParams as DatasetListParams ,
311299 type DatasetGenerateDatasetParams as DatasetGenerateDatasetParams ,
312300 type DatasetGenerateSchemaParams as DatasetGenerateSchemaParams ,
313301 type DatasetGenerateValidatorsParams as DatasetGenerateValidatorsParams ,
314302 type DatasetInsertEntryParams as DatasetInsertEntryParams ,
315- type DatasetUploadJSONLParams as DatasetUploadJSONLParams ,
316303 } ;
317304
318305 export {
0 commit comments