AxCostTracker Generated TypeScript API reference. typescript api api/reference build/apidocs/Interface.AxCostTracker.md interface AxCostTracker

AxCostTracker

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/common_types.ts#L39

Methods

getCurrentCost()

TypeScript
getCurrentCost(): number;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/common_types.ts#L41

Returns

number


getTokenUsage()

TypeScript
getTokenUsage(): Record<string, number>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/common_types.ts#L42

Returns

Record<string, number>


getTotalTokens()

TypeScript
getTotalTokens(): number;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/common_types.ts#L43

Returns

number


isLimitReached()

TypeScript
isLimitReached(): boolean;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/common_types.ts#L44

Returns

boolean


reset()

TypeScript
reset(): void;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/common_types.ts#L45

Returns

void


trackTokens()

TypeScript
trackTokens(count: number, model: string): void;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/common_types.ts#L40

Parameters

ParameterType
countnumber
modelstring

Returns

void

Docs