[fix][launcher]Fix mysql scripts.

This commit is contained in:
jerryjzhang
2024-11-28 09:28:17 +08:00
parent 111304486b
commit c80794e8fc
9 changed files with 70 additions and 15 deletions

View File

@@ -11,7 +11,12 @@ public class LLMConfigUtils {
OPENAI_GLM(false),
OLLAMA_LLAMA3(true),
OLLAMA_QWEN2(true),
OLLAMA_QWEN25(true);
OLLAMA_QWEN25_7B(true),
OLLAMA_QWEN25_14B(true),
OLLAMA_QWEN25_CODE_7B(true),
OLLAMA_QWEN25_CODE_3B(true),
OLLAMA_GLM4(true);
public boolean isOllam;
@@ -35,10 +40,26 @@ public class LLMConfigUtils {
baseUrl = "http://localhost:11434";
modelName = "qwen2:7b";
break;
case OLLAMA_QWEN25:
case OLLAMA_QWEN25_7B:
baseUrl = "http://localhost:11434";
modelName = "qwen2.5:7b";
break;
case OLLAMA_QWEN25_14B:
baseUrl = "http://localhost:11434";
modelName = "qwen2.5:14b";
break;
case OLLAMA_QWEN25_CODE_7B:
baseUrl = "http://localhost:11434";
modelName = "qwen2.5-coder:7b";
break;
case OLLAMA_QWEN25_CODE_3B:
baseUrl = "http://localhost:11434";
modelName = "qwen2.5-coder:3b";
break;
case OLLAMA_GLM4:
baseUrl = "http://localhost:11434";
modelName = "glm4:latest";
break;
case OPENAI_GLM:
baseUrl = "https://open.bigmodel.cn/api/pas/v4/";
apiKey = "REPLACE_WITH_YOUR_KEY";

View File

@@ -1,7 +1,7 @@
spring:
datasource:
driver-class-name: org.h2.Driver
url: jdbc:h2:mem:semantic;DATABASE_TO_UPPER=false;QUERY_TIMEOUT=100
url: jdbc:h2:mem:semantic;DATABASE_TO_UPPER=false;QUERY_TIMEOUT=30
username: root
password: semantic
sql:
@@ -11,4 +11,20 @@ spring:
h2:
console:
path: /h2-console/semantic
enabled: true
enabled: true
### Comment out following lines if using MySQL
#spring:
# datasource:
# driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://localhost:3306/s2_database?user=root
# username: root
# password:
# sql:
# init:
# schema-locations: classpath:db/schema-mysql.sql,classpath:db/schema-mysql-demo.sql
# data-locations: classpath:db/data-mysql.sql,classpath:db/data-mysql-demo.sql
# h2:
# console:
# path: /h2-console/semantic
# enabled: true