Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/provider / / createCostAccumulator

Function: createCostAccumulator()

ts
function createCostAccumulator(): CostAccumulator;

Defined in: packages/provider/src/middleware/with-cost-tracking.ts:69

Create a CostAccumulator - the process-local accumulator described on withCostTracking. Keys totals by '<providerName>::<modelId>'.

Returns

CostAccumulator

Stable