mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-16 03:50:10 +01:00
Don't reduce Claude token counts by 2
This commit is contained in:
parent
07a9e493dc
commit
7250770c5d
@ -1437,6 +1437,11 @@ function countTokens(messages, full = false) {
|
||||
|
||||
for (const message of messages) {
|
||||
const model = getTokenizerModel();
|
||||
|
||||
if (model === 'claude' || shouldTokenizeAI21) {
|
||||
full = true;
|
||||
}
|
||||
|
||||
const hash = getStringHash(JSON.stringify(message));
|
||||
const cacheKey = `${model}-${hash}`;
|
||||
const cachedCount = tokenCache[chatId][cacheKey];
|
||||
|
Loading…
x
Reference in New Issue
Block a user