feat: Add renderModelPriceSimple function and update LogsTable component
- Introduced a new helper function `renderModelPriceSimple` to simplify the rendering of model price information. - Updated the `LogsTable` component to utilize `renderModelPriceSimple`, enhancing the display of model pricing and grouping information. - Removed the previous implementation of `renderModelPrice` from the `LogsTable` for cleaner code.
This commit is contained in:
@@ -175,6 +175,19 @@ export function renderModelPrice(
|
||||
}
|
||||
}
|
||||
|
||||
export function renderModelPriceSimple(
|
||||
modelRatio,
|
||||
modelPrice = -1,
|
||||
groupRatio,
|
||||
) {
|
||||
// 1 ratio = $0.002 / 1K tokens
|
||||
if (modelPrice !== -1) {
|
||||
return '价格:$' + modelPrice + ' * 分组:' + groupRatio;
|
||||
} else {
|
||||
return '模型: ' + modelRatio + ' * 分组: ' + groupRatio;
|
||||
}
|
||||
}
|
||||
|
||||
export function renderAudioModelPrice(
|
||||
inputTokens,
|
||||
completionTokens,
|
||||
|
||||
Reference in New Issue
Block a user