mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Make auto (undefined) actually work
This commit is contained in:
@@ -883,7 +883,7 @@ async function sendXaiRequest(request, response) {
|
|||||||
bodyParams['stop'] = request.body.stop;
|
bodyParams['stop'] = request.body.stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (['grok-3-mini-beta', 'grok-3-mini-fast-beta'].includes(request.body.model)) {
|
if (request.body.reasoning_effort && ['grok-3-mini-beta', 'grok-3-mini-fast-beta'].includes(request.body.model)) {
|
||||||
bodyParams['reasoning_effort'] = request.body.reasoning_effort === 'high' ? 'high' : 'low';
|
bodyParams['reasoning_effort'] = request.body.reasoning_effort === 'high' ? 'high' : 'low';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1273,7 +1273,7 @@ router.post('/generate', function (request, response) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// A few of OpenAIs reasoning models support reasoning effort
|
// A few of OpenAIs reasoning models support reasoning effort
|
||||||
if ([CHAT_COMPLETION_SOURCES.CUSTOM, CHAT_COMPLETION_SOURCES.OPENAI].includes(request.body.chat_completion_source)) {
|
if (request.body.reasoning_effort && [CHAT_COMPLETION_SOURCES.CUSTOM, CHAT_COMPLETION_SOURCES.OPENAI].includes(request.body.chat_completion_source)) {
|
||||||
if (['o1', 'o3-mini', 'o3-mini-2025-01-31', 'o4-mini', 'o4-mini-2025-04-16', 'o3', 'o3-2025-04-16'].includes(request.body.model)) {
|
if (['o1', 'o3-mini', 'o3-mini-2025-01-31', 'o4-mini', 'o4-mini-2025-04-16', 'o3', 'o3-2025-04-16'].includes(request.body.model)) {
|
||||||
bodyParams['reasoning_effort'] = request.body.reasoning_effort;
|
bodyParams['reasoning_effort'] = request.body.reasoning_effort;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user