fix: force reset to default if 0 or false

This commit is contained in:
Wentao Lyu 2023-04-05 17:25:35 +08:00
parent 4b373ebc0e
commit a5202f84cc
4 changed files with 53 additions and 53 deletions

View file

@ -20,7 +20,7 @@ import store from '~/store';
function Settings(props) {
const { readonly, model, chatGptLabel, promptPrefix, temperature, topP, freqP, presP, setOption } = props;
console.log(props);
const endpointsConfig = useRecoilValue(store.endpointsConfig);
const setModel = setOption('model');
@ -295,7 +295,7 @@ function Settings(props) {
id="pres-penalty-int"
disabled={readonly}
value={presP}
onChange={e => setPresP(e.target.value)}
onChange={value => setPresP(value)}
max={2}
min={-2}
step={0.01}