mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add text chunks display to token counter
This commit is contained in:
@ -385,6 +385,11 @@ function getTextTokensRemote(endpoint, str, model = '') {
|
||||
contentType: "application/json",
|
||||
success: function (data) {
|
||||
ids = data.ids;
|
||||
|
||||
// Don't want to break reverse compatibility, so sprinkle in some of the JS magic
|
||||
if (Array.isArray(data.chunks)) {
|
||||
Object.defineProperty(ids, 'chunks', { value: data.chunks });
|
||||
}
|
||||
}
|
||||
});
|
||||
return ids;
|
||||
|
Reference in New Issue
Block a user