MistralAI: Include frequency/presence penalties in requests

This commit is contained in:
Cohee 2024-11-08 11:09:57 +02:00
parent b29bc4000c
commit 8da98faa99
2 changed files with 4 additions and 2 deletions

View File

@ -685,7 +685,7 @@
</div>
</div>
</div>
<div class="range-block" data-source="openai,openrouter,custom,cohere,perplexity,groq">
<div class="range-block" data-source="openai,openrouter,custom,cohere,perplexity,groq,mistralai">
<div class="range-block-title" data-i18n="Frequency Penalty">
Frequency Penalty
</div>
@ -698,7 +698,7 @@
</div>
</div>
</div>
<div class="range-block" data-source="openai,openrouter,custom,cohere,perplexity,groq">
<div class="range-block" data-source="openai,openrouter,custom,cohere,perplexity,groq,mistralai">
<div class="range-block-title" data-i18n="Presence Penalty">
Presence Penalty
</div>

View File

@ -477,6 +477,8 @@ async function sendMistralAIRequest(request, response) {
'messages': messages,
'temperature': request.body.temperature,
'top_p': request.body.top_p,
'frequency_penalty': request.body.frequency_penalty,
'presence_penalty': request.body.presence_penalty,
'max_tokens': request.body.max_tokens,
'stream': request.body.stream,
'safe_prompt': request.body.safe_prompt,