generated from nhcarrigan/template
This commit is contained in:
@@ -22,9 +22,8 @@ export const calculateCost = (
|
|||||||
: 15) / 1_000_000);
|
: 15) / 1_000_000);
|
||||||
const totalCost = inputCost + outputCost;
|
const totalCost = inputCost + outputCost;
|
||||||
return `-# Accepted ${usage.input_tokens.toString()} and generated ${usage.output_tokens.toString()}.
|
return `-# Accepted ${usage.input_tokens.toString()} and generated ${usage.output_tokens.toString()}.
|
||||||
|
-# Total cost: ${totalCost.toLocaleString("en-GB", {
|
||||||
-# Total cost: ${totalCost.toLocaleString("en-GB", {
|
|
||||||
currency: "USD",
|
currency: "USD",
|
||||||
style: "currency",
|
style: "currency",
|
||||||
})}`;
|
})}`;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user