mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
fix: pass model parameter for aphrodite tokenizer
This commit is contained in:
parent
94d4fcc651
commit
62fed2ff6a
@ -838,6 +838,7 @@ function getTextgenAPITokenizationParams(str) {
|
||||
url: getTextGenServer(),
|
||||
legacy_api: textgen_settings.legacy_api && (textgen_settings.type === OOBA || textgen_settings.type === APHRODITE),
|
||||
vllm_model: textgen_settings.vllm_model,
|
||||
aphrodite_model: textgen_settings.aphrodite_model,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -812,6 +812,7 @@ router.post('/remote/textgenerationwebui/encode', jsonParser, async function (re
|
||||
const baseUrl = String(request.body.url);
|
||||
const legacyApi = Boolean(request.body.legacy_api);
|
||||
const vllmModel = String(request.body.vllm_model) || '';
|
||||
const aphroditeModel = String(request.body.aphrodite_model) || '';
|
||||
|
||||
try {
|
||||
const args = {
|
||||
@ -847,7 +848,7 @@ router.post('/remote/textgenerationwebui/encode', jsonParser, async function (re
|
||||
break;
|
||||
case TEXTGEN_TYPES.APHRODITE:
|
||||
url += '/v1/tokenize';
|
||||
args.body = JSON.stringify({ 'prompt': text });
|
||||
args.body = JSON.stringify({ 'model': aphroditeModel, 'prompt': text });
|
||||
break;
|
||||
default:
|
||||
url += '/v1/internal/encode';
|
||||
|
Loading…
Reference in New Issue
Block a user