From f54bf99006e49625cbedd60c1386d472b2b92632 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 10 Dec 2023 16:09:00 +0200 Subject: [PATCH] Fix token ids not displaying in "API_CURRENT" mode for TextGen --- public/scripts/tokenizers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts/tokenizers.js b/public/scripts/tokenizers.js index 3d8357e13..7db5d0887 100644 --- a/public/scripts/tokenizers.js +++ b/public/scripts/tokenizers.js @@ -648,7 +648,7 @@ function decodeTextTokensFromServer(endpoint, ids) { export function getTextTokens(tokenizerType, str) { switch (tokenizerType) { case tokenizers.API_CURRENT: - return callTokenizer(currentRemoteTokenizerAPI(), str); + return getTextTokens(currentRemoteTokenizerAPI(), str); case tokenizers.API_TEXTGENERATIONWEBUI: return getTextTokensFromTextgenAPI(str); default: { @@ -678,7 +678,7 @@ export function getTextTokens(tokenizerType, str) { export function decodeTextTokens(tokenizerType, ids) { // Currently, neither remote API can decode, but this may change in the future. Put this guard here to be safe if (tokenizerType === tokenizers.API_CURRENT) { - return decodeTextTokens(tokenizers.NONE); + return decodeTextTokens(tokenizers.NONE, ids); } const tokenizerEndpoints = TOKENIZER_URLS[tokenizerType]; if (!tokenizerEndpoints) {