Fix sending empty array as OAI stop strings
This commit is contained in:
parent
57985eb08e
commit
8cb194da0f
|
@ -3515,7 +3515,7 @@ app.post("/generate_openai", jsonParser, function (request, response_generate_op
|
|||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue