mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-07 07:06:05 +01:00
Enable TokenHandler to return total token count
This commit is contained in:
parent
eb315993b4
commit
64c04957c2
@ -979,9 +979,12 @@ class TokenHandler {
|
||||
return token_count;
|
||||
}
|
||||
|
||||
getTotal() {
|
||||
return Object.values(this.counts).reduce((a, b) => a + b);
|
||||
}
|
||||
|
||||
log() {
|
||||
const total = Object.values(this.counts).reduce((a, b) => a + b);
|
||||
console.table({ ...this.counts, 'total': total });
|
||||
console.table({ ...this.counts, 'total': this.getTotal() });
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user