Behind the Scenes: How LangChain calculates OpenAI's pricing?
Jun 1, 2023 · 6 min read · tl;dr This post covers how LangChain calculates pricing when one uses OpenAI’s LLM. There are two functions that help in this. The first function maintains the model cost mapping. The second function calculates the cost given a response from OpenAI...
KKavir commented
