Type Alias RunTreeLike

RunTreeLike: {
    child_execution_order: number;
    child_runs: RunTree[];
    client: Client;
    createChild: (config: RunTreeConfig) => RunTree;
    dotted_order: string;
    end: (
        outputs?: KVMap,
        error?: string,
        endTime?: number,
        metadata?: KVMap,
    ) => Promise<void>;
    execution_order: number;
    extra: KVMap;
    id: string;
    inputs: KVMap;
    name: string;
    patchRun: () => Promise<void>;
    postRun: (excludeChildRuns?: boolean) => Promise<void>;
    project_name: string;
    run_type: string;
    serialized: object;
    start_time: number;
    toHeaders: (
        headers?: HeadersLike,
    ) => { baggage: string; "langsmith-trace": string };
    toJSON: () => RunCreate;
    trace_id: string;
    attachments?: undefined | Attachments;
    end_time?: undefined | number;
    error?: undefined | string;
    events?: undefined | KVMap[];
    outputs?: undefined | KVMap;
    parent_run?: undefined | RunTree;
    reference_example_id?: undefined | string;
    tags?: undefined | string[];
    tracingEnabled?: undefined | boolean;
}

Type declaration

  • child_execution_order: number
  • child_runs: RunTree[]
  • client: Client
  • createChild: (config: RunTreeConfig) => RunTree
  • 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
  • end: (
        outputs?: KVMap,
        error?: string,
        endTime?: number,
        metadata?: KVMap,
    ) => Promise<void>
  • execution_order: number
  • extra: KVMap

    Any additional metadata or settings for the run.

  • id: string

    Optionally, a unique identifier for the run.

  • inputs: KVMap

    Inputs that were used to initiate the run.

  • name: string

    A human-readable name for the run.

  • patchRun: () => Promise<void>
  • postRun: (excludeChildRuns?: boolean) => Promise<void>
  • project_name: string
  • run_type: string

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

  • serialized: object

    Serialized state of the run for potential future use.

  • start_time: number

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

  • toHeaders: (headers?: HeadersLike) => { baggage: string; "langsmith-trace": string }
  • toJSON: () => RunCreate
  • trace_id: string

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

  • Optionalattachments?: undefined | Attachments

    Attachments associated with the run. Each entry is a tuple of [mime_type, bytes]

  • Optionalend_time?: undefined | number

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

  • Optionalerror?: undefined | string

    Error message, captured if the run faces any issues.

  • Optionalevents?: undefined | KVMap[]

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

  • Optionaloutputs?: undefined | KVMap

    Outputs produced by the run, if any.

  • Optionalparent_run?: undefined | RunTree
  • Optionalreference_example_id?: undefined | string

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

  • Optionaltags?: undefined | string[]

    Tags for further categorizing or annotating the run.

  • OptionaltracingEnabled?: undefined | boolean