Skip to content

Commit 7ca24c5

Browse files
feat(api): manual updates
1 parent a1237a3 commit 7ca24c5

File tree

10 files changed

+64
-134
lines changed

10 files changed

+64
-134
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 18
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lemma%2Flemma-a75cf89a2fe32bce9d7b4b491fd796350e9c7dfdfa59ac5ebd17d0a58ebf1034.yml
3-
openapi_spec_hash: 3015325a0bbffd4fffb26c77c0890542
1+
configured_endpoints: 17
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lemma%2Flemma-584f07ea035720c85ecac56802077189e3ef8e2970d3a7f9ffb75a605df61fef.yml
3+
openapi_spec_hash: 941d7b54bafb4c217116dc8fea329900
44
config_hash: 6c5faee7a7075551800a7dd39e968e1f

api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Types:
66
- <code><a href="./src/resources/datasets.ts">DatasetListResponse</a></code>
77
- <code><a href="./src/resources/datasets.ts">DatasetDeleteResponse</a></code>
88
- <code><a href="./src/resources/datasets.ts">DatasetGenerateDatasetResponse</a></code>
9-
- <code><a href="./src/resources/datasets.ts">DatasetGenerateDownloadURLResponse</a></code>
109
- <code><a href="./src/resources/datasets.ts">DatasetGenerateSchemaResponse</a></code>
1110
- <code><a href="./src/resources/datasets.ts">DatasetGenerateValidatorsResponse</a></code>
1211

@@ -17,7 +16,6 @@ Methods:
1716
- <code title="get /datasets">client.datasets.<a href="./src/resources/datasets.ts">list</a>() -> DatasetListResponse</code>
1817
- <code title="delete /datasets/{dataset_id}">client.datasets.<a href="./src/resources/datasets.ts">delete</a>(datasetID) -> DatasetDeleteResponse</code>
1918
- <code title="post /datasets/generate-dataset">client.datasets.<a href="./src/resources/datasets.ts">generateDataset</a>({ ...params }) -> DatasetGenerateDatasetResponse</code>
20-
- <code title="get /datasets/{dataset_id}/generate-download-url">client.datasets.<a href="./src/resources/datasets.ts">generateDownloadURL</a>(datasetID) -> string</code>
2119
- <code title="post /datasets/generate-schema">client.datasets.<a href="./src/resources/datasets.ts">generateSchema</a>({ ...params }) -> DatasetGenerateSchemaResponse</code>
2220
- <code title="post /datasets/generate-validators">client.datasets.<a href="./src/resources/datasets.ts">generateValidators</a>({ ...params }) -> DatasetGenerateValidatorsResponse</code>
2321

src/client.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
DatasetDeleteResponse,
2323
DatasetGenerateDatasetParams,
2424
DatasetGenerateDatasetResponse,
25-
DatasetGenerateDownloadURLResponse,
2625
DatasetGenerateSchemaParams,
2726
DatasetGenerateSchemaResponse,
2827
DatasetGenerateValidatorsParams,
@@ -775,7 +774,6 @@ export declare namespace Lemma {
775774
type DatasetListResponse as DatasetListResponse,
776775
type DatasetDeleteResponse as DatasetDeleteResponse,
777776
type DatasetGenerateDatasetResponse as DatasetGenerateDatasetResponse,
778-
type DatasetGenerateDownloadURLResponse as DatasetGenerateDownloadURLResponse,
779777
type DatasetGenerateSchemaResponse as DatasetGenerateSchemaResponse,
780778
type DatasetGenerateValidatorsResponse as DatasetGenerateValidatorsResponse,
781779
type DatasetCreateParams as DatasetCreateParams,

src/resources/datasets.ts

Lines changed: 37 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { APIResource } from '../core/resource';
44
import { APIPromise } from '../core/api-promise';
55
import { type Uploadable } from '../core/uploads';
66
import { RequestOptions } from '../internal/request-options';
7-
import { multipartFormRequestOptions } from '../internal/uploads';
87
import { path } from '../internal/utils/path';
98

109
export class Datasets extends APIResource {
@@ -13,11 +12,6 @@ export class Datasets extends APIResource {
1312
*
1413
* Creates a new dataset with the specified name and optional description. The
1514
* dataset will be associated with the current user's tenant.
16-
*
17-
* Args: name: The name of the dataset description: Optional description of the
18-
* dataset
19-
*
20-
* Returns: Dataset: The created dataset object with generated ID and metadata
2115
*/
2216
create(body: DatasetCreateParams, options?: RequestOptions): APIPromise<Dataset> {
2317
return this._client.post('/datasets', { body, ...options });
@@ -28,10 +22,6 @@ export class Datasets extends APIResource {
2822
*
2923
* Retrieves a specific dataset by its ID. The dataset must belong to the current
3024
* user's tenant.
31-
*
32-
* Args: dataset_id: The unique identifier of the dataset
33-
*
34-
* Returns: Dataset: The dataset object with all its metadata
3525
*/
3626
retrieve(datasetID: string, options?: RequestOptions): APIPromise<Dataset> {
3727
return this._client.get(path`/datasets/${datasetID}`, options);
@@ -42,8 +32,6 @@ export class Datasets extends APIResource {
4232
*
4333
* Retrieves all datasets that belong to the current user's tenant. This includes
4434
* datasets created by any user within the same tenant.
45-
*
46-
* Returns: list[Dataset]: A list of all accessible datasets
4735
*/
4836
list(options?: RequestOptions): APIPromise<DatasetListResponse> {
4937
return this._client.get('/datasets', options);
@@ -54,10 +42,6 @@ export class Datasets extends APIResource {
5442
*
5543
* Permanently deletes a dataset and all its associated data. This action cannot be
5644
* undone. The dataset must belong to the current user's tenant.
57-
*
58-
* Args: dataset_id: The unique identifier of the dataset to delete
59-
*
60-
* Returns: bool: True if the dataset was successfully deleted
6145
*/
6246
delete(datasetID: string, options?: RequestOptions): APIPromise<DatasetDeleteResponse> {
6347
return this._client.delete(path`/datasets/${datasetID}`, options);
@@ -69,13 +53,6 @@ export class Datasets extends APIResource {
6953
* Initiates the generation of a dataset based on the provided schema and
7054
* validators. The generation process runs asynchronously and will create the
7155
* specified number of entries.
72-
*
73-
* Args: dataset_id: The ID of the dataset to generate data for schema: The JSON
74-
* schema defining the data structure validators: Optional CEL validators for data
75-
* validation entries_required: Number of data entries to generate
76-
* data_description: Optional description of the data to generate
77-
*
78-
* Returns: bool: True if the generation process was successfully initiated
7956
*/
8057
generateDataset(
8158
body: DatasetGenerateDatasetParams,
@@ -84,43 +61,19 @@ export class Datasets extends APIResource {
8461
return this._client.post('/datasets/generate-dataset', { body, ...options });
8562
}
8663

87-
/**
88-
* Generate a download URL for a dataset.
89-
*
90-
* Creates a secure, time-limited download URL that allows downloading the dataset
91-
* data. The URL can be used to access the dataset file without requiring
92-
* authentication.
93-
*
94-
* Args: dataset_id: The unique identifier of the dataset
95-
*
96-
* Returns: str: A secure download URL for the dataset
97-
*/
98-
generateDownloadURL(datasetID: string, options?: RequestOptions): APIPromise<string> {
99-
return this._client.get(path`/datasets/${datasetID}/generate-download-url`, options);
100-
}
101-
10264
/**
10365
* Generate a JSON schema from seed data.
10466
*
10567
* Uses AI to analyze provided seed data (either a PDF file or description) and
10668
* generate a JSON schema that can be used for dataset generation. The schema
107-
* represents the structure of a single record in the dataset.
108-
*
109-
* Args: seed_file: Optional PDF file containing example data seed_description:
110-
* Optional text description of the data structure
111-
*
112-
* Returns: SchemaGenerationResponse: Contains the generated JSON schema
113-
*
114-
* Note: Either seed_file or seed_description must be provided.
69+
* represents the structure of a single record in the dataset. Either seed_file or
70+
* seed_description must be provided.
11571
*/
11672
generateSchema(
117-
body: DatasetGenerateSchemaParams | null | undefined = {},
73+
body: DatasetGenerateSchemaParams,
11874
options?: RequestOptions,
11975
): APIPromise<DatasetGenerateSchemaResponse> {
120-
return this._client.post(
121-
'/datasets/generate-schema',
122-
multipartFormRequestOptions({ body, ...options }, this._client),
123-
);
76+
return this._client.post('/datasets/generate-schema', { body, ...options });
12477
}
12578

12679
/**
@@ -129,11 +82,6 @@ export class Datasets extends APIResource {
12982
* Uses AI to analyze a JSON schema and generate Common Expression Language (CEL)
13083
* validation rules that ensure data integrity and business logic constraints for
13184
* the dataset.
132-
*
133-
* Args: schema: The JSON schema to generate validators for seed_description:
134-
* Optional context about the data domain
135-
*
136-
* Returns: ValidatorsGenerationResponse: Contains the generated CEL validators
13785
*/
13886
generateValidators(
13987
body: DatasetGenerateValidatorsParams,
@@ -182,8 +130,6 @@ export type DatasetDeleteResponse = boolean;
182130

183131
export type DatasetGenerateDatasetResponse = boolean;
184132

185-
export type DatasetGenerateDownloadURLResponse = string;
186-
187133
/**
188134
* Response model for schema generation.
189135
*/
@@ -199,32 +145,65 @@ export interface DatasetGenerateValidatorsResponse {
199145
}
200146

201147
export interface DatasetCreateParams {
148+
/**
149+
* The name of the dataset
150+
*/
202151
name: string;
203152

153+
/**
154+
* Optional description of the dataset
155+
*/
204156
description?: string | null;
205157
}
206158

207159
export interface DatasetGenerateDatasetParams {
160+
/**
161+
* The ID of the dataset to generate data for
162+
*/
208163
dataset_id: string;
209164

165+
/**
166+
* Number of data entries to generate
167+
*/
210168
entries_required: number;
211169

170+
/**
171+
* The JSON schema defining the data structure
172+
*/
212173
schema: { [key: string]: unknown };
213174

175+
/**
176+
* Optional description of the data to generate
177+
*/
214178
data_description?: string | null;
215179

180+
/**
181+
* Optional CEL validators for data validation
182+
*/
216183
validators?: string | null;
217184
}
218185

219186
export interface DatasetGenerateSchemaParams {
187+
/**
188+
* The seed description to generate a schema from
189+
*/
220190
seed_description?: string | null;
221191

192+
/**
193+
* The seed file to generate a schema from
194+
*/
222195
seed_file?: Uploadable | null;
223196
}
224197

225198
export interface DatasetGenerateValidatorsParams {
199+
/**
200+
* The JSON schema to generate validators for
201+
*/
226202
schema: string;
227203

204+
/**
205+
* Optional context about the data domain
206+
*/
228207
seed_description?: string | null;
229208
}
230209

@@ -234,7 +213,6 @@ export declare namespace Datasets {
234213
type DatasetListResponse as DatasetListResponse,
235214
type DatasetDeleteResponse as DatasetDeleteResponse,
236215
type DatasetGenerateDatasetResponse as DatasetGenerateDatasetResponse,
237-
type DatasetGenerateDownloadURLResponse as DatasetGenerateDownloadURLResponse,
238216
type DatasetGenerateSchemaResponse as DatasetGenerateSchemaResponse,
239217
type DatasetGenerateValidatorsResponse as DatasetGenerateValidatorsResponse,
240218
type DatasetCreateParams as DatasetCreateParams,

src/resources/evaluators.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ export class Evaluators extends APIResource {
1111
*
1212
* Retrieves detailed information about a specific evaluator. The evaluator must
1313
* belong to the current user's tenant.
14-
*
15-
* Args: evaluator_id: The unique identifier of the evaluator
16-
*
17-
* Returns: Evaluator: The evaluator object with all its configuration
1814
*/
1915
retrieve(evaluatorID: string, options?: RequestOptions): APIPromise<Evaluator> {
2016
return this._client.get(path`/evaluators/${evaluatorID}`, options);
@@ -25,11 +21,6 @@ export class Evaluators extends APIResource {
2521
*
2622
* Updates the configuration and settings of an existing evaluator. The evaluator
2723
* must belong to the current user's tenant.
28-
*
29-
* Args: evaluator_id: The unique identifier of the evaluator to update evaluator:
30-
* The updated evaluator configuration
31-
*
32-
* Returns: Evaluator: The updated evaluator object
3324
*/
3425
update(evaluatorID: string, body: EvaluatorUpdateParams, options?: RequestOptions): APIPromise<Evaluator> {
3526
return this._client.put(path`/evaluators/${evaluatorID}`, { body, ...options });
@@ -40,8 +31,6 @@ export class Evaluators extends APIResource {
4031
*
4132
* Retrieves all evaluators that belong to the current user's tenant. Evaluators
4233
* are used to assess the quality of AI model outputs.
43-
*
44-
* Returns: list[Evaluator]: A list of all accessible evaluators
4534
*/
4635
list(options?: RequestOptions): APIPromise<EvaluatorListResponse> {
4736
return this._client.get('/evaluators', options);
@@ -52,10 +41,6 @@ export class Evaluators extends APIResource {
5241
*
5342
* Creates a new rubric that defines how to evaluate AI model outputs. Rubrics
5443
* provide structured criteria for assessment.
55-
*
56-
* Args: rubric: The rubric object containing evaluation criteria
57-
*
58-
* Returns: Rubric: The created rubric with generated ID and metadata
5944
*/
6045
createRubric(
6146
body: EvaluatorCreateRubricParams,

src/resources/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export {
66
type DatasetListResponse,
77
type DatasetDeleteResponse,
88
type DatasetGenerateDatasetResponse,
9-
type DatasetGenerateDownloadURLResponse,
109
type DatasetGenerateSchemaResponse,
1110
type DatasetGenerateValidatorsResponse,
1211
type DatasetCreateParams,

src/resources/logs.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ export class Logs extends APIResource {
1010
*
1111
* Creates a new log entry to track events, activities, or API usage. Logs are
1212
* associated with the current tenant.
13-
*
14-
* Args: log_data: The log entry data including message, level, and metadata
15-
*
16-
* Returns: Log: The created log entry with generated ID and timestamp
1713
*/
1814
create(body: LogCreateParams, options?: RequestOptions): APIPromise<Log> {
1915
return this._client.post('/logs/', { body, ...options });
@@ -24,11 +20,6 @@ export class Logs extends APIResource {
2420
*
2521
* Retrieves log entries for the current tenant with cursor-based pagination. Logs
2622
* provide visibility into system activities and API usage.
27-
*
28-
* Args: limit: Maximum number of logs to return (1-100) cursor: Pagination cursor
29-
* for retrieving the next page
30-
*
31-
* Returns: list[Log]: A list of log entries with metadata
3223
*/
3324
list(query: LogListParams | null | undefined = {}, options?: RequestOptions): APIPromise<LogListResponse> {
3425
return this._client.get('/logs/', { query, ...options });

src/resources/playground.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ export class Playground extends APIResource {
1616
export type PlaygroundRunResponse = unknown;
1717

1818
export interface PlaygroundRunParams {
19+
/**
20+
* The ID of the prompt to run
21+
*/
1922
prompt_id: string;
2023

24+
/**
25+
* Optional ID of the evaluator to use
26+
*/
2127
evaluator_id?: string | null;
2228
}
2329

0 commit comments

Comments
 (0)