style: add model selection tips in playground

This commit is contained in:
jialin
2025-04-09 17:46:18 +08:00
parent fe8ff2b180
commit 694ffb0a81
11 changed files with 97 additions and 42 deletions
+5 -4
View File
@@ -431,10 +431,6 @@ export const useCheckCompatibility = () => {
const { scheduleType } = allValues;
const gpuIds = allValues.gpu_selector?.gpu_ids || [];
if (scheduleType === 'manual') {
return !gpuIds.length;
}
const noLocalValue =
allValues.source === modelSourceMap.local_path_value &&
!allValues.local_path;
@@ -443,6 +439,10 @@ export const useCheckCompatibility = () => {
allValues.source === modelSourceMap.ollama_library_value &&
!allValues.ollama_library_model_name;
if (scheduleType === 'manual') {
return !gpuIds.length || noLocalValue || noOllamaValue;
}
return noLocalValue || noOllamaValue;
};
@@ -455,6 +455,7 @@ export const useCheckCompatibility = () => {
if (_.isEqual(cacheFormValuesRef.current, allValues)) {
return;
}
if (checkRequiredValue(allValues)) {
setWarningStatus({
show: false,