@sagentic-ai/sagentic-af / PCT
PCT ​
PCT stands for prompt, completion and total quantities
Constructors ​
new PCT(data) ​
ts
new PCT(data?): PCT
Create a new PCT, zeroed by default if no data is provided. If data is provided, total will be computed by adding prompt and completion quantities.
Parameters ​
• data?
optional object with prompt and completion quantities
• data.completion?: number
• data.prompt?: number
Returns ​
Source ​
Properties ​
_total ​
ts
_total: number;
Source ​
completion ​
ts
completion: number;
Source ​
prompt ​
ts
prompt: number;
Source ​
Accessors ​
total ​
ts
get total(): number
Returns ​
number
Source ​
Methods ​
add() ​
ts
add(other): PCT
Add another PCT to this one, mutates receiver.
Parameters ​
• other: PCT
PCT to add to this one