AxDefaultCostTracker
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/optimizer.ts#L1053
Implements
Constructors
Constructor
new AxDefaultCostTracker(options?: AxCostTrackerOptions): AxDefaultCostTracker;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/optimizer.ts#L1062
Parameters
| Parameter | Type |
|---|---|
options? | AxCostTrackerOptions |
Returns
AxDefaultCostTracker
Methods
getCurrentCost()
getCurrentCost(): number;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/optimizer.ts#L1073
Returns
number
Implementation of
getTokenUsage()
getTokenUsage(): Record<string, number>;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/optimizer.ts#L1083
Returns
Record<string, number>
Implementation of
getTotalTokens()
getTotalTokens(): number;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/optimizer.ts#L1087
Returns
number
Implementation of
isLimitReached()
isLimitReached(): boolean;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/optimizer.ts#L1091
Returns
boolean
Implementation of
reset()
reset(): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/optimizer.ts#L1108
Returns
void
Implementation of
trackTokens()
trackTokens(count: number, model: string): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/optimizer.ts#L1068
Parameters
| Parameter | Type |
|---|---|
count | number |
model | string |
Returns
void