(feature)(chat)Introduce new plain_text mode to allow users to talk to LLM directly.

This commit is contained in:
jerryjzhang
2024-06-25 21:14:19 +08:00
parent db9a3fa056
commit d4cc53acae
15 changed files with 112 additions and 25 deletions

View File

@@ -21,7 +21,7 @@ import java.util.TreeSet;
public class SemanticParseInfo {
private Integer id;
private String queryMode;
private String queryMode = "PLAIN_TEXT";
private SchemaElement dataSet;
private Set<SchemaElement> metrics = new TreeSet<>(new SchemaNameLengthComparator());
private Set<SchemaElement> dimensions = new LinkedHashSet();

View File

@@ -43,12 +43,12 @@ public class QueryManager {
private static SemanticQuery getSemanticQuery(String queryMode, SemanticQuery semanticQuery) {
if (Objects.isNull(semanticQuery)) {
throw new RuntimeException("no supported queryMode :" + queryMode);
return null;
}
try {
return semanticQuery.getClass().getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new RuntimeException("no supported queryMode :" + queryMode);
return null;
}
}