Class: LlmSpan

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

Extends

Constructors

Constructor

new LlmSpan(data: LlmSpanOptions): LlmSpan;
Defined in: src/types/logging/span.types.ts:173

Parameters

data
LlmSpanOptions

Returns

LlmSpan

Overrides

BaseSpan.constructor

Properties

createdAt

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

Inherited from

BaseSpan.createdAt

datasetInput?

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

Inherited from

BaseSpan.datasetInput

datasetMetadata?

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

Inherited from

BaseSpan.datasetMetadata

datasetOutput?

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

Inherited from

BaseSpan.datasetOutput

externalId?

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

Inherited from

BaseSpan.externalId

finishReason?

optional finishReason: string;
Defined in: src/types/logging/span.types.ts:171

input

input: Message[];
Defined in: src/types/logging/span.types.ts:162

Overrides

BaseSpan.input

metrics

metrics: LlmMetrics;
Defined in: src/types/logging/span.types.ts:166

Overrides

BaseSpan.metrics

model?

optional model: string;
Defined in: src/types/logging/span.types.ts:169

name

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

Inherited from

BaseSpan.name

output

output: Message;
Defined in: src/types/logging/span.types.ts:164

Overrides

BaseSpan.output

redactedInput?

optional redactedInput: Message[];
Defined in: src/types/logging/span.types.ts:163

Overrides

BaseSpan.redactedInput

redactedOutput?

optional redactedOutput: Message;
Defined in: src/types/logging/span.types.ts:165

Overrides

BaseSpan.redactedOutput

statusCode?

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

Inherited from

BaseSpan.statusCode

stepNumber?

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

Inherited from

BaseSpan.stepNumber

tags?

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

Inherited from

BaseSpan.tags

temperature?

optional temperature: number;
Defined in: src/types/logging/span.types.ts:170

tools?

optional tools: Record<string, any>[];
Defined in: src/types/logging/span.types.ts:168

type

type: StepType = StepType.llm;
Defined in: src/types/logging/span.types.ts:161

Overrides

BaseSpan.type

userMetadata

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

Inherited from

BaseSpan.userMetadata

Methods

toJSON()

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

Returns

Record<string, any>

Overrides

BaseSpan.toJSON

validateInputOutputSerializable()

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

Type Parameters

T
T = | string | string[] | Document | Message | Record<string, string> | Message[] | Record<string, string>[] | Record<string, string>[] | Document[]

Parameters

val
T

Returns

T

Inherited from

BaseSpan.validateInputOutputSerializable