Skip to content

AxChainOfThought

Class: AxChainOfThought<IN, OUT>

Extends

  • AxGen<IN, OUT & object>

Extended by

Type Parameters

IN extends AxGenIn = AxGenIn

OUT extends AxGenOut = AxGenOut

Constructors

new AxChainOfThought()

new AxChainOfThought<IN, OUT>(signature, options?): AxChainOfThought<IN, OUT>

Parameters

signature: Readonly<string | AxSignature>

options?: Readonly<AxGenOptions>

Returns

AxChainOfThought<IN, OUT>

Overrides

AxGen.constructor

Defined in

src/ax/prompts/cot.ts:9

Properties

demos?

protected optional demos: Record<string, AxFieldValue>[]

Inherited from

AxGen.demos

Defined in

src/ax/dsp/program.ts:88


examples?

protected optional examples: Record<string, AxFieldValue>[]

Inherited from

AxGen.examples

Defined in

src/ax/dsp/program.ts:87


sigHash

protected sigHash: string

Inherited from

AxGen.sigHash

Defined in

src/ax/dsp/program.ts:85


signature

protected signature: AxSignature

Inherited from

AxGen.signature

Defined in

src/ax/dsp/program.ts:84


trace?

protected optional trace: Record<string, AxFieldValue>

Inherited from

AxGen.trace

Defined in

src/ax/dsp/program.ts:89


usage

protected usage: AxTokenUsage & object[] = []

Inherited from

AxGen.usage

Defined in

src/ax/dsp/program.ts:90

Methods

addAssert()

addAssert(fn, message?, optional?): void

Parameters

fn

message?: string

optional?: boolean

Returns

void

Inherited from

AxGen.addAssert

Defined in

src/ax/dsp/generate.ts:133


addStreamingAssert()

addStreamingAssert(fieldName, fn, message?, optional?): void

Parameters

fieldName: string

fn

message?: string

optional?: boolean

Returns

void

Inherited from

AxGen.addStreamingAssert

Defined in

src/ax/dsp/generate.ts:141


forward()

forward(ai, values, options?): Promise<OUT & object>

Parameters

ai: Readonly<AxAIService>

values: IN

options?: Readonly<AxProgramForwardOptions>

Returns

Promise<OUT & object>

Inherited from

AxGen.forward

Defined in

src/ax/dsp/generate.ts:462


getSignature()

getSignature(): AxSignature

Returns

AxSignature

Inherited from

AxGen.getSignature

Defined in

src/ax/dsp/program.ts:109


getTraces()

getTraces(): AxProgramTrace[]

Returns

AxProgramTrace[]

Inherited from

AxGen.getTraces

Defined in

src/ax/dsp/program.ts:185


getUsage()

getUsage(): AxTokenUsage & object[]

Returns

AxTokenUsage & object[]

Inherited from

AxGen.getUsage

Defined in

src/ax/dsp/program.ts:199


register()

register(prog): void

Parameters

prog: Readonly<AxTunable & AxUsable>

Returns

void

Inherited from

AxGen.register

Defined in

src/ax/dsp/program.ts:113


resetUsage()

resetUsage(): void

Returns

void

Inherited from

AxGen.resetUsage

Defined in

src/ax/dsp/program.ts:209


setDemos()

setDemos(demos): void

Parameters

demos: readonly AxProgramDemos[]

Returns

void

Inherited from

AxGen.setDemos

Defined in

src/ax/dsp/program.ts:216


setExamples()

setExamples(examples): void

Parameters

examples: Readonly<AxProgramExamples>

Returns

void

Inherited from

AxGen.setExamples

Defined in

src/ax/dsp/program.ts:144


setId()

setId(id): void

Parameters

id: string

Returns

void

Inherited from

AxGen.setId

Defined in

src/ax/dsp/program.ts:131


setParentId()

setParentId(parentId): void

Parameters

parentId: string

Returns

void

Inherited from

AxGen.setParentId

Defined in

src/ax/dsp/program.ts:138