mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
Apply suggestion from @greptile-apps[bot]
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
06497ab42a
commit
b8d7f68aeb
1 changed files with 1 additions and 1 deletions
|
|
@ -245,7 +245,7 @@ export async function makeOpenAIChatCompletionRequest(
|
|||
|
||||
// Extract cost from usage object if available
|
||||
if (chunkWithUsage.usage.cost !== undefined && chunkWithUsage.usage.cost !== null) {
|
||||
const parsedCost = parseFloat(chunkWithUsage.usage.cost);
|
||||
const parsedCost = Number(chunkWithUsage.usage.cost);
|
||||
if (Number.isFinite(parsedCost)) {
|
||||
usageData.cost = parsedCost;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue