mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
refactor: update cost display from per million to per 1000 tokens
This commit is contained in:
@@ -156,13 +156,14 @@ const LlmPage: FunctionComponent<PageComponentProps> = (): ReactElement => {
|
||||
field: {
|
||||
costPerMillionTokensInUSDCents: true,
|
||||
},
|
||||
title: "Cost per Million Tokens",
|
||||
title: "Cost per 1000 Tokens",
|
||||
type: FieldType.Text,
|
||||
getElement: (item: LlmProvider): ReactElement => {
|
||||
const costInCents: number =
|
||||
const costPerMillionInCents: number =
|
||||
item.costPerMillionTokensInUSDCents || 0;
|
||||
const costInUSD: number = costInCents / 100;
|
||||
return <span>${costInUSD.toFixed(2)} USD</span>;
|
||||
const costPer1000InUSD: number =
|
||||
costPerMillionInCents / 100 / 1000;
|
||||
return <span>${costPer1000InUSD.toFixed(4)} USD</span>;
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user