Add min_p and top_a for OpenRouter

This commit is contained in:
Cohee
2024-01-12 17:15:13 +02:00
parent 1367642eb4
commit e33ac6a78a
3 changed files with 71 additions and 9 deletions

View File

@@ -721,6 +721,14 @@ router.post('/generate', jsonParser, function (request, response) {
headers = { 'HTTP-Referer': request.headers.referer };
bodyParams = { 'transforms': ['middle-out'] };
if (request.body.min_p !== undefined) {
bodyParams['min_p'] = request.body.min_p;
}
if (request.body.top_a !== undefined) {
bodyParams['top_a'] = request.body.top_a;
}
if (request.body.use_fallback) {
bodyParams['route'] = 'fallback';
}