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