|
|
@@ -91,79 +91,84 @@ export function ModelConfigList(props: {
|
|
|
}
|
|
|
></input>
|
|
|
</ListItem>
|
|
|
- <ListItem
|
|
|
- title={Locale.Settings.PresencePenalty.Title}
|
|
|
- subTitle={Locale.Settings.PresencePenalty.SubTitle}
|
|
|
- >
|
|
|
- <InputRange
|
|
|
- value={props.modelConfig.presence_penalty?.toFixed(1)}
|
|
|
- min="-2"
|
|
|
- max="2"
|
|
|
- step="0.1"
|
|
|
- onChange={(e) => {
|
|
|
- props.updateConfig(
|
|
|
- (config) =>
|
|
|
- (config.presence_penalty =
|
|
|
- ModalConfigValidator.presence_penalty(
|
|
|
- e.currentTarget.valueAsNumber,
|
|
|
- )),
|
|
|
- );
|
|
|
- }}
|
|
|
- ></InputRange>
|
|
|
- </ListItem>
|
|
|
|
|
|
- <ListItem
|
|
|
- title={Locale.Settings.FrequencyPenalty.Title}
|
|
|
- subTitle={Locale.Settings.FrequencyPenalty.SubTitle}
|
|
|
- >
|
|
|
- <InputRange
|
|
|
- value={props.modelConfig.frequency_penalty?.toFixed(1)}
|
|
|
- min="-2"
|
|
|
- max="2"
|
|
|
- step="0.1"
|
|
|
- onChange={(e) => {
|
|
|
- props.updateConfig(
|
|
|
- (config) =>
|
|
|
- (config.frequency_penalty =
|
|
|
- ModalConfigValidator.frequency_penalty(
|
|
|
- e.currentTarget.valueAsNumber,
|
|
|
- )),
|
|
|
- );
|
|
|
- }}
|
|
|
- ></InputRange>
|
|
|
- </ListItem>
|
|
|
+ {props.modelConfig.model === "gemini-pro" ? null : (
|
|
|
+ <>
|
|
|
+ <ListItem
|
|
|
+ title={Locale.Settings.PresencePenalty.Title}
|
|
|
+ subTitle={Locale.Settings.PresencePenalty.SubTitle}
|
|
|
+ >
|
|
|
+ <InputRange
|
|
|
+ value={props.modelConfig.presence_penalty?.toFixed(1)}
|
|
|
+ min="-2"
|
|
|
+ max="2"
|
|
|
+ step="0.1"
|
|
|
+ onChange={(e) => {
|
|
|
+ props.updateConfig(
|
|
|
+ (config) =>
|
|
|
+ (config.presence_penalty =
|
|
|
+ ModalConfigValidator.presence_penalty(
|
|
|
+ e.currentTarget.valueAsNumber,
|
|
|
+ )),
|
|
|
+ );
|
|
|
+ }}
|
|
|
+ ></InputRange>
|
|
|
+ </ListItem>
|
|
|
|
|
|
- <ListItem
|
|
|
- title={Locale.Settings.InjectSystemPrompts.Title}
|
|
|
- subTitle={Locale.Settings.InjectSystemPrompts.SubTitle}
|
|
|
- >
|
|
|
- <input
|
|
|
- type="checkbox"
|
|
|
- checked={props.modelConfig.enableInjectSystemPrompts}
|
|
|
- onChange={(e) =>
|
|
|
- props.updateConfig(
|
|
|
- (config) =>
|
|
|
- (config.enableInjectSystemPrompts = e.currentTarget.checked),
|
|
|
- )
|
|
|
- }
|
|
|
- ></input>
|
|
|
- </ListItem>
|
|
|
+ <ListItem
|
|
|
+ title={Locale.Settings.FrequencyPenalty.Title}
|
|
|
+ subTitle={Locale.Settings.FrequencyPenalty.SubTitle}
|
|
|
+ >
|
|
|
+ <InputRange
|
|
|
+ value={props.modelConfig.frequency_penalty?.toFixed(1)}
|
|
|
+ min="-2"
|
|
|
+ max="2"
|
|
|
+ step="0.1"
|
|
|
+ onChange={(e) => {
|
|
|
+ props.updateConfig(
|
|
|
+ (config) =>
|
|
|
+ (config.frequency_penalty =
|
|
|
+ ModalConfigValidator.frequency_penalty(
|
|
|
+ e.currentTarget.valueAsNumber,
|
|
|
+ )),
|
|
|
+ );
|
|
|
+ }}
|
|
|
+ ></InputRange>
|
|
|
+ </ListItem>
|
|
|
|
|
|
- <ListItem
|
|
|
- title={Locale.Settings.InputTemplate.Title}
|
|
|
- subTitle={Locale.Settings.InputTemplate.SubTitle}
|
|
|
- >
|
|
|
- <input
|
|
|
- type="text"
|
|
|
- value={props.modelConfig.template}
|
|
|
- onChange={(e) =>
|
|
|
- props.updateConfig(
|
|
|
- (config) => (config.template = e.currentTarget.value),
|
|
|
- )
|
|
|
- }
|
|
|
- ></input>
|
|
|
- </ListItem>
|
|
|
+ <ListItem
|
|
|
+ title={Locale.Settings.InjectSystemPrompts.Title}
|
|
|
+ subTitle={Locale.Settings.InjectSystemPrompts.SubTitle}
|
|
|
+ >
|
|
|
+ <input
|
|
|
+ type="checkbox"
|
|
|
+ checked={props.modelConfig.enableInjectSystemPrompts}
|
|
|
+ onChange={(e) =>
|
|
|
+ props.updateConfig(
|
|
|
+ (config) =>
|
|
|
+ (config.enableInjectSystemPrompts =
|
|
|
+ e.currentTarget.checked),
|
|
|
+ )
|
|
|
+ }
|
|
|
+ ></input>
|
|
|
+ </ListItem>
|
|
|
|
|
|
+ <ListItem
|
|
|
+ title={Locale.Settings.InputTemplate.Title}
|
|
|
+ subTitle={Locale.Settings.InputTemplate.SubTitle}
|
|
|
+ >
|
|
|
+ <input
|
|
|
+ type="text"
|
|
|
+ value={props.modelConfig.template}
|
|
|
+ onChange={(e) =>
|
|
|
+ props.updateConfig(
|
|
|
+ (config) => (config.template = e.currentTarget.value),
|
|
|
+ )
|
|
|
+ }
|
|
|
+ ></input>
|
|
|
+ </ListItem>
|
|
|
+ </>
|
|
|
+ )}
|
|
|
<ListItem
|
|
|
title={Locale.Settings.HistoryCount.Title}
|
|
|
subTitle={Locale.Settings.HistoryCount.SubTitle}
|