From 8da98faa99e5047a7e33031a5eb9f93adea2cdbf Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 8 Nov 2024 11:09:57 +0200 Subject: [PATCH] MistralAI: Include frequency/presence penalties in requests --- public/index.html | 4 ++-- src/endpoints/backends/chat-completions.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index 1a671ad01..de093b58b 100644 --- a/public/index.html +++ b/public/index.html @@ -685,7 +685,7 @@ -
+
Frequency Penalty
@@ -698,7 +698,7 @@
-
+
Presence Penalty
diff --git a/src/endpoints/backends/chat-completions.js b/src/endpoints/backends/chat-completions.js index 1e6cfe251..fe258cfc9 100644 --- a/src/endpoints/backends/chat-completions.js +++ b/src/endpoints/backends/chat-completions.js @@ -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,