Skip to content

AxAgent

Class: AxAgent<IN, OUT>

Type Parameters

IN extends AxGenIn

OUT extends AxGenOut

Implements

Constructors

new AxAgent()

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

Parameters

ai: AxAIService

__namedParameters: Readonly<object>

options?: Readonly<AxAgentOptions>

Returns

AxAgent<IN, OUT>

Defined in

src/ax/prompts/agent.ts:38

Methods

forward()

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

Parameters

values: IN

options?: Readonly<AxProgramForwardOptions>

Returns

Promise<OUT>

Defined in

src/ax/prompts/agent.ts:137


getFunction()

getFunction(): AxFunction

Returns

AxFunction

Implementation of

AxAgentic.getFunction

Defined in

src/ax/prompts/agent.ts:129


getTraces()

getTraces(): AxProgramTrace[]

Returns

AxProgramTrace[]

Implementation of

AxAgentic.getTraces

Defined in

src/ax/prompts/agent.ts:113


getUsage()

getUsage(): AxTokenUsage & object[]

Returns

AxTokenUsage & object[]

Implementation of

AxAgentic.getUsage

Defined in

src/ax/prompts/agent.ts:121


resetUsage()

resetUsage(): void

Returns

void

Implementation of

AxAgentic.resetUsage

Defined in

src/ax/prompts/agent.ts:125


setDemos()

setDemos(demos): void

Parameters

demos: readonly AxProgramDemos[]

Returns

void

Implementation of

AxAgentic.setDemos

Defined in

src/ax/prompts/agent.ts:117


setExamples()

setExamples(examples): void

Parameters

examples: Readonly<AxProgramExamples>

Returns

void

Implementation of

AxAgentic.setExamples

Defined in

src/ax/prompts/agent.ts:101


setId()

setId(id): void

Parameters

id: string

Returns

void

Implementation of

AxAgentic.setId

Defined in

src/ax/prompts/agent.ts:105


setParentId()

setParentId(parentId): void

Parameters

parentId: string

Returns

void

Implementation of

AxAgentic.setParentId

Defined in

src/ax/prompts/agent.ts:109