langsmith 0.7.16 → 0.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_openapi_client/client.cjs +16 -8
- package/dist/_openapi_client/client.d.ts +6 -3
- package/dist/_openapi_client/client.js +16 -8
- package/dist/_openapi_client/resources/index.cjs +5 -3
- package/dist/_openapi_client/resources/index.d.ts +2 -1
- package/dist/_openapi_client/resources/index.js +2 -1
- package/dist/_openapi_client/resources/runs.d.ts +11 -2
- package/dist/_openapi_client/resources/threads.cjs +65 -0
- package/dist/_openapi_client/resources/threads.d.ts +654 -0
- package/dist/_openapi_client/resources/threads.js +61 -0
- package/dist/_openapi_client/resources/traces.cjs +61 -0
- package/dist/_openapi_client/resources/traces.d.ts +162 -0
- package/dist/_openapi_client/resources/traces.js +57 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/wrappers/anthropic.cjs +38 -25
- package/dist/wrappers/anthropic.d.ts +10 -1
- package/dist/wrappers/anthropic.js +38 -25
- package/dist/wrappers/utils/anthropic_managed.cjs +648 -0
- package/dist/wrappers/utils/anthropic_managed.d.ts +7 -0
- package/dist/wrappers/utils/anthropic_managed.js +645 -0
- package/package.json +1 -1
- package/dist/_openapi_client/resources/sessions.cjs +0 -53
- package/dist/_openapi_client/resources/sessions.d.ts +0 -636
- package/dist/_openapi_client/resources/sessions.js +0 -49
|
@@ -1,53 +0,0 @@
|
|
|
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.Sessions = 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 Sessions extends resource_js_1.APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* Create a new project.
|
|
13
|
-
*/
|
|
14
|
-
create(params, options) {
|
|
15
|
-
const { upsert, ...body } = params;
|
|
16
|
-
return this._client.post('/api/v1/sessions', { query: { upsert }, body, ...options });
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Get a specific project.
|
|
20
|
-
*/
|
|
21
|
-
retrieve(project_id, params = {}, options) {
|
|
22
|
-
const { accept, ...query } = params ?? {};
|
|
23
|
-
return this._client.get((0, path_js_1.path) `/api/v1/sessions/${project_id}`, {
|
|
24
|
-
query,
|
|
25
|
-
...options,
|
|
26
|
-
headers: (0, headers_js_1.buildHeaders)([{ ...(accept != null ? { accept: accept } : undefined) }, options?.headers]),
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Update a project.
|
|
31
|
-
*/
|
|
32
|
-
update(project_id, body, options) {
|
|
33
|
-
return this._client.patch((0, path_js_1.path) `/api/v1/sessions/${project_id}`, { body, ...options });
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* List all projects.
|
|
37
|
-
*/
|
|
38
|
-
list(params = {}, options) {
|
|
39
|
-
const { accept, ...query } = params ?? {};
|
|
40
|
-
return this._client.getAPIList('/api/v1/sessions', (pagination_js_1.OffsetPaginationTopLevelArray), {
|
|
41
|
-
query,
|
|
42
|
-
...options,
|
|
43
|
-
headers: (0, headers_js_1.buildHeaders)([{ ...(accept != null ? { accept: accept } : undefined) }, options?.headers]),
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Delete a specific project.
|
|
48
|
-
*/
|
|
49
|
-
delete(project_id, options) {
|
|
50
|
-
return this._client.delete((0, path_js_1.path) `/api/v1/sessions/${project_id}`, options);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.Sessions = Sessions;
|
|
@@ -1,636 +0,0 @@
|
|
|
1
|
-
import { APIResource } from '../core/resource.js';
|
|
2
|
-
import { APIPromise } from '../core/api-promise.js';
|
|
3
|
-
import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../core/pagination.js';
|
|
4
|
-
import { RequestOptions } from '../internal/request-options.js';
|
|
5
|
-
export declare class Sessions extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Create a new project.
|
|
8
|
-
*/
|
|
9
|
-
create(params: SessionCreateParams, options?: RequestOptions): APIPromise<TracerSessionWithoutVirtualFields>;
|
|
10
|
-
/**
|
|
11
|
-
* Get a specific project.
|
|
12
|
-
*/
|
|
13
|
-
retrieve(project_id: string, params?: SessionRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<TracerSession>;
|
|
14
|
-
/**
|
|
15
|
-
* Update a project.
|
|
16
|
-
*/
|
|
17
|
-
update(project_id: string, body: SessionUpdateParams, options?: RequestOptions): APIPromise<TracerSessionWithoutVirtualFields>;
|
|
18
|
-
/**
|
|
19
|
-
* List all projects.
|
|
20
|
-
*/
|
|
21
|
-
list(params?: SessionListParams | null | undefined, options?: RequestOptions): PagePromise<TracerSessionsOffsetPaginationTopLevelArray, TracerSession>;
|
|
22
|
-
/**
|
|
23
|
-
* Delete a specific project.
|
|
24
|
-
*/
|
|
25
|
-
delete(project_id: string, options?: RequestOptions): APIPromise<unknown>;
|
|
26
|
-
}
|
|
27
|
-
export type TracerSessionsOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<TracerSession>;
|
|
28
|
-
export interface CustomChartsSection {
|
|
29
|
-
id: string;
|
|
30
|
-
charts: Array<CustomChartsSection.Chart>;
|
|
31
|
-
title: string;
|
|
32
|
-
description?: string | null;
|
|
33
|
-
index?: number | null;
|
|
34
|
-
session_id?: string | null;
|
|
35
|
-
sub_sections?: Array<CustomChartsSection.SubSection> | null;
|
|
36
|
-
}
|
|
37
|
-
export declare namespace CustomChartsSection {
|
|
38
|
-
interface Chart {
|
|
39
|
-
id: string;
|
|
40
|
-
/**
|
|
41
|
-
* Enum for custom chart types.
|
|
42
|
-
*/
|
|
43
|
-
chart_type: 'line' | 'bar' | 'table' | 'kpi' | 'top-k' | 'pie';
|
|
44
|
-
data: Array<Chart.Data>;
|
|
45
|
-
index: number;
|
|
46
|
-
series: Array<Chart.Series>;
|
|
47
|
-
title: string;
|
|
48
|
-
common_filters?: Chart.CommonFilters | null;
|
|
49
|
-
description?: string | null;
|
|
50
|
-
metadata?: {
|
|
51
|
-
[key: string]: unknown;
|
|
52
|
-
} | null;
|
|
53
|
-
}
|
|
54
|
-
namespace Chart {
|
|
55
|
-
interface Data {
|
|
56
|
-
series_id: string;
|
|
57
|
-
timestamp: string;
|
|
58
|
-
value: number | {
|
|
59
|
-
[key: string]: unknown;
|
|
60
|
-
} | null;
|
|
61
|
-
group?: string | null;
|
|
62
|
-
}
|
|
63
|
-
interface Series {
|
|
64
|
-
id: string;
|
|
65
|
-
name: string;
|
|
66
|
-
feedback_key?: string | null;
|
|
67
|
-
filter_definition?: Series.CustomChartFilterByTracingProject | Series.CustomChartFilterByDataset | null;
|
|
68
|
-
filters?: Series.Filters | null;
|
|
69
|
-
/**
|
|
70
|
-
* Include additional information about where the group_by param was set.
|
|
71
|
-
*/
|
|
72
|
-
group_by?: Series.GroupBy | null;
|
|
73
|
-
group_by_definitions?: Array<Series.CustomChartGroupByPlain | Series.CustomChartGroupByComplex> | null;
|
|
74
|
-
/**
|
|
75
|
-
* Metrics you can chart. Feedback metrics are not available for
|
|
76
|
-
* organization-scoped charts.
|
|
77
|
-
*/
|
|
78
|
-
metric?: 'run_count' | 'latency_p50' | 'latency_p99' | 'latency_avg' | 'first_token_p50' | 'first_token_p99' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'median_tokens' | 'completion_tokens_p50' | 'prompt_tokens_p50' | 'tokens_p99' | 'completion_tokens_p99' | 'prompt_tokens_p99' | 'feedback' | 'feedback_score_avg' | 'feedback_values' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'error_rate' | 'streaming_rate' | 'cost_p50' | 'cost_p99' | null;
|
|
79
|
-
metric_definition?: Series.CustomChartMetricCount | Series.CustomChartMetricScalar | Series.CustomChartMetricPercentile | Series.CustomChartMetricRatioOutput | null;
|
|
80
|
-
/**
|
|
81
|
-
* LGP Metrics you can chart.
|
|
82
|
-
*/
|
|
83
|
-
project_metric?: 'memory_usage' | 'cpu_usage' | 'disk_usage' | 'restart_count' | 'replica_count' | 'worker_count' | 'lg_run_count' | 'responses_per_second' | 'error_responses_per_second' | 'p95_latency' | null;
|
|
84
|
-
workspace_id?: string | null;
|
|
85
|
-
}
|
|
86
|
-
namespace Series {
|
|
87
|
-
interface CustomChartFilterByTracingProject {
|
|
88
|
-
project_ids: Array<string>;
|
|
89
|
-
source_type: 'tracing_project';
|
|
90
|
-
run_filter?: string | null;
|
|
91
|
-
trace_filter?: string | null;
|
|
92
|
-
tree_filter?: string | null;
|
|
93
|
-
}
|
|
94
|
-
interface CustomChartFilterByDataset {
|
|
95
|
-
dataset_ids: Array<string>;
|
|
96
|
-
source_type: 'dataset';
|
|
97
|
-
}
|
|
98
|
-
interface Filters {
|
|
99
|
-
filter?: string | null;
|
|
100
|
-
session?: Array<string> | null;
|
|
101
|
-
trace_filter?: string | null;
|
|
102
|
-
tree_filter?: string | null;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Include additional information about where the group_by param was set.
|
|
106
|
-
*/
|
|
107
|
-
interface GroupBy {
|
|
108
|
-
attribute: 'name' | 'run_type' | 'tag' | 'metadata';
|
|
109
|
-
max_groups?: number;
|
|
110
|
-
path?: string | null;
|
|
111
|
-
set_by?: 'section' | 'series' | null;
|
|
112
|
-
}
|
|
113
|
-
interface CustomChartGroupByPlain {
|
|
114
|
-
attribute: 'name' | 'run_type' | 'tag' | 'project' | 'status';
|
|
115
|
-
}
|
|
116
|
-
interface CustomChartGroupByComplex {
|
|
117
|
-
attribute: 'metadata' | 'feedback_label';
|
|
118
|
-
path: string;
|
|
119
|
-
}
|
|
120
|
-
interface CustomChartMetricCount {
|
|
121
|
-
filter?: string | null;
|
|
122
|
-
type?: 'count';
|
|
123
|
-
}
|
|
124
|
-
interface CustomChartMetricScalar {
|
|
125
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
126
|
-
type: 'sum' | 'max' | 'min' | 'avg';
|
|
127
|
-
filter?: string | null;
|
|
128
|
-
}
|
|
129
|
-
interface CustomChartMetricPercentile {
|
|
130
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
131
|
-
params: CustomChartMetricPercentile.Params;
|
|
132
|
-
type: 'percentile';
|
|
133
|
-
filter?: string | null;
|
|
134
|
-
}
|
|
135
|
-
namespace CustomChartMetricPercentile {
|
|
136
|
-
interface Params {
|
|
137
|
-
p: number;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
interface CustomChartMetricRatioOutput {
|
|
141
|
-
denominator: CustomChartMetricRatioOutput.CustomChartMetricCount | CustomChartMetricRatioOutput.CustomChartMetricScalar | CustomChartMetricRatioOutput.CustomChartMetricPercentile;
|
|
142
|
-
numerator: CustomChartMetricRatioOutput.CustomChartMetricCount | CustomChartMetricRatioOutput.CustomChartMetricScalar | CustomChartMetricRatioOutput.CustomChartMetricPercentile;
|
|
143
|
-
type: 'ratio';
|
|
144
|
-
}
|
|
145
|
-
namespace CustomChartMetricRatioOutput {
|
|
146
|
-
interface CustomChartMetricCount {
|
|
147
|
-
filter?: string | null;
|
|
148
|
-
type?: 'count';
|
|
149
|
-
}
|
|
150
|
-
interface CustomChartMetricScalar {
|
|
151
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
152
|
-
type: 'sum' | 'max' | 'min' | 'avg';
|
|
153
|
-
filter?: string | null;
|
|
154
|
-
}
|
|
155
|
-
interface CustomChartMetricPercentile {
|
|
156
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
157
|
-
params: CustomChartMetricPercentile.Params;
|
|
158
|
-
type: 'percentile';
|
|
159
|
-
filter?: string | null;
|
|
160
|
-
}
|
|
161
|
-
namespace CustomChartMetricPercentile {
|
|
162
|
-
interface Params {
|
|
163
|
-
p: number;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
interface CustomChartMetricCount {
|
|
167
|
-
filter?: string | null;
|
|
168
|
-
type?: 'count';
|
|
169
|
-
}
|
|
170
|
-
interface CustomChartMetricScalar {
|
|
171
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
172
|
-
type: 'sum' | 'max' | 'min' | 'avg';
|
|
173
|
-
filter?: string | null;
|
|
174
|
-
}
|
|
175
|
-
interface CustomChartMetricPercentile {
|
|
176
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
177
|
-
params: CustomChartMetricPercentile.Params;
|
|
178
|
-
type: 'percentile';
|
|
179
|
-
filter?: string | null;
|
|
180
|
-
}
|
|
181
|
-
namespace CustomChartMetricPercentile {
|
|
182
|
-
interface Params {
|
|
183
|
-
p: number;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
interface CommonFilters {
|
|
189
|
-
filter?: string | null;
|
|
190
|
-
session?: Array<string> | null;
|
|
191
|
-
trace_filter?: string | null;
|
|
192
|
-
tree_filter?: string | null;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
interface SubSection {
|
|
196
|
-
id: string;
|
|
197
|
-
charts: Array<SubSection.Chart>;
|
|
198
|
-
index: number;
|
|
199
|
-
title: string;
|
|
200
|
-
description?: string | null;
|
|
201
|
-
}
|
|
202
|
-
namespace SubSection {
|
|
203
|
-
interface Chart {
|
|
204
|
-
id: string;
|
|
205
|
-
/**
|
|
206
|
-
* Enum for custom chart types.
|
|
207
|
-
*/
|
|
208
|
-
chart_type: 'line' | 'bar' | 'table' | 'kpi' | 'top-k' | 'pie';
|
|
209
|
-
data: Array<Chart.Data>;
|
|
210
|
-
index: number;
|
|
211
|
-
series: Array<Chart.Series>;
|
|
212
|
-
title: string;
|
|
213
|
-
common_filters?: Chart.CommonFilters | null;
|
|
214
|
-
description?: string | null;
|
|
215
|
-
metadata?: {
|
|
216
|
-
[key: string]: unknown;
|
|
217
|
-
} | null;
|
|
218
|
-
}
|
|
219
|
-
namespace Chart {
|
|
220
|
-
interface Data {
|
|
221
|
-
series_id: string;
|
|
222
|
-
timestamp: string;
|
|
223
|
-
value: number | {
|
|
224
|
-
[key: string]: unknown;
|
|
225
|
-
} | null;
|
|
226
|
-
group?: string | null;
|
|
227
|
-
}
|
|
228
|
-
interface Series {
|
|
229
|
-
id: string;
|
|
230
|
-
name: string;
|
|
231
|
-
feedback_key?: string | null;
|
|
232
|
-
filter_definition?: Series.CustomChartFilterByTracingProject | Series.CustomChartFilterByDataset | null;
|
|
233
|
-
filters?: Series.Filters | null;
|
|
234
|
-
/**
|
|
235
|
-
* Include additional information about where the group_by param was set.
|
|
236
|
-
*/
|
|
237
|
-
group_by?: Series.GroupBy | null;
|
|
238
|
-
group_by_definitions?: Array<Series.CustomChartGroupByPlain | Series.CustomChartGroupByComplex> | null;
|
|
239
|
-
/**
|
|
240
|
-
* Metrics you can chart. Feedback metrics are not available for
|
|
241
|
-
* organization-scoped charts.
|
|
242
|
-
*/
|
|
243
|
-
metric?: 'run_count' | 'latency_p50' | 'latency_p99' | 'latency_avg' | 'first_token_p50' | 'first_token_p99' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'median_tokens' | 'completion_tokens_p50' | 'prompt_tokens_p50' | 'tokens_p99' | 'completion_tokens_p99' | 'prompt_tokens_p99' | 'feedback' | 'feedback_score_avg' | 'feedback_values' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'error_rate' | 'streaming_rate' | 'cost_p50' | 'cost_p99' | null;
|
|
244
|
-
metric_definition?: Series.CustomChartMetricCount | Series.CustomChartMetricScalar | Series.CustomChartMetricPercentile | Series.CustomChartMetricRatioOutput | null;
|
|
245
|
-
/**
|
|
246
|
-
* LGP Metrics you can chart.
|
|
247
|
-
*/
|
|
248
|
-
project_metric?: 'memory_usage' | 'cpu_usage' | 'disk_usage' | 'restart_count' | 'replica_count' | 'worker_count' | 'lg_run_count' | 'responses_per_second' | 'error_responses_per_second' | 'p95_latency' | null;
|
|
249
|
-
workspace_id?: string | null;
|
|
250
|
-
}
|
|
251
|
-
namespace Series {
|
|
252
|
-
interface CustomChartFilterByTracingProject {
|
|
253
|
-
project_ids: Array<string>;
|
|
254
|
-
source_type: 'tracing_project';
|
|
255
|
-
run_filter?: string | null;
|
|
256
|
-
trace_filter?: string | null;
|
|
257
|
-
tree_filter?: string | null;
|
|
258
|
-
}
|
|
259
|
-
interface CustomChartFilterByDataset {
|
|
260
|
-
dataset_ids: Array<string>;
|
|
261
|
-
source_type: 'dataset';
|
|
262
|
-
}
|
|
263
|
-
interface Filters {
|
|
264
|
-
filter?: string | null;
|
|
265
|
-
session?: Array<string> | null;
|
|
266
|
-
trace_filter?: string | null;
|
|
267
|
-
tree_filter?: string | null;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Include additional information about where the group_by param was set.
|
|
271
|
-
*/
|
|
272
|
-
interface GroupBy {
|
|
273
|
-
attribute: 'name' | 'run_type' | 'tag' | 'metadata';
|
|
274
|
-
max_groups?: number;
|
|
275
|
-
path?: string | null;
|
|
276
|
-
set_by?: 'section' | 'series' | null;
|
|
277
|
-
}
|
|
278
|
-
interface CustomChartGroupByPlain {
|
|
279
|
-
attribute: 'name' | 'run_type' | 'tag' | 'project' | 'status';
|
|
280
|
-
}
|
|
281
|
-
interface CustomChartGroupByComplex {
|
|
282
|
-
attribute: 'metadata' | 'feedback_label';
|
|
283
|
-
path: string;
|
|
284
|
-
}
|
|
285
|
-
interface CustomChartMetricCount {
|
|
286
|
-
filter?: string | null;
|
|
287
|
-
type?: 'count';
|
|
288
|
-
}
|
|
289
|
-
interface CustomChartMetricScalar {
|
|
290
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
291
|
-
type: 'sum' | 'max' | 'min' | 'avg';
|
|
292
|
-
filter?: string | null;
|
|
293
|
-
}
|
|
294
|
-
interface CustomChartMetricPercentile {
|
|
295
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
296
|
-
params: CustomChartMetricPercentile.Params;
|
|
297
|
-
type: 'percentile';
|
|
298
|
-
filter?: string | null;
|
|
299
|
-
}
|
|
300
|
-
namespace CustomChartMetricPercentile {
|
|
301
|
-
interface Params {
|
|
302
|
-
p: number;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
interface CustomChartMetricRatioOutput {
|
|
306
|
-
denominator: CustomChartMetricRatioOutput.CustomChartMetricCount | CustomChartMetricRatioOutput.CustomChartMetricScalar | CustomChartMetricRatioOutput.CustomChartMetricPercentile;
|
|
307
|
-
numerator: CustomChartMetricRatioOutput.CustomChartMetricCount | CustomChartMetricRatioOutput.CustomChartMetricScalar | CustomChartMetricRatioOutput.CustomChartMetricPercentile;
|
|
308
|
-
type: 'ratio';
|
|
309
|
-
}
|
|
310
|
-
namespace CustomChartMetricRatioOutput {
|
|
311
|
-
interface CustomChartMetricCount {
|
|
312
|
-
filter?: string | null;
|
|
313
|
-
type?: 'count';
|
|
314
|
-
}
|
|
315
|
-
interface CustomChartMetricScalar {
|
|
316
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
317
|
-
type: 'sum' | 'max' | 'min' | 'avg';
|
|
318
|
-
filter?: string | null;
|
|
319
|
-
}
|
|
320
|
-
interface CustomChartMetricPercentile {
|
|
321
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
322
|
-
params: CustomChartMetricPercentile.Params;
|
|
323
|
-
type: 'percentile';
|
|
324
|
-
filter?: string | null;
|
|
325
|
-
}
|
|
326
|
-
namespace CustomChartMetricPercentile {
|
|
327
|
-
interface Params {
|
|
328
|
-
p: number;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
interface CustomChartMetricCount {
|
|
332
|
-
filter?: string | null;
|
|
333
|
-
type?: 'count';
|
|
334
|
-
}
|
|
335
|
-
interface CustomChartMetricScalar {
|
|
336
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
337
|
-
type: 'sum' | 'max' | 'min' | 'avg';
|
|
338
|
-
filter?: string | null;
|
|
339
|
-
}
|
|
340
|
-
interface CustomChartMetricPercentile {
|
|
341
|
-
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'total_cost' | 'prompt_cost' | 'completion_cost';
|
|
342
|
-
params: CustomChartMetricPercentile.Params;
|
|
343
|
-
type: 'percentile';
|
|
344
|
-
filter?: string | null;
|
|
345
|
-
}
|
|
346
|
-
namespace CustomChartMetricPercentile {
|
|
347
|
-
interface Params {
|
|
348
|
-
p: number;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
interface CommonFilters {
|
|
354
|
-
filter?: string | null;
|
|
355
|
-
session?: Array<string> | null;
|
|
356
|
-
trace_filter?: string | null;
|
|
357
|
-
tree_filter?: string | null;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
export interface CustomChartsSectionRequest {
|
|
363
|
-
end_time?: string | null;
|
|
364
|
-
/**
|
|
365
|
-
* Group by param for run stats.
|
|
366
|
-
*/
|
|
367
|
-
group_by?: RunStatsGroupBy | null;
|
|
368
|
-
omit_data?: boolean;
|
|
369
|
-
start_time?: string | null;
|
|
370
|
-
/**
|
|
371
|
-
* Timedelta input.
|
|
372
|
-
*/
|
|
373
|
-
stride?: TimedeltaInput;
|
|
374
|
-
timezone?: string;
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* Group by param for run stats.
|
|
378
|
-
*/
|
|
379
|
-
export interface RunStatsGroupBy {
|
|
380
|
-
attribute: 'name' | 'run_type' | 'tag' | 'metadata';
|
|
381
|
-
max_groups?: number;
|
|
382
|
-
path?: string | null;
|
|
383
|
-
}
|
|
384
|
-
export type SessionSortableColumns = 'name' | 'start_time' | 'last_run_start_time' | 'latency_p50' | 'latency_p99' | 'error_rate' | 'feedback';
|
|
385
|
-
/**
|
|
386
|
-
* Timedelta input.
|
|
387
|
-
*/
|
|
388
|
-
export interface TimedeltaInput {
|
|
389
|
-
days?: number;
|
|
390
|
-
hours?: number;
|
|
391
|
-
minutes?: number;
|
|
392
|
-
}
|
|
393
|
-
/**
|
|
394
|
-
* TracerSession schema.
|
|
395
|
-
*/
|
|
396
|
-
export interface TracerSession {
|
|
397
|
-
id: string;
|
|
398
|
-
tenant_id: string;
|
|
399
|
-
completion_cost?: string | null;
|
|
400
|
-
completion_tokens?: number | null;
|
|
401
|
-
default_dataset_id?: string | null;
|
|
402
|
-
description?: string | null;
|
|
403
|
-
end_time?: string | null;
|
|
404
|
-
error_rate?: number | null;
|
|
405
|
-
experiment_progress?: TracerSession.ExperimentProgress | null;
|
|
406
|
-
extra?: {
|
|
407
|
-
[key: string]: unknown;
|
|
408
|
-
} | null;
|
|
409
|
-
feedback_stats?: {
|
|
410
|
-
[key: string]: unknown;
|
|
411
|
-
} | null;
|
|
412
|
-
first_token_p50?: number | null;
|
|
413
|
-
first_token_p99?: number | null;
|
|
414
|
-
last_run_start_time?: string | null;
|
|
415
|
-
last_run_start_time_live?: string | null;
|
|
416
|
-
latency_p50?: number | null;
|
|
417
|
-
latency_p99?: number | null;
|
|
418
|
-
name?: string;
|
|
419
|
-
prompt_cost?: string | null;
|
|
420
|
-
prompt_tokens?: number | null;
|
|
421
|
-
reference_dataset_id?: string | null;
|
|
422
|
-
run_count?: number | null;
|
|
423
|
-
run_facets?: Array<{
|
|
424
|
-
[key: string]: unknown;
|
|
425
|
-
}> | null;
|
|
426
|
-
session_feedback_stats?: {
|
|
427
|
-
[key: string]: unknown;
|
|
428
|
-
} | null;
|
|
429
|
-
start_time?: string;
|
|
430
|
-
streaming_rate?: number | null;
|
|
431
|
-
test_run_number?: number | null;
|
|
432
|
-
total_cost?: string | null;
|
|
433
|
-
total_tokens?: number | null;
|
|
434
|
-
trace_tier?: 'longlived' | 'shortlived' | null;
|
|
435
|
-
}
|
|
436
|
-
export declare namespace TracerSession {
|
|
437
|
-
interface ExperimentProgress {
|
|
438
|
-
evaluator_progress: {
|
|
439
|
-
[key: string]: number;
|
|
440
|
-
};
|
|
441
|
-
expected_run_count: number;
|
|
442
|
-
run_progress: number;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
/**
|
|
446
|
-
* TracerSession schema.
|
|
447
|
-
*/
|
|
448
|
-
export interface TracerSessionWithoutVirtualFields {
|
|
449
|
-
id: string;
|
|
450
|
-
tenant_id: string;
|
|
451
|
-
default_dataset_id?: string | null;
|
|
452
|
-
description?: string | null;
|
|
453
|
-
end_time?: string | null;
|
|
454
|
-
extra?: {
|
|
455
|
-
[key: string]: unknown;
|
|
456
|
-
} | null;
|
|
457
|
-
last_run_start_time_live?: string | null;
|
|
458
|
-
name?: string;
|
|
459
|
-
reference_dataset_id?: string | null;
|
|
460
|
-
start_time?: string;
|
|
461
|
-
trace_tier?: 'longlived' | 'shortlived' | null;
|
|
462
|
-
}
|
|
463
|
-
export type SessionDeleteResponse = unknown;
|
|
464
|
-
export interface SessionCreateParams {
|
|
465
|
-
/**
|
|
466
|
-
* Query param
|
|
467
|
-
*/
|
|
468
|
-
upsert?: boolean;
|
|
469
|
-
/**
|
|
470
|
-
* Body param
|
|
471
|
-
*/
|
|
472
|
-
id?: string | null;
|
|
473
|
-
/**
|
|
474
|
-
* Body param
|
|
475
|
-
*/
|
|
476
|
-
default_dataset_id?: string | null;
|
|
477
|
-
/**
|
|
478
|
-
* Body param
|
|
479
|
-
*/
|
|
480
|
-
description?: string | null;
|
|
481
|
-
/**
|
|
482
|
-
* Body param
|
|
483
|
-
*/
|
|
484
|
-
end_time?: string | null;
|
|
485
|
-
/**
|
|
486
|
-
* Body param
|
|
487
|
-
*/
|
|
488
|
-
evaluator_keys?: Array<string> | null;
|
|
489
|
-
/**
|
|
490
|
-
* Body param
|
|
491
|
-
*/
|
|
492
|
-
extra?: {
|
|
493
|
-
[key: string]: unknown;
|
|
494
|
-
} | null;
|
|
495
|
-
/**
|
|
496
|
-
* Body param
|
|
497
|
-
*/
|
|
498
|
-
kicked_off_by?: string | null;
|
|
499
|
-
/**
|
|
500
|
-
* Body param
|
|
501
|
-
*/
|
|
502
|
-
name?: string;
|
|
503
|
-
/**
|
|
504
|
-
* Body param
|
|
505
|
-
*/
|
|
506
|
-
num_examples?: number | null;
|
|
507
|
-
/**
|
|
508
|
-
* Body param
|
|
509
|
-
*/
|
|
510
|
-
num_repetitions?: number | null;
|
|
511
|
-
/**
|
|
512
|
-
* Body param
|
|
513
|
-
*/
|
|
514
|
-
reference_dataset_id?: string | null;
|
|
515
|
-
/**
|
|
516
|
-
* Body param
|
|
517
|
-
*/
|
|
518
|
-
start_time?: string;
|
|
519
|
-
/**
|
|
520
|
-
* Body param
|
|
521
|
-
*/
|
|
522
|
-
tag_value_ids?: Array<string> | null;
|
|
523
|
-
/**
|
|
524
|
-
* Body param
|
|
525
|
-
*/
|
|
526
|
-
trace_tier?: 'longlived' | 'shortlived' | null;
|
|
527
|
-
}
|
|
528
|
-
export interface SessionRetrieveParams {
|
|
529
|
-
/**
|
|
530
|
-
* Query param
|
|
531
|
-
*/
|
|
532
|
-
include_stats?: boolean;
|
|
533
|
-
/**
|
|
534
|
-
* Query param
|
|
535
|
-
*/
|
|
536
|
-
stats_start_time?: string | null;
|
|
537
|
-
/**
|
|
538
|
-
* Header param
|
|
539
|
-
*/
|
|
540
|
-
accept?: string;
|
|
541
|
-
}
|
|
542
|
-
export interface SessionUpdateParams {
|
|
543
|
-
default_dataset_id?: string | null;
|
|
544
|
-
description?: string | null;
|
|
545
|
-
end_time?: string | null;
|
|
546
|
-
extra?: {
|
|
547
|
-
[key: string]: unknown;
|
|
548
|
-
} | null;
|
|
549
|
-
name?: string | null;
|
|
550
|
-
trace_tier?: 'longlived' | 'shortlived' | null;
|
|
551
|
-
}
|
|
552
|
-
export interface SessionListParams extends OffsetPaginationTopLevelArrayParams {
|
|
553
|
-
/**
|
|
554
|
-
* Query param
|
|
555
|
-
*/
|
|
556
|
-
id?: Array<string> | null;
|
|
557
|
-
/**
|
|
558
|
-
* Query param
|
|
559
|
-
*/
|
|
560
|
-
dataset_version?: string | null;
|
|
561
|
-
/**
|
|
562
|
-
* Query param
|
|
563
|
-
*/
|
|
564
|
-
facets?: boolean;
|
|
565
|
-
/**
|
|
566
|
-
* Query param
|
|
567
|
-
*/
|
|
568
|
-
filter?: string | null;
|
|
569
|
-
/**
|
|
570
|
-
* Query param
|
|
571
|
-
*/
|
|
572
|
-
include_stats?: boolean;
|
|
573
|
-
/**
|
|
574
|
-
* Query param
|
|
575
|
-
*/
|
|
576
|
-
metadata?: string | null;
|
|
577
|
-
/**
|
|
578
|
-
* Query param
|
|
579
|
-
*/
|
|
580
|
-
name?: string | null;
|
|
581
|
-
/**
|
|
582
|
-
* Query param
|
|
583
|
-
*/
|
|
584
|
-
name_contains?: string | null;
|
|
585
|
-
/**
|
|
586
|
-
* Query param
|
|
587
|
-
*/
|
|
588
|
-
reference_dataset?: Array<string> | null;
|
|
589
|
-
/**
|
|
590
|
-
* Query param
|
|
591
|
-
*/
|
|
592
|
-
reference_free?: boolean | null;
|
|
593
|
-
/**
|
|
594
|
-
* Query param
|
|
595
|
-
*/
|
|
596
|
-
sort_by?: SessionSortableColumns;
|
|
597
|
-
/**
|
|
598
|
-
* Query param
|
|
599
|
-
*/
|
|
600
|
-
sort_by_desc?: boolean;
|
|
601
|
-
/**
|
|
602
|
-
* Query param
|
|
603
|
-
*/
|
|
604
|
-
sort_by_feedback_key?: string | null;
|
|
605
|
-
/**
|
|
606
|
-
* Query param
|
|
607
|
-
*/
|
|
608
|
-
sort_by_feedback_source?: 'session' | 'run' | null;
|
|
609
|
-
/**
|
|
610
|
-
* Query param
|
|
611
|
-
*/
|
|
612
|
-
stats_filter?: string | null;
|
|
613
|
-
/**
|
|
614
|
-
* Query param
|
|
615
|
-
*/
|
|
616
|
-
stats_select?: Array<string> | null;
|
|
617
|
-
/**
|
|
618
|
-
* Query param
|
|
619
|
-
*/
|
|
620
|
-
stats_start_time?: string | null;
|
|
621
|
-
/**
|
|
622
|
-
* Query param
|
|
623
|
-
*/
|
|
624
|
-
tag_value_id?: Array<string> | null;
|
|
625
|
-
/**
|
|
626
|
-
* Query param
|
|
627
|
-
*/
|
|
628
|
-
use_approx_stats?: boolean;
|
|
629
|
-
/**
|
|
630
|
-
* Header param
|
|
631
|
-
*/
|
|
632
|
-
accept?: string;
|
|
633
|
-
}
|
|
634
|
-
export declare namespace Sessions {
|
|
635
|
-
export { 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, };
|
|
636
|
-
}
|