Skip to main content

Class: RunTree

run_trees.RunTree

A run can represent either a trace (root run) or a child run (~span).

Implements

Constructors

constructor

new RunTree(originalConfig): RunTree

Parameters

NameType
originalConfigRunTreeConfig

Returns

RunTree

Defined in

run_trees.ts:104

Properties

child_runs

child_runs: RunTree[]

Defined in

run_trees.ts:89


client

client: Client

Defined in

run_trees.ts:99


dotted_order

dotted_order: string

The dotted order for the run.

This is a string composed of {time}{run-uuid}.* so that a trace can be sorted in the order it was executed.

Example:

  • Parent: 20230914T223155647Z1b64098b-4ab7-43f6-afee-992304f198d8
  • Children:
    • 20230914T223155647Z1b64098b-4ab7-43f6-afee-992304f198d8.20230914T223155649Z809ed3a2-0172-4f4d-8a02-a64e9b7a0f8a
    • 20230915T223155647Z1b64098b-4ab7-43f6-afee-992304f198d8.20230914T223155650Zc8d9f4c5-6c5a-4b2d-9b1c-3d9d7a7c5c7c

Implementation of

BaseRun.dotted_order

Defined in

run_trees.ts:102


extra

extra: KVMap

Any additional metadata or settings for the run.

Implementation of

BaseRun.extra

Defined in

run_trees.ts:92


id

id: string

Optionally, a unique identifier for the run.

Implementation of

BaseRun.id

Defined in

run_trees.ts:84


inputs

inputs: KVMap

Inputs that were used to initiate the run.

Implementation of

BaseRun.inputs

Defined in

run_trees.ts:96


name

name: string

A human-readable name for the run.

Implementation of

BaseRun.name

Defined in

run_trees.ts:85


project_name

project_name: string

Defined in

run_trees.ts:87


run_type

run_type: string

Specifies the type of run (tool, chain, llm, etc.).

Implementation of

BaseRun.run_type

Defined in

run_trees.ts:86


serialized

serialized: object

Serialized state of the run for potential future use.

Implementation of

BaseRun.serialized

Defined in

run_trees.ts:95


start_time

start_time: number

The epoch time at which the run started, if available.

Implementation of

BaseRun.start_time

Defined in

run_trees.ts:90


trace_id

trace_id: string

Unique ID assigned to every run within this nested trace. *

Implementation of

BaseRun.trace_id

Defined in

run_trees.ts:101


end_time

Optional end_time: number

The epoch time at which the run ended, if applicable.

Implementation of

BaseRun.end_time

Defined in

run_trees.ts:91


error

Optional error: string

Error message, captured if the run faces any issues.

Implementation of

BaseRun.error

Defined in

run_trees.ts:94


events

Optional events: KVMap[]

Events like 'start', 'end' linked to the run.

Implementation of

BaseRun.events

Defined in

run_trees.ts:100


outputs

Optional outputs: KVMap

Outputs produced by the run, if any.

Implementation of

BaseRun.outputs

Defined in

run_trees.ts:97


parent_run

Optional parent_run: BaseRun

Defined in

run_trees.ts:88


reference_example_id

Optional reference_example_id: string

ID of an example that might be related to this run.

Implementation of

BaseRun.reference_example_id

Defined in

run_trees.ts:98


tags

Optional tags: string[]

Tags for further categorizing or annotating the run.

Implementation of

BaseRun.tags

Defined in

run_trees.ts:93

Methods

createChild

createChild(config): RunTree

Parameters

NameType
configRunTreeConfig

Returns

RunTree

Defined in

run_trees.ts:196


end

end(outputs?, error?, endTime?): Promise<void>

Parameters

NameType
outputs?KVMap
error?string
endTimenumber

Returns

Promise<void>

Defined in

run_trees.ts:208


patchRun

patchRun(): Promise<void>

Returns

Promise<void>

Defined in

run_trees.ts:281


postRun

postRun(excludeChildRuns?): Promise<void>

Parameters

NameTypeDefault value
excludeChildRunsbooleantrue

Returns

Promise<void>

Defined in

run_trees.ts:267


fromRunnableConfig

fromRunnableConfig(config, props): RunTree

Parameters

NameType
configRunnableConfigLike
propsObject
props.namestring
props.metadata?KVMap
props.tags?string[]

Returns

RunTree

Defined in

run_trees.ts:135


Was this page helpful?