Skip to content

AxAgent

Class: AxAgent<IN, OUT>

Type Parameters

IN extends AxGenIn

OUT extends AxGenOut

Implements

Constructors

new AxAgent()

new AxAgent<IN, OUT>(__namedParameters, options?): AxAgent<IN, OUT>

Parameters

__namedParameters: Readonly<object>

options?: Readonly<AxAgentOptions>

Returns

AxAgent<IN, OUT>

Defined in

src/ax/prompts/agent.ts:37

Methods

forward()

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

Parameters

ai: Readonly<AxAIService>

values: IN

options?: Readonly<AxProgramForwardOptions>

Returns

Promise<OUT>

Defined in

src/ax/prompts/agent.ts:146


getFunction()

getFunction(): AxFunction

Returns

AxFunction

Implementation of

AxAgentic.getFunction

Defined in

src/ax/prompts/agent.ts:125


getTraces()

getTraces(): AxProgramTrace[]

Returns

AxProgramTrace[]

Implementation of

AxAgentic.getTraces

Defined in

src/ax/prompts/agent.ts:109


getUsage()

getUsage(): AxTokenUsage & object[]

Returns

AxTokenUsage & object[]

Implementation of

AxAgentic.getUsage

Defined in

src/ax/prompts/agent.ts:117


resetUsage()

resetUsage(): void

Returns

void

Implementation of

AxAgentic.resetUsage

Defined in

src/ax/prompts/agent.ts:121


setDemos()

setDemos(demos): void

Parameters

demos: readonly AxProgramDemos[]

Returns

void

Implementation of

AxAgentic.setDemos

Defined in

src/ax/prompts/agent.ts:113


setExamples()

setExamples(examples): void

Parameters

examples: Readonly<AxProgramExamples>

Returns

void

Implementation of

AxAgentic.setExamples

Defined in

src/ax/prompts/agent.ts:97


setId()

setId(id): void

Parameters

id: string

Returns

void

Implementation of

AxAgentic.setId

Defined in

src/ax/prompts/agent.ts:101


setParentId()

setParentId(parentId): void

Parameters

parentId: string

Returns

void

Implementation of

AxAgentic.setParentId

Defined in

src/ax/prompts/agent.ts:105