mirror of https://github.com/hwchase17/langchain
Adjusted OpenAI cost calculation (#6798)
Added parentheses to ensure the division operation is performed before multiplication. This now correctly calculates the cost by dividing the number of tokens by 1000 first (to get the cost per token), and then multiplies it with the model's cost per 1k tokens @agola11pull/6853/head
parent
b4c196f785
commit
efe0d39c6a
Loading…
Reference in New Issue