langsmith 0.0.32 → 0.0.33
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/schemas.d.ts +51 -8
- package/package.json +1 -1
package/dist/schemas.d.ts
CHANGED
|
@@ -26,32 +26,75 @@ export interface BaseExample {
|
|
|
26
26
|
inputs: KVMap;
|
|
27
27
|
outputs?: KVMap;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* A run can represent either a trace (root run)
|
|
31
|
+
* or a child run (~span).
|
|
32
|
+
*/
|
|
29
33
|
export interface BaseRun {
|
|
34
|
+
/** Optionally, a unique identifier for the run. */
|
|
30
35
|
id?: string;
|
|
36
|
+
/** A human-readable name for the run. */
|
|
31
37
|
name: string;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
/** Defines the sequence in which the run was executed. */
|
|
39
|
+
execution_order?: number;
|
|
40
|
+
/** The epoch time at which the run started, if available. */
|
|
35
41
|
start_time?: number;
|
|
42
|
+
/** Specifies the type of run (tool, chain, llm, etc.). */
|
|
43
|
+
run_type: string;
|
|
44
|
+
/** The epoch time at which the run ended, if applicable. */
|
|
36
45
|
end_time?: number;
|
|
46
|
+
/** Any additional metadata or settings for the run. */
|
|
37
47
|
extra?: KVMap;
|
|
48
|
+
/** Error message, captured if the run faces any issues. */
|
|
38
49
|
error?: string;
|
|
39
|
-
|
|
50
|
+
/** Serialized state of the run for potential future use. */
|
|
51
|
+
serialized?: object;
|
|
52
|
+
/** Events like 'start', 'end' linked to the run. */
|
|
53
|
+
events?: KVMap[];
|
|
54
|
+
/** Inputs that were used to initiate the run. */
|
|
55
|
+
inputs: KVMap;
|
|
56
|
+
/** Outputs produced by the run, if any. */
|
|
40
57
|
outputs?: KVMap;
|
|
58
|
+
/** ID of an example that might be related to this run. */
|
|
41
59
|
reference_example_id?: string;
|
|
60
|
+
/** ID of a parent run, if this run is part of a larger operation. */
|
|
42
61
|
parent_run_id?: string;
|
|
43
|
-
|
|
62
|
+
/** Tags for further categorizing or annotating the run. */
|
|
44
63
|
tags?: string[];
|
|
45
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Describes properties of a run when loaded from the database.
|
|
67
|
+
* Extends the BaseRun interface.
|
|
68
|
+
*/
|
|
46
69
|
export interface Run extends BaseRun {
|
|
70
|
+
/** A unique identifier for the run, mandatory when loaded from DB. */
|
|
47
71
|
id: string;
|
|
48
|
-
|
|
72
|
+
/** Defines the sequence in which the run was executed. */
|
|
49
73
|
execution_order: number;
|
|
50
|
-
|
|
74
|
+
/** The ID of the project that owns this run. */
|
|
75
|
+
session_id?: string;
|
|
76
|
+
/** IDs of any child runs spawned by this run. */
|
|
51
77
|
child_run_ids?: string[];
|
|
52
|
-
|
|
78
|
+
/** Child runs, loaded explicitly via a heavier query. */
|
|
53
79
|
child_runs?: Run[];
|
|
80
|
+
/** Stats capturing feedback for this run. */
|
|
81
|
+
feedback_stats?: KVMap;
|
|
82
|
+
/** The URL path where this run is accessible within the app. */
|
|
54
83
|
app_path?: string;
|
|
84
|
+
/** The manifest ID that correlates with this run. */
|
|
85
|
+
manifest_id?: string;
|
|
86
|
+
/** The current status of the run, such as 'success'. */
|
|
87
|
+
status?: string;
|
|
88
|
+
/** Number of tokens used in the prompt. */
|
|
89
|
+
prompt_tokens?: number;
|
|
90
|
+
/** Number of tokens generated in the completion. */
|
|
91
|
+
completion_tokens?: number;
|
|
92
|
+
/** Total token count, combining prompt and completion. */
|
|
93
|
+
total_tokens?: number;
|
|
94
|
+
/** Time when the first token was processed. */
|
|
95
|
+
first_token_time?: number;
|
|
96
|
+
/** IDs of parent runs, if multiple exist. */
|
|
97
|
+
parent_run_ids?: string[];
|
|
55
98
|
}
|
|
56
99
|
export interface RunCreate extends BaseRun {
|
|
57
100
|
child_runs?: this[];
|