MCPcopy
hub / github.com/FlowiseAI/Flowise / formatCost

Function formatCost

packages/server/src/services/evaluations/CostCalculator.ts:52–57  ·  view source on GitHub ↗
(cost: number)

Source from the content-addressed store, hash-verified

50}
51
52export const formatCost = (cost: number) => {
53 if (cost == 0) {
54 return '$ 0'
55 }
56 return cost < 0.01 ? '$ <0.01' : '$ ' + cost.toFixed(fractionDigits)
57}

Callers 2

createEvaluationFunction · 0.90
calculateCostFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected