Files
SillyTavern/src
ReithanandCohee 37b3e9e461 fix /tokens command returning inflated count for OpenAI API (#5601)
* fix /tokens command returning inflated count for OpenAI API

* Apply repo owner's patch to improve token counting fix

- Remove artificial 'role: system' wrapper that caused inflated counts
- Initialize token_count to 0 instead of -1
- Simplify web tokenizer to join message content directly
- Maintains caching functionality while fixing the overhead issue

* lint

* Revert to using cached implementation

* lint 2: revenge

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-05-12 00:19:48 +03:00
..
2024-10-10 22:37:22 +03:00
2025-07-17 13:49:15 +00:00
2025-03-06 14:55:50 +00:00
2025-07-21 00:24:49 +03:00