langsmith 0.7.15 → 0.7.16
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 +1 -1
- package/dist/_openapi_client/client.d.ts +3 -3
- package/dist/_openapi_client/client.js +1 -1
- 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 +1 -1
- package/dist/_openapi_client/resources/index.d.ts +2 -2
- package/dist/_openapi_client/resources/index.js +1 -1
- package/dist/_openapi_client/resources/runs.cjs +69 -15
- package/dist/_openapi_client/resources/runs.d.ts +806 -1
- package/dist/_openapi_client/resources/runs.js +67 -1
- 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/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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIResource } from '../../core/resource.js';
|
|
2
|
-
import * as RunsAPI from '../runs
|
|
2
|
+
import * as RunsAPI from '../runs.js';
|
|
3
3
|
import { ItemsCursorPostPagination, type ItemsCursorPostPaginationParams, PagePromise } from '../../core/pagination.js';
|
|
4
4
|
import { RequestOptions } from '../../internal/request-options.js';
|
|
5
5
|
export declare class ExperimentRuns extends APIResource {
|
|
@@ -7,10 +7,10 @@ export declare class ExperimentRuns extends APIResource {
|
|
|
7
7
|
* Returns a paginated page of dataset examples with runs from the requested
|
|
8
8
|
* experiments. Response uses the canonical `{items, next_cursor}` envelope.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
query(datasetID: string, body: ExperimentRunQueryParams, options?: RequestOptions): PagePromise<ExperimentRunQueryResponsesItemsCursorPostPagination, ExperimentRunQueryResponse>;
|
|
11
11
|
}
|
|
12
|
-
export type
|
|
13
|
-
export interface
|
|
12
|
+
export type ExperimentRunQueryResponsesItemsCursorPostPagination = ItemsCursorPostPagination<ExperimentRunQueryResponse>;
|
|
13
|
+
export interface ExperimentRunQueryResponse {
|
|
14
14
|
/**
|
|
15
15
|
* `id` is the dataset example UUID.
|
|
16
16
|
*/
|
|
@@ -56,7 +56,7 @@ export interface ExperimentRunCreateResponse {
|
|
|
56
56
|
*/
|
|
57
57
|
source_run_id?: string;
|
|
58
58
|
}
|
|
59
|
-
export interface
|
|
59
|
+
export interface ExperimentRunQueryParams extends ItemsCursorPostPaginationParams {
|
|
60
60
|
/**
|
|
61
61
|
* `comparative_experiment_id` scopes pairwise-annotation feedback (optional).
|
|
62
62
|
*/
|
|
@@ -86,9 +86,9 @@ export interface ExperimentRunCreateParams extends ItemsCursorPostPaginationPara
|
|
|
86
86
|
/**
|
|
87
87
|
* `sort` controls feedback-score sorting (single project only).
|
|
88
88
|
*/
|
|
89
|
-
sort?:
|
|
89
|
+
sort?: ExperimentRunQueryParams.Sort;
|
|
90
90
|
}
|
|
91
|
-
export declare namespace
|
|
91
|
+
export declare namespace ExperimentRunQueryParams {
|
|
92
92
|
/**
|
|
93
93
|
* `sort` controls feedback-score sorting (single project only).
|
|
94
94
|
*/
|
|
@@ -105,5 +105,5 @@ export declare namespace ExperimentRunCreateParams {
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
export declare namespace ExperimentRuns {
|
|
108
|
-
export { type
|
|
108
|
+
export { type ExperimentRunQueryResponse as ExperimentRunQueryResponse, type ExperimentRunQueryResponsesItemsCursorPostPagination as ExperimentRunQueryResponsesItemsCursorPostPagination, type ExperimentRunQueryParams as ExperimentRunQueryParams, };
|
|
109
109
|
}
|
|
@@ -8,7 +8,7 @@ export class ExperimentRuns extends APIResource {
|
|
|
8
8
|
* Returns a paginated page of dataset examples with runs from the requested
|
|
9
9
|
* experiments. Response uses the canonical `{items, next_cursor}` envelope.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
query(datasetID, body, options) {
|
|
12
12
|
return this._client.getAPIList(path `/v2/datasets/${datasetID}/experiment-runs`, (ItemsCursorPostPagination), { body, method: 'post', ...options });
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -11,7 +11,7 @@ var issues_js_1 = require("./issues.cjs");
|
|
|
11
11
|
Object.defineProperty(exports, "Issues", { enumerable: true, get: function () { return issues_js_1.Issues; } });
|
|
12
12
|
var online_evaluators_js_1 = require("./online-evaluators.cjs");
|
|
13
13
|
Object.defineProperty(exports, "OnlineEvaluators", { enumerable: true, get: function () { return online_evaluators_js_1.OnlineEvaluators; } });
|
|
14
|
-
var runs_js_1 = require("./runs
|
|
14
|
+
var runs_js_1 = require("./runs.cjs");
|
|
15
15
|
Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_js_1.Runs; } });
|
|
16
16
|
var sandboxes_js_1 = require("./sandboxes/sandboxes.cjs");
|
|
17
17
|
Object.defineProperty(exports, "Sandboxes", { enumerable: true, get: function () { return sandboxes_js_1.Sandboxes; } });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { Datasets, type DataType, type Dataset, type DatasetTransformation, type DatasetVersion, type FeedbackCreateCoreSchema, type Missing, type SortByDatasetColumn,
|
|
1
|
+
export { Datasets, type DataType, type Dataset, type DatasetTransformation, type DatasetVersion, type FeedbackCreateCoreSchema, type Missing, type SortByDatasetColumn, } from './datasets/datasets.js';
|
|
2
2
|
export { Info, type InfoListResponse } from './info.js';
|
|
3
3
|
export { Issues, type Issue, type IssueListParams, type IssuesOffsetPaginationIssues } from './issues.js';
|
|
4
4
|
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';
|
|
5
|
-
export { Runs, type ResponseBodyForRunsGenerateQuery, type Run, type RunIngest, type RunSchema, type RunStatsQueryParams, type RunTypeEnum, type RunsFilterDataSourceTypeEnum, type RunQueryV2Params, type RunRetrieveV2Params, type RunRetrieveParams, type RunQueryParams, type RunsItemsCursorPostPagination, } from './runs
|
|
5
|
+
export { Runs, type ResponseBodyForRunsGenerateQuery, type Run, type RunIngest, type RunSchema, type RunStatsQueryParams, type RunTypeEnum, type RunsFilterDataSourceTypeEnum, type RunQueryV2Params, type RunRetrieveV2Params, type RunRetrieveParams, type RunQueryParams, type RunsItemsCursorPostPagination, } from './runs.js';
|
|
6
6
|
export { Sandboxes, type SandboxListResponse, type SandboxResponse, type SandboxStatusResponse, type ServiceURLResponse, type SnapshotListResponse, type SnapshotResponse, } from './sandboxes/sandboxes.js';
|
|
7
7
|
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,6 +4,6 @@ export { Datasets, } from './datasets/datasets.js';
|
|
|
4
4
|
export { Info } from './info.js';
|
|
5
5
|
export { Issues } from './issues.js';
|
|
6
6
|
export { OnlineEvaluators, } from './online-evaluators.js';
|
|
7
|
-
export { Runs, } from './runs
|
|
7
|
+
export { Runs, } from './runs.js';
|
|
8
8
|
export { Sandboxes, } from './sandboxes/sandboxes.js';
|
|
9
9
|
export { Sessions, } from './sessions.js';
|
|
@@ -1,19 +1,73 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
4
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(o, k2, desc);
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
-
};
|
|
18
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
|
|
5
|
+
exports.Runs = void 0;
|
|
6
|
+
const resource_js_1 = require("../core/resource.cjs");
|
|
7
|
+
const pagination_js_1 = require("../core/pagination.cjs");
|
|
8
|
+
const headers_js_1 = require("../internal/headers.cjs");
|
|
9
|
+
const path_js_1 = require("../internal/utils/path.cjs");
|
|
10
|
+
class Runs extends resource_js_1.APIResource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
Object.defineProperty(this, "retrieve", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: this.retrieveV2
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "query", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: this.queryV2
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* **Alpha:** The request and response contract may change; Returns a paginated
|
|
28
|
+
* list of runs for the given projects within min/max start_time. Supports filters,
|
|
29
|
+
* cursor pagination, and `selects` to select fields to return.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* // Automatically fetches more pages as needed.
|
|
34
|
+
* for await (const run of client.runs.queryV2()) {
|
|
35
|
+
* // ...
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
queryV2(params, options) {
|
|
40
|
+
const { Accept, ...body } = params;
|
|
41
|
+
return this._client.getAPIList('/v2/runs/query', (pagination_js_1.ItemsCursorPostPagination), {
|
|
42
|
+
body,
|
|
43
|
+
method: 'post',
|
|
44
|
+
...options,
|
|
45
|
+
headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* **Alpha:** The request and response contract may change; Returns one run by ID
|
|
50
|
+
* for the given session and start_time. Use the `selects` query parameter
|
|
51
|
+
* (repeatable) to select fields to return.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const run = await client.runs.retrieveV2(
|
|
56
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
57
|
+
* {
|
|
58
|
+
* project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
59
|
+
* start_time: '2019-12-27T18:11:19.117Z',
|
|
60
|
+
* },
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
retrieveV2(runID, params, options) {
|
|
65
|
+
const { Accept, ...query } = params;
|
|
66
|
+
return this._client.get((0, path_js_1.path) `/v2/runs/${runID}`, {
|
|
67
|
+
query,
|
|
68
|
+
...options,
|
|
69
|
+
headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.Runs = Runs;
|