Skip to main content

Class: BaseSpan

Defined in: src/types/logging/span.types.ts

Extends

Extended by

Constructors

Constructor

new BaseSpan(type: "agent" | "llm" | "retriever" | "tool" | "workflow" | "trace" | "session", data: BaseSpanOptions): BaseSpan;
Defined in: src/types/logging/span.types.ts

Parameters

type
"agent" | "llm" | "retriever" | "tool" | "workflow" | "trace" | "session"
data
BaseSpanOptions

Returns

BaseSpan

Overrides

BaseStep.constructor

Properties

createdAt

createdAt: Date;
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.createdAt

datasetInput?

optional datasetInput: string;
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.datasetInput

datasetMetadata?

optional datasetMetadata: Record<string, string> = {};
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.datasetMetadata

datasetOutput?

optional datasetOutput: string;
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.datasetOutput

externalId?

optional externalId: string;
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.externalId

input

input: StepAllowedInputType;
Defined in: src/types/logging/span.types.ts

Overrides

BaseStep.input

metrics

metrics: Metrics;
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.metrics

name

name: string = "";
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.name

output?

optional output: StepAllowedOutputType;
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.output

redactedInput?

optional redactedInput: StepAllowedInputType;
Defined in: src/types/logging/span.types.ts

Overrides

BaseStep.redactedInput

redactedOutput?

optional redactedOutput: StepAllowedOutputType;
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.redactedOutput

statusCode?

optional statusCode: number;
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.statusCode

stepNumber?

optional stepNumber: number;
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.stepNumber

tags?

optional tags: string[];
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.tags

type

type: "agent" | "llm" | "retriever" | "tool" | "workflow" | "trace" | "session";
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.type

userMetadata

userMetadata: Record<string, string> = {};
Defined in: src/types/logging/step.types.ts

Inherited from

BaseStep.userMetadata

Methods

toJSON()

toJSON(): Record<string, any>;
Defined in: src/types/logging/step.types.ts

Returns

Record<string, any>

Inherited from

BaseStep.toJSON

validateInputOutputSerializable()

validateInputOutputSerializable<T>(val: T): T;
Defined in: src/types/logging/step.types.ts

Type Parameters

T
T = | string | { content: string; role: | "function" | "agent" | "tool" | "user" | "assistant" | "developer" | "system"; tool_call_id?: null | string; tool_calls?: null | object[]; } | string[] | Document | Record<string, string> | Document[] | Record<string, string>[] | object[] | Record<string, string>[]

Parameters

val
T

Returns

T

Inherited from

BaseStep.validateInputOutputSerializable