fix(ui): get embedding select working

This commit is contained in:
psychedelicious 2024-02-20 10:45:05 +11:00 committed by Brandon Rising
parent ff53d828ce
commit d6c9360fa3

View File

@ -18,7 +18,7 @@ export const EmbeddingSelect = memo(({ onSelect, onClose }: EmbeddingSelectProps
const getIsDisabled = useCallback(
(embedding: TextualInversionConfig): boolean => {
const isCompatible = currentBaseModel === embedding.base_model;
const isCompatible = currentBaseModel === embedding.base;
const hasMainModel = Boolean(currentBaseModel);
return !hasMainModel || !isCompatible;
},
@ -31,7 +31,7 @@ export const EmbeddingSelect = memo(({ onSelect, onClose }: EmbeddingSelectProps
if (!embedding) {
return;
}
onSelect(embedding.model_name);
onSelect(embedding.key);
},
[onSelect]
);