langsmith 0.7.13 → 0.7.15
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 +10 -5
- package/dist/_openapi_client/client.js +9 -1
- package/dist/_openapi_client/core/pagination.cjs +29 -1
- package/dist/_openapi_client/core/pagination.d.ts +11 -0
- package/dist/_openapi_client/core/pagination.js +27 -0
- 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 +4 -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 +3 -2
- package/dist/_openapi_client/resources/index.js +2 -1
- package/dist/_openapi_client/resources/issues.cjs +31 -0
- package/dist/_openapi_client/resources/issues.d.ts +78 -0
- package/dist/_openapi_client/resources/issues.js +27 -0
- package/dist/_openapi_client/resources/runs/index.d.ts +1 -1
- package/dist/_openapi_client/resources/runs/runs.cjs +2 -2
- package/dist/_openapi_client/resources/runs/runs.d.ts +24 -24
- package/dist/_openapi_client/resources/runs/runs.js +2 -2
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +7 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +1 -0
- package/dist/_openapi_client/resources/sessions.cjs +53 -0
- package/dist/_openapi_client/resources/{sessions/sessions.d.ts → sessions.d.ts} +14 -52
- package/dist/_openapi_client/resources/sessions.js +49 -0
- package/dist/client.cjs +40 -0
- package/dist/client.d.ts +28 -0
- package/dist/client.js +40 -0
- package/dist/experimental/anthropic/context.cjs +6 -1
- package/dist/experimental/anthropic/context.js +6 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/env.cjs +1 -1
- package/dist/utils/env.d.ts +0 -7
- package/dist/utils/env.js +1 -1
- package/package.json +10 -10
- 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
|
@@ -63,11 +63,12 @@ const Uploads = __importStar(require("./core/uploads.cjs"));
|
|
|
63
63
|
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
|
+
const issues_js_1 = require("./resources/issues.cjs");
|
|
66
67
|
const online_evaluators_js_1 = require("./resources/online-evaluators.cjs");
|
|
68
|
+
const sessions_js_1 = require("./resources/sessions.cjs");
|
|
67
69
|
const datasets_js_1 = require("./resources/datasets/datasets.cjs");
|
|
68
70
|
const runs_js_1 = require("./resources/runs/runs.cjs");
|
|
69
71
|
const sandboxes_js_1 = require("./resources/sandboxes/sandboxes.cjs");
|
|
70
|
-
const sessions_js_1 = require("./resources/sessions/sessions.cjs");
|
|
71
72
|
const headers_js_1 = require("./internal/headers.cjs");
|
|
72
73
|
const env_js_1 = require("./internal/utils/env.cjs");
|
|
73
74
|
const log_js_1 = require("./internal/utils/log.cjs");
|
|
@@ -188,6 +189,12 @@ class Langsmith {
|
|
|
188
189
|
writable: true,
|
|
189
190
|
value: new API.Info(this)
|
|
190
191
|
});
|
|
192
|
+
Object.defineProperty(this, "issues", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
configurable: true,
|
|
195
|
+
writable: true,
|
|
196
|
+
value: new API.Issues(this)
|
|
197
|
+
});
|
|
191
198
|
Object.defineProperty(this, "sandboxes", {
|
|
192
199
|
enumerable: true,
|
|
193
200
|
configurable: true,
|
|
@@ -739,4 +746,5 @@ Langsmith.Datasets = datasets_js_1.Datasets;
|
|
|
739
746
|
Langsmith.Runs = runs_js_1.Runs;
|
|
740
747
|
Langsmith.OnlineEvaluators = online_evaluators_js_1.OnlineEvaluators;
|
|
741
748
|
Langsmith.Info = info_js_1.Info;
|
|
749
|
+
Langsmith.Issues = issues_js_1.Issues;
|
|
742
750
|
Langsmith.Sandboxes = sandboxes_js_1.Sandboxes;
|
|
@@ -4,16 +4,17 @@ export type { Logger, LogLevel } from './internal/utils/log.js';
|
|
|
4
4
|
import * as Opts from './internal/request-options.js';
|
|
5
5
|
import * as Errors from './core/error.js';
|
|
6
6
|
import * as Pagination from './core/pagination.js';
|
|
7
|
-
import { type CursorPaginationParams, CursorPaginationResponse, type ItemsCursorGetPaginationParams, ItemsCursorGetPaginationResponse, type ItemsCursorPostPaginationParams, ItemsCursorPostPaginationResponse, type OffsetPaginationCommitsParams, OffsetPaginationCommitsResponse, type OffsetPaginationInsightsClusteringJobsParams, OffsetPaginationInsightsClusteringJobsResponse, type OffsetPaginationOnlineEvaluatorsParams, OffsetPaginationOnlineEvaluatorsResponse, type OffsetPaginationReposParams, OffsetPaginationReposResponse, type OffsetPaginationTopLevelArrayParams, OffsetPaginationTopLevelArrayResponse } from './core/pagination.js';
|
|
7
|
+
import { type CursorPaginationParams, CursorPaginationResponse, type ItemsCursorGetPaginationParams, ItemsCursorGetPaginationResponse, type ItemsCursorPostPaginationParams, ItemsCursorPostPaginationResponse, type OffsetPaginationCommitsParams, OffsetPaginationCommitsResponse, type OffsetPaginationInsightsClusteringJobsParams, OffsetPaginationInsightsClusteringJobsResponse, type OffsetPaginationIssuesParams, OffsetPaginationIssuesResponse, type OffsetPaginationOnlineEvaluatorsParams, OffsetPaginationOnlineEvaluatorsResponse, type OffsetPaginationReposParams, OffsetPaginationReposResponse, type OffsetPaginationTopLevelArrayParams, OffsetPaginationTopLevelArrayResponse } from './core/pagination.js';
|
|
8
8
|
import * as Uploads from './core/uploads.js';
|
|
9
9
|
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
|
+
import { Issue, IssueListParams, Issues, IssuesOffsetPaginationIssues } from './resources/issues.js';
|
|
12
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 { CustomChartsSection, CustomChartsSectionRequest, RunStatsGroupBy, SessionCreateParams, SessionDeleteResponse, SessionListParams, SessionRetrieveParams, SessionSortableColumns, SessionUpdateParams, Sessions, TimedeltaInput, TracerSession, TracerSessionWithoutVirtualFields, TracerSessionsOffsetPaginationTopLevelArray } from './resources/sessions.js';
|
|
13
15
|
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
|
-
import {
|
|
16
|
+
import { ResponseBodyForRunsGenerateQuery, Run, RunIngest, RunQueryParams, RunQueryV2Params, RunRetrieveParams, RunRetrieveV2Params, RunSchema, RunStatsQueryParams, RunTypeEnum, Runs, RunsFilterDataSourceTypeEnum, RunsItemsCursorPostPagination } from './resources/runs/runs.js';
|
|
15
17
|
import { SandboxListResponse, SandboxResponse, SandboxStatusResponse, Sandboxes, ServiceURLResponse, SnapshotListResponse, SnapshotResponse } from './resources/sandboxes/sandboxes.js';
|
|
16
|
-
import { CustomChartsSection, CustomChartsSectionRequest, RunStatsGroupBy, SessionCreateParams, SessionDashboardParams, SessionDeleteResponse, SessionListParams, SessionRetrieveParams, SessionSortableColumns, SessionUpdateParams, Sessions, TimedeltaInput, TracerSession, TracerSessionWithoutVirtualFields, TracerSessionsOffsetPaginationTopLevelArray } from './resources/sessions/sessions.js';
|
|
17
18
|
import { type Fetch } from './internal/builtin-types.js';
|
|
18
19
|
import { HeadersLike, NullableHeaders } from './internal/headers.js';
|
|
19
20
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options.js';
|
|
@@ -191,12 +192,15 @@ export declare class Langsmith {
|
|
|
191
192
|
runs: API.Runs;
|
|
192
193
|
onlineEvaluators: API.OnlineEvaluators;
|
|
193
194
|
info: API.Info;
|
|
195
|
+
issues: API.Issues;
|
|
194
196
|
sandboxes: API.Sandboxes;
|
|
195
197
|
}
|
|
196
198
|
export declare namespace Langsmith {
|
|
197
199
|
export type RequestOptions = Opts.RequestOptions;
|
|
198
200
|
export import OffsetPaginationTopLevelArray = Pagination.OffsetPaginationTopLevelArray;
|
|
199
201
|
export { type OffsetPaginationTopLevelArrayParams as OffsetPaginationTopLevelArrayParams, type OffsetPaginationTopLevelArrayResponse as OffsetPaginationTopLevelArrayResponse, };
|
|
202
|
+
export import OffsetPaginationIssues = Pagination.OffsetPaginationIssues;
|
|
203
|
+
export { type OffsetPaginationIssuesParams as OffsetPaginationIssuesParams, type OffsetPaginationIssuesResponse as OffsetPaginationIssuesResponse, };
|
|
200
204
|
export import OffsetPaginationRepos = Pagination.OffsetPaginationRepos;
|
|
201
205
|
export { type OffsetPaginationReposParams as OffsetPaginationReposParams, type OffsetPaginationReposResponse as OffsetPaginationReposResponse, };
|
|
202
206
|
export import OffsetPaginationCommits = Pagination.OffsetPaginationCommits;
|
|
@@ -211,10 +215,11 @@ export declare namespace Langsmith {
|
|
|
211
215
|
export { type ItemsCursorPostPaginationParams as ItemsCursorPostPaginationParams, type ItemsCursorPostPaginationResponse as ItemsCursorPostPaginationResponse, };
|
|
212
216
|
export import ItemsCursorGetPagination = Pagination.ItemsCursorGetPagination;
|
|
213
217
|
export { type ItemsCursorGetPaginationParams as ItemsCursorGetPaginationParams, type ItemsCursorGetPaginationResponse as ItemsCursorGetPaginationResponse, };
|
|
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,
|
|
218
|
+
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, };
|
|
215
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, };
|
|
216
|
-
export { Runs as Runs, type
|
|
220
|
+
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, };
|
|
217
221
|
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, };
|
|
218
222
|
export { Info as Info, type InfoListResponse as InfoListResponse };
|
|
223
|
+
export { Issues as Issues, type Issue as Issue, type IssuesOffsetPaginationIssues as IssuesOffsetPaginationIssues, type IssueListParams as IssueListParams, };
|
|
219
224
|
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, };
|
|
220
225
|
}
|
|
@@ -27,11 +27,12 @@ import * as Uploads from './core/uploads.js';
|
|
|
27
27
|
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
|
+
import { Issues } from './resources/issues.js';
|
|
30
31
|
import { OnlineEvaluators, } from './resources/online-evaluators.js';
|
|
32
|
+
import { Sessions, } from './resources/sessions.js';
|
|
31
33
|
import { Datasets, } from './resources/datasets/datasets.js';
|
|
32
34
|
import { Runs, } from './resources/runs/runs.js';
|
|
33
35
|
import { Sandboxes, } from './resources/sandboxes/sandboxes.js';
|
|
34
|
-
import { Sessions, } from './resources/sessions/sessions.js';
|
|
35
36
|
import { buildHeaders } from './internal/headers.js';
|
|
36
37
|
import { readEnv } from './internal/utils/env.js';
|
|
37
38
|
import { formatRequestDetails, loggerFor, parseLogLevel, } from './internal/utils/log.js';
|
|
@@ -152,6 +153,12 @@ export class Langsmith {
|
|
|
152
153
|
writable: true,
|
|
153
154
|
value: new API.Info(this)
|
|
154
155
|
});
|
|
156
|
+
Object.defineProperty(this, "issues", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
configurable: true,
|
|
159
|
+
writable: true,
|
|
160
|
+
value: new API.Issues(this)
|
|
161
|
+
});
|
|
155
162
|
Object.defineProperty(this, "sandboxes", {
|
|
156
163
|
enumerable: true,
|
|
157
164
|
configurable: true,
|
|
@@ -702,4 +709,5 @@ Langsmith.Datasets = Datasets;
|
|
|
702
709
|
Langsmith.Runs = Runs;
|
|
703
710
|
Langsmith.OnlineEvaluators = OnlineEvaluators;
|
|
704
711
|
Langsmith.Info = Info;
|
|
712
|
+
Langsmith.Issues = Issues;
|
|
705
713
|
Langsmith.Sandboxes = Sandboxes;
|
|
@@ -14,7 +14,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
14
14
|
};
|
|
15
15
|
var _AbstractPage_client;
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ItemsCursorGetPagination = exports.ItemsCursorPostPagination = exports.CursorPagination = exports.OffsetPaginationInsightsClusteringJobs = exports.OffsetPaginationOnlineEvaluators = exports.OffsetPaginationCommits = exports.OffsetPaginationRepos = exports.OffsetPaginationTopLevelArray = exports.PagePromise = exports.AbstractPage = void 0;
|
|
17
|
+
exports.ItemsCursorGetPagination = exports.ItemsCursorPostPagination = exports.CursorPagination = exports.OffsetPaginationInsightsClusteringJobs = exports.OffsetPaginationOnlineEvaluators = exports.OffsetPaginationCommits = exports.OffsetPaginationRepos = exports.OffsetPaginationIssues = exports.OffsetPaginationTopLevelArray = exports.PagePromise = exports.AbstractPage = void 0;
|
|
18
18
|
const error_js_1 = require("./error.cjs");
|
|
19
19
|
const parse_js_1 = require("../internal/parse.cjs");
|
|
20
20
|
const api_promise_js_1 = require("./api-promise.cjs");
|
|
@@ -131,6 +131,34 @@ class OffsetPaginationTopLevelArray extends AbstractPage {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
exports.OffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray;
|
|
134
|
+
class OffsetPaginationIssues extends AbstractPage {
|
|
135
|
+
constructor(client, response, body, options) {
|
|
136
|
+
super(client, response, body, options);
|
|
137
|
+
Object.defineProperty(this, "items", {
|
|
138
|
+
enumerable: true,
|
|
139
|
+
configurable: true,
|
|
140
|
+
writable: true,
|
|
141
|
+
value: void 0
|
|
142
|
+
});
|
|
143
|
+
this.items = body || [];
|
|
144
|
+
}
|
|
145
|
+
getPaginatedItems() {
|
|
146
|
+
return this.items ?? [];
|
|
147
|
+
}
|
|
148
|
+
nextPageRequestOptions() {
|
|
149
|
+
const offset = this.options.query.offset ?? 0;
|
|
150
|
+
const length = this.getPaginatedItems().length;
|
|
151
|
+
const currentCount = offset + length;
|
|
152
|
+
return {
|
|
153
|
+
...this.options,
|
|
154
|
+
query: {
|
|
155
|
+
...(0, values_js_1.maybeObj)(this.options.query),
|
|
156
|
+
offset: currentCount,
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
exports.OffsetPaginationIssues = OffsetPaginationIssues;
|
|
134
162
|
class OffsetPaginationRepos extends AbstractPage {
|
|
135
163
|
constructor(client, response, body, options) {
|
|
136
164
|
super(client, response, body, options);
|
|
@@ -47,6 +47,17 @@ export declare class OffsetPaginationTopLevelArray<Item> extends AbstractPage<It
|
|
|
47
47
|
getPaginatedItems(): Item[];
|
|
48
48
|
nextPageRequestOptions(): PageRequestOptions | null;
|
|
49
49
|
}
|
|
50
|
+
export type OffsetPaginationIssuesResponse<Item> = Item[];
|
|
51
|
+
export interface OffsetPaginationIssuesParams {
|
|
52
|
+
offset?: number;
|
|
53
|
+
limit?: number;
|
|
54
|
+
}
|
|
55
|
+
export declare class OffsetPaginationIssues<Item> extends AbstractPage<Item> {
|
|
56
|
+
items: Array<Item>;
|
|
57
|
+
constructor(client: Langsmith, response: Response, body: OffsetPaginationIssuesResponse<Item>, options: FinalRequestOptions);
|
|
58
|
+
getPaginatedItems(): Item[];
|
|
59
|
+
nextPageRequestOptions(): PageRequestOptions | null;
|
|
60
|
+
}
|
|
50
61
|
export interface OffsetPaginationReposResponse<Item> {
|
|
51
62
|
repos: Array<Item>;
|
|
52
63
|
total: number;
|
|
@@ -125,6 +125,33 @@ export class OffsetPaginationTopLevelArray extends AbstractPage {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
+
export class OffsetPaginationIssues extends AbstractPage {
|
|
129
|
+
constructor(client, response, body, options) {
|
|
130
|
+
super(client, response, body, options);
|
|
131
|
+
Object.defineProperty(this, "items", {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
configurable: true,
|
|
134
|
+
writable: true,
|
|
135
|
+
value: void 0
|
|
136
|
+
});
|
|
137
|
+
this.items = body || [];
|
|
138
|
+
}
|
|
139
|
+
getPaginatedItems() {
|
|
140
|
+
return this.items ?? [];
|
|
141
|
+
}
|
|
142
|
+
nextPageRequestOptions() {
|
|
143
|
+
const offset = this.options.query.offset ?? 0;
|
|
144
|
+
const length = this.getPaginatedItems().length;
|
|
145
|
+
const currentCount = offset + length;
|
|
146
|
+
return {
|
|
147
|
+
...this.options,
|
|
148
|
+
query: {
|
|
149
|
+
...maybeObj(this.options.query),
|
|
150
|
+
offset: currentCount,
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
}
|
|
128
155
|
export class OffsetPaginationRepos extends AbstractPage {
|
|
129
156
|
constructor(client, response, body, options) {
|
|
130
157
|
super(client, response, body, options);
|
|
@@ -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.Run>;
|
|
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.
|
|
@@ -42,6 +37,9 @@ export interface ExampleWithRunsCh {
|
|
|
42
37
|
[key: string]: unknown;
|
|
43
38
|
} | null;
|
|
44
39
|
source_run_id?: string | null;
|
|
40
|
+
source_run_start_time?: string | null;
|
|
41
|
+
source_session_id?: string | null;
|
|
42
|
+
source_trace_id?: string | null;
|
|
45
43
|
}
|
|
46
44
|
export declare namespace ExampleWithRunsCh {
|
|
47
45
|
/**
|
|
@@ -123,34 +121,6 @@ export interface QueryExampleSchemaWithRuns {
|
|
|
123
121
|
preview?: boolean;
|
|
124
122
|
sort_params?: SortParamsForRunsComparisonView | null;
|
|
125
123
|
}
|
|
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
124
|
export interface SortParamsForRunsComparisonView {
|
|
155
125
|
sort_by: string;
|
|
156
126
|
sort_order?: 'ASC' | 'DESC';
|
|
@@ -200,17 +170,6 @@ export interface RunCreateParams {
|
|
|
200
170
|
*/
|
|
201
171
|
sort_params?: SortParamsForRunsComparisonView | null;
|
|
202
172
|
}
|
|
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
173
|
export declare namespace Runs {
|
|
215
|
-
export { type ExampleWithRunsCh as ExampleWithRunsCh, type QueryExampleSchemaWithRuns as QueryExampleSchemaWithRuns, type
|
|
174
|
+
export { type ExampleWithRunsCh as ExampleWithRunsCh, type QueryExampleSchemaWithRuns as QueryExampleSchemaWithRuns, type SortParamsForRunsComparisonView as SortParamsForRunsComparisonView, type RunCreateResponse as RunCreateResponse, type RunCreateParams as RunCreateParams, };
|
|
216
175
|
}
|
|
@@ -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,16 +2,18 @@
|
|
|
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.Sandboxes = exports.Runs = exports.OnlineEvaluators = exports.Info = exports.Datasets = void 0;
|
|
5
|
+
exports.Sessions = exports.Sandboxes = exports.Runs = exports.OnlineEvaluators = exports.Issues = 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");
|
|
9
9
|
Object.defineProperty(exports, "Info", { enumerable: true, get: function () { return info_js_1.Info; } });
|
|
10
|
+
var issues_js_1 = require("./issues.cjs");
|
|
11
|
+
Object.defineProperty(exports, "Issues", { enumerable: true, get: function () { return issues_js_1.Issues; } });
|
|
10
12
|
var online_evaluators_js_1 = require("./online-evaluators.cjs");
|
|
11
13
|
Object.defineProperty(exports, "OnlineEvaluators", { enumerable: true, get: function () { return online_evaluators_js_1.OnlineEvaluators; } });
|
|
12
14
|
var runs_js_1 = require("./runs/runs.cjs");
|
|
13
15
|
Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_js_1.Runs; } });
|
|
14
16
|
var sandboxes_js_1 = require("./sandboxes/sandboxes.cjs");
|
|
15
17
|
Object.defineProperty(exports, "Sandboxes", { enumerable: true, get: function () { return sandboxes_js_1.Sandboxes; } });
|
|
16
|
-
var sessions_js_1 = require("./sessions
|
|
18
|
+
var sessions_js_1 = require("./sessions.cjs");
|
|
17
19
|
Object.defineProperty(exports, "Sessions", { enumerable: true, get: function () { return sessions_js_1.Sessions; } });
|