(improvement)(semantic) save metric default query config (#503)

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2023-12-13 21:29:15 +08:00
committed by GitHub
parent 2c7afd0d55
commit f89be48e98
24 changed files with 255 additions and 84 deletions

View File

@@ -2,7 +2,9 @@ package com.tencent.supersonic.common.pojo;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Map;
@@ -49,7 +51,10 @@ public class ModelCluster {
}
public Long getFirstModel() {
return modelIds.stream().findFirst().orElse(null);
if (CollectionUtils.isEmpty(modelIds)) {
return -1L;
}
return new ArrayList<>(modelIds).get(0);
}
}

View File

@@ -79,7 +79,7 @@ public class SysParameter {
//llm config
Parameter parameter = new Parameter("llm.model.name", "gpt3.5",
"模型名称", "","list", "Parser相关配置");
"模型名称", "", "list", "Parser相关配置");
parameter.setCandidateValues(Lists.newArrayList("gpt3.5", "gpt3.5-16k"));
parameters.add(parameter);
parameters.add(new Parameter("llm.api.key", "sk-secret",