[GH-ISSUE #4337] [FEAT]: Store tokens used in workspace_chats #2761

Closed
opened 2026-02-22 18:31:07 -05:00 by yindo · 2 comments
Owner

Originally created by @EfrosIonelu on GitHub (Aug 28, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4337

What would you like to see?

It will be great to store in workspace_chats and embeded_chats number of tokens used.

Originally created by @EfrosIonelu on GitHub (Aug 28, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4337 ### What would you like to see? It will be great to store in workspace_chats and embeded_chats number of tokens used.
yindo added the enhancementfeature request labels 2026-02-22 18:31:08 -05:00
yindo closed this issue 2026-02-22 18:31:08 -05:00
Author
Owner

@timothycarambat commented on GitHub (Aug 28, 2025):

In the DB, that information should be stored in the JSON blob in textResponse column?

{
  "text": "<think>\nOkay, so I'm trying.... 2024.\n</think>\n\nThe file contains ....",
  "sources": [...],
  "type": "chat",
  "attachments": [],
  "metrics": { // This is where that information is stored, this is on every chat.
    "completion_tokens": 863,
    "prompt_tokens": 884,
    "total_tokens": 1747,
    "outputTps": 216.99773698767916,
    "duration": 3.977
  }
}
@timothycarambat commented on GitHub (Aug 28, 2025): In the DB, that information should be stored in the JSON blob in `textResponse` column? ```json5 { "text": "<think>\nOkay, so I'm trying.... 2024.\n</think>\n\nThe file contains ....", "sources": [...], "type": "chat", "attachments": [], "metrics": { // This is where that information is stored, this is on every chat. "completion_tokens": 863, "prompt_tokens": 884, "total_tokens": 1747, "outputTps": 216.99773698767916, "duration": 3.977 } }
Author
Owner

@EfrosIonelu commented on GitHub (Aug 29, 2025):

I have not specified but metrics are not stored for agents, but i think this is already https://github.com/wladpaiva/aibitat problem

@EfrosIonelu commented on GitHub (Aug 29, 2025): I have not specified but metrics are not stored for agents, but i think this is already https://github.com/wladpaiva/aibitat problem
yindo changed title from [FEAT]: Store tokens used in workspace_chats to [GH-ISSUE #4337] [FEAT]: Store tokens used in workspace_chats 2026-06-05 14:48:24 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2761