This content originally appeared on DEV Community and was authored by Sudha Nippani
Hello everyone! I am building an agent using langchain, using Anthropic’s 3.5 Haiku. I want to get the analytics of the model, such as number of input tokens, output tokens, cost per token, etc. When I fetch the number of input and output tokens from the json that is returned from the llm, there is a big difference in these numbers and the numbers which are displayed on the anthropic dashboard. I do not understand why and how to get an accurate number. Could anyone please share their insights regarding this problem?
Thankyou
This content originally appeared on DEV Community and was authored by Sudha Nippani