More info for mancer models
This commit is contained in:
parent
ac07c8324d
commit
48034eb6c9
|
@ -38,9 +38,13 @@ function getMancerModelTemplate(option) {
|
||||||
return option.text;
|
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 $((`
|
return $((`
|
||||||
<div class="flex-container flexFlowColumn">
|
<div class="flex-container flexFlowColumn">
|
||||||
<div><strong>${DOMPurify.sanitize(model.name)}</strong> | <span>${model.limits?.context} ctx</span></div>
|
<div><strong>${DOMPurify.sanitize(model.name)}</strong> | <span>${model.limits?.context} ctx</span> / <span>${model.limits?.completion} res</span> | <small>Credits per request (max): ${creditsTotal}</small></div>
|
||||||
</div>
|
</div>
|
||||||
`));
|
`));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue