Replies: 1 comment
-
Hi @djaddis , the Based on that, it seems the only way to solve this generally would be to allow providing a callback function that is called when the usage is received for a message. When experimenting with this previously I found this was limited because often you want to use the For the moment, if your responses are not streamed you could create a wrapper ChatModel that does something with the usage after each LLM query, like described here #74 (comment) This could be used with |
Beta Was this translation helpful? Give feedback.
-
I can only see a way of tracking token usage / cost for the chat models, is this possible with the other regular prompts too?
Great package though!
Beta Was this translation helpful? Give feedback.
All reactions