-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathmetrics.ts
More file actions
81 lines (66 loc) · 1.84 KB
/
metrics.ts
File metadata and controls
81 lines (66 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
import { APIPromise } from '../../core/api-promise';
import { RequestOptions } from '../../internal/request-options';
import { path } from '../../internal/utils/path';
export class Metrics extends APIResource {
/**
* Get step metrics by step ID.
*/
retrieve(stepID: string, options?: RequestOptions): APIPromise<MetricRetrieveResponse> {
return this._client.get(path`/v1/steps/${stepID}/metrics`, options);
}
}
export interface MetricRetrieveResponse {
/**
* The id of the step this metric belongs to (matches steps.id).
*/
id: string;
/**
* The unique identifier of the agent.
*/
agent_id?: string | null;
/**
* The base template ID that the step belongs to (cloud only).
*/
base_template_id?: string | null;
/**
* Time spent on LLM requests in nanoseconds.
*/
llm_request_ns?: number | null;
/**
* The timestamp of the start of the llm request in nanoseconds.
*/
llm_request_start_ns?: number | null;
/**
* The project that the step belongs to (cloud only).
*/
project_id?: string | null;
/**
* The unique identifier of the provider.
*/
provider_id?: string | null;
/**
* The unique identifier of the run.
*/
run_id?: string | null;
/**
* Total time for the step in nanoseconds.
*/
step_ns?: number | null;
/**
* The timestamp of the start of the step in nanoseconds.
*/
step_start_ns?: number | null;
/**
* The template ID that the step belongs to (cloud only).
*/
template_id?: string | null;
/**
* Time spent on tool execution in nanoseconds.
*/
tool_execution_ns?: number | null;
}
export declare namespace Metrics {
export { type MetricRetrieveResponse as MetricRetrieveResponse };
}