server: fix min/max min_p/top_p values

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
Jared Van Bortel 2024-09-26 16:45:28 -04:00
parent 33f805d60a
commit 5add87e85b
2 changed files with 3 additions and 2 deletions

View File

@ -8,6 +8,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

View File

@ -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());