mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
API Tokenizer: Add support for TabbyAPI
Use Tabby's /v1/token endpoints. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -3424,7 +3424,7 @@ app.post("/tokenize_via_api", jsonParser, async function (request, response) {
|
||||
url += '/v1/token-count';
|
||||
args.body = JSON.stringify({ "prompt": text });
|
||||
} else {
|
||||
url += '/v1/internal/encode';
|
||||
url += request.body.use_tabby ? '/v1/token/encode' : '/v1/internal/encode';
|
||||
args.body = JSON.stringify({ "text": text });
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user