I am trying to figure out how to get an accurate token count when using AWS Bedrock. The callbacks do not seem to match what Bedrock is returning and I need to capture this accurately for billing reasons, is there a way to solve this?
i did use a proper tokenizer (that matches the embedding model) but they dont match. I see that the LLM init actually takes a CallbackManager , is there an example of how that works?