import { ALL_MODELS, ModalConfigValidator, ModelConfig } from "../store"; import Locale from "../locales"; import { InputRange } from "./input-range"; import { List, ListItem, Select } from "./ui-lib"; export function ModelConfigList(props: { modelConfig: ModelConfig; updateConfig: (updater: (config: ModelConfig) => void) => void; }) { return ( <> { props.updateConfig( (config) => (config.temperature = ModalConfigValidator.temperature( e.currentTarget.valueAsNumber, )), ); }} > props.updateConfig( (config) => (config.max_tokens = ModalConfigValidator.max_tokens( e.currentTarget.valueAsNumber, )), ) } > { props.updateConfig( (config) => (config.presence_penalty = ModalConfigValidator.presence_penalty( e.currentTarget.valueAsNumber, )), ); }} > props.updateConfig( (config) => (config.historyMessageCount = e.target.valueAsNumber), ) } > props.updateConfig( (config) => (config.compressMessageLengthThreshold = e.currentTarget.valueAsNumber), ) } > props.updateConfig( (config) => (config.sendMemory = e.currentTarget.checked), ) } > ); }