(improvement)(chat) Parse info compatible with front-end (#704)

* (improvement)(headless) Modify view demo data

* (improvement)(chat) Parse info compatible with front-end

---------

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2024-01-30 22:06:23 +08:00
committed by GitHub
parent 7f15bacca4
commit f29b1854ba
3 changed files with 9 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
package com.tencent.supersonic.chat.api.pojo;
import com.google.common.base.Objects;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -51,4 +52,7 @@ public class SchemaElement implements Serializable {
return Objects.hashCode(view, id, name, bizName, type);
}
public List<String> getModelNames() {
return Lists.newArrayList(name);
}
}

View File

@@ -78,4 +78,8 @@ public class SemanticParseInfo {
return view.getView();
}
public SchemaElement getModel() {
return view;
}
}

View File

@@ -36,7 +36,7 @@ public class ViewResp extends SchemaItem {
}
public List<Long> getAllDimensions() {
return getViewModelConfigs().stream().map(ViewModelConfig::getMetrics)
return getViewModelConfigs().stream().map(ViewModelConfig::getDimensions)
.flatMap(Collection::stream).collect(Collectors.toList());
}