mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 13:07:32 +00:00
(improvement)(semantic) save metric default query config (#503)
Co-authored-by: jolunoluo
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user