mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 04:27:39 +00:00
[improvement][Chat] Support agent permission management (#1923)
* [improvement][Chat] Support agent permission management #1143 * [improvement][chat]Iterate LLM prompts of parsing and correction. * [improvement][headless-fe] Added null-check conditions to the data formatting function. * [improvement][headless]Clean code logic of headless translator. --------- Co-authored-by: lxwcodemonkey <jolunoluo@tencent.com> Co-authored-by: tristanliu <tristanliu@tencent.com>
This commit is contained in:
@@ -7,14 +7,11 @@ import com.tencent.supersonic.headless.api.pojo.enums.SchemaType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.tencent.supersonic.common.pojo.Constants.UNDERLINE;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@@ -32,13 +29,6 @@ public class SemanticSchemaResp {
|
||||
private DatabaseResp databaseResp;
|
||||
private QueryType queryType;
|
||||
|
||||
public String getSchemaKey() {
|
||||
if (dataSetId == null) {
|
||||
return String.format("%s_%s", schemaType, StringUtils.join(modelIds, UNDERLINE));
|
||||
}
|
||||
return String.format("%s_%s", schemaType, dataSetId);
|
||||
}
|
||||
|
||||
public MetricSchemaResp getMetric(String bizName) {
|
||||
return metrics.stream().filter(metric -> bizName.equalsIgnoreCase(metric.getBizName()))
|
||||
.findFirst().orElse(null);
|
||||
|
||||
Reference in New Issue
Block a user