Create /search endpoint, update model object structure in scan model page

This commit is contained in:
Brandon Rising
2024-02-21 11:54:02 -05:00
committed by Brandon
parent 4ac5e307c4
commit c0d9990344
3 changed files with 35 additions and 4 deletions

View File

@ -20,7 +20,7 @@ const ImportModelsPanel = () => {
<Button onClick={handleClickAddTab} isChecked={addModelTab === 'add'} size="sm" width="100%">
{t('modelManager.addModel')}
</Button>
<Button onClick={handleClickScanTab} isChecked={addModelTab === 'scan'} size="sm" width="100%" isDisabled>
<Button onClick={handleClickScanTab} isChecked={addModelTab === 'scan'} size="sm" width="100%">
{t('modelManager.scanForModels')}
</Button>
</ButtonGroup>

View File

@ -139,10 +139,10 @@ const modelsFilter = <T extends MainModelConfig | LoRAConfig>(
return;
}
const matchesFilter = model.model_name.toLowerCase().includes(nameFilter.toLowerCase());
const matchesFilter = model.name.toLowerCase().includes(nameFilter.toLowerCase());
const matchesFormat = model_format === undefined || model.model_format === model_format;
const matchesType = model.model_type === model_type;
const matchesFormat = model_format === undefined || model.format === model_format;
const matchesType = model.type === model_type;
if (matchesFilter && matchesFormat && matchesType) {
filteredModels.push(model);