langsmith 0.7.15 → 0.7.17
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 +17 -9
- package/dist/_openapi_client/client.d.ts +9 -6
- package/dist/_openapi_client/client.js +17 -9
- package/dist/_openapi_client/resources/datasets/datasets.cjs +0 -130
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +3 -271
- package/dist/_openapi_client/resources/datasets/datasets.js +0 -130
- package/dist/_openapi_client/resources/datasets/experiment-runs.cjs +1 -1
- package/dist/_openapi_client/resources/datasets/experiment-runs.d.ts +8 -8
- package/dist/_openapi_client/resources/datasets/experiment-runs.js +1 -1
- package/dist/_openapi_client/resources/index.cjs +6 -4
- package/dist/_openapi_client/resources/index.d.ts +4 -3
- package/dist/_openapi_client/resources/index.js +3 -2
- package/dist/_openapi_client/resources/runs.cjs +69 -15
- package/dist/_openapi_client/resources/runs.d.ts +815 -1
- package/dist/_openapi_client/resources/runs.js +67 -1
- package/dist/_openapi_client/resources/threads.cjs +65 -0
- package/dist/_openapi_client/resources/threads.d.ts +654 -0
- package/dist/_openapi_client/resources/threads.js +61 -0
- package/dist/_openapi_client/resources/traces.cjs +61 -0
- package/dist/_openapi_client/resources/traces.d.ts +162 -0
- package/dist/_openapi_client/resources/traces.js +57 -0
- package/dist/client.cjs +1 -5
- package/dist/client.d.ts +2 -5
- package/dist/client.js +1 -5
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/wrappers/anthropic.cjs +38 -25
- package/dist/wrappers/anthropic.d.ts +10 -1
- package/dist/wrappers/anthropic.js +38 -25
- package/dist/wrappers/utils/anthropic_managed.cjs +648 -0
- package/dist/wrappers/utils/anthropic_managed.d.ts +7 -0
- package/dist/wrappers/utils/anthropic_managed.js +645 -0
- package/package.json +1 -1
- package/dist/_openapi_client/resources/datasets/comparative.cjs +0 -22
- package/dist/_openapi_client/resources/datasets/comparative.d.ts +0 -55
- package/dist/_openapi_client/resources/datasets/comparative.js +0 -18
- package/dist/_openapi_client/resources/datasets/runs.cjs +0 -22
- package/dist/_openapi_client/resources/datasets/runs.d.ts +0 -175
- package/dist/_openapi_client/resources/datasets/runs.js +0 -18
- package/dist/_openapi_client/resources/datasets/share.cjs +0 -32
- package/dist/_openapi_client/resources/datasets/share.d.ts +0 -28
- package/dist/_openapi_client/resources/datasets/share.js +0 -28
- package/dist/_openapi_client/resources/datasets/splits.cjs +0 -22
- package/dist/_openapi_client/resources/datasets/splits.d.ts +0 -30
- package/dist/_openapi_client/resources/datasets/splits.js +0 -18
- package/dist/_openapi_client/resources/datasets/versions.cjs +0 -23
- package/dist/_openapi_client/resources/datasets/versions.d.ts +0 -36
- package/dist/_openapi_client/resources/datasets/versions.js +0 -19
- package/dist/_openapi_client/resources/runs/index.cjs +0 -9
- package/dist/_openapi_client/resources/runs/index.d.ts +0 -2
- package/dist/_openapi_client/resources/runs/index.js +0 -4
- package/dist/_openapi_client/resources/runs/rules.cjs +0 -9
- package/dist/_openapi_client/resources/runs/rules.d.ts +0 -3
- package/dist/_openapi_client/resources/runs/rules.js +0 -5
- package/dist/_openapi_client/resources/runs/runs.cjs +0 -115
- package/dist/_openapi_client/resources/runs/runs.d.ts +0 -800
- package/dist/_openapi_client/resources/runs/runs.js +0 -78
- package/dist/_openapi_client/resources/sessions.cjs +0 -53
- package/dist/_openapi_client/resources/sessions.d.ts +0 -636
- package/dist/_openapi_client/resources/sessions.js +0 -49
|
@@ -65,9 +65,10 @@ const api_promise_js_1 = require("./core/api-promise.cjs");
|
|
|
65
65
|
const info_js_1 = require("./resources/info.cjs");
|
|
66
66
|
const issues_js_1 = require("./resources/issues.cjs");
|
|
67
67
|
const online_evaluators_js_1 = require("./resources/online-evaluators.cjs");
|
|
68
|
-
const
|
|
68
|
+
const runs_js_1 = require("./resources/runs.cjs");
|
|
69
|
+
const threads_js_1 = require("./resources/threads.cjs");
|
|
70
|
+
const traces_js_1 = require("./resources/traces.cjs");
|
|
69
71
|
const datasets_js_1 = require("./resources/datasets/datasets.cjs");
|
|
70
|
-
const runs_js_1 = require("./resources/runs/runs.cjs");
|
|
71
72
|
const sandboxes_js_1 = require("./resources/sandboxes/sandboxes.cjs");
|
|
72
73
|
const headers_js_1 = require("./internal/headers.cjs");
|
|
73
74
|
const env_js_1 = require("./internal/utils/env.cjs");
|
|
@@ -159,12 +160,6 @@ class Langsmith {
|
|
|
159
160
|
writable: true,
|
|
160
161
|
value: void 0
|
|
161
162
|
});
|
|
162
|
-
Object.defineProperty(this, "sessions", {
|
|
163
|
-
enumerable: true,
|
|
164
|
-
configurable: true,
|
|
165
|
-
writable: true,
|
|
166
|
-
value: new API.Sessions(this)
|
|
167
|
-
});
|
|
168
163
|
Object.defineProperty(this, "datasets", {
|
|
169
164
|
enumerable: true,
|
|
170
165
|
configurable: true,
|
|
@@ -177,6 +172,18 @@ class Langsmith {
|
|
|
177
172
|
writable: true,
|
|
178
173
|
value: new API.Runs(this)
|
|
179
174
|
});
|
|
175
|
+
Object.defineProperty(this, "threads", {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
configurable: true,
|
|
178
|
+
writable: true,
|
|
179
|
+
value: new API.Threads(this)
|
|
180
|
+
});
|
|
181
|
+
Object.defineProperty(this, "traces", {
|
|
182
|
+
enumerable: true,
|
|
183
|
+
configurable: true,
|
|
184
|
+
writable: true,
|
|
185
|
+
value: new API.Traces(this)
|
|
186
|
+
});
|
|
180
187
|
Object.defineProperty(this, "onlineEvaluators", {
|
|
181
188
|
enumerable: true,
|
|
182
189
|
configurable: true,
|
|
@@ -741,9 +748,10 @@ Object.defineProperty(Langsmith, "toFile", {
|
|
|
741
748
|
writable: true,
|
|
742
749
|
value: Uploads.toFile
|
|
743
750
|
});
|
|
744
|
-
Langsmith.Sessions = sessions_js_1.Sessions;
|
|
745
751
|
Langsmith.Datasets = datasets_js_1.Datasets;
|
|
746
752
|
Langsmith.Runs = runs_js_1.Runs;
|
|
753
|
+
Langsmith.Threads = threads_js_1.Threads;
|
|
754
|
+
Langsmith.Traces = traces_js_1.Traces;
|
|
747
755
|
Langsmith.OnlineEvaluators = online_evaluators_js_1.OnlineEvaluators;
|
|
748
756
|
Langsmith.Info = info_js_1.Info;
|
|
749
757
|
Langsmith.Issues = issues_js_1.Issues;
|
|
@@ -11,9 +11,10 @@ import { APIPromise } from './core/api-promise.js';
|
|
|
11
11
|
import { Info, InfoListResponse } from './resources/info.js';
|
|
12
12
|
import { Issue, IssueListParams, Issues, IssuesOffsetPaginationIssues } from './resources/issues.js';
|
|
13
13
|
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';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { ResponseBodyForRunsGenerateQuery, Run, RunIngest, RunQueryParams, RunQueryV2Params, RunRetrieveParams, RunRetrieveV2Params, RunSchema, RunStatsQueryParams, RunTypeEnum, Runs, RunsFilterDataSourceTypeEnum, RunsItemsCursorPostPagination } from './resources/runs.js';
|
|
15
|
+
import { ThreadListItem, ThreadListItemsItemsCursorPostPagination, ThreadListTracesParams, ThreadQueryParams, ThreadStatsParams, ThreadStatsResponse, ThreadTraceListItem, ThreadTraceListItemsItemsCursorGetPagination, Threads } from './resources/threads.js';
|
|
16
|
+
import { Trace, TraceAggregates, TraceListRunsParams, TraceListRunsResponse, TraceQueryParams, Traces, TracesItemsCursorPostPagination } from './resources/traces.js';
|
|
17
|
+
import { DataType, Dataset, DatasetTransformation, DatasetVersion, Datasets, FeedbackCreateCoreSchema, Missing, SortByDatasetColumn } from './resources/datasets/datasets.js';
|
|
17
18
|
import { SandboxListResponse, SandboxResponse, SandboxStatusResponse, Sandboxes, ServiceURLResponse, SnapshotListResponse, SnapshotResponse } from './resources/sandboxes/sandboxes.js';
|
|
18
19
|
import { type Fetch } from './internal/builtin-types.js';
|
|
19
20
|
import { HeadersLike, NullableHeaders } from './internal/headers.js';
|
|
@@ -187,9 +188,10 @@ export declare class Langsmith {
|
|
|
187
188
|
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
188
189
|
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
189
190
|
static toFile: typeof Uploads.toFile;
|
|
190
|
-
sessions: API.Sessions;
|
|
191
191
|
datasets: API.Datasets;
|
|
192
192
|
runs: API.Runs;
|
|
193
|
+
threads: API.Threads;
|
|
194
|
+
traces: API.Traces;
|
|
193
195
|
onlineEvaluators: API.OnlineEvaluators;
|
|
194
196
|
info: API.Info;
|
|
195
197
|
issues: API.Issues;
|
|
@@ -215,9 +217,10 @@ export declare namespace Langsmith {
|
|
|
215
217
|
export { type ItemsCursorPostPaginationParams as ItemsCursorPostPaginationParams, type ItemsCursorPostPaginationResponse as ItemsCursorPostPaginationResponse, };
|
|
216
218
|
export import ItemsCursorGetPagination = Pagination.ItemsCursorGetPagination;
|
|
217
219
|
export { type ItemsCursorGetPaginationParams as ItemsCursorGetPaginationParams, type ItemsCursorGetPaginationResponse as ItemsCursorGetPaginationResponse, };
|
|
218
|
-
export {
|
|
219
|
-
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, };
|
|
220
|
+
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, };
|
|
220
221
|
export { Runs as Runs, type ResponseBodyForRunsGenerateQuery as ResponseBodyForRunsGenerateQuery, type Run as Run, type RunIngest as RunIngest, type RunSchema as RunSchema, type RunStatsQueryParams as RunStatsQueryParams, type RunTypeEnum as RunTypeEnum, type RunsFilterDataSourceTypeEnum as RunsFilterDataSourceTypeEnum, type RunsItemsCursorPostPagination as RunsItemsCursorPostPagination, type RunQueryV2Params as RunQueryV2Params, type RunRetrieveV2Params as RunRetrieveV2Params, type RunRetrieveParams as RunRetrieveParams, type RunQueryParams as RunQueryParams, };
|
|
222
|
+
export { Threads as Threads, type ThreadListItem as ThreadListItem, type ThreadTraceListItem as ThreadTraceListItem, type ThreadStatsResponse as ThreadStatsResponse, type ThreadTraceListItemsItemsCursorGetPagination as ThreadTraceListItemsItemsCursorGetPagination, type ThreadListItemsItemsCursorPostPagination as ThreadListItemsItemsCursorPostPagination, type ThreadListTracesParams as ThreadListTracesParams, type ThreadQueryParams as ThreadQueryParams, type ThreadStatsParams as ThreadStatsParams, };
|
|
223
|
+
export { Traces as Traces, type Trace as Trace, type TraceAggregates as TraceAggregates, type TraceListRunsResponse as TraceListRunsResponse, type TracesItemsCursorPostPagination as TracesItemsCursorPostPagination, type TraceListRunsParams as TraceListRunsParams, type TraceQueryParams as TraceQueryParams, };
|
|
221
224
|
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, };
|
|
222
225
|
export { Info as Info, type InfoListResponse as InfoListResponse };
|
|
223
226
|
export { Issues as Issues, type Issue as Issue, type IssuesOffsetPaginationIssues as IssuesOffsetPaginationIssues, type IssueListParams as IssueListParams, };
|
|
@@ -29,9 +29,10 @@ import { APIPromise } from './core/api-promise.js';
|
|
|
29
29
|
import { Info } from './resources/info.js';
|
|
30
30
|
import { Issues } from './resources/issues.js';
|
|
31
31
|
import { OnlineEvaluators, } from './resources/online-evaluators.js';
|
|
32
|
-
import {
|
|
32
|
+
import { Runs, } from './resources/runs.js';
|
|
33
|
+
import { Threads, } from './resources/threads.js';
|
|
34
|
+
import { Traces, } from './resources/traces.js';
|
|
33
35
|
import { Datasets, } from './resources/datasets/datasets.js';
|
|
34
|
-
import { Runs, } from './resources/runs/runs.js';
|
|
35
36
|
import { Sandboxes, } from './resources/sandboxes/sandboxes.js';
|
|
36
37
|
import { buildHeaders } from './internal/headers.js';
|
|
37
38
|
import { readEnv } from './internal/utils/env.js';
|
|
@@ -123,12 +124,6 @@ export class Langsmith {
|
|
|
123
124
|
writable: true,
|
|
124
125
|
value: void 0
|
|
125
126
|
});
|
|
126
|
-
Object.defineProperty(this, "sessions", {
|
|
127
|
-
enumerable: true,
|
|
128
|
-
configurable: true,
|
|
129
|
-
writable: true,
|
|
130
|
-
value: new API.Sessions(this)
|
|
131
|
-
});
|
|
132
127
|
Object.defineProperty(this, "datasets", {
|
|
133
128
|
enumerable: true,
|
|
134
129
|
configurable: true,
|
|
@@ -141,6 +136,18 @@ export class Langsmith {
|
|
|
141
136
|
writable: true,
|
|
142
137
|
value: new API.Runs(this)
|
|
143
138
|
});
|
|
139
|
+
Object.defineProperty(this, "threads", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
configurable: true,
|
|
142
|
+
writable: true,
|
|
143
|
+
value: new API.Threads(this)
|
|
144
|
+
});
|
|
145
|
+
Object.defineProperty(this, "traces", {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
configurable: true,
|
|
148
|
+
writable: true,
|
|
149
|
+
value: new API.Traces(this)
|
|
150
|
+
});
|
|
144
151
|
Object.defineProperty(this, "onlineEvaluators", {
|
|
145
152
|
enumerable: true,
|
|
146
153
|
configurable: true,
|
|
@@ -704,9 +711,10 @@ Object.defineProperty(Langsmith, "toFile", {
|
|
|
704
711
|
writable: true,
|
|
705
712
|
value: Uploads.toFile
|
|
706
713
|
});
|
|
707
|
-
Langsmith.Sessions = Sessions;
|
|
708
714
|
Langsmith.Datasets = Datasets;
|
|
709
715
|
Langsmith.Runs = Runs;
|
|
716
|
+
Langsmith.Threads = Threads;
|
|
717
|
+
Langsmith.Traces = Traces;
|
|
710
718
|
Langsmith.OnlineEvaluators = OnlineEvaluators;
|
|
711
719
|
Langsmith.Info = Info;
|
|
712
720
|
Langsmith.Issues = Issues;
|
|
@@ -37,148 +37,18 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.Datasets = void 0;
|
|
39
39
|
const resource_js_1 = require("../../core/resource.cjs");
|
|
40
|
-
const ComparativeAPI = __importStar(require("./comparative.cjs"));
|
|
41
|
-
const comparative_js_1 = require("./comparative.cjs");
|
|
42
40
|
const ExperimentRunsAPI = __importStar(require("./experiment-runs.cjs"));
|
|
43
41
|
const experiment_runs_js_1 = require("./experiment-runs.cjs");
|
|
44
|
-
const RunsAPI = __importStar(require("./runs.cjs"));
|
|
45
|
-
const runs_js_1 = require("./runs.cjs");
|
|
46
|
-
const ShareAPI = __importStar(require("./share.cjs"));
|
|
47
|
-
const share_js_1 = require("./share.cjs");
|
|
48
|
-
const SplitsAPI = __importStar(require("./splits.cjs"));
|
|
49
|
-
const splits_js_1 = require("./splits.cjs");
|
|
50
|
-
const VersionsAPI = __importStar(require("./versions.cjs"));
|
|
51
|
-
const versions_js_1 = require("./versions.cjs");
|
|
52
|
-
const pagination_js_1 = require("../../core/pagination.cjs");
|
|
53
|
-
const uploads_js_1 = require("../../internal/uploads.cjs");
|
|
54
|
-
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
55
42
|
class Datasets extends resource_js_1.APIResource {
|
|
56
43
|
constructor() {
|
|
57
44
|
super(...arguments);
|
|
58
|
-
Object.defineProperty(this, "versions", {
|
|
59
|
-
enumerable: true,
|
|
60
|
-
configurable: true,
|
|
61
|
-
writable: true,
|
|
62
|
-
value: new VersionsAPI.Versions(this._client)
|
|
63
|
-
});
|
|
64
|
-
Object.defineProperty(this, "runs", {
|
|
65
|
-
enumerable: true,
|
|
66
|
-
configurable: true,
|
|
67
|
-
writable: true,
|
|
68
|
-
value: new RunsAPI.Runs(this._client)
|
|
69
|
-
});
|
|
70
45
|
Object.defineProperty(this, "experimentRuns", {
|
|
71
46
|
enumerable: true,
|
|
72
47
|
configurable: true,
|
|
73
48
|
writable: true,
|
|
74
49
|
value: new ExperimentRunsAPI.ExperimentRuns(this._client)
|
|
75
50
|
});
|
|
76
|
-
Object.defineProperty(this, "share", {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
configurable: true,
|
|
79
|
-
writable: true,
|
|
80
|
-
value: new ShareAPI.Share(this._client)
|
|
81
|
-
});
|
|
82
|
-
Object.defineProperty(this, "comparative", {
|
|
83
|
-
enumerable: true,
|
|
84
|
-
configurable: true,
|
|
85
|
-
writable: true,
|
|
86
|
-
value: new ComparativeAPI.Comparative(this._client)
|
|
87
|
-
});
|
|
88
|
-
Object.defineProperty(this, "splits", {
|
|
89
|
-
enumerable: true,
|
|
90
|
-
configurable: true,
|
|
91
|
-
writable: true,
|
|
92
|
-
value: new SplitsAPI.Splits(this._client)
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Create a new dataset.
|
|
97
|
-
*/
|
|
98
|
-
create(body, options) {
|
|
99
|
-
return this._client.post('/api/v1/datasets', { body, ...options });
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Get a specific dataset.
|
|
103
|
-
*/
|
|
104
|
-
retrieve(datasetID, options) {
|
|
105
|
-
return this._client.get((0, path_js_1.path) `/api/v1/datasets/${datasetID}`, options);
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Update a specific dataset.
|
|
109
|
-
*/
|
|
110
|
-
update(datasetID, body, options) {
|
|
111
|
-
return this._client.patch((0, path_js_1.path) `/api/v1/datasets/${datasetID}`, { body, ...options });
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Get all datasets by query params and owner.
|
|
115
|
-
*/
|
|
116
|
-
list(params = {}, options) {
|
|
117
|
-
const { datatype, ...query } = params ?? {};
|
|
118
|
-
return this._client.getAPIList('/api/v1/datasets', (pagination_js_1.OffsetPaginationTopLevelArray), {
|
|
119
|
-
query: { data_type: datatype, ...query },
|
|
120
|
-
...options,
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Delete a specific dataset.
|
|
125
|
-
*/
|
|
126
|
-
delete(datasetID, options) {
|
|
127
|
-
return this._client.delete((0, path_js_1.path) `/api/v1/datasets/${datasetID}`, options);
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Clone a dataset.
|
|
131
|
-
*/
|
|
132
|
-
clone(body, options) {
|
|
133
|
-
return this._client.post('/api/v1/datasets/clone', { body, ...options });
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Download a dataset as CSV format.
|
|
137
|
-
*/
|
|
138
|
-
retrieveCsv(datasetID, query = {}, options) {
|
|
139
|
-
return this._client.get((0, path_js_1.path) `/api/v1/datasets/${datasetID}/csv`, { query, ...options });
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Download a dataset as CSV format.
|
|
143
|
-
*/
|
|
144
|
-
retrieveJSONL(datasetID, query = {}, options) {
|
|
145
|
-
return this._client.get((0, path_js_1.path) `/api/v1/datasets/${datasetID}/jsonl`, { query, ...options });
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Download a dataset as OpenAI Evals Jsonl format.
|
|
149
|
-
*/
|
|
150
|
-
retrieveOpenAI(datasetID, query = {}, options) {
|
|
151
|
-
return this._client.get((0, path_js_1.path) `/api/v1/datasets/${datasetID}/openai`, { query, ...options });
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Download a dataset as OpenAI Jsonl format.
|
|
155
|
-
*/
|
|
156
|
-
retrieveOpenAIFt(datasetID, query = {}, options) {
|
|
157
|
-
return this._client.get((0, path_js_1.path) `/api/v1/datasets/${datasetID}/openai_ft`, { query, ...options });
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Get dataset version by as_of or exact tag.
|
|
161
|
-
*/
|
|
162
|
-
retrieveVersion(datasetID, query = {}, options) {
|
|
163
|
-
return this._client.get((0, path_js_1.path) `/api/v1/datasets/${datasetID}/version`, { query, ...options });
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Set a tag on a dataset version.
|
|
167
|
-
*/
|
|
168
|
-
updateTags(datasetID, body, options) {
|
|
169
|
-
return this._client.put((0, path_js_1.path) `/api/v1/datasets/${datasetID}/tags`, { body, ...options });
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Create a new dataset from a CSV or JSONL file.
|
|
173
|
-
*/
|
|
174
|
-
upload(body, options) {
|
|
175
|
-
return this._client.post('/api/v1/datasets/upload', (0, uploads_js_1.multipartFormRequestOptions)({ body, ...options }, this._client));
|
|
176
51
|
}
|
|
177
52
|
}
|
|
178
53
|
exports.Datasets = Datasets;
|
|
179
|
-
Datasets.Versions = versions_js_1.Versions;
|
|
180
|
-
Datasets.Runs = runs_js_1.Runs;
|
|
181
54
|
Datasets.ExperimentRuns = experiment_runs_js_1.ExperimentRuns;
|
|
182
|
-
Datasets.Share = share_js_1.Share;
|
|
183
|
-
Datasets.Comparative = comparative_js_1.Comparative;
|
|
184
|
-
Datasets.Splits = splits_js_1.Splits;
|
|
@@ -1,82 +1,9 @@
|
|
|
1
1
|
import { APIResource } from '../../core/resource.js';
|
|
2
|
-
import * as ComparativeAPI from './comparative.js';
|
|
3
|
-
import { Comparative, ComparativeCreateParams, ComparativeCreateResponse, ComparativeDeleteResponse, SimpleExperimentInfo, SortByComparativeExperimentColumn } from './comparative.js';
|
|
4
2
|
import * as ExperimentRunsAPI from './experiment-runs.js';
|
|
5
|
-
import {
|
|
6
|
-
import * as RunsAPI from './runs.js';
|
|
7
|
-
import { ExampleWithRunsCh, QueryExampleSchemaWithRuns, RunCreateParams, RunCreateResponse, Runs, SortParamsForRunsComparisonView } from './runs.js';
|
|
8
|
-
import * as ShareAPI from './share.js';
|
|
9
|
-
import { DatasetShareSchema, Share, ShareCreateParams, ShareDeleteAllResponse } from './share.js';
|
|
10
|
-
import * as SplitsAPI from './splits.js';
|
|
11
|
-
import { SplitCreateParams, SplitCreateResponse, SplitRetrieveParams, SplitRetrieveResponse, Splits } from './splits.js';
|
|
12
|
-
import * as VersionsAPI from './versions.js';
|
|
13
|
-
import { VersionListParams, VersionRetrieveDiffParams, VersionRetrieveDiffResponse, Versions } from './versions.js';
|
|
14
|
-
import { APIPromise } from '../../core/api-promise.js';
|
|
15
|
-
import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
|
|
16
|
-
import { type Uploadable } from '../../core/uploads.js';
|
|
17
|
-
import { RequestOptions } from '../../internal/request-options.js';
|
|
3
|
+
import { ExperimentRunQueryParams, ExperimentRunQueryResponse, ExperimentRunQueryResponsesItemsCursorPostPagination, ExperimentRuns } from './experiment-runs.js';
|
|
18
4
|
export declare class Datasets extends APIResource {
|
|
19
|
-
versions: VersionsAPI.Versions;
|
|
20
|
-
runs: RunsAPI.Runs;
|
|
21
5
|
experimentRuns: ExperimentRunsAPI.ExperimentRuns;
|
|
22
|
-
share: ShareAPI.Share;
|
|
23
|
-
comparative: ComparativeAPI.Comparative;
|
|
24
|
-
splits: SplitsAPI.Splits;
|
|
25
|
-
/**
|
|
26
|
-
* Create a new dataset.
|
|
27
|
-
*/
|
|
28
|
-
create(body: DatasetCreateParams, options?: RequestOptions): APIPromise<Dataset>;
|
|
29
|
-
/**
|
|
30
|
-
* Get a specific dataset.
|
|
31
|
-
*/
|
|
32
|
-
retrieve(datasetID: string, options?: RequestOptions): APIPromise<Dataset>;
|
|
33
|
-
/**
|
|
34
|
-
* Update a specific dataset.
|
|
35
|
-
*/
|
|
36
|
-
update(datasetID: string, body: DatasetUpdateParams, options?: RequestOptions): APIPromise<DatasetUpdateResponse>;
|
|
37
|
-
/**
|
|
38
|
-
* Get all datasets by query params and owner.
|
|
39
|
-
*/
|
|
40
|
-
list(params?: DatasetListParams | null | undefined, options?: RequestOptions): PagePromise<DatasetsOffsetPaginationTopLevelArray, Dataset>;
|
|
41
|
-
/**
|
|
42
|
-
* Delete a specific dataset.
|
|
43
|
-
*/
|
|
44
|
-
delete(datasetID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
45
|
-
/**
|
|
46
|
-
* Clone a dataset.
|
|
47
|
-
*/
|
|
48
|
-
clone(body: DatasetCloneParams, options?: RequestOptions): APIPromise<DatasetCloneResponse>;
|
|
49
|
-
/**
|
|
50
|
-
* Download a dataset as CSV format.
|
|
51
|
-
*/
|
|
52
|
-
retrieveCsv(datasetID: string, query?: DatasetRetrieveCsvParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
|
|
53
|
-
/**
|
|
54
|
-
* Download a dataset as CSV format.
|
|
55
|
-
*/
|
|
56
|
-
retrieveJSONL(datasetID: string, query?: DatasetRetrieveJSONLParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
|
|
57
|
-
/**
|
|
58
|
-
* Download a dataset as OpenAI Evals Jsonl format.
|
|
59
|
-
*/
|
|
60
|
-
retrieveOpenAI(datasetID: string, query?: DatasetRetrieveOpenAIParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
|
|
61
|
-
/**
|
|
62
|
-
* Download a dataset as OpenAI Jsonl format.
|
|
63
|
-
*/
|
|
64
|
-
retrieveOpenAIFt(datasetID: string, query?: DatasetRetrieveOpenAIFtParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
|
|
65
|
-
/**
|
|
66
|
-
* Get dataset version by as_of or exact tag.
|
|
67
|
-
*/
|
|
68
|
-
retrieveVersion(datasetID: string, query?: DatasetRetrieveVersionParams | null | undefined, options?: RequestOptions): APIPromise<DatasetVersion>;
|
|
69
|
-
/**
|
|
70
|
-
* Set a tag on a dataset version.
|
|
71
|
-
*/
|
|
72
|
-
updateTags(datasetID: string, body: DatasetUpdateTagsParams, options?: RequestOptions): APIPromise<DatasetVersion>;
|
|
73
|
-
/**
|
|
74
|
-
* Create a new dataset from a CSV or JSONL file.
|
|
75
|
-
*/
|
|
76
|
-
upload(body: DatasetUploadParams, options?: RequestOptions): APIPromise<Dataset>;
|
|
77
6
|
}
|
|
78
|
-
export type DatasetsOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<Dataset>;
|
|
79
|
-
export type DatasetVersionsOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<DatasetVersion>;
|
|
80
7
|
/**
|
|
81
8
|
* Enum for dataset data types.
|
|
82
9
|
*/
|
|
@@ -217,202 +144,7 @@ export interface Missing {
|
|
|
217
144
|
* Enum for available dataset columns to sort by.
|
|
218
145
|
*/
|
|
219
146
|
export type SortByDatasetColumn = 'name' | 'created_at' | 'last_session_start_time' | 'example_count' | 'session_count' | 'modified_at';
|
|
220
|
-
export interface DatasetUpdateResponse {
|
|
221
|
-
id: string;
|
|
222
|
-
name: string;
|
|
223
|
-
tenant_id: string;
|
|
224
|
-
created_at?: string;
|
|
225
|
-
/**
|
|
226
|
-
* Enum for dataset data types.
|
|
227
|
-
*/
|
|
228
|
-
data_type?: DataType | null;
|
|
229
|
-
description?: string | null;
|
|
230
|
-
externally_managed?: boolean | null;
|
|
231
|
-
inputs_schema_definition?: {
|
|
232
|
-
[key: string]: unknown;
|
|
233
|
-
} | null;
|
|
234
|
-
outputs_schema_definition?: {
|
|
235
|
-
[key: string]: unknown;
|
|
236
|
-
} | null;
|
|
237
|
-
transformations?: Array<DatasetTransformation> | null;
|
|
238
|
-
}
|
|
239
|
-
export type DatasetDeleteResponse = unknown;
|
|
240
|
-
export type DatasetCloneResponse = Array<{
|
|
241
|
-
[key: string]: unknown;
|
|
242
|
-
}>;
|
|
243
|
-
export type DatasetRetrieveCsvResponse = unknown;
|
|
244
|
-
export type DatasetRetrieveJSONLResponse = unknown;
|
|
245
|
-
export type DatasetRetrieveOpenAIResponse = unknown;
|
|
246
|
-
export type DatasetRetrieveOpenAIFtResponse = unknown;
|
|
247
|
-
export interface DatasetCreateParams {
|
|
248
|
-
name: string;
|
|
249
|
-
id?: string | null;
|
|
250
|
-
created_at?: string;
|
|
251
|
-
/**
|
|
252
|
-
* Enum for dataset data types.
|
|
253
|
-
*/
|
|
254
|
-
data_type?: DataType;
|
|
255
|
-
description?: string | null;
|
|
256
|
-
externally_managed?: boolean | null;
|
|
257
|
-
extra?: {
|
|
258
|
-
[key: string]: unknown;
|
|
259
|
-
} | null;
|
|
260
|
-
inputs_schema_definition?: {
|
|
261
|
-
[key: string]: unknown;
|
|
262
|
-
} | null;
|
|
263
|
-
outputs_schema_definition?: {
|
|
264
|
-
[key: string]: unknown;
|
|
265
|
-
} | null;
|
|
266
|
-
tag_value_ids?: Array<string> | null;
|
|
267
|
-
transformations?: Array<DatasetTransformation> | null;
|
|
268
|
-
}
|
|
269
|
-
export interface DatasetUpdateParams {
|
|
270
|
-
baseline_experiment_id?: string | Missing | null;
|
|
271
|
-
description?: string | Missing | null;
|
|
272
|
-
inputs_schema_definition?: {
|
|
273
|
-
[key: string]: unknown;
|
|
274
|
-
} | Missing | null;
|
|
275
|
-
metadata?: {
|
|
276
|
-
[key: string]: unknown;
|
|
277
|
-
} | Missing | null;
|
|
278
|
-
name?: string | Missing | null;
|
|
279
|
-
outputs_schema_definition?: {
|
|
280
|
-
[key: string]: unknown;
|
|
281
|
-
} | Missing | null;
|
|
282
|
-
patch_examples?: {
|
|
283
|
-
[key: string]: DatasetUpdateParams.PatchExamples;
|
|
284
|
-
} | null;
|
|
285
|
-
transformations?: Array<DatasetTransformation> | Missing | null;
|
|
286
|
-
}
|
|
287
|
-
export declare namespace DatasetUpdateParams {
|
|
288
|
-
/**
|
|
289
|
-
* Update class for Example.
|
|
290
|
-
*/
|
|
291
|
-
interface PatchExamples {
|
|
292
|
-
attachments_operations?: PatchExamples.AttachmentsOperations | null;
|
|
293
|
-
dataset_id?: string | null;
|
|
294
|
-
inputs?: {
|
|
295
|
-
[key: string]: unknown;
|
|
296
|
-
} | null;
|
|
297
|
-
metadata?: {
|
|
298
|
-
[key: string]: unknown;
|
|
299
|
-
} | null;
|
|
300
|
-
outputs?: {
|
|
301
|
-
[key: string]: unknown;
|
|
302
|
-
} | null;
|
|
303
|
-
overwrite?: boolean;
|
|
304
|
-
split?: Array<string> | string | null;
|
|
305
|
-
}
|
|
306
|
-
namespace PatchExamples {
|
|
307
|
-
interface AttachmentsOperations {
|
|
308
|
-
/**
|
|
309
|
-
* Mapping of old attachment names to new names
|
|
310
|
-
*/
|
|
311
|
-
rename?: {
|
|
312
|
-
[key: string]: string;
|
|
313
|
-
};
|
|
314
|
-
/**
|
|
315
|
-
* List of attachment names to keep
|
|
316
|
-
*/
|
|
317
|
-
retain?: Array<string>;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
export interface DatasetListParams extends OffsetPaginationTopLevelArrayParams {
|
|
322
|
-
id?: Array<string> | null;
|
|
323
|
-
/**
|
|
324
|
-
* Enum for dataset data types.
|
|
325
|
-
*/
|
|
326
|
-
datatype?: Array<DataType> | DataType | null;
|
|
327
|
-
exclude?: Array<'example_count'> | null;
|
|
328
|
-
exclude_corrections_datasets?: boolean;
|
|
329
|
-
metadata?: string | null;
|
|
330
|
-
name?: string | null;
|
|
331
|
-
name_contains?: string | null;
|
|
332
|
-
/**
|
|
333
|
-
* Enum for available dataset columns to sort by.
|
|
334
|
-
*/
|
|
335
|
-
sort_by?: SortByDatasetColumn;
|
|
336
|
-
sort_by_desc?: boolean;
|
|
337
|
-
tag_value_id?: Array<string> | null;
|
|
338
|
-
}
|
|
339
|
-
export interface DatasetCloneParams {
|
|
340
|
-
source_dataset_id: string;
|
|
341
|
-
target_dataset_id: string;
|
|
342
|
-
/**
|
|
343
|
-
* Only modifications made on or before this time are included. If None, the latest
|
|
344
|
-
* version of the dataset is used.
|
|
345
|
-
*/
|
|
346
|
-
as_of?: (string & {}) | string | null;
|
|
347
|
-
examples?: Array<string>;
|
|
348
|
-
split?: string | Array<string> | null;
|
|
349
|
-
tag_value_ids?: Array<string> | null;
|
|
350
|
-
}
|
|
351
|
-
export interface DatasetRetrieveCsvParams {
|
|
352
|
-
/**
|
|
353
|
-
* Only modifications made on or before this time are included. If None, the latest
|
|
354
|
-
* version of the dataset is used.
|
|
355
|
-
*/
|
|
356
|
-
as_of?: string | null;
|
|
357
|
-
}
|
|
358
|
-
export interface DatasetRetrieveJSONLParams {
|
|
359
|
-
/**
|
|
360
|
-
* Only modifications made on or before this time are included. If None, the latest
|
|
361
|
-
* version of the dataset is used.
|
|
362
|
-
*/
|
|
363
|
-
as_of?: string | null;
|
|
364
|
-
}
|
|
365
|
-
export interface DatasetRetrieveOpenAIParams {
|
|
366
|
-
/**
|
|
367
|
-
* Only modifications made on or before this time are included. If None, the latest
|
|
368
|
-
* version of the dataset is used.
|
|
369
|
-
*/
|
|
370
|
-
as_of?: string | null;
|
|
371
|
-
}
|
|
372
|
-
export interface DatasetRetrieveOpenAIFtParams {
|
|
373
|
-
/**
|
|
374
|
-
* Only modifications made on or before this time are included. If None, the latest
|
|
375
|
-
* version of the dataset is used.
|
|
376
|
-
*/
|
|
377
|
-
as_of?: string | null;
|
|
378
|
-
}
|
|
379
|
-
export interface DatasetRetrieveVersionParams {
|
|
380
|
-
as_of?: string | null;
|
|
381
|
-
tag?: string | null;
|
|
382
|
-
}
|
|
383
|
-
export interface DatasetUpdateTagsParams {
|
|
384
|
-
/**
|
|
385
|
-
* Only modifications made on or before this time are included. If None, the latest
|
|
386
|
-
* version of the dataset is used.
|
|
387
|
-
*/
|
|
388
|
-
as_of: (string & {}) | string;
|
|
389
|
-
tag: string;
|
|
390
|
-
}
|
|
391
|
-
export interface DatasetUploadParams {
|
|
392
|
-
file: Uploadable;
|
|
393
|
-
input_keys: Array<string>;
|
|
394
|
-
/**
|
|
395
|
-
* Enum for dataset data types.
|
|
396
|
-
*/
|
|
397
|
-
data_type?: DataType;
|
|
398
|
-
description?: string | null;
|
|
399
|
-
input_key_mappings?: string | null;
|
|
400
|
-
inputs_schema_definition?: string | null;
|
|
401
|
-
metadata_key_mappings?: string | null;
|
|
402
|
-
metadata_keys?: Array<string>;
|
|
403
|
-
name?: string | null;
|
|
404
|
-
output_key_mappings?: string | null;
|
|
405
|
-
output_keys?: Array<string>;
|
|
406
|
-
outputs_schema_definition?: string | null;
|
|
407
|
-
tag_value_ids?: string | null;
|
|
408
|
-
transformations?: string | null;
|
|
409
|
-
}
|
|
410
147
|
export declare namespace Datasets {
|
|
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,
|
|
412
|
-
export {
|
|
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, };
|
|
415
|
-
export { Share as Share, type DatasetShareSchema as DatasetShareSchema, type ShareDeleteAllResponse as ShareDeleteAllResponse, type ShareCreateParams as ShareCreateParams, };
|
|
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, };
|
|
417
|
-
export { Splits as Splits, type SplitCreateResponse as SplitCreateResponse, type SplitRetrieveResponse as SplitRetrieveResponse, type SplitCreateParams as SplitCreateParams, type SplitRetrieveParams as SplitRetrieveParams, };
|
|
148
|
+
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, };
|
|
149
|
+
export { ExperimentRuns as ExperimentRuns, type ExperimentRunQueryResponse as ExperimentRunQueryResponse, type ExperimentRunQueryResponsesItemsCursorPostPagination as ExperimentRunQueryResponsesItemsCursorPostPagination, type ExperimentRunQueryParams as ExperimentRunQueryParams, };
|
|
418
150
|
}
|