mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-19 13:04:21 +08:00
(improvement)[build] Format the enumeration class with line breaks (#1761)
This commit is contained in:
@@ -5,8 +5,13 @@ import java.util.Map;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public enum AggregateEnum {
|
public enum AggregateEnum {
|
||||||
MOST("最多", "max"), HIGHEST("最高", "max"), MAXIMUN("最大", "max"), LEAST("最少",
|
MOST("最多", "max"),
|
||||||
"min"), SMALLEST("最小", "min"), LOWEST("最低", "min"), AVERAGE("平均", "avg");
|
HIGHEST("最高", "max"),
|
||||||
|
MAXIMUN("最大", "max"),
|
||||||
|
LEAST("最少", "min"),
|
||||||
|
SMALLEST("最小", "min"),
|
||||||
|
LOWEST("最低", "min"),
|
||||||
|
AVERAGE("平均", "avg");
|
||||||
|
|
||||||
private String aggregateCh;
|
private String aggregateCh;
|
||||||
private String aggregateEN;
|
private String aggregateEN;
|
||||||
|
|||||||
@@ -40,9 +40,16 @@ public class Criterion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public enum NumericDataType {
|
public enum NumericDataType {
|
||||||
TINYINT("TINYINT"), SMALLINT("SMALLINT"), MEDIUMINT("MEDIUMINT"), INT("INT"), INTEGER(
|
TINYINT("TINYINT"),
|
||||||
"INTEGER"), BIGINT("BIGINT"), FLOAT(
|
SMALLINT("SMALLINT"),
|
||||||
"FLOAT"), DOUBLE("DOUBLE"), DECIMAL("DECIMAL"), NUMERIC("NUMERIC"),;
|
MEDIUMINT("MEDIUMINT"),
|
||||||
|
INT("INT"),
|
||||||
|
INTEGER("INTEGER"),
|
||||||
|
BIGINT("BIGINT"),
|
||||||
|
FLOAT("FLOAT"),
|
||||||
|
DOUBLE("DOUBLE"),
|
||||||
|
DECIMAL("DECIMAL"),
|
||||||
|
NUMERIC("NUMERIC"),;
|
||||||
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
|||||||
@@ -9,13 +9,19 @@ public enum AggOperatorEnum {
|
|||||||
|
|
||||||
SUM("SUM"),
|
SUM("SUM"),
|
||||||
|
|
||||||
COUNT("COUNT"), COUNT_DISTINCT("COUNT_DISTINCT"), DISTINCT("DISTINCT"),
|
COUNT("COUNT"),
|
||||||
|
|
||||||
|
COUNT_DISTINCT("COUNT_DISTINCT"),
|
||||||
|
|
||||||
|
DISTINCT("DISTINCT"),
|
||||||
|
|
||||||
TOPN("TOPN"),
|
TOPN("TOPN"),
|
||||||
|
|
||||||
PERCENTILE("PERCENTILE"),
|
PERCENTILE("PERCENTILE"),
|
||||||
|
|
||||||
RATIO_ROLL("RATIO_ROLL"), RATIO_OVER("RATIO_OVER"),
|
RATIO_ROLL("RATIO_ROLL"),
|
||||||
|
|
||||||
|
RATIO_OVER("RATIO_OVER"),
|
||||||
|
|
||||||
UNKNOWN("UNKNOWN");
|
UNKNOWN("UNKNOWN");
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import lombok.Getter;
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public enum ChatModelType {
|
public enum ChatModelType {
|
||||||
TEXT_TO_SQL("SQL生成", "Convert text query to SQL statement"), MULTI_TURN_REWRITE("多轮改写",
|
TEXT_TO_SQL("SQL生成", "Convert text query to SQL statement"),
|
||||||
"Rewrite text query for multi-turn conversation"), MEMORY_REVIEW("记忆评估",
|
MULTI_TURN_REWRITE("多轮改写", "Rewrite text query for multi-turn conversation"),
|
||||||
"Review memory in order to add few-shot examples"), RESPONSE_GENERATE("回复生成",
|
MEMORY_REVIEW("记忆评估", "Review memory in order to add few-shot examples"),
|
||||||
"Generate readable response to the end user");
|
RESPONSE_GENERATE("回复生成", "Generate readable response to the end user");
|
||||||
|
|
||||||
private String description;
|
private String description;
|
||||||
private String name;
|
private String name;
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
package com.tencent.supersonic.common.pojo.enums;
|
package com.tencent.supersonic.common.pojo.enums;
|
||||||
|
|
||||||
public enum EngineType {
|
public enum EngineType {
|
||||||
TDW(0, "tdw"), MYSQL(1, "mysql"), DORIS(2, "doris"), CLICKHOUSE(3, "clickhouse"), KAFKA(4,
|
TDW(0, "tdw"),
|
||||||
"kafka"), H2(5, "h2"), POSTGRESQL(6, "postgresql"), OTHER(7, "other");
|
MYSQL(1, "mysql"),
|
||||||
|
DORIS(2, "doris"),
|
||||||
|
CLICKHOUSE(3, "clickhouse"),
|
||||||
|
KAFKA(4, "kafka"),
|
||||||
|
H2(5, "h2"),
|
||||||
|
POSTGRESQL(6, "postgresql"),
|
||||||
|
OTHER(7, "other");
|
||||||
|
|
||||||
private Integer code;
|
private Integer code;
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,20 @@ import net.sf.jsqlparser.expression.operators.relational.MinorThan;
|
|||||||
import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals;
|
import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals;
|
||||||
|
|
||||||
public enum FilterOperatorEnum {
|
public enum FilterOperatorEnum {
|
||||||
IN("IN"), NOT_IN("NOT_IN"), EQUALS("="), BETWEEN("BETWEEN"), GREATER_THAN(
|
IN("IN"),
|
||||||
">"), GREATER_THAN_EQUALS(">="), IS_NULL("IS_NULL"), IS_NOT_NULL("IS_NOT_NULL"), LIKE(
|
NOT_IN("NOT_IN"),
|
||||||
"LIKE"), MINOR_THAN("<"), MINOR_THAN_EQUALS(
|
EQUALS("="),
|
||||||
"<="), NOT_EQUALS("!="), SQL_PART("SQL_PART"), EXISTS("EXISTS");
|
BETWEEN("BETWEEN"),
|
||||||
|
GREATER_THAN(">"),
|
||||||
|
GREATER_THAN_EQUALS(">="),
|
||||||
|
IS_NULL("IS_NULL"),
|
||||||
|
IS_NOT_NULL("IS_NOT_NULL"),
|
||||||
|
LIKE("LIKE"),
|
||||||
|
MINOR_THAN("<"),
|
||||||
|
MINOR_THAN_EQUALS("<="),
|
||||||
|
NOT_EQUALS("!="),
|
||||||
|
SQL_PART("SQL_PART"),
|
||||||
|
EXISTS("EXISTS");
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
package com.tencent.supersonic.common.pojo.enums;
|
package com.tencent.supersonic.common.pojo.enums;
|
||||||
|
|
||||||
public enum RatioOverType {
|
public enum RatioOverType {
|
||||||
DAY_ON_DAY("日环比"), WEEK_ON_DAY("周环比"), WEEK_ON_WEEK("周环比"), MONTH_ON_WEEK(
|
DAY_ON_DAY("日环比"),
|
||||||
"月环比"), MONTH_ON_MONTH("月环比"), YEAR_ON_MONTH("年同比"), YEAR_ON_YEAR("年环比");
|
WEEK_ON_DAY("周环比"),
|
||||||
|
WEEK_ON_WEEK("周环比"),
|
||||||
|
MONTH_ON_WEEK("月环比"),
|
||||||
|
MONTH_ON_MONTH("月环比"),
|
||||||
|
YEAR_ON_MONTH("年同比"),
|
||||||
|
YEAR_ON_YEAR("年环比");
|
||||||
|
|
||||||
private String showName;
|
private String showName;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package com.tencent.supersonic.common.pojo.enums;
|
package com.tencent.supersonic.common.pojo.enums;
|
||||||
|
|
||||||
public enum ReturnCode {
|
public enum ReturnCode {
|
||||||
SUCCESS(200, "success"), INVALID_REQUEST(400, "invalid request"), INVALID_PERMISSION(401,
|
SUCCESS(200, "success"),
|
||||||
"invalid permission"), ACCESS_ERROR(403,
|
INVALID_REQUEST(400, "invalid request"),
|
||||||
"access denied"), SYSTEM_ERROR(500, "system error");
|
INVALID_PERMISSION(401, "invalid permission"),
|
||||||
|
ACCESS_ERROR(403, "access denied"),
|
||||||
|
SYSTEM_ERROR(500, "system error");
|
||||||
|
|
||||||
private final int code;
|
private final int code;
|
||||||
private final String message;
|
private final String message;
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
package com.tencent.supersonic.common.pojo.enums;
|
package com.tencent.supersonic.common.pojo.enums;
|
||||||
|
|
||||||
public enum StatusEnum {
|
public enum StatusEnum {
|
||||||
INITIALIZED("INITIALIZED", 0), ONLINE("ONLINE", 1), OFFLINE("OFFLINE", 2), DELETED("DELETED",
|
INITIALIZED("INITIALIZED", 0),
|
||||||
3), UNAVAILABLE("UNAVAILABLE", 4), UNKNOWN("UNKNOWN", -1);
|
ONLINE("ONLINE", 1),
|
||||||
|
OFFLINE("OFFLINE", 2),
|
||||||
|
DELETED("DELETED", 3),
|
||||||
|
UNAVAILABLE("UNAVAILABLE", 4),
|
||||||
|
UNKNOWN("UNKNOWN", -1);
|
||||||
|
|
||||||
private String status;
|
private String status;
|
||||||
private Integer code;
|
private Integer code;
|
||||||
|
|||||||
@@ -3,8 +3,9 @@ package dev.langchain4j.model.openai;
|
|||||||
public enum OpenAiChatModelName {
|
public enum OpenAiChatModelName {
|
||||||
GPT_3_5_TURBO("gpt-3.5-turbo"), // alias
|
GPT_3_5_TURBO("gpt-3.5-turbo"), // alias
|
||||||
@Deprecated
|
@Deprecated
|
||||||
GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613"), GPT_3_5_TURBO_1106(
|
GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613"),
|
||||||
"gpt-3.5-turbo-1106"), GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125"),
|
GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106"),
|
||||||
|
GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125"),
|
||||||
|
|
||||||
GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k"), // alias
|
GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k"), // alias
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@@ -12,18 +13,22 @@ public enum OpenAiChatModelName {
|
|||||||
|
|
||||||
GPT_4("gpt-4"), // alias
|
GPT_4("gpt-4"), // alias
|
||||||
@Deprecated
|
@Deprecated
|
||||||
GPT_4_0314("gpt-4-0314"), GPT_4_0613("gpt-4-0613"),
|
GPT_4_0314("gpt-4-0314"),
|
||||||
|
GPT_4_0613("gpt-4-0613"),
|
||||||
|
|
||||||
GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview"), // alias
|
GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview"), // alias
|
||||||
GPT_4_1106_PREVIEW("gpt-4-1106-preview"), GPT_4_0125_PREVIEW("gpt-4-0125-preview"),
|
GPT_4_1106_PREVIEW("gpt-4-1106-preview"),
|
||||||
|
GPT_4_0125_PREVIEW("gpt-4-0125-preview"),
|
||||||
|
|
||||||
GPT_4_32K("gpt-4-32k"), // alias
|
GPT_4_32K("gpt-4-32k"), // alias
|
||||||
GPT_4_32K_0314("gpt-4-32k-0314"), GPT_4_32K_0613("gpt-4-32k-0613"),
|
GPT_4_32K_0314("gpt-4-32k-0314"),
|
||||||
|
GPT_4_32K_0613("gpt-4-32k-0613"),
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
GPT_4_VISION_PREVIEW("gpt-4-vision-preview"),
|
GPT_4_VISION_PREVIEW("gpt-4-vision-preview"),
|
||||||
|
|
||||||
GPT_4_O("gpt-4o"), GPT_4_O_MINI("gpt-4o-mini");
|
GPT_4_O("gpt-4o"),
|
||||||
|
GPT_4_O_MINI("gpt-4o-mini");
|
||||||
|
|
||||||
private final String stringValue;
|
private final String stringValue;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package com.tencent.supersonic.headless.chat.knowledge;
|
package com.tencent.supersonic.headless.chat.knowledge;
|
||||||
|
|
||||||
public enum DictUpdateMode {
|
public enum DictUpdateMode {
|
||||||
OFFLINE_FULL("OFFLINE_FULL"), OFFLINE_MODEL("OFFLINE_MODEL"), REALTIME_ADD(
|
OFFLINE_FULL("OFFLINE_FULL"),
|
||||||
"REALTIME_ADD"), REALTIME_DELETE("REALTIME_DELETE"), NOT_SUPPORT("NOT_SUPPORT");
|
OFFLINE_MODEL("OFFLINE_MODEL"),
|
||||||
|
REALTIME_ADD("REALTIME_ADD"),
|
||||||
|
REALTIME_DELETE("REALTIME_DELETE"),
|
||||||
|
NOT_SUPPORT("NOT_SUPPORT");
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
|||||||
@@ -291,7 +291,7 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="48"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
|
||||||
|
|||||||
@@ -4,9 +4,14 @@ import com.tencent.supersonic.common.pojo.ChatModelConfig;
|
|||||||
|
|
||||||
public class LLMConfigUtils {
|
public class LLMConfigUtils {
|
||||||
public enum LLMType {
|
public enum LLMType {
|
||||||
OPENAI_GPT(false), OPENAI_MOONSHOT(false), OPENAI_DEEPSEEK(false), OPENAI_QWEN(
|
OPENAI_GPT(false),
|
||||||
false), OPENAI_GLM(
|
OPENAI_MOONSHOT(false),
|
||||||
false), OLLAMA_LLAMA3(true), OLLAMA_QWEN2(true), OLLAMA_QWEN25(true);
|
OPENAI_DEEPSEEK(false),
|
||||||
|
OPENAI_QWEN(false),
|
||||||
|
OPENAI_GLM(false),
|
||||||
|
OLLAMA_LLAMA3(true),
|
||||||
|
OLLAMA_QWEN2(true),
|
||||||
|
OLLAMA_QWEN25(true);
|
||||||
|
|
||||||
public boolean isOllam;
|
public boolean isOllam;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user