mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Extension framework for function tool calling
This commit is contained in:
@@ -920,6 +920,11 @@ router.post('/generate', jsonParser, function (request, response) {
|
||||
controller.abort();
|
||||
});
|
||||
|
||||
if (!isTextCompletion) {
|
||||
bodyParams['tools'] = request.body.tools;
|
||||
bodyParams['tool_choice'] = request.body.tool_choice;
|
||||
}
|
||||
|
||||
const requestBody = {
|
||||
'messages': isTextCompletion === false ? request.body.messages : undefined,
|
||||
'prompt': isTextCompletion === true ? textPrompt : undefined,
|
||||
|
Reference in New Issue
Block a user