Repository navigation
Proper count tokens for conversation / message level #1034
Unanswered
vectorkovacspeter
asked this question in
Q&A
Replies: 2 comments 1 reply
|
Hi @vectorkovacspeter, thanks for trying out LibreChat. Are you on the latest commit on main branch? The message.tokenCount is mainly for caching the tokenCount on subsequent message requests.
This should not be the case, as you can see below
No, but you can inspect the schemas in /LibreChat/api/models/schema/ To view what is actually spent, you should be looking at the transactions collection and filter by conversationId |
1 reply
|
See these docs and PR for more info: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Contact Details
kovacs.peter@vector.hu
What is your question?
How can I properly get the input and output token numbers for a conversation or a message?
In the Mongo database, thez messages.tokenCount value is null for the non-user messages, am I search it in the wrong place?
Is there a detailed documentation available for the database schama, and its content?
More Details
I try to sum the tokens used by a specified conversation or a specified message stored in the chat database (I use mongo).
What is the main subject of your question?
Other
Screenshots
No response
Code of Conduct
All reactions