Remove to-int conversion from Novel logprobs

1938e8ac141c53846eae23a4e8d2d7093049dd1e

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -2Ignore whitespace
public/scripts/logprobs.js+2 -2
@@ -519,14 +519,14 @@ function convertTokenIdLogprobsToText(input) {
519519
520520 const tokenizerId = getTokenizerBestMatch(api);
521521
522522 //** @type {any[]} Flatten unique token IDs across all logprobs */
523523 const tokenIds = Array.from(new Set(input.flatMap(logprobs =>
524524 logprobs.topLogprobs.map(([token]) => token).concat(logprobs.token),
525525 )));
526526
527527 // Submit token IDs to tokenizer to get token text, then build ID->text map
528528 // noinspection JSCheckFunctionSignatures - mutates input in-place
529529 const { chunks } = decodeTextTokens(tokenizerId, tokenIds.map(parseInt));
530530 const tokenIdText = new Map(tokenIds.map((id, i) => [id, chunks[i]]));
531531
532532 // Fixup logprobs data with token text