fix: Update model pricing display
- Updated the title of Menu.Item to include the input and output prices of the model - Fixed the formatting of the prices to display up to 3 decimal places
This commit is contained in:
parent
e0506b62be
commit
ebdba68d9a
@ -376,7 +376,7 @@ const InputMessage = observer((props: any) => {
|
||||
return (
|
||||
<Menu.Item
|
||||
key={model.name}
|
||||
title={model.input_price!== -1? (t("input price:") + `${model.currency !== 'CNY' ? '$' : ''}${model.input_price}`+t("/1M tokens") + "\n" + t("output price:") + `${model.currency !== 'CNY' ? '$' : ''}${model.output_price}`+ t("/1M tokens")) : ""}
|
||||
title={model.input_price!== -1? (t("input price:") + `${model.currency !== 'CNY' ? '$' : ''}${model.input_price.toFixed(3)}`+t("/1M tokens") + "\n" + t("output price:") + `${model.currency !== 'CNY' ? '$' : ''}${model.output_price.toFixed(3)}`+ t("/1M tokens")) : ""}
|
||||
onClick={() => changeModel(model.name)}
|
||||
>
|
||||
{getModelShowName(model.name)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user