allow manifest customTokenizer

This commit is contained in:
josc146 2023-12-25 16:57:32 +08:00
parent 8e05f3c360
commit 01bc355dde

View File

@ -228,8 +228,17 @@ const Configs: FC = observer(() => {
<Select style={{ minWidth: 0 }} className="grow"
value={selectedConfig.modelParameters.modelName}
onChange={(e, data) => {
const modelSource = commonStore.modelSourceList.find(item => item.name === data.value);
if (modelSource?.customTokenizer)
setSelectedConfigModelParams({
modelName: data.value
modelName: data.value,
useCustomTokenizer: true,
customTokenizer: modelSource?.customTokenizer
});
else // prevent customTokenizer from being overwritten
setSelectedConfigModelParams({
modelName: data.value,
useCustomTokenizer: false
});
}}>
{!commonStore.modelSourceList.find(item => item.name === selectedConfig.modelParameters.modelName)?.isComplete