mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
(improvement)(headless)Remove mapper related configs from system configuration UI.
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
package com.tencent.supersonic.chat.server.parser;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.common.config.ParameterConfig;
|
||||
import com.tencent.supersonic.common.pojo.Parameter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service("ChatParserConfig")
|
||||
@Slf4j
|
||||
public class ParserConfig extends ParameterConfig {
|
||||
@@ -17,11 +14,4 @@ public class ParserConfig extends ParameterConfig {
|
||||
"是否开启多轮对话", "开启多轮对话将消耗更多token",
|
||||
"bool", "Parser相关配置");
|
||||
|
||||
@Override
|
||||
public List<Parameter> getSysParameters() {
|
||||
return Lists.newArrayList(
|
||||
PARSER_MULTI_TURN_ENABLE
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@@ -21,7 +22,9 @@ public abstract class ParameterConfig {
|
||||
/**
|
||||
* @return system parameters to be set with user interface
|
||||
*/
|
||||
protected abstract List<Parameter> getSysParameters();
|
||||
protected List<Parameter> getSysParameters() {
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameter value will be derived in the following order:
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
package com.tencent.supersonic.headless.chat.mapper;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.common.config.ParameterConfig;
|
||||
import com.tencent.supersonic.common.pojo.Parameter;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service("HeadlessMapperConfig")
|
||||
public class MapperConfig extends ParameterConfig {
|
||||
|
||||
@@ -94,17 +91,4 @@ public class MapperConfig extends ParameterConfig {
|
||||
"向量召回相似度阈值在动态调整中的最低值",
|
||||
"number", "Mapper相关配置");
|
||||
|
||||
@Override
|
||||
public List<Parameter> getSysParameters() {
|
||||
return Lists.newArrayList(
|
||||
MAPPER_DETECTION_SIZE,
|
||||
MAPPER_DETECTION_MAX_SIZE,
|
||||
MAPPER_NAME_THRESHOLD,
|
||||
MAPPER_NAME_THRESHOLD_MIN,
|
||||
MAPPER_DIMENSION_VALUE_SIZE,
|
||||
MAPPER_VALUE_THRESHOLD,
|
||||
MAPPER_VALUE_THRESHOLD_MIN
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user