server: fix min/max min_p/top_p values (#2996)

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
Jared Van Bortel 2024-09-26 17:08:59 -04:00 committed by GitHub
parent 364d9772e4
commit 7b793d4435
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
### Fixed ### Fixed
- Fix a crash when attempting to continue a chat loaded from disk ([#2995](https://github.com/nomic-ai/gpt4all/pull/2995)) - 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 ## [3.3.0] - 2024-09-20

View File

@ -193,11 +193,11 @@ protected:
if (!value.isNull()) if (!value.isNull())
this->temperature = float(value.toDouble()); 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()) if (!value.isNull())
this->top_p = float(value.toDouble()); 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()) if (!value.isNull())
this->min_p = float(value.toDouble()); this->min_p = float(value.toDouble());