Reference/SDK/Typescript/Classes

Class: ReadonlyExperiment

A read-only view of an experiment, initialized by passing open: true to init().

Hierarchy

  • ObjectFetcher<ExperimentEvent>

    ReadonlyExperiment

Accessors

id

get id(): Promise<string>

Returns

Promise<string>

Overrides

ObjectFetcher.id


name

get name(): Promise<string>

Returns

Promise<string>

Constructors

constructor

new ReadonlyExperiment(state, lazyMetadata): ReadonlyExperiment

Parameters

NameType
stateBraintrustState
lazyMetadataLazyValue<ProjectExperimentMetadata>

Returns

ReadonlyExperiment

Overrides

ObjectFetcher&lt;ExperimentEvent&gt;.constructor

Methods

[asyncIterator]

[asyncIterator](): AsyncIterator<WithTransactionId<ExperimentEvent>, any, undefined>

Returns

AsyncIterator<WithTransactionId<ExperimentEvent>, any, undefined>

Inherited from

ObjectFetcher.[asyncIterator]


asDataset

asDataset<Input, Expected>(): AsyncGenerator<EvalCase<Input, Expected, void>, any, unknown>

Type parameters

Name
Input
Expected

Returns

AsyncGenerator<EvalCase<Input, Expected, void>, any, unknown>


clearCache

clearCache(): void

Returns

void

Inherited from

ObjectFetcher.clearCache


fetch

fetch(): AsyncGenerator<WithTransactionId<ExperimentEvent>, any, unknown>

Returns

AsyncGenerator<WithTransactionId<ExperimentEvent>, any, unknown>

Inherited from

ObjectFetcher.fetch


fetchedData

fetchedData(): Promise<WithTransactionId<ExperimentEvent>[]>

Returns

Promise<WithTransactionId<ExperimentEvent>[]>

Inherited from

ObjectFetcher.fetchedData


getState

getState(): Promise<BraintrustState>

Returns

Promise<BraintrustState>

Overrides

ObjectFetcher.getState


version

version(): Promise<undefined | string>

Returns

Promise<undefined | string>

Inherited from

ObjectFetcher.version