From 7b793d44351857a139e5c7141f7197ed345fa6a9 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Thu, 26 Sep 2024 17:08:59 -0400 Subject: [PATCH] server: fix min/max min_p/top_p values (#2996) Signed-off-by: Jared Van Bortel --- gpt4all-chat/CHANGELOG.md | 1 + gpt4all-chat/src/server.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gpt4all-chat/CHANGELOG.md b/gpt4all-chat/CHANGELOG.md index faceaf58..83875148 100644 --- a/gpt4all-chat/CHANGELOG.md +++ b/gpt4all-chat/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Fixed - Fix a crash when attempting to continue a chat loaded from disk ([#2995](https://github.com/nomic-ai/gpt4all/pull/2995)) +- Fix the local server rejecting min\_p/top\_p less than 1 ([#2996](https://github.com/nomic-ai/gpt4all/pull/2996)) ## [3.3.0] - 2024-09-20 diff --git a/gpt4all-chat/src/server.cpp b/gpt4all-chat/src/server.cpp index 9d5c9583..f212f8f4 100644 --- a/gpt4all-chat/src/server.cpp +++ b/gpt4all-chat/src/server.cpp @@ -193,11 +193,11 @@ protected: if (!value.isNull()) this->temperature = float(value.toDouble()); - value = reqValue("top_p", Number, /*min*/ 0, /*max*/ 1); + value = reqValue("top_p", Number, false, /*min*/ 0, /*max*/ 1); if (!value.isNull()) this->top_p = float(value.toDouble()); - value = reqValue("min_p", Number, /*min*/ 0, /*max*/ 1); + value = reqValue("min_p", Number, false, /*min*/ 0, /*max*/ 1); if (!value.isNull()) this->min_p = float(value.toDouble());