mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Mistral API got fixed
This commit is contained in:
@ -1631,7 +1631,7 @@ async function sendOpenAIRequest(type, messages, signal) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isMistral) {
|
if (isMistral) {
|
||||||
generate_data['safe_mode'] = false; // already defaults to false, but just incase they change that in the future.
|
generate_data['safe_prompt'] = false; // already defaults to false, but just incase they change that in the future.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCustom) {
|
if (isCustom) {
|
||||||
|
@ -483,7 +483,7 @@ async function sendMistralAIRequest(request, response) {
|
|||||||
'top_p': request.body.top_p,
|
'top_p': request.body.top_p,
|
||||||
'max_tokens': request.body.max_tokens,
|
'max_tokens': request.body.max_tokens,
|
||||||
'stream': request.body.stream,
|
'stream': request.body.stream,
|
||||||
//'safe_mode': request.body.safe_mode,
|
'safe_prompt': request.body.safe_prompt,
|
||||||
'random_seed': request.body.seed === -1 ? undefined : request.body.seed,
|
'random_seed': request.body.seed === -1 ? undefined : request.body.seed,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -545,7 +545,7 @@ router.post('/status', jsonParser, async function (request, response_getstatus_o
|
|||||||
} else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.MISTRALAI) {
|
} else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.MISTRALAI) {
|
||||||
api_url = 'https://api.mistral.ai/v1';
|
api_url = 'https://api.mistral.ai/v1';
|
||||||
api_key_openai = readSecret(SECRET_KEYS.MISTRALAI);
|
api_key_openai = readSecret(SECRET_KEYS.MISTRALAI);
|
||||||
headers = { 'Content-Length': '0' }; // WTF?
|
headers = {};
|
||||||
} else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.CUSTOM) {
|
} else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.CUSTOM) {
|
||||||
api_url = request.body.custom_url;
|
api_url = request.body.custom_url;
|
||||||
api_key_openai = readSecret(SECRET_KEYS.CUSTOM);
|
api_key_openai = readSecret(SECRET_KEYS.CUSTOM);
|
||||||
|
Reference in New Issue
Block a user