mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Function calling for Mistral
This commit is contained in:
@@ -486,6 +486,11 @@ async function sendMistralAIRequest(request, response) {
|
||||
'random_seed': request.body.seed === -1 ? undefined : request.body.seed,
|
||||
};
|
||||
|
||||
if (Array.isArray(request.body.tools) && request.body.tools.length > 0) {
|
||||
requestBody['tools'] = request.body.tools;
|
||||
requestBody['tool_choice'] = request.body.tool_choice === 'required' ? 'any' : 'auto';
|
||||
}
|
||||
|
||||
const config = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
Reference in New Issue
Block a user