Observation

interface ApiObservation {
    completionStartTime?: null | string;
    costDetails?: Record<string, number>;
    endTime?: null | string;
    id: string;
    input?: any;
    level: ApiObservationLevel;
    metadata?: any;
    model?: null | string;
    modelParameters?: Record<string, ApiMapValue>;
    name?: null | string;
    output?: any;
    parentObservationId?: null | string;
    promptId?: null | string;
    startTime: string;
    statusMessage?: null | string;
    traceId?: null | string;
    type: string;
    usage?: null | ApiUsage;
    usageDetails?: Record<string, number>;
    version?: null | string;
}

Properties

completionStartTime?: null | string

The completion start time of the observation

date-time

costDetails?: Record<string, number>

The cost details of the observation. Key is the name of the cost metric, value is the cost in USD. The total key is the sum of all (non-total) cost metrics or the total value ingested.

endTime?: null | string

The end time of the observation.

date-time

id: string

The unique identifier of the observation

input?: any

The input data of the observation

The level of the observation

metadata?: any

Additional metadata of the observation

model?: null | string

The model used for the observation

modelParameters?: Record<string, ApiMapValue>

The parameters of the model used for the observation

name?: null | string

The name of the observation

output?: any

The output data of the observation

parentObservationId?: null | string

The parent observation ID

promptId?: null | string

The prompt ID associated with the observation

startTime: string

The start time of the observation

date-time

statusMessage?: null | string

The status message of the observation

traceId?: null | string

The trace ID associated with the observation

type: string

The type of the observation

usage?: null | ApiUsage

(Deprecated. Use usageDetails and costDetails instead.) The usage data of the observation

usageDetails?: Record<string, number>

The usage details of the observation. Key is the name of the usage metric, value is the number of units consumed. The total key is the sum of all (non-total) usage metrics or the total value ingested.

version?: null | string

The version of the observation