langsmith 0.7.12 → 0.7.14
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/dist/_openapi_client/client.cjs +9 -1
- package/dist/_openapi_client/client.d.ts +5 -2
- package/dist/_openapi_client/client.js +9 -1
- package/dist/_openapi_client/resources/datasets/datasets.cjs +5 -14
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +6 -10
- package/dist/_openapi_client/resources/datasets/datasets.js +5 -14
- package/dist/_openapi_client/resources/datasets/experiment-runs.cjs +18 -0
- package/dist/_openapi_client/resources/datasets/experiment-runs.d.ts +109 -0
- package/dist/_openapi_client/resources/datasets/experiment-runs.js +14 -0
- package/dist/_openapi_client/resources/datasets/runs.cjs +0 -7
- package/dist/_openapi_client/resources/datasets/runs.d.ts +1 -45
- package/dist/_openapi_client/resources/datasets/runs.js +0 -7
- package/dist/_openapi_client/resources/index.cjs +4 -2
- package/dist/_openapi_client/resources/index.d.ts +2 -1
- package/dist/_openapi_client/resources/index.js +2 -1
- package/dist/_openapi_client/resources/runs/runs.d.ts +1 -1
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +86 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +465 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.js +82 -0
- package/dist/_openapi_client/resources/sandboxes/registries.cjs +44 -0
- package/dist/_openapi_client/resources/sandboxes/registries.d.ts +67 -0
- package/dist/_openapi_client/resources/sandboxes/registries.js +40 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +72 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +309 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +35 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +39 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +62 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +35 -0
- package/dist/_openapi_client/resources/sessions.cjs +53 -0
- package/dist/_openapi_client/resources/{sessions/sessions.d.ts → sessions.d.ts} +13 -51
- package/dist/_openapi_client/resources/sessions.js +49 -0
- package/dist/client.cjs +44 -0
- package/dist/client.d.ts +31 -0
- package/dist/client.js +44 -0
- package/dist/experimental/anthropic/context.cjs +5 -1
- package/dist/experimental/anthropic/context.js +5 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/client.cjs +58 -15
- package/dist/sandbox/client.d.ts +27 -1
- package/dist/sandbox/client.js +54 -11
- package/dist/sandbox/sandbox.cjs +7 -6
- package/dist/sandbox/sandbox.d.ts +7 -2
- package/dist/sandbox/sandbox.js +8 -7
- package/dist/sandbox/types.d.ts +1 -7
- package/package.json +1 -1
- package/dist/_openapi_client/resources/datasets/experiments.cjs +0 -16
- package/dist/_openapi_client/resources/datasets/experiments.d.ts +0 -23
- package/dist/_openapi_client/resources/datasets/experiments.js +0 -12
- package/dist/_openapi_client/resources/datasets/group.cjs +0 -17
- package/dist/_openapi_client/resources/datasets/group.d.ts +0 -160
- package/dist/_openapi_client/resources/datasets/group.js +0 -13
- package/dist/_openapi_client/resources/sessions/insights.cjs +0 -54
- package/dist/_openapi_client/resources/sessions/insights.d.ts +0 -246
- package/dist/_openapi_client/resources/sessions/insights.js +0 -50
- package/dist/_openapi_client/resources/sessions/sessions.cjs +0 -109
- package/dist/_openapi_client/resources/sessions/sessions.js +0 -72
|
@@ -64,9 +64,10 @@ const API = __importStar(require("./resources/index.cjs"));
|
|
|
64
64
|
const api_promise_js_1 = require("./core/api-promise.cjs");
|
|
65
65
|
const info_js_1 = require("./resources/info.cjs");
|
|
66
66
|
const online_evaluators_js_1 = require("./resources/online-evaluators.cjs");
|
|
67
|
+
const sessions_js_1 = require("./resources/sessions.cjs");
|
|
67
68
|
const datasets_js_1 = require("./resources/datasets/datasets.cjs");
|
|
68
69
|
const runs_js_1 = require("./resources/runs/runs.cjs");
|
|
69
|
-
const
|
|
70
|
+
const sandboxes_js_1 = require("./resources/sandboxes/sandboxes.cjs");
|
|
70
71
|
const headers_js_1 = require("./internal/headers.cjs");
|
|
71
72
|
const env_js_1 = require("./internal/utils/env.cjs");
|
|
72
73
|
const log_js_1 = require("./internal/utils/log.cjs");
|
|
@@ -187,6 +188,12 @@ class Langsmith {
|
|
|
187
188
|
writable: true,
|
|
188
189
|
value: new API.Info(this)
|
|
189
190
|
});
|
|
191
|
+
Object.defineProperty(this, "sandboxes", {
|
|
192
|
+
enumerable: true,
|
|
193
|
+
configurable: true,
|
|
194
|
+
writable: true,
|
|
195
|
+
value: new API.Sandboxes(this)
|
|
196
|
+
});
|
|
190
197
|
const options = {
|
|
191
198
|
apiKey,
|
|
192
199
|
tenantID,
|
|
@@ -732,3 +739,4 @@ Langsmith.Datasets = datasets_js_1.Datasets;
|
|
|
732
739
|
Langsmith.Runs = runs_js_1.Runs;
|
|
733
740
|
Langsmith.OnlineEvaluators = online_evaluators_js_1.OnlineEvaluators;
|
|
734
741
|
Langsmith.Info = info_js_1.Info;
|
|
742
|
+
Langsmith.Sandboxes = sandboxes_js_1.Sandboxes;
|
|
@@ -10,9 +10,10 @@ import * as API from './resources/index.js';
|
|
|
10
10
|
import { APIPromise } from './core/api-promise.js';
|
|
11
11
|
import { Info, InfoListResponse } from './resources/info.js';
|
|
12
12
|
import { BulkDeleteEvaluatorFailedItem, BulkDeleteEvaluatorsResponse, CreateOnlineCodeEvaluatorRequest, CreateOnlineEvaluatorRequest, CreateOnlineEvaluatorResponse, CreateOnlineLlmEvaluatorRequest, GetOnlineEvaluatorSpendResponse, OnlineCodeEvaluator, OnlineEvaluator, OnlineEvaluatorBulkDeleteParams, OnlineEvaluatorCreateParams, OnlineEvaluatorDeleteParams, OnlineEvaluatorListParams, OnlineEvaluatorRunRule, OnlineEvaluatorSpendDay, OnlineEvaluatorSpendGroup, OnlineEvaluatorSpendParams, OnlineEvaluatorType, OnlineEvaluatorUpdateParams, OnlineEvaluators, OnlineEvaluatorsOffsetPaginationOnlineEvaluators, OnlineLlmEvaluator, OnlineSpendLimit, UpdateOnlineCodeEvaluatorRequest, UpdateOnlineEvaluatorRequest, UpdateOnlineEvaluatorResponse, UpdateOnlineLlmEvaluatorRequest } from './resources/online-evaluators.js';
|
|
13
|
+
import { CustomChartsSection, CustomChartsSectionRequest, RunStatsGroupBy, SessionCreateParams, SessionDeleteResponse, SessionListParams, SessionRetrieveParams, SessionSortableColumns, SessionUpdateParams, Sessions, TimedeltaInput, TracerSession, TracerSessionWithoutVirtualFields, TracerSessionsOffsetPaginationTopLevelArray } from './resources/sessions.js';
|
|
13
14
|
import { DataType, Dataset, DatasetCloneParams, DatasetCloneResponse, DatasetCreateParams, DatasetDeleteResponse, DatasetListParams, DatasetRetrieveCsvParams, DatasetRetrieveCsvResponse, DatasetRetrieveJSONLParams, DatasetRetrieveJSONLResponse, DatasetRetrieveOpenAIFtParams, DatasetRetrieveOpenAIFtResponse, DatasetRetrieveOpenAIParams, DatasetRetrieveOpenAIResponse, DatasetRetrieveVersionParams, DatasetTransformation, DatasetUpdateParams, DatasetUpdateResponse, DatasetUpdateTagsParams, DatasetUploadParams, DatasetVersion, Datasets, DatasetsOffsetPaginationTopLevelArray, FeedbackCreateCoreSchema, Missing, SortByDatasetColumn } from './resources/datasets/datasets.js';
|
|
14
15
|
import { QueryRunResponse, QueryRunResponsesItemsCursorPostPagination, ResponseBodyForRunsGenerateQuery, Run, RunQueryParams, RunQueryV2Params, RunRetrieveParams, RunRetrieveV2Params, RunSchema, RunStatsQueryParams, RunTypeEnum, Runs, RunsFilterDataSourceTypeEnum } from './resources/runs/runs.js';
|
|
15
|
-
import {
|
|
16
|
+
import { SandboxListResponse, SandboxResponse, SandboxStatusResponse, Sandboxes, ServiceURLResponse, SnapshotListResponse, SnapshotResponse } from './resources/sandboxes/sandboxes.js';
|
|
16
17
|
import { type Fetch } from './internal/builtin-types.js';
|
|
17
18
|
import { HeadersLike, NullableHeaders } from './internal/headers.js';
|
|
18
19
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options.js';
|
|
@@ -190,6 +191,7 @@ export declare class Langsmith {
|
|
|
190
191
|
runs: API.Runs;
|
|
191
192
|
onlineEvaluators: API.OnlineEvaluators;
|
|
192
193
|
info: API.Info;
|
|
194
|
+
sandboxes: API.Sandboxes;
|
|
193
195
|
}
|
|
194
196
|
export declare namespace Langsmith {
|
|
195
197
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -209,9 +211,10 @@ export declare namespace Langsmith {
|
|
|
209
211
|
export { type ItemsCursorPostPaginationParams as ItemsCursorPostPaginationParams, type ItemsCursorPostPaginationResponse as ItemsCursorPostPaginationResponse, };
|
|
210
212
|
export import ItemsCursorGetPagination = Pagination.ItemsCursorGetPagination;
|
|
211
213
|
export { type ItemsCursorGetPaginationParams as ItemsCursorGetPaginationParams, type ItemsCursorGetPaginationResponse as ItemsCursorGetPaginationResponse, };
|
|
212
|
-
export { Sessions as Sessions, type CustomChartsSection as CustomChartsSection, type CustomChartsSectionRequest as CustomChartsSectionRequest, type RunStatsGroupBy as RunStatsGroupBy, type SessionSortableColumns as SessionSortableColumns, type TimedeltaInput as TimedeltaInput, type TracerSession as TracerSession, type TracerSessionWithoutVirtualFields as TracerSessionWithoutVirtualFields, type SessionDeleteResponse as SessionDeleteResponse, type TracerSessionsOffsetPaginationTopLevelArray as TracerSessionsOffsetPaginationTopLevelArray, type SessionCreateParams as SessionCreateParams, type SessionRetrieveParams as SessionRetrieveParams, type SessionUpdateParams as SessionUpdateParams, type SessionListParams as SessionListParams,
|
|
214
|
+
export { Sessions as Sessions, type CustomChartsSection as CustomChartsSection, type CustomChartsSectionRequest as CustomChartsSectionRequest, type RunStatsGroupBy as RunStatsGroupBy, type SessionSortableColumns as SessionSortableColumns, type TimedeltaInput as TimedeltaInput, type TracerSession as TracerSession, type TracerSessionWithoutVirtualFields as TracerSessionWithoutVirtualFields, type SessionDeleteResponse as SessionDeleteResponse, type TracerSessionsOffsetPaginationTopLevelArray as TracerSessionsOffsetPaginationTopLevelArray, type SessionCreateParams as SessionCreateParams, type SessionRetrieveParams as SessionRetrieveParams, type SessionUpdateParams as SessionUpdateParams, type SessionListParams as SessionListParams, };
|
|
213
215
|
export { Datasets as Datasets, type DataType as DataType, type Dataset as Dataset, type DatasetTransformation as DatasetTransformation, type DatasetVersion as DatasetVersion, type FeedbackCreateCoreSchema as FeedbackCreateCoreSchema, type Missing as Missing, type SortByDatasetColumn as SortByDatasetColumn, type DatasetUpdateResponse as DatasetUpdateResponse, type DatasetDeleteResponse as DatasetDeleteResponse, type DatasetCloneResponse as DatasetCloneResponse, type DatasetRetrieveCsvResponse as DatasetRetrieveCsvResponse, type DatasetRetrieveJSONLResponse as DatasetRetrieveJSONLResponse, type DatasetRetrieveOpenAIResponse as DatasetRetrieveOpenAIResponse, type DatasetRetrieveOpenAIFtResponse as DatasetRetrieveOpenAIFtResponse, type DatasetsOffsetPaginationTopLevelArray as DatasetsOffsetPaginationTopLevelArray, type DatasetCreateParams as DatasetCreateParams, type DatasetUpdateParams as DatasetUpdateParams, type DatasetListParams as DatasetListParams, type DatasetCloneParams as DatasetCloneParams, type DatasetRetrieveCsvParams as DatasetRetrieveCsvParams, type DatasetRetrieveJSONLParams as DatasetRetrieveJSONLParams, type DatasetRetrieveOpenAIParams as DatasetRetrieveOpenAIParams, type DatasetRetrieveOpenAIFtParams as DatasetRetrieveOpenAIFtParams, type DatasetRetrieveVersionParams as DatasetRetrieveVersionParams, type DatasetUpdateTagsParams as DatasetUpdateTagsParams, type DatasetUploadParams as DatasetUploadParams, };
|
|
214
216
|
export { Runs as Runs, type QueryRunResponse as QueryRunResponse, type ResponseBodyForRunsGenerateQuery as ResponseBodyForRunsGenerateQuery, type Run as Run, type RunSchema as RunSchema, type RunStatsQueryParams as RunStatsQueryParams, type RunTypeEnum as RunTypeEnum, type RunsFilterDataSourceTypeEnum as RunsFilterDataSourceTypeEnum, type QueryRunResponsesItemsCursorPostPagination as QueryRunResponsesItemsCursorPostPagination, type RunQueryV2Params as RunQueryV2Params, type RunRetrieveV2Params as RunRetrieveV2Params, type RunRetrieveParams as RunRetrieveParams, type RunQueryParams as RunQueryParams, };
|
|
215
217
|
export { OnlineEvaluators as OnlineEvaluators, type BulkDeleteEvaluatorFailedItem as BulkDeleteEvaluatorFailedItem, type BulkDeleteEvaluatorsResponse as BulkDeleteEvaluatorsResponse, type CreateOnlineCodeEvaluatorRequest as CreateOnlineCodeEvaluatorRequest, type CreateOnlineEvaluatorRequest as CreateOnlineEvaluatorRequest, type CreateOnlineEvaluatorResponse as CreateOnlineEvaluatorResponse, type CreateOnlineLlmEvaluatorRequest as CreateOnlineLlmEvaluatorRequest, type GetOnlineEvaluatorSpendResponse as GetOnlineEvaluatorSpendResponse, type OnlineCodeEvaluator as OnlineCodeEvaluator, type OnlineEvaluator as OnlineEvaluator, type OnlineEvaluatorRunRule as OnlineEvaluatorRunRule, type OnlineEvaluatorSpendDay as OnlineEvaluatorSpendDay, type OnlineEvaluatorSpendGroup as OnlineEvaluatorSpendGroup, type OnlineEvaluatorType as OnlineEvaluatorType, type OnlineLlmEvaluator as OnlineLlmEvaluator, type OnlineSpendLimit as OnlineSpendLimit, type UpdateOnlineCodeEvaluatorRequest as UpdateOnlineCodeEvaluatorRequest, type UpdateOnlineEvaluatorRequest as UpdateOnlineEvaluatorRequest, type UpdateOnlineEvaluatorResponse as UpdateOnlineEvaluatorResponse, type UpdateOnlineLlmEvaluatorRequest as UpdateOnlineLlmEvaluatorRequest, type OnlineEvaluatorsOffsetPaginationOnlineEvaluators as OnlineEvaluatorsOffsetPaginationOnlineEvaluators, type OnlineEvaluatorCreateParams as OnlineEvaluatorCreateParams, type OnlineEvaluatorUpdateParams as OnlineEvaluatorUpdateParams, type OnlineEvaluatorListParams as OnlineEvaluatorListParams, type OnlineEvaluatorDeleteParams as OnlineEvaluatorDeleteParams, type OnlineEvaluatorBulkDeleteParams as OnlineEvaluatorBulkDeleteParams, type OnlineEvaluatorSpendParams as OnlineEvaluatorSpendParams, };
|
|
216
218
|
export { Info as Info, type InfoListResponse as InfoListResponse };
|
|
219
|
+
export { Sandboxes as Sandboxes, type SandboxListResponse as SandboxListResponse, type SandboxResponse as SandboxResponse, type SandboxStatusResponse as SandboxStatusResponse, type ServiceURLResponse as ServiceURLResponse, type SnapshotListResponse as SnapshotListResponse, type SnapshotResponse as SnapshotResponse, };
|
|
217
220
|
}
|
|
@@ -28,9 +28,10 @@ import * as API from './resources/index.js';
|
|
|
28
28
|
import { APIPromise } from './core/api-promise.js';
|
|
29
29
|
import { Info } from './resources/info.js';
|
|
30
30
|
import { OnlineEvaluators, } from './resources/online-evaluators.js';
|
|
31
|
+
import { Sessions, } from './resources/sessions.js';
|
|
31
32
|
import { Datasets, } from './resources/datasets/datasets.js';
|
|
32
33
|
import { Runs, } from './resources/runs/runs.js';
|
|
33
|
-
import {
|
|
34
|
+
import { Sandboxes, } from './resources/sandboxes/sandboxes.js';
|
|
34
35
|
import { buildHeaders } from './internal/headers.js';
|
|
35
36
|
import { readEnv } from './internal/utils/env.js';
|
|
36
37
|
import { formatRequestDetails, loggerFor, parseLogLevel, } from './internal/utils/log.js';
|
|
@@ -151,6 +152,12 @@ export class Langsmith {
|
|
|
151
152
|
writable: true,
|
|
152
153
|
value: new API.Info(this)
|
|
153
154
|
});
|
|
155
|
+
Object.defineProperty(this, "sandboxes", {
|
|
156
|
+
enumerable: true,
|
|
157
|
+
configurable: true,
|
|
158
|
+
writable: true,
|
|
159
|
+
value: new API.Sandboxes(this)
|
|
160
|
+
});
|
|
154
161
|
const options = {
|
|
155
162
|
apiKey,
|
|
156
163
|
tenantID,
|
|
@@ -695,3 +702,4 @@ Langsmith.Datasets = Datasets;
|
|
|
695
702
|
Langsmith.Runs = Runs;
|
|
696
703
|
Langsmith.OnlineEvaluators = OnlineEvaluators;
|
|
697
704
|
Langsmith.Info = Info;
|
|
705
|
+
Langsmith.Sandboxes = Sandboxes;
|
|
@@ -39,10 +39,8 @@ exports.Datasets = void 0;
|
|
|
39
39
|
const resource_js_1 = require("../../core/resource.cjs");
|
|
40
40
|
const ComparativeAPI = __importStar(require("./comparative.cjs"));
|
|
41
41
|
const comparative_js_1 = require("./comparative.cjs");
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const GroupAPI = __importStar(require("./group.cjs"));
|
|
45
|
-
const group_js_1 = require("./group.cjs");
|
|
42
|
+
const ExperimentRunsAPI = __importStar(require("./experiment-runs.cjs"));
|
|
43
|
+
const experiment_runs_js_1 = require("./experiment-runs.cjs");
|
|
46
44
|
const RunsAPI = __importStar(require("./runs.cjs"));
|
|
47
45
|
const runs_js_1 = require("./runs.cjs");
|
|
48
46
|
const ShareAPI = __importStar(require("./share.cjs"));
|
|
@@ -69,17 +67,11 @@ class Datasets extends resource_js_1.APIResource {
|
|
|
69
67
|
writable: true,
|
|
70
68
|
value: new RunsAPI.Runs(this._client)
|
|
71
69
|
});
|
|
72
|
-
Object.defineProperty(this, "
|
|
70
|
+
Object.defineProperty(this, "experimentRuns", {
|
|
73
71
|
enumerable: true,
|
|
74
72
|
configurable: true,
|
|
75
73
|
writable: true,
|
|
76
|
-
value: new
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(this, "experiments", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
configurable: true,
|
|
81
|
-
writable: true,
|
|
82
|
-
value: new ExperimentsAPI.Experiments(this._client)
|
|
74
|
+
value: new ExperimentRunsAPI.ExperimentRuns(this._client)
|
|
83
75
|
});
|
|
84
76
|
Object.defineProperty(this, "share", {
|
|
85
77
|
enumerable: true,
|
|
@@ -186,8 +178,7 @@ class Datasets extends resource_js_1.APIResource {
|
|
|
186
178
|
exports.Datasets = Datasets;
|
|
187
179
|
Datasets.Versions = versions_js_1.Versions;
|
|
188
180
|
Datasets.Runs = runs_js_1.Runs;
|
|
189
|
-
Datasets.
|
|
190
|
-
Datasets.Experiments = experiments_js_1.Experiments;
|
|
181
|
+
Datasets.ExperimentRuns = experiment_runs_js_1.ExperimentRuns;
|
|
191
182
|
Datasets.Share = share_js_1.Share;
|
|
192
183
|
Datasets.Comparative = comparative_js_1.Comparative;
|
|
193
184
|
Datasets.Splits = splits_js_1.Splits;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { APIResource } from '../../core/resource.js';
|
|
2
2
|
import * as ComparativeAPI from './comparative.js';
|
|
3
3
|
import { Comparative, ComparativeCreateParams, ComparativeCreateResponse, ComparativeDeleteResponse, SimpleExperimentInfo, SortByComparativeExperimentColumn } from './comparative.js';
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
6
|
-
import * as GroupAPI from './group.js';
|
|
7
|
-
import { Group, GroupRunsParams, GroupRunsResponse } from './group.js';
|
|
4
|
+
import * as ExperimentRunsAPI from './experiment-runs.js';
|
|
5
|
+
import { ExperimentRunCreateParams, ExperimentRunCreateResponse, ExperimentRunCreateResponsesItemsCursorPostPagination, ExperimentRuns } from './experiment-runs.js';
|
|
8
6
|
import * as RunsAPI from './runs.js';
|
|
9
|
-
import { ExampleWithRunsCh, QueryExampleSchemaWithRuns,
|
|
7
|
+
import { ExampleWithRunsCh, QueryExampleSchemaWithRuns, RunCreateParams, RunCreateResponse, Runs, SortParamsForRunsComparisonView } from './runs.js';
|
|
10
8
|
import * as ShareAPI from './share.js';
|
|
11
9
|
import { DatasetShareSchema, Share, ShareCreateParams, ShareDeleteAllResponse } from './share.js';
|
|
12
10
|
import * as SplitsAPI from './splits.js';
|
|
@@ -20,8 +18,7 @@ import { RequestOptions } from '../../internal/request-options.js';
|
|
|
20
18
|
export declare class Datasets extends APIResource {
|
|
21
19
|
versions: VersionsAPI.Versions;
|
|
22
20
|
runs: RunsAPI.Runs;
|
|
23
|
-
|
|
24
|
-
experiments: ExperimentsAPI.Experiments;
|
|
21
|
+
experimentRuns: ExperimentRunsAPI.ExperimentRuns;
|
|
25
22
|
share: ShareAPI.Share;
|
|
26
23
|
comparative: ComparativeAPI.Comparative;
|
|
27
24
|
splits: SplitsAPI.Splits;
|
|
@@ -413,9 +410,8 @@ export interface DatasetUploadParams {
|
|
|
413
410
|
export declare namespace Datasets {
|
|
414
411
|
export { type DataType as DataType, type Dataset as Dataset, type DatasetTransformation as DatasetTransformation, type DatasetVersion as DatasetVersion, type FeedbackCreateCoreSchema as FeedbackCreateCoreSchema, type Missing as Missing, type SortByDatasetColumn as SortByDatasetColumn, type DatasetUpdateResponse as DatasetUpdateResponse, type DatasetDeleteResponse as DatasetDeleteResponse, type DatasetCloneResponse as DatasetCloneResponse, type DatasetRetrieveCsvResponse as DatasetRetrieveCsvResponse, type DatasetRetrieveJSONLResponse as DatasetRetrieveJSONLResponse, type DatasetRetrieveOpenAIResponse as DatasetRetrieveOpenAIResponse, type DatasetRetrieveOpenAIFtResponse as DatasetRetrieveOpenAIFtResponse, type DatasetsOffsetPaginationTopLevelArray as DatasetsOffsetPaginationTopLevelArray, type DatasetCreateParams as DatasetCreateParams, type DatasetUpdateParams as DatasetUpdateParams, type DatasetListParams as DatasetListParams, type DatasetCloneParams as DatasetCloneParams, type DatasetRetrieveCsvParams as DatasetRetrieveCsvParams, type DatasetRetrieveJSONLParams as DatasetRetrieveJSONLParams, type DatasetRetrieveOpenAIParams as DatasetRetrieveOpenAIParams, type DatasetRetrieveOpenAIFtParams as DatasetRetrieveOpenAIFtParams, type DatasetRetrieveVersionParams as DatasetRetrieveVersionParams, type DatasetUpdateTagsParams as DatasetUpdateTagsParams, type DatasetUploadParams as DatasetUploadParams, };
|
|
415
412
|
export { Versions as Versions, type VersionRetrieveDiffResponse as VersionRetrieveDiffResponse, type VersionListParams as VersionListParams, type VersionRetrieveDiffParams as VersionRetrieveDiffParams, };
|
|
416
|
-
export { Runs as Runs, type ExampleWithRunsCh as ExampleWithRunsCh, type QueryExampleSchemaWithRuns as QueryExampleSchemaWithRuns, type
|
|
417
|
-
export {
|
|
418
|
-
export { Experiments as Experiments, type ExperimentGroupedResponse as ExperimentGroupedResponse, type ExperimentGroupedParams as ExperimentGroupedParams, };
|
|
413
|
+
export { Runs as Runs, type ExampleWithRunsCh as ExampleWithRunsCh, type QueryExampleSchemaWithRuns as QueryExampleSchemaWithRuns, type SortParamsForRunsComparisonView as SortParamsForRunsComparisonView, type RunCreateResponse as RunCreateResponse, type RunCreateParams as RunCreateParams, };
|
|
414
|
+
export { ExperimentRuns as ExperimentRuns, type ExperimentRunCreateResponse as ExperimentRunCreateResponse, type ExperimentRunCreateResponsesItemsCursorPostPagination as ExperimentRunCreateResponsesItemsCursorPostPagination, type ExperimentRunCreateParams as ExperimentRunCreateParams, };
|
|
419
415
|
export { Share as Share, type DatasetShareSchema as DatasetShareSchema, type ShareDeleteAllResponse as ShareDeleteAllResponse, type ShareCreateParams as ShareCreateParams, };
|
|
420
416
|
export { Comparative as Comparative, type SimpleExperimentInfo as SimpleExperimentInfo, type SortByComparativeExperimentColumn as SortByComparativeExperimentColumn, type ComparativeCreateResponse as ComparativeCreateResponse, type ComparativeDeleteResponse as ComparativeDeleteResponse, type ComparativeCreateParams as ComparativeCreateParams, };
|
|
421
417
|
export { Splits as Splits, type SplitCreateResponse as SplitCreateResponse, type SplitRetrieveResponse as SplitRetrieveResponse, type SplitCreateParams as SplitCreateParams, type SplitRetrieveParams as SplitRetrieveParams, };
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource.js';
|
|
4
4
|
import * as ComparativeAPI from './comparative.js';
|
|
5
5
|
import { Comparative, } from './comparative.js';
|
|
6
|
-
import * as
|
|
7
|
-
import {
|
|
8
|
-
import * as GroupAPI from './group.js';
|
|
9
|
-
import { Group } from './group.js';
|
|
6
|
+
import * as ExperimentRunsAPI from './experiment-runs.js';
|
|
7
|
+
import { ExperimentRuns, } from './experiment-runs.js';
|
|
10
8
|
import * as RunsAPI from './runs.js';
|
|
11
9
|
import { Runs, } from './runs.js';
|
|
12
10
|
import * as ShareAPI from './share.js';
|
|
@@ -33,17 +31,11 @@ export class Datasets extends APIResource {
|
|
|
33
31
|
writable: true,
|
|
34
32
|
value: new RunsAPI.Runs(this._client)
|
|
35
33
|
});
|
|
36
|
-
Object.defineProperty(this, "
|
|
34
|
+
Object.defineProperty(this, "experimentRuns", {
|
|
37
35
|
enumerable: true,
|
|
38
36
|
configurable: true,
|
|
39
37
|
writable: true,
|
|
40
|
-
value: new
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(this, "experiments", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
configurable: true,
|
|
45
|
-
writable: true,
|
|
46
|
-
value: new ExperimentsAPI.Experiments(this._client)
|
|
38
|
+
value: new ExperimentRunsAPI.ExperimentRuns(this._client)
|
|
47
39
|
});
|
|
48
40
|
Object.defineProperty(this, "share", {
|
|
49
41
|
enumerable: true,
|
|
@@ -149,8 +141,7 @@ export class Datasets extends APIResource {
|
|
|
149
141
|
}
|
|
150
142
|
Datasets.Versions = Versions;
|
|
151
143
|
Datasets.Runs = Runs;
|
|
152
|
-
Datasets.
|
|
153
|
-
Datasets.Experiments = Experiments;
|
|
144
|
+
Datasets.ExperimentRuns = ExperimentRuns;
|
|
154
145
|
Datasets.Share = Share;
|
|
155
146
|
Datasets.Comparative = Comparative;
|
|
156
147
|
Datasets.Splits = Splits;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ExperimentRuns = void 0;
|
|
6
|
+
const resource_js_1 = require("../../core/resource.cjs");
|
|
7
|
+
const pagination_js_1 = require("../../core/pagination.cjs");
|
|
8
|
+
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
9
|
+
class ExperimentRuns extends resource_js_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Returns a paginated page of dataset examples with runs from the requested
|
|
12
|
+
* experiments. Response uses the canonical `{items, next_cursor}` envelope.
|
|
13
|
+
*/
|
|
14
|
+
create(datasetID, body, options) {
|
|
15
|
+
return this._client.getAPIList((0, path_js_1.path) `/v2/datasets/${datasetID}/experiment-runs`, (pagination_js_1.ItemsCursorPostPagination), { body, method: 'post', ...options });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ExperimentRuns = ExperimentRuns;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import * as RunsAPI from '../runs/runs.js';
|
|
3
|
+
import { ItemsCursorPostPagination, type ItemsCursorPostPaginationParams, PagePromise } from '../../core/pagination.js';
|
|
4
|
+
import { RequestOptions } from '../../internal/request-options.js';
|
|
5
|
+
export declare class ExperimentRuns extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Returns a paginated page of dataset examples with runs from the requested
|
|
8
|
+
* experiments. Response uses the canonical `{items, next_cursor}` envelope.
|
|
9
|
+
*/
|
|
10
|
+
create(datasetID: string, body: ExperimentRunCreateParams, options?: RequestOptions): PagePromise<ExperimentRunCreateResponsesItemsCursorPostPagination, ExperimentRunCreateResponse>;
|
|
11
|
+
}
|
|
12
|
+
export type ExperimentRunCreateResponsesItemsCursorPostPagination = ItemsCursorPostPagination<ExperimentRunCreateResponse>;
|
|
13
|
+
export interface ExperimentRunCreateResponse {
|
|
14
|
+
/**
|
|
15
|
+
* `id` is the dataset example UUID.
|
|
16
|
+
*/
|
|
17
|
+
id?: string;
|
|
18
|
+
/**
|
|
19
|
+
* `attachment_urls` maps each attachment name to a pre-signed download URL.
|
|
20
|
+
*/
|
|
21
|
+
attachment_urls?: unknown;
|
|
22
|
+
/**
|
|
23
|
+
* `created_at` is when the example was created (RFC3339 date-time).
|
|
24
|
+
*/
|
|
25
|
+
created_at?: string;
|
|
26
|
+
/**
|
|
27
|
+
* `dataset_id` is the parent dataset UUID.
|
|
28
|
+
*/
|
|
29
|
+
dataset_id?: string;
|
|
30
|
+
/**
|
|
31
|
+
* `inputs` is the example input payload (arbitrary JSON object).
|
|
32
|
+
*/
|
|
33
|
+
inputs?: unknown;
|
|
34
|
+
/**
|
|
35
|
+
* `metadata` is arbitrary user-defined JSON metadata on the example.
|
|
36
|
+
*/
|
|
37
|
+
metadata?: unknown;
|
|
38
|
+
/**
|
|
39
|
+
* `modified_at` is when the example was last modified (RFC3339 date-time).
|
|
40
|
+
*/
|
|
41
|
+
modified_at?: string;
|
|
42
|
+
/**
|
|
43
|
+
* `name` is the example's optional name.
|
|
44
|
+
*/
|
|
45
|
+
name?: string;
|
|
46
|
+
/**
|
|
47
|
+
* `outputs` is the example reference-output payload (arbitrary JSON object).
|
|
48
|
+
*/
|
|
49
|
+
outputs?: unknown;
|
|
50
|
+
/**
|
|
51
|
+
* `runs` is the list of experiment runs produced for this example.
|
|
52
|
+
*/
|
|
53
|
+
runs?: Array<RunsAPI.QueryRunResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* `source_run_id` is the run UUID the example was created from, if any.
|
|
56
|
+
*/
|
|
57
|
+
source_run_id?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface ExperimentRunCreateParams extends ItemsCursorPostPaginationParams {
|
|
60
|
+
/**
|
|
61
|
+
* `comparative_experiment_id` scopes pairwise-annotation feedback (optional).
|
|
62
|
+
*/
|
|
63
|
+
comparative_experiment_id?: string;
|
|
64
|
+
/**
|
|
65
|
+
* `example_ids` optionally restricts the page to these dataset example UUIDs (max
|
|
66
|
+
* 1000).
|
|
67
|
+
*/
|
|
68
|
+
example_ids?: Array<string>;
|
|
69
|
+
/**
|
|
70
|
+
* `experiment_ids` lists the experiment (tracing session) UUIDs to query.
|
|
71
|
+
* Required, non-empty.
|
|
72
|
+
*/
|
|
73
|
+
experiment_ids?: Array<string>;
|
|
74
|
+
/**
|
|
75
|
+
* `filters` maps a project (session) UUID string to a list of filter expressions
|
|
76
|
+
* (optional).
|
|
77
|
+
*/
|
|
78
|
+
filters?: {
|
|
79
|
+
[key: string]: Array<string>;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* `selects` lists which run properties to include. Omitted => only `id`. Tokens
|
|
83
|
+
* mirror /v2/runs/query.
|
|
84
|
+
*/
|
|
85
|
+
selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'SHARE_URL' | 'FEEDBACK_STATS'>;
|
|
86
|
+
/**
|
|
87
|
+
* `sort` controls feedback-score sorting (single project only).
|
|
88
|
+
*/
|
|
89
|
+
sort?: ExperimentRunCreateParams.Sort;
|
|
90
|
+
}
|
|
91
|
+
export declare namespace ExperimentRunCreateParams {
|
|
92
|
+
/**
|
|
93
|
+
* `sort` controls feedback-score sorting (single project only).
|
|
94
|
+
*/
|
|
95
|
+
interface Sort {
|
|
96
|
+
/**
|
|
97
|
+
* `by` is the feedback selector, e.g. `feedback.correctness` (the `feedback.`
|
|
98
|
+
* prefix is optional).
|
|
99
|
+
*/
|
|
100
|
+
by?: string;
|
|
101
|
+
/**
|
|
102
|
+
* `order` is `ASC` or `DESC` (defaults to `DESC`).
|
|
103
|
+
*/
|
|
104
|
+
order?: string;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export declare namespace ExperimentRuns {
|
|
108
|
+
export { type ExperimentRunCreateResponse as ExperimentRunCreateResponse, type ExperimentRunCreateResponsesItemsCursorPostPagination as ExperimentRunCreateResponsesItemsCursorPostPagination, type ExperimentRunCreateParams as ExperimentRunCreateParams, };
|
|
109
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
import { APIResource } from '../../core/resource.js';
|
|
4
|
+
import { ItemsCursorPostPagination, } from '../../core/pagination.js';
|
|
5
|
+
import { path } from '../../internal/utils/path.js';
|
|
6
|
+
export class ExperimentRuns extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Returns a paginated page of dataset examples with runs from the requested
|
|
9
|
+
* experiments. Response uses the canonical `{items, next_cursor}` envelope.
|
|
10
|
+
*/
|
|
11
|
+
create(datasetID, body, options) {
|
|
12
|
+
return this._client.getAPIList(path `/v2/datasets/${datasetID}/experiment-runs`, (ItemsCursorPostPagination), { body, method: 'post', ...options });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -18,12 +18,5 @@ class Runs extends resource_js_1.APIResource {
|
|
|
18
18
|
...options,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Fetch the number of regressions/improvements for each example in a dataset,
|
|
23
|
-
* between sessions[0] and sessions[1].
|
|
24
|
-
*/
|
|
25
|
-
delta(datasetID, body, options) {
|
|
26
|
-
return this._client.post((0, path_js_1.path) `/api/v1/datasets/${datasetID}/runs/delta`, { body, ...options });
|
|
27
|
-
}
|
|
28
21
|
}
|
|
29
22
|
exports.Runs = Runs;
|
|
@@ -8,11 +8,6 @@ export declare class Runs extends APIResource {
|
|
|
8
8
|
* associated with the given session_ids.
|
|
9
9
|
*/
|
|
10
10
|
create(datasetID: string, params: RunCreateParams, options?: RequestOptions): APIPromise<RunCreateResponse | null>;
|
|
11
|
-
/**
|
|
12
|
-
* Fetch the number of regressions/improvements for each example in a dataset,
|
|
13
|
-
* between sessions[0] and sessions[1].
|
|
14
|
-
*/
|
|
15
|
-
delta(datasetID: string, body: RunDeltaParams, options?: RequestOptions): APIPromise<SessionFeedbackDelta>;
|
|
16
11
|
}
|
|
17
12
|
/**
|
|
18
13
|
* Example schema with list of runs from ClickHouse.
|
|
@@ -123,34 +118,6 @@ export interface QueryExampleSchemaWithRuns {
|
|
|
123
118
|
preview?: boolean;
|
|
124
119
|
sort_params?: SortParamsForRunsComparisonView | null;
|
|
125
120
|
}
|
|
126
|
-
export interface QueryFeedbackDelta {
|
|
127
|
-
baseline_session_id: string;
|
|
128
|
-
comparison_session_ids: Array<string>;
|
|
129
|
-
feedback_key: string;
|
|
130
|
-
comparative_experiment_id?: string | null;
|
|
131
|
-
filters?: {
|
|
132
|
-
[key: string]: Array<string>;
|
|
133
|
-
} | null;
|
|
134
|
-
limit?: number;
|
|
135
|
-
offset?: number;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* List of feedback keys with number of improvements and regressions for each.
|
|
139
|
-
*/
|
|
140
|
-
export interface SessionFeedbackDelta {
|
|
141
|
-
feedback_deltas: {
|
|
142
|
-
[key: string]: SessionFeedbackDelta.FeedbackDeltas;
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
export declare namespace SessionFeedbackDelta {
|
|
146
|
-
/**
|
|
147
|
-
* Feedback key with number of improvements and regressions.
|
|
148
|
-
*/
|
|
149
|
-
interface FeedbackDeltas {
|
|
150
|
-
improved_examples: Array<string>;
|
|
151
|
-
regressed_examples: Array<string>;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
121
|
export interface SortParamsForRunsComparisonView {
|
|
155
122
|
sort_by: string;
|
|
156
123
|
sort_order?: 'ASC' | 'DESC';
|
|
@@ -200,17 +167,6 @@ export interface RunCreateParams {
|
|
|
200
167
|
*/
|
|
201
168
|
sort_params?: SortParamsForRunsComparisonView | null;
|
|
202
169
|
}
|
|
203
|
-
export interface RunDeltaParams {
|
|
204
|
-
baseline_session_id: string;
|
|
205
|
-
comparison_session_ids: Array<string>;
|
|
206
|
-
feedback_key: string;
|
|
207
|
-
comparative_experiment_id?: string | null;
|
|
208
|
-
filters?: {
|
|
209
|
-
[key: string]: Array<string>;
|
|
210
|
-
} | null;
|
|
211
|
-
limit?: number;
|
|
212
|
-
offset?: number;
|
|
213
|
-
}
|
|
214
170
|
export declare namespace Runs {
|
|
215
|
-
export { type ExampleWithRunsCh as ExampleWithRunsCh, type QueryExampleSchemaWithRuns as QueryExampleSchemaWithRuns, type
|
|
171
|
+
export { type ExampleWithRunsCh as ExampleWithRunsCh, type QueryExampleSchemaWithRuns as QueryExampleSchemaWithRuns, type SortParamsForRunsComparisonView as SortParamsForRunsComparisonView, type RunCreateResponse as RunCreateResponse, type RunCreateParams as RunCreateParams, };
|
|
216
172
|
}
|
|
@@ -15,11 +15,4 @@ export class Runs extends APIResource {
|
|
|
15
15
|
...options,
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Fetch the number of regressions/improvements for each example in a dataset,
|
|
20
|
-
* between sessions[0] and sessions[1].
|
|
21
|
-
*/
|
|
22
|
-
delta(datasetID, body, options) {
|
|
23
|
-
return this._client.post(path `/api/v1/datasets/${datasetID}/runs/delta`, { body, ...options });
|
|
24
|
-
}
|
|
25
18
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.Sessions = exports.Runs = exports.OnlineEvaluators = exports.Info = exports.Datasets = void 0;
|
|
5
|
+
exports.Sessions = exports.Sandboxes = exports.Runs = exports.OnlineEvaluators = exports.Info = exports.Datasets = void 0;
|
|
6
6
|
var datasets_js_1 = require("./datasets/datasets.cjs");
|
|
7
7
|
Object.defineProperty(exports, "Datasets", { enumerable: true, get: function () { return datasets_js_1.Datasets; } });
|
|
8
8
|
var info_js_1 = require("./info.cjs");
|
|
@@ -11,5 +11,7 @@ var online_evaluators_js_1 = require("./online-evaluators.cjs");
|
|
|
11
11
|
Object.defineProperty(exports, "OnlineEvaluators", { enumerable: true, get: function () { return online_evaluators_js_1.OnlineEvaluators; } });
|
|
12
12
|
var runs_js_1 = require("./runs/runs.cjs");
|
|
13
13
|
Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_js_1.Runs; } });
|
|
14
|
-
var
|
|
14
|
+
var sandboxes_js_1 = require("./sandboxes/sandboxes.cjs");
|
|
15
|
+
Object.defineProperty(exports, "Sandboxes", { enumerable: true, get: function () { return sandboxes_js_1.Sandboxes; } });
|
|
16
|
+
var sessions_js_1 = require("./sessions.cjs");
|
|
15
17
|
Object.defineProperty(exports, "Sessions", { enumerable: true, get: function () { return sessions_js_1.Sessions; } });
|
|
@@ -2,4 +2,5 @@ export { Datasets, type DataType, type Dataset, type DatasetTransformation, type
|
|
|
2
2
|
export { Info, type InfoListResponse } from './info.js';
|
|
3
3
|
export { OnlineEvaluators, type BulkDeleteEvaluatorFailedItem, type BulkDeleteEvaluatorsResponse, type CreateOnlineCodeEvaluatorRequest, type CreateOnlineEvaluatorRequest, type CreateOnlineEvaluatorResponse, type CreateOnlineLlmEvaluatorRequest, type GetOnlineEvaluatorSpendResponse, type OnlineCodeEvaluator, type OnlineEvaluator, type OnlineEvaluatorRunRule, type OnlineEvaluatorSpendDay, type OnlineEvaluatorSpendGroup, type OnlineEvaluatorType, type OnlineLlmEvaluator, type OnlineSpendLimit, type UpdateOnlineCodeEvaluatorRequest, type UpdateOnlineEvaluatorRequest, type UpdateOnlineEvaluatorResponse, type UpdateOnlineLlmEvaluatorRequest, type OnlineEvaluatorCreateParams, type OnlineEvaluatorUpdateParams, type OnlineEvaluatorListParams, type OnlineEvaluatorDeleteParams, type OnlineEvaluatorBulkDeleteParams, type OnlineEvaluatorSpendParams, type OnlineEvaluatorsOffsetPaginationOnlineEvaluators, } from './online-evaluators.js';
|
|
4
4
|
export { Runs, type QueryRunResponse, type ResponseBodyForRunsGenerateQuery, type Run, type RunSchema, type RunStatsQueryParams, type RunTypeEnum, type RunsFilterDataSourceTypeEnum, type RunQueryV2Params, type RunRetrieveV2Params, type RunRetrieveParams, type RunQueryParams, type QueryRunResponsesItemsCursorPostPagination, } from './runs/runs.js';
|
|
5
|
-
export {
|
|
5
|
+
export { Sandboxes, type SandboxListResponse, type SandboxResponse, type SandboxStatusResponse, type ServiceURLResponse, type SnapshotListResponse, type SnapshotResponse, } from './sandboxes/sandboxes.js';
|
|
6
|
+
export { Sessions, type CustomChartsSection, type CustomChartsSectionRequest, type RunStatsGroupBy, type SessionSortableColumns, type TimedeltaInput, type TracerSession, type TracerSessionWithoutVirtualFields, type SessionDeleteResponse, type SessionCreateParams, type SessionRetrieveParams, type SessionUpdateParams, type SessionListParams, type TracerSessionsOffsetPaginationTopLevelArray, } from './sessions.js';
|
|
@@ -4,4 +4,5 @@ export { Datasets, } from './datasets/datasets.js';
|
|
|
4
4
|
export { Info } from './info.js';
|
|
5
5
|
export { OnlineEvaluators, } from './online-evaluators.js';
|
|
6
6
|
export { Runs, } from './runs/runs.js';
|
|
7
|
-
export {
|
|
7
|
+
export { Sandboxes, } from './sandboxes/sandboxes.js';
|
|
8
|
+
export { Sessions, } from './sessions.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import * as SessionsAPI from '../sessions.js';
|
|
2
3
|
import * as RulesAPI from './rules.js';
|
|
3
4
|
import { Rules } from './rules.js';
|
|
4
|
-
import * as SessionsAPI from '../sessions/sessions.js';
|
|
5
5
|
import { APIPromise } from '../../core/api-promise.js';
|
|
6
6
|
import { ItemsCursorPostPagination, type ItemsCursorPostPaginationParams, PagePromise } from '../../core/pagination.js';
|
|
7
7
|
import { RequestOptions } from '../../internal/request-options.js';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Boxes = void 0;
|
|
6
|
+
const resource_js_1 = require("../../core/resource.cjs");
|
|
7
|
+
const headers_js_1 = require("../../internal/headers.cjs");
|
|
8
|
+
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
9
|
+
class Boxes extends resource_js_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Create a new sandbox from a snapshot. Provide at most one of `snapshot_id` or
|
|
12
|
+
* `snapshot_name`; if neither is provided, the server uses the default static
|
|
13
|
+
* blueprint.
|
|
14
|
+
*/
|
|
15
|
+
create(body, options) {
|
|
16
|
+
return this._client.post('/v2/sandboxes/boxes', { body, ...options });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Retrieve a sandbox by name. Stale provisioning sandboxes are auto-failed.
|
|
20
|
+
*/
|
|
21
|
+
retrieve(name, options) {
|
|
22
|
+
return this._client.get((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, options);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Update a sandbox's display name. The name must be unique within the tenant.
|
|
26
|
+
*/
|
|
27
|
+
update(name, body, options) {
|
|
28
|
+
return this._client.patch((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* List sandboxes for the authenticated tenant, with optional filtering, sorting,
|
|
32
|
+
* and pagination.
|
|
33
|
+
*/
|
|
34
|
+
list(query = {}, options) {
|
|
35
|
+
return this._client.get('/v2/sandboxes/boxes', { query, ...options });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Delete a sandbox by name or UUID. Tears down the sandbox runtime and removes the
|
|
39
|
+
* DB record.
|
|
40
|
+
*/
|
|
41
|
+
delete(name, options) {
|
|
42
|
+
return this._client.delete((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, {
|
|
43
|
+
...options,
|
|
44
|
+
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create a snapshot by capturing the current state of a sandbox or promoting an
|
|
49
|
+
* existing checkpoint.
|
|
50
|
+
*/
|
|
51
|
+
createSnapshot(name, body, options) {
|
|
52
|
+
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/snapshot`, { body, ...options });
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Create a short-lived JWT for accessing an HTTP service running on a specific
|
|
56
|
+
* port inside a sandbox. Returns a browser_url (sets auth cookie via redirect), a
|
|
57
|
+
* service_url (for use with the X-Langsmith-Sandbox-Service-Token header), the raw
|
|
58
|
+
* token, and its expiry.
|
|
59
|
+
*/
|
|
60
|
+
generateServiceURL(name, body, options) {
|
|
61
|
+
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/service-url`, { body, ...options });
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Retrieve the lightweight status of a sandbox for polling.
|
|
65
|
+
*/
|
|
66
|
+
getStatus(name, options) {
|
|
67
|
+
return this._client.get((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/status`, options);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Start a stopped or failed sandbox. This endpoint is not idempotent.
|
|
71
|
+
*/
|
|
72
|
+
start(name, options) {
|
|
73
|
+
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/start`, options);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Stop a ready sandbox. This endpoint is not idempotent; the filesystem is
|
|
77
|
+
* preserved for later restart.
|
|
78
|
+
*/
|
|
79
|
+
stop(name, options) {
|
|
80
|
+
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/stop`, {
|
|
81
|
+
...options,
|
|
82
|
+
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.Boxes = Boxes;
|