mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 21:17:08 +00:00
(improvement)(Chat) add extend config for agent (#1010)
This commit is contained in:
@@ -22,7 +22,6 @@ import com.tencent.supersonic.headless.server.service.DatabaseService;
|
||||
import com.tencent.supersonic.headless.server.service.ModelService;
|
||||
import com.tencent.supersonic.headless.server.utils.DatabaseConverter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@@ -36,8 +35,6 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DatabaseServiceImpl implements DatabaseService {
|
||||
@Value("${inMemoryEmbeddingStore.persistent.path:/tmp}")
|
||||
private String embeddingStorePersistentPath;
|
||||
|
||||
private final SqlUtils sqlUtils;
|
||||
private DatabaseRepository databaseRepository;
|
||||
|
||||
@@ -66,6 +66,13 @@ import com.tencent.supersonic.headless.server.service.TagMetaService;
|
||||
import com.tencent.supersonic.headless.server.utils.MetricCheckUtils;
|
||||
import com.tencent.supersonic.headless.server.utils.MetricConverter;
|
||||
import com.tencent.supersonic.headless.server.utils.ModelClusterBuilder;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -79,13 +86,6 @@ import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -293,12 +293,13 @@ public class MetricServiceImpl implements MetricService {
|
||||
queryMapReq.setUser(user);
|
||||
queryMapReq.setMapModeEnum(MapModeEnum.LOOSE);
|
||||
MapInfoResp mapMeta = metaDiscoveryService.getMapMeta(queryMapReq);
|
||||
Map<String, DataSetMapInfo> dataSetMapInfo = mapMeta.getDataSetMapInfo();
|
||||
if (CollectionUtils.isEmpty(dataSetMapInfo)) {
|
||||
Map<String, DataSetMapInfo> dataSetMapInfoMap = mapMeta.getDataSetMapInfo();
|
||||
if (CollectionUtils.isEmpty(dataSetMapInfoMap)) {
|
||||
return metricRespPageInfo;
|
||||
}
|
||||
Map<Long, Double> result = dataSetMapInfo.values().stream()
|
||||
Map<Long, Double> result = dataSetMapInfoMap.values().stream()
|
||||
.map(DataSetMapInfo::getMapFields)
|
||||
.filter(Objects::nonNull)
|
||||
.flatMap(Collection::stream).filter(schemaElementMatch ->
|
||||
SchemaElementType.METRIC.equals(schemaElementMatch.getElement().getType()))
|
||||
.collect(Collectors.toMap(schemaElementMatch ->
|
||||
|
||||
Reference in New Issue
Block a user