mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix sending empty array as OAI stop strings
This commit is contained in:
@@ -3515,7 +3515,7 @@ app.post("/generate_openai", jsonParser, function (request, response_generate_op
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add custom stop sequences
|
// Add custom stop sequences
|
||||||
if (Array.isArray(request.body.stop)) {
|
if (Array.isArray(request.body.stop) && request.body.stop.length > 0) {
|
||||||
bodyParams['stop'] = request.body.stop;
|
bodyParams['stop'] = request.body.stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user