More precise prompt costs

This commit is contained in:
Cohee 2023-08-10 12:58:21 +03:00
parent ea4b1759aa
commit aa49efe656
1 changed files with 1 additions and 1 deletions

View File

@ -707,7 +707,7 @@ function calculateOpenRouterCost() {
const promptTokens = (oai_settings.openai_max_context - completionTokens);
const totalCost = (completionCost * completionTokens) + (promptCost * promptTokens);
if (!isNaN(totalCost)) {
cost = totalCost.toFixed(2);
cost = totalCost.toFixed(3);
}
}