mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Groq: Add new models and multimodal captions
This commit is contained in:
@@ -55,6 +55,10 @@ router.post('/caption-image', jsonParser, async (request, response) => {
|
||||
key = readSecret(request.user.directories, SECRET_KEYS.MISTRALAI);
|
||||
}
|
||||
|
||||
if (request.body.api === 'groq') {
|
||||
key = readSecret(request.user.directories, SECRET_KEYS.GROQ);
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -111,6 +115,10 @@ router.post('/caption-image', jsonParser, async (request, response) => {
|
||||
apiUrl = 'https://api.01.ai/v1/chat/completions';
|
||||
}
|
||||
|
||||
if (request.body.api === 'groq') {
|
||||
apiUrl = 'https://api.groq.com/openai/v1/chat/completions';
|
||||
}
|
||||
|
||||
if (request.body.api === 'mistral') {
|
||||
apiUrl = 'https://api.mistral.ai/v1/chat/completions';
|
||||
}
|
||||
|
Reference in New Issue
Block a user