mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add vLLM as multimodal captioning source
This commit is contained in:
@@ -43,7 +43,11 @@ router.post('/caption-image', jsonParser, async (request, response) => {
|
||||
key = readSecret(request.user.directories, SECRET_KEYS.KOBOLDCPP);
|
||||
}
|
||||
|
||||
if (!key && !request.body.reverse_proxy && ['custom', 'ooba', 'koboldcpp'].includes(request.body.api) === false) {
|
||||
if (request.body.api === 'vllm') {
|
||||
key = readSecret(request.user.directories, SECRET_KEYS.VLLM);
|
||||
}
|
||||
|
||||
if (!key && !request.body.reverse_proxy && ['custom', 'ooba', 'koboldcpp', 'vllm'].includes(request.body.api) === false) {
|
||||
console.log('No key found for API', request.body.api);
|
||||
return response.sendStatus(400);
|
||||
}
|
||||
@@ -110,7 +114,7 @@ router.post('/caption-image', jsonParser, async (request, response) => {
|
||||
});
|
||||
}
|
||||
|
||||
if (request.body.api === 'koboldcpp') {
|
||||
if (request.body.api === 'koboldcpp' || request.body.api === 'vllm') {
|
||||
apiUrl = `${trimV1(request.body.server_url)}/v1/chat/completions`;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user