From 48034eb6c9e6e20c7c19c7da7803df3944dbe7c7 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 19 Nov 2023 23:01:39 +0200 Subject: [PATCH] More info for mancer models --- public/scripts/mancer-settings.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/scripts/mancer-settings.js b/public/scripts/mancer-settings.js index 14f9bbcaa..5db00ec71 100644 --- a/public/scripts/mancer-settings.js +++ b/public/scripts/mancer-settings.js @@ -38,9 +38,13 @@ function getMancerModelTemplate(option) { return option.text; } + const creditsPerPrompt = (model.limits?.context - model.limits?.completion) * model.pricing?.prompt; + const creditsPerCompletion = model.limits?.completion * model.pricing?.completion; + const creditsTotal = Math.round(creditsPerPrompt + creditsPerCompletion).toFixed(0); + return $((`