langsmith 0.8.6 → 0.8.8
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 +8 -0
- package/dist/_openapi_client/client.d.ts +3 -0
- package/dist/_openapi_client/client.js +8 -0
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +147 -0
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +372 -0
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +110 -0
- package/dist/_openapi_client/resources/annotation-queues/items.cjs +84 -0
- package/dist/_openapi_client/resources/annotation-queues/items.d.ts +207 -0
- package/dist/_openapi_client/resources/annotation-queues/items.js +80 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.cjs +61 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +185 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.js +57 -0
- package/dist/_openapi_client/resources/datasets/experiment-runs.cjs +1 -1
- package/dist/_openapi_client/resources/datasets/experiment-runs.js +1 -1
- package/dist/_openapi_client/resources/index.cjs +3 -1
- package/dist/_openapi_client/resources/index.d.ts +1 -0
- package/dist/_openapi_client/resources/index.js +1 -0
- package/dist/_openapi_client/resources/info.cjs +3 -1
- package/dist/_openapi_client/resources/info.d.ts +16 -22
- package/dist/_openapi_client/resources/info.js +3 -1
- package/dist/_openapi_client/resources/issues.cjs +2 -2
- package/dist/_openapi_client/resources/issues.js +2 -2
- package/dist/_openapi_client/resources/online-evaluators.cjs +7 -7
- package/dist/_openapi_client/resources/online-evaluators.d.ts +8 -0
- package/dist/_openapi_client/resources/online-evaluators.js +7 -7
- package/dist/_openapi_client/resources/public/runs.cjs +2 -2
- package/dist/_openapi_client/resources/public/runs.d.ts +1 -1
- package/dist/_openapi_client/resources/public/runs.js +2 -2
- package/dist/_openapi_client/resources/runs/runs.cjs +3 -3
- package/dist/_openapi_client/resources/runs/runs.d.ts +9 -4
- package/dist/_openapi_client/resources/runs/runs.js +3 -3
- package/dist/_openapi_client/resources/runs/share.cjs +2 -2
- package/dist/_openapi_client/resources/runs/share.js +2 -2
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +10 -10
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +40 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.js +10 -10
- package/dist/_openapi_client/resources/sandboxes/registries.cjs +5 -5
- package/dist/_openapi_client/resources/sandboxes/registries.js +5 -5
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +17 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +4 -4
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +12 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +4 -4
- package/dist/_openapi_client/resources/threads.cjs +3 -3
- package/dist/_openapi_client/resources/threads.d.ts +2 -1
- package/dist/_openapi_client/resources/threads.js +3 -3
- package/dist/_openapi_client/resources/traces.cjs +2 -2
- package/dist/_openapi_client/resources/traces.d.ts +1 -1
- package/dist/_openapi_client/resources/traces.js +2 -2
- package/dist/client.cjs +57 -21
- package/dist/client.d.ts +58 -22
- package/dist/client.js +57 -21
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/command_handle.cjs +4 -4
- package/dist/sandbox/command_handle.js +5 -5
- package/dist/sandbox/errors.cjs +16 -1
- package/dist/sandbox/errors.d.ts +11 -0
- package/dist/sandbox/errors.js +14 -0
- package/dist/sandbox/index.cjs +2 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/sandbox.cjs +33 -17
- package/dist/sandbox/sandbox.d.ts +2 -1
- package/dist/sandbox/sandbox.js +35 -19
- package/dist/sandbox/ws_execute.cjs +87 -13
- package/dist/sandbox/ws_execute.d.ts +10 -0
- package/dist/sandbox/ws_execute.js +83 -13
- package/package.json +1 -1
- package/dist/utils/constants.cjs +0 -4
- package/dist/utils/constants.d.ts +0 -1
- package/dist/utils/constants.js +0 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import * as AnnotationQueuesAPI from './annotation-queues.js';
|
|
3
|
+
import { APIPromise } from '../../core/api-promise.js';
|
|
4
|
+
import { RequestOptions } from '../../internal/request-options.js';
|
|
5
|
+
export declare class Runs extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Add Runs To Annotation Queue
|
|
8
|
+
*/
|
|
9
|
+
create(queueID: string, params: RunCreateParams, options?: RequestOptions): APIPromise<RunCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Update Run In Annotation Queue
|
|
12
|
+
*/
|
|
13
|
+
update(queueRunID: string, params: RunUpdateParams, options?: RequestOptions): APIPromise<unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* Get Runs From Annotation Queue
|
|
16
|
+
*/
|
|
17
|
+
list(queueID: string, query?: RunListParams | null | undefined, options?: RequestOptions): APIPromise<RunListResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Add Runs To Annotation Queue By Key
|
|
20
|
+
*/
|
|
21
|
+
createByKey(queueID: string, params: RunCreateByKeyParams, options?: RequestOptions): APIPromise<RunCreateByKeyResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Delete Runs From Annotation Queue
|
|
24
|
+
*/
|
|
25
|
+
deleteAll(queueID: string, body: RunDeleteAllParams, options?: RequestOptions): APIPromise<unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* Delete Run From Annotation Queue
|
|
28
|
+
*/
|
|
29
|
+
deleteQueue(queueRunID: string, params: RunDeleteQueueParams, options?: RequestOptions): APIPromise<unknown>;
|
|
30
|
+
}
|
|
31
|
+
export type RunCreateResponse = Array<RunCreateResponse.RunCreateResponseItem>;
|
|
32
|
+
export declare namespace RunCreateResponse {
|
|
33
|
+
interface RunCreateResponseItem {
|
|
34
|
+
id: string;
|
|
35
|
+
queue_id: string;
|
|
36
|
+
run_id: string;
|
|
37
|
+
added_at?: string;
|
|
38
|
+
last_reviewed_time?: string | null;
|
|
39
|
+
source_proposed_example_id?: string | null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export type RunUpdateResponse = unknown;
|
|
43
|
+
export type RunListResponse = Array<AnnotationQueuesAPI.RunSchemaWithAnnotationQueueInfo>;
|
|
44
|
+
export type RunCreateByKeyResponse = Array<RunCreateByKeyResponse.RunCreateByKeyResponseItem>;
|
|
45
|
+
export declare namespace RunCreateByKeyResponse {
|
|
46
|
+
interface RunCreateByKeyResponseItem {
|
|
47
|
+
id: string;
|
|
48
|
+
queue_id: string;
|
|
49
|
+
run_id: string;
|
|
50
|
+
added_at?: string;
|
|
51
|
+
last_reviewed_time?: string | null;
|
|
52
|
+
source_proposed_example_id?: string | null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export type RunDeleteAllResponse = unknown;
|
|
56
|
+
export type RunDeleteQueueResponse = unknown;
|
|
57
|
+
export type RunCreateParams = RunCreateParams.RunsUuidArray | RunCreateParams.RunsAnnotationQueueRunAddSchemaArray | RunCreateParams.Variant2;
|
|
58
|
+
export declare namespace RunCreateParams {
|
|
59
|
+
interface RunsUuidArray {
|
|
60
|
+
/**
|
|
61
|
+
* Body param
|
|
62
|
+
*/
|
|
63
|
+
body: Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
* Query param
|
|
66
|
+
*/
|
|
67
|
+
extend_trace_retention?: boolean;
|
|
68
|
+
}
|
|
69
|
+
interface RunsAnnotationQueueRunAddSchemaArray {
|
|
70
|
+
/**
|
|
71
|
+
* Body param
|
|
72
|
+
*/
|
|
73
|
+
body: Array<RunsAnnotationQueueRunAddSchemaArray.Body>;
|
|
74
|
+
/**
|
|
75
|
+
* Query param
|
|
76
|
+
*/
|
|
77
|
+
extend_trace_retention?: boolean;
|
|
78
|
+
}
|
|
79
|
+
namespace RunsAnnotationQueueRunAddSchemaArray {
|
|
80
|
+
/**
|
|
81
|
+
* Add a single run to AQ (CH path) with an optional back-pointer to the
|
|
82
|
+
* issues-agent proposal that seeded this add. Use when bulk-adding runs that come
|
|
83
|
+
* from different proposals — each row carries its own source_proposed_example_id.
|
|
84
|
+
* For unrelated bulk adds, prefer plain List[UUID] on the same endpoint.
|
|
85
|
+
*/
|
|
86
|
+
interface Body {
|
|
87
|
+
run_id: string;
|
|
88
|
+
source_proposed_example_id?: string | null;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
interface Variant2 {
|
|
92
|
+
/**
|
|
93
|
+
* Body param
|
|
94
|
+
*/
|
|
95
|
+
body: Array<Variant2.Body>;
|
|
96
|
+
/**
|
|
97
|
+
* Query param
|
|
98
|
+
*/
|
|
99
|
+
extend_trace_retention?: boolean;
|
|
100
|
+
}
|
|
101
|
+
namespace Variant2 {
|
|
102
|
+
/**
|
|
103
|
+
* Deprecated: use plain UUID list or AddRunToQueueByKeyRequest instead.
|
|
104
|
+
*/
|
|
105
|
+
interface Body {
|
|
106
|
+
/**
|
|
107
|
+
* @deprecated
|
|
108
|
+
*/
|
|
109
|
+
run_id: string;
|
|
110
|
+
/**
|
|
111
|
+
* @deprecated
|
|
112
|
+
*/
|
|
113
|
+
parent_run_id?: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated
|
|
116
|
+
*/
|
|
117
|
+
session_id?: string | null;
|
|
118
|
+
/**
|
|
119
|
+
* @deprecated
|
|
120
|
+
*/
|
|
121
|
+
start_time?: string | null;
|
|
122
|
+
/**
|
|
123
|
+
* @deprecated
|
|
124
|
+
*/
|
|
125
|
+
trace_id?: string | null;
|
|
126
|
+
/**
|
|
127
|
+
* @deprecated
|
|
128
|
+
*/
|
|
129
|
+
trace_tier?: 'longlived' | 'shortlived' | null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
export interface RunUpdateParams {
|
|
134
|
+
/**
|
|
135
|
+
* Path param
|
|
136
|
+
*/
|
|
137
|
+
queue_id: string;
|
|
138
|
+
/**
|
|
139
|
+
* Body param
|
|
140
|
+
*/
|
|
141
|
+
added_at?: string | null;
|
|
142
|
+
/**
|
|
143
|
+
* Body param
|
|
144
|
+
*/
|
|
145
|
+
last_reviewed_time?: string | null;
|
|
146
|
+
}
|
|
147
|
+
export interface RunListParams {
|
|
148
|
+
archived?: boolean | null;
|
|
149
|
+
include_stats?: boolean | null;
|
|
150
|
+
limit?: number;
|
|
151
|
+
offset?: number;
|
|
152
|
+
status?: 'needs_my_review' | 'needs_others_review' | 'completed' | null;
|
|
153
|
+
}
|
|
154
|
+
export interface RunCreateByKeyParams {
|
|
155
|
+
/**
|
|
156
|
+
* Body param
|
|
157
|
+
*/
|
|
158
|
+
body: Array<RunCreateByKeyParams.Body>;
|
|
159
|
+
/**
|
|
160
|
+
* Query param
|
|
161
|
+
*/
|
|
162
|
+
extend_trace_retention?: boolean;
|
|
163
|
+
}
|
|
164
|
+
export declare namespace RunCreateByKeyParams {
|
|
165
|
+
/**
|
|
166
|
+
* Add run to AQ by SmithDB key. is_root derived server-side (LSAQ-141).
|
|
167
|
+
*/
|
|
168
|
+
interface Body {
|
|
169
|
+
run_id: string;
|
|
170
|
+
session_id: string;
|
|
171
|
+
start_time: string;
|
|
172
|
+
source_proposed_example_id?: string | null;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
export interface RunDeleteAllParams {
|
|
176
|
+
delete_all?: boolean;
|
|
177
|
+
exclude_run_ids?: Array<string> | null;
|
|
178
|
+
run_ids?: Array<string> | null;
|
|
179
|
+
}
|
|
180
|
+
export interface RunDeleteQueueParams {
|
|
181
|
+
queue_id: string;
|
|
182
|
+
}
|
|
183
|
+
export declare namespace Runs {
|
|
184
|
+
export { type RunCreateResponse as RunCreateResponse, type RunUpdateResponse as RunUpdateResponse, type RunListResponse as RunListResponse, type RunCreateByKeyResponse as RunCreateByKeyResponse, type RunDeleteAllResponse as RunDeleteAllResponse, type RunDeleteQueueResponse as RunDeleteQueueResponse, type RunCreateParams as RunCreateParams, type RunUpdateParams as RunUpdateParams, type RunListParams as RunListParams, type RunCreateByKeyParams as RunCreateByKeyParams, type RunDeleteAllParams as RunDeleteAllParams, type RunDeleteQueueParams as RunDeleteQueueParams, };
|
|
185
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { path } from '../../internal/utils/path.js';
|
|
5
|
+
export class Runs extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Add Runs To Annotation Queue
|
|
8
|
+
*/
|
|
9
|
+
create(queueID, params, options) {
|
|
10
|
+
const { body, extend_trace_retention } = params;
|
|
11
|
+
return this._client.post(path `/api/v1/annotation-queues/${queueID}/runs`, {
|
|
12
|
+
query: { extend_trace_retention },
|
|
13
|
+
body: body,
|
|
14
|
+
...options,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Update Run In Annotation Queue
|
|
19
|
+
*/
|
|
20
|
+
update(queueRunID, params, options) {
|
|
21
|
+
const { queue_id, ...body } = params;
|
|
22
|
+
return this._client.patch(path `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, {
|
|
23
|
+
body,
|
|
24
|
+
...options,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get Runs From Annotation Queue
|
|
29
|
+
*/
|
|
30
|
+
list(queueID, query = {}, options) {
|
|
31
|
+
return this._client.get(path `/api/v1/annotation-queues/${queueID}/runs`, { query, ...options });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Add Runs To Annotation Queue By Key
|
|
35
|
+
*/
|
|
36
|
+
createByKey(queueID, params, options) {
|
|
37
|
+
const { body, extend_trace_retention } = params;
|
|
38
|
+
return this._client.post(path `/api/v1/annotation-queues/${queueID}/runs/by-key`, {
|
|
39
|
+
query: { extend_trace_retention },
|
|
40
|
+
body: body,
|
|
41
|
+
...options,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Delete Runs From Annotation Queue
|
|
46
|
+
*/
|
|
47
|
+
deleteAll(queueID, body, options) {
|
|
48
|
+
return this._client.post(path `/api/v1/annotation-queues/${queueID}/runs/delete`, { body, ...options });
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Delete Run From Annotation Queue
|
|
52
|
+
*/
|
|
53
|
+
deleteQueue(queueRunID, params, options) {
|
|
54
|
+
const { queue_id } = params;
|
|
55
|
+
return this._client.delete(path `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, options);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -12,7 +12,7 @@ class ExperimentRuns extends resource_js_1.APIResource {
|
|
|
12
12
|
* experiments. Response uses the canonical `{items, next_cursor}` envelope.
|
|
13
13
|
*/
|
|
14
14
|
query(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 });
|
|
15
|
+
return this._client.getAPIList((0, path_js_1.path) `/api/v2/datasets/${datasetID}/experiment-runs`, (pagination_js_1.ItemsCursorPostPagination), { body, method: 'post', ...options });
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.ExperimentRuns = ExperimentRuns;
|
|
@@ -9,6 +9,6 @@ export class ExperimentRuns extends APIResource {
|
|
|
9
9
|
* experiments. Response uses the canonical `{items, next_cursor}` envelope.
|
|
10
10
|
*/
|
|
11
11
|
query(datasetID, body, options) {
|
|
12
|
-
return this._client.getAPIList(path `/v2/datasets/${datasetID}/experiment-runs`, (ItemsCursorPostPagination), { body, method: 'post', ...options });
|
|
12
|
+
return this._client.getAPIList(path `/api/v2/datasets/${datasetID}/experiment-runs`, (ItemsCursorPostPagination), { body, method: 'post', ...options });
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -2,7 +2,9 @@
|
|
|
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.Traces = exports.Threads = exports.Sandboxes = exports.Runs = exports.Public = exports.OnlineEvaluators = exports.Issues = exports.Info = exports.Datasets = void 0;
|
|
5
|
+
exports.Traces = exports.Threads = exports.Sandboxes = exports.Runs = exports.Public = exports.OnlineEvaluators = exports.Issues = exports.Info = exports.Datasets = exports.AnnotationQueues = void 0;
|
|
6
|
+
var annotation_queues_js_1 = require("./annotation-queues/annotation-queues.cjs");
|
|
7
|
+
Object.defineProperty(exports, "AnnotationQueues", { enumerable: true, get: function () { return annotation_queues_js_1.AnnotationQueues; } });
|
|
6
8
|
var datasets_js_1 = require("./datasets/datasets.cjs");
|
|
7
9
|
Object.defineProperty(exports, "Datasets", { enumerable: true, get: function () { return datasets_js_1.Datasets; } });
|
|
8
10
|
var info_js_1 = require("./info.cjs");
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { AnnotationQueues, type AnnotationQueueRubricItemSchema, type AnnotationQueueSchema, type AnnotationQueueSizeSchema, type RunSchemaWithAnnotationQueueInfo, type AnnotationQueueRetrieveResponse, type AnnotationQueueUpdateResponse, type AnnotationQueueDeleteResponse, type AnnotationQueueCreateRunStatusResponse, type AnnotationQueueExportResponse, type AnnotationQueuePopulateResponse, type AnnotationQueueRetrieveAnnotationQueuesResponse, type AnnotationQueueRetrieveQueuesResponse, type AnnotationQueueUpdateParams, type AnnotationQueueAnnotationQueuesParams, type AnnotationQueueCreateRunStatusParams, type AnnotationQueueExportParams, type AnnotationQueuePopulateParams, type AnnotationQueueRetrieveAnnotationQueuesParams, type AnnotationQueueRetrieveRunParams, type AnnotationQueueRetrieveSizeParams, type AnnotationQueueRetrieveTotalArchivedParams, type AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray, } from './annotation-queues/annotation-queues.js';
|
|
1
2
|
export { Datasets, type DataType, type Dataset, type DatasetTransformation, type DatasetVersion, type FeedbackCreateCoreSchema, type Missing, type SortByDatasetColumn, } from './datasets/datasets.js';
|
|
2
3
|
export { Info, type InfoListResponse } from './info.js';
|
|
3
4
|
export { Issues, type Issue, type IssueListParams, type IssuesOffsetPaginationIssues } from './issues.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
export { AnnotationQueues, } from './annotation-queues/annotation-queues.js';
|
|
3
4
|
export { Datasets, } from './datasets/datasets.js';
|
|
4
5
|
export { Info } from './info.js';
|
|
5
6
|
export { Issues } from './issues.js';
|
|
@@ -6,7 +6,9 @@ exports.Info = void 0;
|
|
|
6
6
|
const resource_js_1 = require("../core/resource.cjs");
|
|
7
7
|
class Info extends resource_js_1.APIResource {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Returns information about the current LangSmith deployment: version, instance
|
|
10
|
+
* feature flags, batch-ingest limits, and max SDK versions. Unauthenticated by
|
|
11
|
+
* default; set FF_INFO_ENDPOINT_AUTH_REQUIRED=true to require auth.
|
|
10
12
|
*/
|
|
11
13
|
list(options) {
|
|
12
14
|
return this._client.get('/api/v1/info', options);
|
|
@@ -3,33 +3,24 @@ import { APIPromise } from '../core/api-promise.js';
|
|
|
3
3
|
import { RequestOptions } from '../internal/request-options.js';
|
|
4
4
|
export declare class Info extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Returns information about the current LangSmith deployment: version, instance
|
|
7
|
+
* feature flags, batch-ingest limits, and max SDK versions. Unauthenticated by
|
|
8
|
+
* default; set FF_INFO_ENDPOINT_AUTH_REQUIRED=true to require auth.
|
|
7
9
|
*/
|
|
8
10
|
list(options?: RequestOptions): APIPromise<InfoListResponse>;
|
|
9
11
|
}
|
|
10
|
-
/**
|
|
11
|
-
* The LangSmith server info.
|
|
12
|
-
*/
|
|
13
12
|
export interface InfoListResponse {
|
|
14
|
-
version: string;
|
|
15
|
-
/**
|
|
16
|
-
* Batch ingest config.
|
|
17
|
-
*/
|
|
18
13
|
batch_ingest_config?: InfoListResponse.BatchIngestConfig;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*/
|
|
22
|
-
customer_info?: InfoListResponse.CustomerInfo | null;
|
|
23
|
-
git_sha?: string | null;
|
|
14
|
+
customer_info?: InfoListResponse.CustomerInfo;
|
|
15
|
+
git_sha?: string;
|
|
24
16
|
instance_flags?: {
|
|
25
17
|
[key: string]: unknown;
|
|
26
18
|
};
|
|
27
|
-
license_expiration_time?: string
|
|
19
|
+
license_expiration_time?: string;
|
|
20
|
+
sdk_versions?: InfoListResponse.SDKVersions;
|
|
21
|
+
version?: string;
|
|
28
22
|
}
|
|
29
23
|
export declare namespace InfoListResponse {
|
|
30
|
-
/**
|
|
31
|
-
* Batch ingest config.
|
|
32
|
-
*/
|
|
33
24
|
interface BatchIngestConfig {
|
|
34
25
|
scale_down_nempty_trigger?: number;
|
|
35
26
|
scale_up_nthreads_limit?: number;
|
|
@@ -38,12 +29,15 @@ export declare namespace InfoListResponse {
|
|
|
38
29
|
size_limit_bytes?: number;
|
|
39
30
|
use_multipart_endpoint?: boolean;
|
|
40
31
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Customer info.
|
|
43
|
-
*/
|
|
44
32
|
interface CustomerInfo {
|
|
45
|
-
customer_id
|
|
46
|
-
customer_name
|
|
33
|
+
customer_id?: string;
|
|
34
|
+
customer_name?: string;
|
|
35
|
+
}
|
|
36
|
+
interface SDKVersions {
|
|
37
|
+
max_go_sdk_version?: string;
|
|
38
|
+
max_java_sdk_version?: string;
|
|
39
|
+
max_js_sdk_version?: string;
|
|
40
|
+
max_python_sdk_version?: string;
|
|
47
41
|
}
|
|
48
42
|
}
|
|
49
43
|
export declare namespace Info {
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
import { APIResource } from '../core/resource.js';
|
|
4
4
|
export class Info extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Returns information about the current LangSmith deployment: version, instance
|
|
7
|
+
* feature flags, batch-ingest limits, and max SDK versions. Unauthenticated by
|
|
8
|
+
* default; set FF_INFO_ENDPOINT_AUTH_REQUIRED=true to require auth.
|
|
7
9
|
*/
|
|
8
10
|
list(options) {
|
|
9
11
|
return this._client.get('/api/v1/info', options);
|
|
@@ -13,7 +13,7 @@ class Issues extends resource_js_1.APIResource {
|
|
|
13
13
|
* Returns one issue for the authenticated tenant.
|
|
14
14
|
*/
|
|
15
15
|
retrieve(id, options) {
|
|
16
|
-
return this._client.get((0, path_js_1.path) `/v1/platform/issues/${id}`, options);
|
|
16
|
+
return this._client.get((0, path_js_1.path) `/api/v1/platform/issues/${id}`, options);
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* **Beta:** This endpoint is in active development and may change without notice.
|
|
@@ -22,7 +22,7 @@ class Issues extends resource_js_1.APIResource {
|
|
|
22
22
|
* status, severity, tag, or last modified time.
|
|
23
23
|
*/
|
|
24
24
|
list(query = {}, options) {
|
|
25
|
-
return this._client.getAPIList('/v1/platform/issues', (pagination_js_1.OffsetPaginationIssues), {
|
|
25
|
+
return this._client.getAPIList('/api/v1/platform/issues', (pagination_js_1.OffsetPaginationIssues), {
|
|
26
26
|
query,
|
|
27
27
|
...options,
|
|
28
28
|
});
|
|
@@ -10,7 +10,7 @@ export class Issues extends APIResource {
|
|
|
10
10
|
* Returns one issue for the authenticated tenant.
|
|
11
11
|
*/
|
|
12
12
|
retrieve(id, options) {
|
|
13
|
-
return this._client.get(path `/v1/platform/issues/${id}`, options);
|
|
13
|
+
return this._client.get(path `/api/v1/platform/issues/${id}`, options);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* **Beta:** This endpoint is in active development and may change without notice.
|
|
@@ -19,7 +19,7 @@ export class Issues extends APIResource {
|
|
|
19
19
|
* status, severity, tag, or last modified time.
|
|
20
20
|
*/
|
|
21
21
|
list(query = {}, options) {
|
|
22
|
-
return this._client.getAPIList('/v1/platform/issues', (OffsetPaginationIssues), {
|
|
22
|
+
return this._client.getAPIList('/api/v1/platform/issues', (OffsetPaginationIssues), {
|
|
23
23
|
query,
|
|
24
24
|
...options,
|
|
25
25
|
});
|
|
@@ -12,26 +12,26 @@ class OnlineEvaluators extends resource_js_1.APIResource {
|
|
|
12
12
|
* Create a new LLM or code evaluator for the current workspace.
|
|
13
13
|
*/
|
|
14
14
|
create(body, options) {
|
|
15
|
-
return this._client.post('/v1/platform/evaluators', { body, ...options });
|
|
15
|
+
return this._client.post('/api/v1/platform/evaluators', { body, ...options });
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Retrieve a single evaluator by its ID.
|
|
19
19
|
*/
|
|
20
20
|
retrieve(evaluatorID, options) {
|
|
21
|
-
return this._client.get((0, path_js_1.path) `/v1/platform/evaluators/${evaluatorID}`, options);
|
|
21
|
+
return this._client.get((0, path_js_1.path) `/api/v1/platform/evaluators/${evaluatorID}`, options);
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Update an existing evaluator's name, LLM configuration, or code configuration.
|
|
25
25
|
*/
|
|
26
26
|
update(evaluatorID, body, options) {
|
|
27
|
-
return this._client.patch((0, path_js_1.path) `/v1/platform/evaluators/${evaluatorID}`, { body, ...options });
|
|
27
|
+
return this._client.patch((0, path_js_1.path) `/api/v1/platform/evaluators/${evaluatorID}`, { body, ...options });
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* List evaluators for the current workspace, with optional filtering by type,
|
|
31
31
|
* name, tag, feedback key, or resource ID.
|
|
32
32
|
*/
|
|
33
33
|
list(query = {}, options) {
|
|
34
|
-
return this._client.getAPIList('/v1/platform/evaluators', (pagination_js_1.OffsetPaginationOnlineEvaluators), { query, ...options });
|
|
34
|
+
return this._client.getAPIList('/api/v1/platform/evaluators', (pagination_js_1.OffsetPaginationOnlineEvaluators), { query, ...options });
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Delete an evaluator. When delete_run_rules is true, all run rules referencing
|
|
@@ -41,7 +41,7 @@ class OnlineEvaluators extends resource_js_1.APIResource {
|
|
|
41
41
|
*/
|
|
42
42
|
delete(evaluatorID, params = {}, options) {
|
|
43
43
|
const { delete_run_rules } = params ?? {};
|
|
44
|
-
return this._client.delete((0, path_js_1.path) `/v1/platform/evaluators/${evaluatorID}`, {
|
|
44
|
+
return this._client.delete((0, path_js_1.path) `/api/v1/platform/evaluators/${evaluatorID}`, {
|
|
45
45
|
query: { delete_run_rules },
|
|
46
46
|
...options,
|
|
47
47
|
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
@@ -52,7 +52,7 @@ class OnlineEvaluators extends resource_js_1.APIResource {
|
|
|
52
52
|
*/
|
|
53
53
|
bulkDelete(params, options) {
|
|
54
54
|
const { evaluator_ids, delete_run_rules } = params;
|
|
55
|
-
return this._client.delete('/v1/platform/evaluators', {
|
|
55
|
+
return this._client.delete('/api/v1/platform/evaluators', {
|
|
56
56
|
query: { evaluator_ids, delete_run_rules },
|
|
57
57
|
...options,
|
|
58
58
|
});
|
|
@@ -64,7 +64,7 @@ class OnlineEvaluators extends resource_js_1.APIResource {
|
|
|
64
64
|
* be supplied with group_by to narrow listing aggregations.
|
|
65
65
|
*/
|
|
66
66
|
spend(query, options) {
|
|
67
|
-
return this._client.get('/v1/platform/evaluators/spend', { query, ...options });
|
|
67
|
+
return this._client.get('/api/v1/platform/evaluators/spend', { query, ...options });
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
exports.OnlineEvaluators = OnlineEvaluators;
|
|
@@ -66,6 +66,10 @@ export interface CreateOnlineEvaluatorResponse {
|
|
|
66
66
|
}
|
|
67
67
|
export interface CreateOnlineLlmEvaluatorRequest {
|
|
68
68
|
commit_hash_or_tag?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Model Configuration ID
|
|
71
|
+
*/
|
|
72
|
+
playground_settings_id?: string;
|
|
69
73
|
prompt_repo_handle?: string;
|
|
70
74
|
variable_mapping?: unknown;
|
|
71
75
|
}
|
|
@@ -186,6 +190,10 @@ export interface UpdateOnlineEvaluatorResponse {
|
|
|
186
190
|
export interface UpdateOnlineLlmEvaluatorRequest {
|
|
187
191
|
commit_hash_or_tag?: string;
|
|
188
192
|
num_few_shot_examples?: number;
|
|
193
|
+
/**
|
|
194
|
+
* Model Configuration ID
|
|
195
|
+
*/
|
|
196
|
+
playground_settings_id?: string;
|
|
189
197
|
prompt_repo_handle?: string;
|
|
190
198
|
use_corrections_dataset?: boolean;
|
|
191
199
|
variable_mapping?: unknown;
|
|
@@ -9,26 +9,26 @@ export class OnlineEvaluators extends APIResource {
|
|
|
9
9
|
* Create a new LLM or code evaluator for the current workspace.
|
|
10
10
|
*/
|
|
11
11
|
create(body, options) {
|
|
12
|
-
return this._client.post('/v1/platform/evaluators', { body, ...options });
|
|
12
|
+
return this._client.post('/api/v1/platform/evaluators', { body, ...options });
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Retrieve a single evaluator by its ID.
|
|
16
16
|
*/
|
|
17
17
|
retrieve(evaluatorID, options) {
|
|
18
|
-
return this._client.get(path `/v1/platform/evaluators/${evaluatorID}`, options);
|
|
18
|
+
return this._client.get(path `/api/v1/platform/evaluators/${evaluatorID}`, options);
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Update an existing evaluator's name, LLM configuration, or code configuration.
|
|
22
22
|
*/
|
|
23
23
|
update(evaluatorID, body, options) {
|
|
24
|
-
return this._client.patch(path `/v1/platform/evaluators/${evaluatorID}`, { body, ...options });
|
|
24
|
+
return this._client.patch(path `/api/v1/platform/evaluators/${evaluatorID}`, { body, ...options });
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* List evaluators for the current workspace, with optional filtering by type,
|
|
28
28
|
* name, tag, feedback key, or resource ID.
|
|
29
29
|
*/
|
|
30
30
|
list(query = {}, options) {
|
|
31
|
-
return this._client.getAPIList('/v1/platform/evaluators', (OffsetPaginationOnlineEvaluators), { query, ...options });
|
|
31
|
+
return this._client.getAPIList('/api/v1/platform/evaluators', (OffsetPaginationOnlineEvaluators), { query, ...options });
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Delete an evaluator. When delete_run_rules is true, all run rules referencing
|
|
@@ -38,7 +38,7 @@ export class OnlineEvaluators extends APIResource {
|
|
|
38
38
|
*/
|
|
39
39
|
delete(evaluatorID, params = {}, options) {
|
|
40
40
|
const { delete_run_rules } = params ?? {};
|
|
41
|
-
return this._client.delete(path `/v1/platform/evaluators/${evaluatorID}`, {
|
|
41
|
+
return this._client.delete(path `/api/v1/platform/evaluators/${evaluatorID}`, {
|
|
42
42
|
query: { delete_run_rules },
|
|
43
43
|
...options,
|
|
44
44
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
@@ -49,7 +49,7 @@ export class OnlineEvaluators extends APIResource {
|
|
|
49
49
|
*/
|
|
50
50
|
bulkDelete(params, options) {
|
|
51
51
|
const { evaluator_ids, delete_run_rules } = params;
|
|
52
|
-
return this._client.delete('/v1/platform/evaluators', {
|
|
52
|
+
return this._client.delete('/api/v1/platform/evaluators', {
|
|
53
53
|
query: { evaluator_ids, delete_run_rules },
|
|
54
54
|
...options,
|
|
55
55
|
});
|
|
@@ -61,6 +61,6 @@ export class OnlineEvaluators extends APIResource {
|
|
|
61
61
|
* be supplied with group_by to narrow listing aggregations.
|
|
62
62
|
*/
|
|
63
63
|
spend(query, options) {
|
|
64
|
-
return this._client.get('/v1/platform/evaluators/spend', { query, ...options });
|
|
64
|
+
return this._client.get('/api/v1/platform/evaluators/spend', { query, ...options });
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -26,7 +26,7 @@ class Runs extends resource_js_1.APIResource {
|
|
|
26
26
|
*/
|
|
27
27
|
retrieve(runID, params, options) {
|
|
28
28
|
const { share_token, Accept, ...query } = params;
|
|
29
|
-
return this._client.get((0, path_js_1.path) `/v2/public/${share_token}/run/${runID}`, {
|
|
29
|
+
return this._client.get((0, path_js_1.path) `/api/v2/public/${share_token}/run/${runID}`, {
|
|
30
30
|
query,
|
|
31
31
|
...options,
|
|
32
32
|
headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|
|
@@ -46,7 +46,7 @@ class Runs extends resource_js_1.APIResource {
|
|
|
46
46
|
*/
|
|
47
47
|
query(shareToken, params, options) {
|
|
48
48
|
const { Accept, ...body } = params;
|
|
49
|
-
return this._client.post((0, path_js_1.path) `/v2/public/${shareToken}/runs/v2/query`, {
|
|
49
|
+
return this._client.post((0, path_js_1.path) `/api/v2/public/${shareToken}/runs/v2/query`, {
|
|
50
50
|
body,
|
|
51
51
|
...options,
|
|
52
52
|
headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|
|
@@ -65,7 +65,7 @@ export interface RunQueryParams {
|
|
|
65
65
|
* Body param: `selects` lists which public run properties to include on each
|
|
66
66
|
* returned run.
|
|
67
67
|
*/
|
|
68
|
-
selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'INPUTS_PREVIEW' | 'OUTPUTS_PREVIEW' | 'PARENT_RUN_ID' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | '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' | 'THREAD_EVALUATION_TIME'>;
|
|
68
|
+
selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'INPUTS_PREVIEW' | 'OUTPUTS_PREVIEW' | 'PARENT_RUN_ID' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | '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' | 'THREAD_EVALUATION_TIME' | 'FEEDBACK_STATS'>;
|
|
69
69
|
/**
|
|
70
70
|
* Header param: application/json
|
|
71
71
|
*/
|
|
@@ -23,7 +23,7 @@ export class Runs extends APIResource {
|
|
|
23
23
|
*/
|
|
24
24
|
retrieve(runID, params, options) {
|
|
25
25
|
const { share_token, Accept, ...query } = params;
|
|
26
|
-
return this._client.get(path `/v2/public/${share_token}/run/${runID}`, {
|
|
26
|
+
return this._client.get(path `/api/v2/public/${share_token}/run/${runID}`, {
|
|
27
27
|
query,
|
|
28
28
|
...options,
|
|
29
29
|
headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|
|
@@ -43,7 +43,7 @@ export class Runs extends APIResource {
|
|
|
43
43
|
*/
|
|
44
44
|
query(shareToken, params, options) {
|
|
45
45
|
const { Accept, ...body } = params;
|
|
46
|
-
return this._client.post(path `/v2/public/${shareToken}/runs/v2/query`, {
|
|
46
|
+
return this._client.post(path `/api/v2/public/${shareToken}/runs/v2/query`, {
|
|
47
47
|
body,
|
|
48
48
|
...options,
|
|
49
49
|
headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|
|
@@ -78,7 +78,7 @@ class Runs extends resource_js_1.APIResource {
|
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
80
|
getURL(runID, query, options) {
|
|
81
|
-
return this._client.get((0, path_js_1.path) `/v2/runs/${runID}/url`, { query, ...options });
|
|
81
|
+
return this._client.get((0, path_js_1.path) `/api/v2/runs/${runID}/url`, { query, ...options });
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* **Alpha:** The request and response contract may change; Returns a paginated
|
|
@@ -95,7 +95,7 @@ class Runs extends resource_js_1.APIResource {
|
|
|
95
95
|
*/
|
|
96
96
|
queryV2(params, options) {
|
|
97
97
|
const { Accept, ...body } = params;
|
|
98
|
-
return this._client.getAPIList('/v2/runs/query', (pagination_js_1.ItemsCursorPostPagination), {
|
|
98
|
+
return this._client.getAPIList('/api/v2/runs/query', (pagination_js_1.ItemsCursorPostPagination), {
|
|
99
99
|
body,
|
|
100
100
|
method: 'post',
|
|
101
101
|
...options,
|
|
@@ -117,7 +117,7 @@ class Runs extends resource_js_1.APIResource {
|
|
|
117
117
|
*/
|
|
118
118
|
retrieveV2(runID, params, options) {
|
|
119
119
|
const { Accept, ...query } = params;
|
|
120
|
-
return this._client.get((0, path_js_1.path) `/v2/runs/${runID}`, {
|
|
120
|
+
return this._client.get((0, path_js_1.path) `/api/v2/runs/${runID}`, {
|
|
121
121
|
query,
|
|
122
122
|
...options,
|
|
123
123
|
headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|