langsmith 0.10.7 → 0.10.9
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 +26 -2
- package/dist/_openapi_client/client.d.ts +15 -6
- package/dist/_openapi_client/client.js +27 -3
- package/dist/_openapi_client/internal/detect-platform.cjs +1 -1
- package/dist/_openapi_client/internal/detect-platform.js +1 -1
- package/dist/_openapi_client/resources/annotation-queues/items.cjs +13 -6
- package/dist/_openapi_client/resources/annotation-queues/items.d.ts +33 -8
- package/dist/_openapi_client/resources/annotation-queues/items.js +13 -6
- package/dist/_openapi_client/resources/datasets/datasets.cjs +9 -0
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +4 -0
- package/dist/_openapi_client/resources/datasets/datasets.js +9 -0
- package/dist/_openapi_client/resources/datasets/examples.cjs +26 -0
- package/dist/_openapi_client/resources/datasets/examples.d.ts +23 -0
- package/dist/_openapi_client/resources/datasets/examples.js +22 -0
- package/dist/_openapi_client/resources/fleet/fleet.cjs +54 -0
- package/dist/_openapi_client/resources/fleet/fleet.d.ts +9 -0
- package/dist/_openapi_client/resources/fleet/fleet.js +17 -0
- package/dist/_openapi_client/resources/fleet/threads.cjs +18 -0
- package/dist/_openapi_client/resources/fleet/threads.d.ts +19 -0
- package/dist/_openapi_client/resources/fleet/threads.js +14 -0
- package/dist/_openapi_client/resources/index.cjs +8 -2
- package/dist/_openapi_client/resources/index.d.ts +6 -3
- package/dist/_openapi_client/resources/index.js +5 -2
- package/dist/_openapi_client/resources/info.d.ts +6 -0
- package/dist/_openapi_client/resources/issues.cjs +2 -2
- package/dist/_openapi_client/resources/issues.d.ts +188 -4
- package/dist/_openapi_client/resources/issues.js +2 -2
- package/dist/_openapi_client/resources/online-evaluators.cjs +7 -4
- package/dist/_openapi_client/resources/online-evaluators.d.ts +63 -4
- package/dist/_openapi_client/resources/online-evaluators.js +7 -4
- package/dist/_openapi_client/resources/product-feedback.cjs +33 -0
- package/dist/_openapi_client/resources/product-feedback.d.ts +77 -0
- package/dist/_openapi_client/resources/product-feedback.js +29 -0
- package/dist/_openapi_client/resources/runs/runs.d.ts +26 -16
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +44 -4
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +256 -21
- package/dist/_openapi_client/resources/sandboxes/boxes.js +44 -4
- package/dist/_openapi_client/resources/sandboxes/registries.d.ts +10 -2
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +13 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +169 -14
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +13 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +10 -6
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +37 -6
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +10 -6
- package/dist/_openapi_client/resources/sessions.cjs +23 -0
- package/dist/_openapi_client/resources/sessions.d.ts +732 -0
- package/dist/_openapi_client/resources/sessions.js +19 -0
- package/dist/_openapi_client/resources/threads/index.cjs +9 -0
- package/dist/_openapi_client/resources/threads/index.d.ts +2 -0
- package/dist/_openapi_client/resources/threads/index.js +4 -0
- package/dist/_openapi_client/resources/threads/share.cjs +61 -0
- package/dist/_openapi_client/resources/threads/share.d.ts +71 -0
- package/dist/_openapi_client/resources/threads/share.js +57 -0
- package/dist/_openapi_client/resources/threads/threads.cjs +143 -0
- package/dist/_openapi_client/resources/threads/threads.d.ts +973 -0
- package/dist/_openapi_client/resources/threads/threads.js +106 -0
- package/dist/_openapi_client/resources/threads.cjs +15 -67
- package/dist/_openapi_client/resources/threads.d.ts +1 -709
- package/dist/_openapi_client/resources/threads.js +1 -65
- package/dist/_openapi_client/resources/traces.d.ts +7 -1
- package/dist/_openapi_client/version.cjs +1 -1
- package/dist/_openapi_client/version.js +1 -1
- package/dist/address.cjs +176 -99
- package/dist/address.d.ts +63 -8
- package/dist/address.js +170 -90
- package/dist/anonymizer/index.cjs +1 -1
- package/dist/anonymizer/index.js +1 -1
- package/dist/client.cjs +39 -19
- package/dist/client.d.ts +20 -4
- package/dist/client.js +34 -14
- package/dist/experimental/otel/exporter.cjs +21 -4
- package/dist/experimental/otel/exporter.d.ts +4 -2
- package/dist/experimental/otel/exporter.js +21 -4
- package/dist/index.cjs +5 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/run_trees.cjs +26 -43
- package/dist/run_trees.d.ts +4 -4
- package/dist/run_trees.js +23 -40
- package/dist/sandbox/client.cjs +33 -4
- package/dist/sandbox/client.d.ts +4 -0
- package/dist/sandbox/client.js +34 -5
- package/dist/sandbox/command_handle.cjs +8 -0
- package/dist/sandbox/command_handle.js +8 -0
- package/dist/sandbox/sandbox.cjs +7 -0
- package/dist/sandbox/sandbox.js +7 -0
- package/dist/sandbox/service_url.cjs +9 -1
- package/dist/sandbox/service_url.d.ts +2 -1
- package/dist/sandbox/service_url.js +9 -1
- package/dist/sandbox/tracing.cjs +13 -0
- package/dist/sandbox/tracing.d.ts +1 -0
- package/dist/sandbox/tracing.js +10 -0
- package/dist/schemas.d.ts +3 -3
- package/dist/traceable.cjs +5 -4
- package/dist/traceable.js +4 -3
- package/dist/utils/{agent_addressing.cjs → addressing.cjs} +22 -23
- package/dist/utils/{agent_addressing.d.ts → addressing.d.ts} +5 -8
- package/dist/utils/{agent_addressing.js → addressing.js} +23 -23
- package/dist/utils/env.cjs +6 -4
- package/dist/utils/env.js +6 -4
- package/package.json +1 -1
|
@@ -0,0 +1,732 @@
|
|
|
1
|
+
import { APIResource } from '../core/resource.js';
|
|
2
|
+
import { APIPromise } from '../core/api-promise.js';
|
|
3
|
+
import { RequestOptions } from '../internal/request-options.js';
|
|
4
|
+
export declare class Sessions extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* **Beta:** This endpoint is in active development and may change without notice.
|
|
7
|
+
* Returns the tracing project (session) an address names. An address is an AGENT
|
|
8
|
+
* (`id` and `environment`), an EXPERIMENT (`id`), or an EVALUATOR (no `id`:
|
|
9
|
+
* evaluator traces share one project per workspace). Send `kind` and `environment`
|
|
10
|
+
* in upper case, as listed; they are matched case-insensitively, while the Agent
|
|
11
|
+
* `id` is case-sensitive. An address that does not exist, or whose project you
|
|
12
|
+
* cannot read, is a 404. Pass the returned `session_id` to any endpoint that takes
|
|
13
|
+
* a project (session) ID. This is not supported on a BYOC data plane yet, and is a
|
|
14
|
+
* 501 there.
|
|
15
|
+
*/
|
|
16
|
+
resolve(query: SessionResolveParams, options?: RequestOptions): APIPromise<SessionResolveResponse>;
|
|
17
|
+
}
|
|
18
|
+
export interface CustomChartsSection {
|
|
19
|
+
id: string;
|
|
20
|
+
charts: Array<CustomChartsSection.SingleCustomChartResponseSerialized | CustomChartsSection.CustomTextBlock>;
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string | null;
|
|
23
|
+
index?: number | null;
|
|
24
|
+
layout?: CustomChartsSection.Layout | null;
|
|
25
|
+
session_id?: string | null;
|
|
26
|
+
sub_sections?: Array<CustomChartsSection.SubSection> | null;
|
|
27
|
+
}
|
|
28
|
+
export declare namespace CustomChartsSection {
|
|
29
|
+
interface SingleCustomChartResponseSerialized {
|
|
30
|
+
id: string;
|
|
31
|
+
chart_type: 'line' | 'bar' | 'table' | 'kpi' | 'top-k' | 'pie';
|
|
32
|
+
data: Array<SingleCustomChartResponseSerialized.Data>;
|
|
33
|
+
index: number;
|
|
34
|
+
series: Array<SingleCustomChartResponseSerialized.Series>;
|
|
35
|
+
title: string;
|
|
36
|
+
common_filters?: SingleCustomChartResponseSerialized.CommonFilters | null;
|
|
37
|
+
description?: string | null;
|
|
38
|
+
metadata?: {
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
} | null;
|
|
41
|
+
}
|
|
42
|
+
namespace SingleCustomChartResponseSerialized {
|
|
43
|
+
interface Data {
|
|
44
|
+
series_id: string;
|
|
45
|
+
timestamp: string;
|
|
46
|
+
value: number | {
|
|
47
|
+
[key: string]: unknown;
|
|
48
|
+
} | null;
|
|
49
|
+
group?: string | null;
|
|
50
|
+
}
|
|
51
|
+
interface Series {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
feedback_key?: string | null;
|
|
55
|
+
filter_definition?: Series.CustomChartFilterByTracingProject | Series.CustomChartFilterByDataset | null;
|
|
56
|
+
filters?: Series.Filters | null;
|
|
57
|
+
/**
|
|
58
|
+
* Include additional information about where the group_by param was set.
|
|
59
|
+
*/
|
|
60
|
+
group_by?: Series.GroupBy | null;
|
|
61
|
+
group_by_definitions?: Array<Series.CustomChartGroupByPlain | Series.CustomChartGroupByComplex> | null;
|
|
62
|
+
metadata?: {
|
|
63
|
+
[key: string]: unknown;
|
|
64
|
+
} | null;
|
|
65
|
+
/**
|
|
66
|
+
* Metrics you can chart. Feedback metrics are not available for
|
|
67
|
+
* organization-scoped charts.
|
|
68
|
+
*/
|
|
69
|
+
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;
|
|
70
|
+
metric_definition?: Series.CustomChartFeedbackCountMetric | Series.CustomChartMetricCount | Series.CustomChartFeedbackScoreMetricScalar | Series.CustomChartMetricScalar | Series.CustomChartFeedbackScoreMetricPercentile | Series.CustomChartMetricPercentile | Series.CustomChartMetricRatioOutput | null;
|
|
71
|
+
/**
|
|
72
|
+
* LGP Metrics you can chart.
|
|
73
|
+
*/
|
|
74
|
+
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' | 'run_queue_wait_time' | null;
|
|
75
|
+
workspace_id?: string | null;
|
|
76
|
+
}
|
|
77
|
+
namespace Series {
|
|
78
|
+
interface CustomChartFilterByTracingProject {
|
|
79
|
+
project_ids: Array<string>;
|
|
80
|
+
source_type: 'tracing_project';
|
|
81
|
+
run_filter?: string | null;
|
|
82
|
+
trace_filter?: string | null;
|
|
83
|
+
tree_filter?: string | null;
|
|
84
|
+
}
|
|
85
|
+
interface CustomChartFilterByDataset {
|
|
86
|
+
dataset_ids: Array<string>;
|
|
87
|
+
source_type: 'dataset';
|
|
88
|
+
}
|
|
89
|
+
interface Filters {
|
|
90
|
+
filter?: string | null;
|
|
91
|
+
session?: Array<string> | null;
|
|
92
|
+
trace_filter?: string | null;
|
|
93
|
+
tree_filter?: string | null;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Include additional information about where the group_by param was set.
|
|
97
|
+
*/
|
|
98
|
+
interface GroupBy {
|
|
99
|
+
attribute: 'name' | 'run_type' | 'tag' | 'metadata';
|
|
100
|
+
max_groups?: number;
|
|
101
|
+
path?: string | null;
|
|
102
|
+
set_by?: 'section' | 'series' | null;
|
|
103
|
+
}
|
|
104
|
+
interface CustomChartGroupByPlain {
|
|
105
|
+
attribute: 'name' | 'run_type' | 'tag' | 'project' | 'status';
|
|
106
|
+
}
|
|
107
|
+
interface CustomChartGroupByComplex {
|
|
108
|
+
attribute: 'metadata' | 'feedback_label';
|
|
109
|
+
path: string;
|
|
110
|
+
}
|
|
111
|
+
interface CustomChartFeedbackCountMetric {
|
|
112
|
+
entity: 'feedback';
|
|
113
|
+
params: CustomChartFeedbackCountMetric.Params;
|
|
114
|
+
filter?: string | null;
|
|
115
|
+
type?: 'count';
|
|
116
|
+
}
|
|
117
|
+
namespace CustomChartFeedbackCountMetric {
|
|
118
|
+
interface Params {
|
|
119
|
+
feedback_key: string;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
interface CustomChartMetricCount {
|
|
123
|
+
filter?: string | null;
|
|
124
|
+
type?: 'count';
|
|
125
|
+
}
|
|
126
|
+
interface CustomChartFeedbackScoreMetricScalar {
|
|
127
|
+
field: 'feedback_score';
|
|
128
|
+
params: CustomChartFeedbackScoreMetricScalar.Params;
|
|
129
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
130
|
+
filter?: string | null;
|
|
131
|
+
}
|
|
132
|
+
namespace CustomChartFeedbackScoreMetricScalar {
|
|
133
|
+
interface Params {
|
|
134
|
+
feedback_key: string;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
interface CustomChartMetricScalar {
|
|
138
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
139
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
140
|
+
filter?: string | null;
|
|
141
|
+
}
|
|
142
|
+
interface CustomChartFeedbackScoreMetricPercentile {
|
|
143
|
+
field: 'feedback_score';
|
|
144
|
+
params: CustomChartFeedbackScoreMetricPercentile.Params;
|
|
145
|
+
type: 'percentile';
|
|
146
|
+
filter?: string | null;
|
|
147
|
+
}
|
|
148
|
+
namespace CustomChartFeedbackScoreMetricPercentile {
|
|
149
|
+
interface Params {
|
|
150
|
+
feedback_key: string;
|
|
151
|
+
p: number;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
interface CustomChartMetricPercentile {
|
|
155
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
156
|
+
params: CustomChartMetricPercentile.Params;
|
|
157
|
+
type: 'percentile';
|
|
158
|
+
filter?: string | null;
|
|
159
|
+
}
|
|
160
|
+
namespace CustomChartMetricPercentile {
|
|
161
|
+
interface Params {
|
|
162
|
+
p: number;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
interface CustomChartMetricRatioOutput {
|
|
166
|
+
denominator: CustomChartMetricRatioOutput.CustomChartFeedbackCountMetric | CustomChartMetricRatioOutput.CustomChartMetricCount | CustomChartMetricRatioOutput.CustomChartFeedbackScoreMetricScalar | CustomChartMetricRatioOutput.CustomChartMetricScalar | CustomChartMetricRatioOutput.CustomChartFeedbackScoreMetricPercentile | CustomChartMetricRatioOutput.CustomChartMetricPercentile;
|
|
167
|
+
numerator: CustomChartMetricRatioOutput.CustomChartFeedbackCountMetric | CustomChartMetricRatioOutput.CustomChartMetricCount | CustomChartMetricRatioOutput.CustomChartFeedbackScoreMetricScalar | CustomChartMetricRatioOutput.CustomChartMetricScalar | CustomChartMetricRatioOutput.CustomChartFeedbackScoreMetricPercentile | CustomChartMetricRatioOutput.CustomChartMetricPercentile;
|
|
168
|
+
type: 'ratio';
|
|
169
|
+
}
|
|
170
|
+
namespace CustomChartMetricRatioOutput {
|
|
171
|
+
interface CustomChartFeedbackCountMetric {
|
|
172
|
+
entity: 'feedback';
|
|
173
|
+
params: CustomChartFeedbackCountMetric.Params;
|
|
174
|
+
filter?: string | null;
|
|
175
|
+
type?: 'count';
|
|
176
|
+
}
|
|
177
|
+
namespace CustomChartFeedbackCountMetric {
|
|
178
|
+
interface Params {
|
|
179
|
+
feedback_key: string;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
interface CustomChartMetricCount {
|
|
183
|
+
filter?: string | null;
|
|
184
|
+
type?: 'count';
|
|
185
|
+
}
|
|
186
|
+
interface CustomChartFeedbackScoreMetricScalar {
|
|
187
|
+
field: 'feedback_score';
|
|
188
|
+
params: CustomChartFeedbackScoreMetricScalar.Params;
|
|
189
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
190
|
+
filter?: string | null;
|
|
191
|
+
}
|
|
192
|
+
namespace CustomChartFeedbackScoreMetricScalar {
|
|
193
|
+
interface Params {
|
|
194
|
+
feedback_key: string;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
interface CustomChartMetricScalar {
|
|
198
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
199
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
200
|
+
filter?: string | null;
|
|
201
|
+
}
|
|
202
|
+
interface CustomChartFeedbackScoreMetricPercentile {
|
|
203
|
+
field: 'feedback_score';
|
|
204
|
+
params: CustomChartFeedbackScoreMetricPercentile.Params;
|
|
205
|
+
type: 'percentile';
|
|
206
|
+
filter?: string | null;
|
|
207
|
+
}
|
|
208
|
+
namespace CustomChartFeedbackScoreMetricPercentile {
|
|
209
|
+
interface Params {
|
|
210
|
+
feedback_key: string;
|
|
211
|
+
p: number;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
interface CustomChartMetricPercentile {
|
|
215
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
216
|
+
params: CustomChartMetricPercentile.Params;
|
|
217
|
+
type: 'percentile';
|
|
218
|
+
filter?: string | null;
|
|
219
|
+
}
|
|
220
|
+
namespace CustomChartMetricPercentile {
|
|
221
|
+
interface Params {
|
|
222
|
+
p: number;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
interface CustomChartFeedbackCountMetric {
|
|
226
|
+
entity: 'feedback';
|
|
227
|
+
params: CustomChartFeedbackCountMetric.Params;
|
|
228
|
+
filter?: string | null;
|
|
229
|
+
type?: 'count';
|
|
230
|
+
}
|
|
231
|
+
namespace CustomChartFeedbackCountMetric {
|
|
232
|
+
interface Params {
|
|
233
|
+
feedback_key: string;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
interface CustomChartMetricCount {
|
|
237
|
+
filter?: string | null;
|
|
238
|
+
type?: 'count';
|
|
239
|
+
}
|
|
240
|
+
interface CustomChartFeedbackScoreMetricScalar {
|
|
241
|
+
field: 'feedback_score';
|
|
242
|
+
params: CustomChartFeedbackScoreMetricScalar.Params;
|
|
243
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
244
|
+
filter?: string | null;
|
|
245
|
+
}
|
|
246
|
+
namespace CustomChartFeedbackScoreMetricScalar {
|
|
247
|
+
interface Params {
|
|
248
|
+
feedback_key: string;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
interface CustomChartMetricScalar {
|
|
252
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
253
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
254
|
+
filter?: string | null;
|
|
255
|
+
}
|
|
256
|
+
interface CustomChartFeedbackScoreMetricPercentile {
|
|
257
|
+
field: 'feedback_score';
|
|
258
|
+
params: CustomChartFeedbackScoreMetricPercentile.Params;
|
|
259
|
+
type: 'percentile';
|
|
260
|
+
filter?: string | null;
|
|
261
|
+
}
|
|
262
|
+
namespace CustomChartFeedbackScoreMetricPercentile {
|
|
263
|
+
interface Params {
|
|
264
|
+
feedback_key: string;
|
|
265
|
+
p: number;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
interface CustomChartMetricPercentile {
|
|
269
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
270
|
+
params: CustomChartMetricPercentile.Params;
|
|
271
|
+
type: 'percentile';
|
|
272
|
+
filter?: string | null;
|
|
273
|
+
}
|
|
274
|
+
namespace CustomChartMetricPercentile {
|
|
275
|
+
interface Params {
|
|
276
|
+
p: number;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
interface CommonFilters {
|
|
282
|
+
filter?: string | null;
|
|
283
|
+
session?: Array<string> | null;
|
|
284
|
+
trace_filter?: string | null;
|
|
285
|
+
tree_filter?: string | null;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
interface CustomTextBlock {
|
|
289
|
+
id: string;
|
|
290
|
+
chart_type: 'text';
|
|
291
|
+
index: number;
|
|
292
|
+
markdown: string;
|
|
293
|
+
metadata?: {
|
|
294
|
+
[key: string]: unknown;
|
|
295
|
+
} | null;
|
|
296
|
+
}
|
|
297
|
+
interface Layout {
|
|
298
|
+
breakpoints: Layout.Breakpoints;
|
|
299
|
+
version: 1;
|
|
300
|
+
}
|
|
301
|
+
namespace Layout {
|
|
302
|
+
interface Breakpoints {
|
|
303
|
+
md: Breakpoints.Md;
|
|
304
|
+
sm: Breakpoints.Sm;
|
|
305
|
+
}
|
|
306
|
+
namespace Breakpoints {
|
|
307
|
+
interface Md {
|
|
308
|
+
rows: Array<Md.Row>;
|
|
309
|
+
}
|
|
310
|
+
namespace Md {
|
|
311
|
+
interface Row {
|
|
312
|
+
height_units: number;
|
|
313
|
+
items: Array<Row.Item>;
|
|
314
|
+
}
|
|
315
|
+
namespace Row {
|
|
316
|
+
interface Item {
|
|
317
|
+
chart_id: string;
|
|
318
|
+
width_units: number;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
interface Sm {
|
|
323
|
+
rows: Array<Sm.Row>;
|
|
324
|
+
}
|
|
325
|
+
namespace Sm {
|
|
326
|
+
interface Row {
|
|
327
|
+
height_units: number;
|
|
328
|
+
items: Array<Row.Item>;
|
|
329
|
+
}
|
|
330
|
+
namespace Row {
|
|
331
|
+
interface Item {
|
|
332
|
+
chart_id: string;
|
|
333
|
+
width_units: number;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
interface SubSection {
|
|
340
|
+
id: string;
|
|
341
|
+
charts: Array<SubSection.Chart>;
|
|
342
|
+
index: number;
|
|
343
|
+
title: string;
|
|
344
|
+
description?: string | null;
|
|
345
|
+
}
|
|
346
|
+
namespace SubSection {
|
|
347
|
+
interface Chart {
|
|
348
|
+
id: string;
|
|
349
|
+
chart_type: 'line' | 'bar' | 'table' | 'kpi' | 'top-k' | 'pie';
|
|
350
|
+
data: Array<Chart.Data>;
|
|
351
|
+
index: number;
|
|
352
|
+
series: Array<Chart.Series>;
|
|
353
|
+
title: string;
|
|
354
|
+
common_filters?: Chart.CommonFilters | null;
|
|
355
|
+
description?: string | null;
|
|
356
|
+
metadata?: {
|
|
357
|
+
[key: string]: unknown;
|
|
358
|
+
} | null;
|
|
359
|
+
}
|
|
360
|
+
namespace Chart {
|
|
361
|
+
interface Data {
|
|
362
|
+
series_id: string;
|
|
363
|
+
timestamp: string;
|
|
364
|
+
value: number | {
|
|
365
|
+
[key: string]: unknown;
|
|
366
|
+
} | null;
|
|
367
|
+
group?: string | null;
|
|
368
|
+
}
|
|
369
|
+
interface Series {
|
|
370
|
+
id: string;
|
|
371
|
+
name: string;
|
|
372
|
+
feedback_key?: string | null;
|
|
373
|
+
filter_definition?: Series.CustomChartFilterByTracingProject | Series.CustomChartFilterByDataset | null;
|
|
374
|
+
filters?: Series.Filters | null;
|
|
375
|
+
/**
|
|
376
|
+
* Include additional information about where the group_by param was set.
|
|
377
|
+
*/
|
|
378
|
+
group_by?: Series.GroupBy | null;
|
|
379
|
+
group_by_definitions?: Array<Series.CustomChartGroupByPlain | Series.CustomChartGroupByComplex> | null;
|
|
380
|
+
metadata?: {
|
|
381
|
+
[key: string]: unknown;
|
|
382
|
+
} | null;
|
|
383
|
+
/**
|
|
384
|
+
* Metrics you can chart. Feedback metrics are not available for
|
|
385
|
+
* organization-scoped charts.
|
|
386
|
+
*/
|
|
387
|
+
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;
|
|
388
|
+
metric_definition?: Series.CustomChartFeedbackCountMetric | Series.CustomChartMetricCount | Series.CustomChartFeedbackScoreMetricScalar | Series.CustomChartMetricScalar | Series.CustomChartFeedbackScoreMetricPercentile | Series.CustomChartMetricPercentile | Series.CustomChartMetricRatioOutput | null;
|
|
389
|
+
/**
|
|
390
|
+
* LGP Metrics you can chart.
|
|
391
|
+
*/
|
|
392
|
+
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' | 'run_queue_wait_time' | null;
|
|
393
|
+
workspace_id?: string | null;
|
|
394
|
+
}
|
|
395
|
+
namespace Series {
|
|
396
|
+
interface CustomChartFilterByTracingProject {
|
|
397
|
+
project_ids: Array<string>;
|
|
398
|
+
source_type: 'tracing_project';
|
|
399
|
+
run_filter?: string | null;
|
|
400
|
+
trace_filter?: string | null;
|
|
401
|
+
tree_filter?: string | null;
|
|
402
|
+
}
|
|
403
|
+
interface CustomChartFilterByDataset {
|
|
404
|
+
dataset_ids: Array<string>;
|
|
405
|
+
source_type: 'dataset';
|
|
406
|
+
}
|
|
407
|
+
interface Filters {
|
|
408
|
+
filter?: string | null;
|
|
409
|
+
session?: Array<string> | null;
|
|
410
|
+
trace_filter?: string | null;
|
|
411
|
+
tree_filter?: string | null;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Include additional information about where the group_by param was set.
|
|
415
|
+
*/
|
|
416
|
+
interface GroupBy {
|
|
417
|
+
attribute: 'name' | 'run_type' | 'tag' | 'metadata';
|
|
418
|
+
max_groups?: number;
|
|
419
|
+
path?: string | null;
|
|
420
|
+
set_by?: 'section' | 'series' | null;
|
|
421
|
+
}
|
|
422
|
+
interface CustomChartGroupByPlain {
|
|
423
|
+
attribute: 'name' | 'run_type' | 'tag' | 'project' | 'status';
|
|
424
|
+
}
|
|
425
|
+
interface CustomChartGroupByComplex {
|
|
426
|
+
attribute: 'metadata' | 'feedback_label';
|
|
427
|
+
path: string;
|
|
428
|
+
}
|
|
429
|
+
interface CustomChartFeedbackCountMetric {
|
|
430
|
+
entity: 'feedback';
|
|
431
|
+
params: CustomChartFeedbackCountMetric.Params;
|
|
432
|
+
filter?: string | null;
|
|
433
|
+
type?: 'count';
|
|
434
|
+
}
|
|
435
|
+
namespace CustomChartFeedbackCountMetric {
|
|
436
|
+
interface Params {
|
|
437
|
+
feedback_key: string;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
interface CustomChartMetricCount {
|
|
441
|
+
filter?: string | null;
|
|
442
|
+
type?: 'count';
|
|
443
|
+
}
|
|
444
|
+
interface CustomChartFeedbackScoreMetricScalar {
|
|
445
|
+
field: 'feedback_score';
|
|
446
|
+
params: CustomChartFeedbackScoreMetricScalar.Params;
|
|
447
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
448
|
+
filter?: string | null;
|
|
449
|
+
}
|
|
450
|
+
namespace CustomChartFeedbackScoreMetricScalar {
|
|
451
|
+
interface Params {
|
|
452
|
+
feedback_key: string;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
interface CustomChartMetricScalar {
|
|
456
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
457
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
458
|
+
filter?: string | null;
|
|
459
|
+
}
|
|
460
|
+
interface CustomChartFeedbackScoreMetricPercentile {
|
|
461
|
+
field: 'feedback_score';
|
|
462
|
+
params: CustomChartFeedbackScoreMetricPercentile.Params;
|
|
463
|
+
type: 'percentile';
|
|
464
|
+
filter?: string | null;
|
|
465
|
+
}
|
|
466
|
+
namespace CustomChartFeedbackScoreMetricPercentile {
|
|
467
|
+
interface Params {
|
|
468
|
+
feedback_key: string;
|
|
469
|
+
p: number;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
interface CustomChartMetricPercentile {
|
|
473
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
474
|
+
params: CustomChartMetricPercentile.Params;
|
|
475
|
+
type: 'percentile';
|
|
476
|
+
filter?: string | null;
|
|
477
|
+
}
|
|
478
|
+
namespace CustomChartMetricPercentile {
|
|
479
|
+
interface Params {
|
|
480
|
+
p: number;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
interface CustomChartMetricRatioOutput {
|
|
484
|
+
denominator: CustomChartMetricRatioOutput.CustomChartFeedbackCountMetric | CustomChartMetricRatioOutput.CustomChartMetricCount | CustomChartMetricRatioOutput.CustomChartFeedbackScoreMetricScalar | CustomChartMetricRatioOutput.CustomChartMetricScalar | CustomChartMetricRatioOutput.CustomChartFeedbackScoreMetricPercentile | CustomChartMetricRatioOutput.CustomChartMetricPercentile;
|
|
485
|
+
numerator: CustomChartMetricRatioOutput.CustomChartFeedbackCountMetric | CustomChartMetricRatioOutput.CustomChartMetricCount | CustomChartMetricRatioOutput.CustomChartFeedbackScoreMetricScalar | CustomChartMetricRatioOutput.CustomChartMetricScalar | CustomChartMetricRatioOutput.CustomChartFeedbackScoreMetricPercentile | CustomChartMetricRatioOutput.CustomChartMetricPercentile;
|
|
486
|
+
type: 'ratio';
|
|
487
|
+
}
|
|
488
|
+
namespace CustomChartMetricRatioOutput {
|
|
489
|
+
interface CustomChartFeedbackCountMetric {
|
|
490
|
+
entity: 'feedback';
|
|
491
|
+
params: CustomChartFeedbackCountMetric.Params;
|
|
492
|
+
filter?: string | null;
|
|
493
|
+
type?: 'count';
|
|
494
|
+
}
|
|
495
|
+
namespace CustomChartFeedbackCountMetric {
|
|
496
|
+
interface Params {
|
|
497
|
+
feedback_key: string;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
interface CustomChartMetricCount {
|
|
501
|
+
filter?: string | null;
|
|
502
|
+
type?: 'count';
|
|
503
|
+
}
|
|
504
|
+
interface CustomChartFeedbackScoreMetricScalar {
|
|
505
|
+
field: 'feedback_score';
|
|
506
|
+
params: CustomChartFeedbackScoreMetricScalar.Params;
|
|
507
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
508
|
+
filter?: string | null;
|
|
509
|
+
}
|
|
510
|
+
namespace CustomChartFeedbackScoreMetricScalar {
|
|
511
|
+
interface Params {
|
|
512
|
+
feedback_key: string;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
interface CustomChartMetricScalar {
|
|
516
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
517
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
518
|
+
filter?: string | null;
|
|
519
|
+
}
|
|
520
|
+
interface CustomChartFeedbackScoreMetricPercentile {
|
|
521
|
+
field: 'feedback_score';
|
|
522
|
+
params: CustomChartFeedbackScoreMetricPercentile.Params;
|
|
523
|
+
type: 'percentile';
|
|
524
|
+
filter?: string | null;
|
|
525
|
+
}
|
|
526
|
+
namespace CustomChartFeedbackScoreMetricPercentile {
|
|
527
|
+
interface Params {
|
|
528
|
+
feedback_key: string;
|
|
529
|
+
p: number;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
interface CustomChartMetricPercentile {
|
|
533
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
534
|
+
params: CustomChartMetricPercentile.Params;
|
|
535
|
+
type: 'percentile';
|
|
536
|
+
filter?: string | null;
|
|
537
|
+
}
|
|
538
|
+
namespace CustomChartMetricPercentile {
|
|
539
|
+
interface Params {
|
|
540
|
+
p: number;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
interface CustomChartFeedbackCountMetric {
|
|
544
|
+
entity: 'feedback';
|
|
545
|
+
params: CustomChartFeedbackCountMetric.Params;
|
|
546
|
+
filter?: string | null;
|
|
547
|
+
type?: 'count';
|
|
548
|
+
}
|
|
549
|
+
namespace CustomChartFeedbackCountMetric {
|
|
550
|
+
interface Params {
|
|
551
|
+
feedback_key: string;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
interface CustomChartMetricCount {
|
|
555
|
+
filter?: string | null;
|
|
556
|
+
type?: 'count';
|
|
557
|
+
}
|
|
558
|
+
interface CustomChartFeedbackScoreMetricScalar {
|
|
559
|
+
field: 'feedback_score';
|
|
560
|
+
params: CustomChartFeedbackScoreMetricScalar.Params;
|
|
561
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
562
|
+
filter?: string | null;
|
|
563
|
+
}
|
|
564
|
+
namespace CustomChartFeedbackScoreMetricScalar {
|
|
565
|
+
interface Params {
|
|
566
|
+
feedback_key: string;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
interface CustomChartMetricScalar {
|
|
570
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
571
|
+
type: 'sum' | 'max' | 'min' | 'avg';
|
|
572
|
+
filter?: string | null;
|
|
573
|
+
}
|
|
574
|
+
interface CustomChartFeedbackScoreMetricPercentile {
|
|
575
|
+
field: 'feedback_score';
|
|
576
|
+
params: CustomChartFeedbackScoreMetricPercentile.Params;
|
|
577
|
+
type: 'percentile';
|
|
578
|
+
filter?: string | null;
|
|
579
|
+
}
|
|
580
|
+
namespace CustomChartFeedbackScoreMetricPercentile {
|
|
581
|
+
interface Params {
|
|
582
|
+
feedback_key: string;
|
|
583
|
+
p: number;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
interface CustomChartMetricPercentile {
|
|
587
|
+
field: 'latency_seconds' | 'first_token_seconds' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'prompt_token_details.cache_creation' | 'prompt_token_details.cache_read' | 'prompt_token_details.ephemeral_1h_input_tokens' | 'prompt_token_details.ephemeral_5m_input_tokens' | 'prompt_token_details.audio' | 'prompt_token_details.image' | 'prompt_token_details.video' | 'completion_token_details.reasoning' | 'completion_token_details.audio' | 'completion_token_details.image' | 'completion_token_details.video' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'feedback_score';
|
|
588
|
+
params: CustomChartMetricPercentile.Params;
|
|
589
|
+
type: 'percentile';
|
|
590
|
+
filter?: string | null;
|
|
591
|
+
}
|
|
592
|
+
namespace CustomChartMetricPercentile {
|
|
593
|
+
interface Params {
|
|
594
|
+
p: number;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
interface CommonFilters {
|
|
600
|
+
filter?: string | null;
|
|
601
|
+
session?: Array<string> | null;
|
|
602
|
+
trace_filter?: string | null;
|
|
603
|
+
tree_filter?: string | null;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
export interface CustomChartsSectionRequest {
|
|
609
|
+
end_time?: string | null;
|
|
610
|
+
/**
|
|
611
|
+
* Group by param for run stats.
|
|
612
|
+
*/
|
|
613
|
+
group_by?: RunStatsGroupBy | null;
|
|
614
|
+
omit_data?: boolean;
|
|
615
|
+
start_time?: string | null;
|
|
616
|
+
/**
|
|
617
|
+
* Timedelta input.
|
|
618
|
+
*/
|
|
619
|
+
stride?: TimedeltaInput;
|
|
620
|
+
timezone?: string;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Group by param for run stats.
|
|
624
|
+
*/
|
|
625
|
+
export interface RunStatsGroupBy {
|
|
626
|
+
attribute: 'name' | 'run_type' | 'tag' | 'metadata';
|
|
627
|
+
max_groups?: number;
|
|
628
|
+
path?: string | null;
|
|
629
|
+
}
|
|
630
|
+
export type SessionSortableColumns = 'name' | 'start_time' | 'last_run_start_time' | 'latency_p50' | 'latency_p99' | 'error_rate' | 'feedback';
|
|
631
|
+
/**
|
|
632
|
+
* Timedelta input.
|
|
633
|
+
*/
|
|
634
|
+
export interface TimedeltaInput {
|
|
635
|
+
days?: number;
|
|
636
|
+
hours?: number;
|
|
637
|
+
minutes?: number;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* TracerSession schema.
|
|
641
|
+
*/
|
|
642
|
+
export interface TracerSession {
|
|
643
|
+
id: string;
|
|
644
|
+
tenant_id: string;
|
|
645
|
+
completion_cost?: string | null;
|
|
646
|
+
completion_tokens?: number | null;
|
|
647
|
+
default_dataset_id?: string | null;
|
|
648
|
+
description?: string | null;
|
|
649
|
+
end_time?: string | null;
|
|
650
|
+
error_rate?: number | null;
|
|
651
|
+
experiment_progress?: TracerSession.ExperimentProgress | null;
|
|
652
|
+
extra?: {
|
|
653
|
+
[key: string]: unknown;
|
|
654
|
+
} | null;
|
|
655
|
+
feedback_stats?: {
|
|
656
|
+
[key: string]: unknown;
|
|
657
|
+
} | null;
|
|
658
|
+
first_token_p50?: number | null;
|
|
659
|
+
first_token_p99?: number | null;
|
|
660
|
+
last_run_start_time?: string | null;
|
|
661
|
+
last_run_start_time_live?: string | null;
|
|
662
|
+
latency_p50?: number | null;
|
|
663
|
+
latency_p99?: number | null;
|
|
664
|
+
name?: string;
|
|
665
|
+
prompt_cost?: string | null;
|
|
666
|
+
prompt_tokens?: number | null;
|
|
667
|
+
reference_dataset_id?: string | null;
|
|
668
|
+
run_count?: number | null;
|
|
669
|
+
run_facets?: Array<{
|
|
670
|
+
[key: string]: unknown;
|
|
671
|
+
}> | null;
|
|
672
|
+
session_feedback_stats?: {
|
|
673
|
+
[key: string]: unknown;
|
|
674
|
+
} | null;
|
|
675
|
+
start_time?: string;
|
|
676
|
+
streaming_rate?: number | null;
|
|
677
|
+
test_run_number?: number | null;
|
|
678
|
+
total_cost?: string | null;
|
|
679
|
+
total_tokens?: number | null;
|
|
680
|
+
trace_tier?: 'longlived' | 'shortlived' | null;
|
|
681
|
+
}
|
|
682
|
+
export declare namespace TracerSession {
|
|
683
|
+
interface ExperimentProgress {
|
|
684
|
+
evaluator_progress: {
|
|
685
|
+
[key: string]: number;
|
|
686
|
+
};
|
|
687
|
+
expected_run_count: number;
|
|
688
|
+
run_progress: number;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* TracerSession schema.
|
|
693
|
+
*/
|
|
694
|
+
export interface TracerSessionWithoutVirtualFields {
|
|
695
|
+
id: string;
|
|
696
|
+
tenant_id: string;
|
|
697
|
+
default_dataset_id?: string | null;
|
|
698
|
+
description?: string | null;
|
|
699
|
+
end_time?: string | null;
|
|
700
|
+
extra?: {
|
|
701
|
+
[key: string]: unknown;
|
|
702
|
+
} | null;
|
|
703
|
+
last_run_start_time_live?: string | null;
|
|
704
|
+
name?: string;
|
|
705
|
+
reference_dataset_id?: string | null;
|
|
706
|
+
start_time?: string;
|
|
707
|
+
trace_tier?: 'longlived' | 'shortlived' | null;
|
|
708
|
+
}
|
|
709
|
+
export interface SessionResolveResponse {
|
|
710
|
+
/**
|
|
711
|
+
* `session_id` is the tracing project (session) the address names.
|
|
712
|
+
*/
|
|
713
|
+
session_id: string;
|
|
714
|
+
}
|
|
715
|
+
export interface SessionResolveParams {
|
|
716
|
+
/**
|
|
717
|
+
* The kind of address.
|
|
718
|
+
*/
|
|
719
|
+
kind: 'AGENT' | 'EXPERIMENT' | 'EVALUATOR';
|
|
720
|
+
/**
|
|
721
|
+
* The Agent's user-assigned id for AGENT, or the experiment's id for EXPERIMENT.
|
|
722
|
+
* Not set for EVALUATOR.
|
|
723
|
+
*/
|
|
724
|
+
id?: string;
|
|
725
|
+
/**
|
|
726
|
+
* The Agent environment. Only set for AGENT.
|
|
727
|
+
*/
|
|
728
|
+
environment?: 'LOCAL' | 'DEVELOPMENT' | 'STAGING' | 'PRODUCTION';
|
|
729
|
+
}
|
|
730
|
+
export declare namespace Sessions {
|
|
731
|
+
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 SessionResolveResponse as SessionResolveResponse, type SessionResolveParams as SessionResolveParams, };
|
|
732
|
+
}
|