Cainier / gpt-tokens

Calculate the token consumption and amount of openai gpt message
MIT License
106 stars 13 forks source link

Differentiating input vs. output token cost #54

Open clairefro opened 2 months ago

clairefro commented 2 months ago

Is there a way to flag as input or output when calculating the usedUsd?

I see differentiation of the prices in the code base, but unsure how to fetch the cost based on the context.