mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 04:27:39 +00:00
(improvement)(launcher)Separate prd and local profiles for langchain4j yaml.
This commit is contained in:
@@ -1,15 +1,4 @@
|
|||||||
server:
|
|
||||||
port: 9080
|
|
||||||
compression:
|
|
||||||
enabled: true
|
|
||||||
min-response-size: 1024
|
|
||||||
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
h2:
|
|
||||||
console:
|
|
||||||
path: /h2-console/semantic
|
|
||||||
enabled: true
|
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: org.h2.Driver
|
driver-class-name: org.h2.Driver
|
||||||
schema: classpath:db/schema-h2.sql
|
schema: classpath:db/schema-h2.sql
|
||||||
@@ -17,23 +6,10 @@ spring:
|
|||||||
url: jdbc:h2:mem:semantic;DATABASE_TO_UPPER=false
|
url: jdbc:h2:mem:semantic;DATABASE_TO_UPPER=false
|
||||||
username: root
|
username: root
|
||||||
password: semantic
|
password: semantic
|
||||||
|
h2:
|
||||||
mybatis:
|
console:
|
||||||
mapper-locations=classpath:mappers/custom/*.xml,classpath*:/mappers/*.xml
|
path: /h2-console/semantic
|
||||||
|
enabled: true
|
||||||
logging:
|
config:
|
||||||
level:
|
import:
|
||||||
dev.langchain4j: DEBUG
|
- classpath:langchain4j-local.yaml
|
||||||
dev.ai4j.openai4j: DEBUG
|
|
||||||
# swagger配置
|
|
||||||
swagger:
|
|
||||||
title: 'SuperSonic平台接口文档'
|
|
||||||
base:
|
|
||||||
package: com.tencent.supersonic
|
|
||||||
description: 'SuperSonic平台接口文档'
|
|
||||||
url: ''
|
|
||||||
contact:
|
|
||||||
name:
|
|
||||||
email:
|
|
||||||
url: ''
|
|
||||||
version: 3.0
|
|
||||||
@@ -1,33 +1,9 @@
|
|||||||
server:
|
|
||||||
port: 9080
|
|
||||||
compression:
|
|
||||||
enabled: true
|
|
||||||
min-response-size: 1024
|
|
||||||
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://${DB_HOST}:3306/${DB_NAME}?useUnicode=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://${DB_HOST}:3306/${DB_NAME}?useUnicode=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
|
||||||
username: ${DB_USERNAME}
|
username: ${DB_USERNAME}
|
||||||
password: ${DB_PASSWORD}
|
password: ${DB_PASSWORD}
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
|
config:
|
||||||
mybatis:
|
import:
|
||||||
mapper-locations=classpath:mappers/custom/*.xml,classpath*:/mappers/*.xml
|
- classpath:langchain4j-prd.yaml
|
||||||
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
dev.langchain4j: DEBUG
|
|
||||||
dev.ai4j.openai4j: DEBUG
|
|
||||||
# swagger配置
|
|
||||||
swagger:
|
|
||||||
title: 'SuperSonic平台接口文档'
|
|
||||||
base:
|
|
||||||
package: com.tencent.supersonic
|
|
||||||
description: 'SuperSonic平台接口文档'
|
|
||||||
url: ''
|
|
||||||
contact:
|
|
||||||
name:
|
|
||||||
email:
|
|
||||||
url: ''
|
|
||||||
version: 3.0
|
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
|
server:
|
||||||
|
port: 9080
|
||||||
|
compression:
|
||||||
|
enabled: true
|
||||||
|
min-response-size: 1024
|
||||||
|
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: local
|
active: local
|
||||||
@@ -6,7 +13,6 @@ spring:
|
|||||||
config:
|
config:
|
||||||
import:
|
import:
|
||||||
- classpath:s2-config.yaml
|
- classpath:s2-config.yaml
|
||||||
- classpath:langchain4j-config.yaml
|
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- spring.dev.langchain4j.spring.LangChain4jAutoConfig
|
- spring.dev.langchain4j.spring.LangChain4jAutoConfig
|
||||||
@@ -17,4 +23,21 @@ spring:
|
|||||||
- spring.dev.langchain4j.anthropic.spring.AutoConfig
|
- spring.dev.langchain4j.anthropic.spring.AutoConfig
|
||||||
|
|
||||||
mybatis:
|
mybatis:
|
||||||
mapper-locations=classpath:mappers/custom/*.xml,classpath*:/mappers/*.xml
|
mapper-locations=classpath:mappers/custom/*.xml,classpath*:/mappers/*.xml
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
dev.langchain4j: DEBUG
|
||||||
|
dev.ai4j.openai4j: DEBUG
|
||||||
|
|
||||||
|
swagger:
|
||||||
|
title: 'SuperSonic API Documentation'
|
||||||
|
base:
|
||||||
|
package: com.tencent.supersonic
|
||||||
|
description: 'SuperSonic API Documentation'
|
||||||
|
url: ''
|
||||||
|
contact:
|
||||||
|
name:
|
||||||
|
email:
|
||||||
|
url: ''
|
||||||
|
version: 3.0
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
langchain4j:
|
|
||||||
open-ai:
|
|
||||||
chat-model:
|
|
||||||
# Replace with your LLM configs
|
|
||||||
# Note: The default API key `demo` is provided by langchain4j community
|
|
||||||
# which limits 1000 tokens per request.
|
|
||||||
base-url: https://api.openai.com/v1
|
|
||||||
api-key: demo
|
|
||||||
model-name: gpt-3.5-turbo
|
|
||||||
temperature: 0.0
|
|
||||||
timeout: PT60S
|
|
||||||
in-memory:
|
|
||||||
embedding-model:
|
|
||||||
model-name: bge-small-zh
|
|
||||||
chroma:
|
|
||||||
embedding-store:
|
|
||||||
baseUrl: http://0.0.0.0:8000
|
|
||||||
timeout: 120s
|
|
||||||
# ollama:
|
|
||||||
# chat-model:
|
|
||||||
# base-url: http://localhost:11434
|
|
||||||
# api-key: demo
|
|
||||||
# model-name: qwen:0.5b
|
|
||||||
# temperature: 0.0
|
|
||||||
# timeout: PT60S
|
|
||||||
|
|
||||||
# chroma:
|
|
||||||
# embedding-store:
|
|
||||||
# baseUrl: http://0.0.0.0:8000
|
|
||||||
# timeout: 120s
|
|
||||||
|
|
||||||
# milvus:
|
|
||||||
# embedding-store:
|
|
||||||
# host: localhost
|
|
||||||
# port: 2379
|
|
||||||
# uri: http://0.0.0.0:19530
|
|
||||||
# token: demo
|
|
||||||
# dimension: 512
|
|
||||||
# timeout: 120s
|
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
langchain4j:
|
||||||
|
# Replace `open_ai` with ollama/zhipu/azure/dashscope as needed.
|
||||||
|
# Note:
|
||||||
|
# 1. `open_ai` is commonly used to connect to cloud-based models;
|
||||||
|
# 2. `ollama` is commonly used to connect to local models.
|
||||||
|
open-ai:
|
||||||
|
chat-model:
|
||||||
|
# It is recommended to replace with your API key in production.
|
||||||
|
# Note: The default API key `demo` is provided by langchain4j community
|
||||||
|
# which limits 1000 tokens per request.
|
||||||
|
base-url: ${OPENAI_API_BASE:https://api.openai.com/v1}
|
||||||
|
api-key: ${OPENAI_API_KEY:demo}
|
||||||
|
model-name: ${OPENAI_MODEL_NAME:gpt-3.5-turbo}
|
||||||
|
temperature: ${OPENAI_TEMPERATURE:0.0}
|
||||||
|
timeout: ${OPENAI_TIMEOUT:PT60S}
|
||||||
|
|
||||||
|
# embedding-model:
|
||||||
|
# base-url: https://api.openai.com/v1
|
||||||
|
# api-key: demo
|
||||||
|
# model-name: text-embedding-3-small
|
||||||
|
# timeout: PT60S
|
||||||
|
|
||||||
|
in-memory:
|
||||||
|
embedding-model:
|
||||||
|
model-name: bge-small-zh
|
||||||
|
|
||||||
|
embedding-store:
|
||||||
|
persist-path: /tmp
|
||||||
|
|
||||||
|
# chroma:
|
||||||
|
# embedding-store:
|
||||||
|
# baseUrl: http://0.0.0.0:8000
|
||||||
|
# timeout: 120s
|
||||||
|
|
||||||
|
# milvus:
|
||||||
|
# embedding-store:
|
||||||
|
# host: localhost
|
||||||
|
# port: 2379
|
||||||
|
# uri: http://0.0.0.0:19530
|
||||||
|
# token: demo
|
||||||
|
# dimension: 512
|
||||||
|
# timeout: 120s
|
||||||
42
launchers/standalone/src/main/resources/langchain4j-prd.yaml
Normal file
42
launchers/standalone/src/main/resources/langchain4j-prd.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
langchain4j:
|
||||||
|
# Replace `open_ai` with ollama/zhipu/azure/dashscope as needed.
|
||||||
|
# Note:
|
||||||
|
# 1. `open_ai` is commonly used to connect to cloud-based models;
|
||||||
|
# 2. `ollama` is commonly used to connect to local models.
|
||||||
|
open-ai:
|
||||||
|
chat-model:
|
||||||
|
# It is recommended to replace with your API key in production.
|
||||||
|
# Note: The default API key `demo` is provided by langchain4j community
|
||||||
|
# which limits 1000 tokens per request.
|
||||||
|
base-url: ${OPENAI_API_BASE:https://api.openai.com/v1}
|
||||||
|
api-key: ${OPENAI_API_KEY:demo}
|
||||||
|
model-name: ${OPENAI_MODEL_NAME:gpt-3.5-turbo}
|
||||||
|
temperature: ${OPENAI_TEMPERATURE:0.0}
|
||||||
|
timeout: ${OPENAI_TIMEOUT:PT60S}
|
||||||
|
|
||||||
|
# embedding-model:
|
||||||
|
# base-url: https://api.openai.com/v1
|
||||||
|
# api-key: demo
|
||||||
|
# model-name: text-embedding-3-small
|
||||||
|
# timeout: PT60S
|
||||||
|
|
||||||
|
in-memory:
|
||||||
|
embedding-model:
|
||||||
|
model-name: bge-small-zh
|
||||||
|
|
||||||
|
# embedding-store:
|
||||||
|
# persist-path: /tmp
|
||||||
|
|
||||||
|
chroma:
|
||||||
|
embedding-store:
|
||||||
|
baseUrl: http://0.0.0.0:8000
|
||||||
|
timeout: 120s
|
||||||
|
|
||||||
|
# milvus:
|
||||||
|
# embedding-store:
|
||||||
|
# host: localhost
|
||||||
|
# port: 2379
|
||||||
|
# uri: http://0.0.0.0:19530
|
||||||
|
# token: demo
|
||||||
|
# dimension: 512
|
||||||
|
# timeout: 120s
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
server:
|
|
||||||
port: 9080
|
|
||||||
compression:
|
|
||||||
enabled: true
|
|
||||||
min-response-size: 1024
|
|
||||||
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
|
|
||||||
|
|
||||||
spring:
|
|
||||||
h2:
|
|
||||||
console:
|
|
||||||
path: /h2-console/semantic
|
|
||||||
enabled: true
|
|
||||||
datasource:
|
|
||||||
driver-class-name: org.h2.Driver
|
|
||||||
schema: classpath:db/schema-h2.sql
|
|
||||||
data: classpath:db/data-h2.sql
|
|
||||||
url: jdbc:h2:mem:semantic;DATABASE_TO_UPPER=false
|
|
||||||
username: root
|
|
||||||
password: semantic
|
|
||||||
|
|
||||||
mybatis:
|
|
||||||
mapper-locations=classpath:mappers/custom/*.xml,classpath*:/mappers/*.xml
|
|
||||||
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
dev.langchain4j: DEBUG
|
|
||||||
dev.ai4j.openai4j: DEBUG
|
|
||||||
# swagger配置
|
|
||||||
swagger:
|
|
||||||
title: 'SuperSonic平台接口文档'
|
|
||||||
base:
|
|
||||||
package: com.tencent.supersonic
|
|
||||||
description: 'SuperSonic平台接口文档'
|
|
||||||
url: ''
|
|
||||||
contact:
|
|
||||||
name:
|
|
||||||
email:
|
|
||||||
url: ''
|
|
||||||
version: 3.0
|
|
||||||
@@ -1,12 +1,19 @@
|
|||||||
|
server:
|
||||||
|
port: 9080
|
||||||
|
compression:
|
||||||
|
enabled: true
|
||||||
|
min-response-size: 1024
|
||||||
|
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: prd
|
active: local
|
||||||
application:
|
application:
|
||||||
name: chat
|
name: chat
|
||||||
config:
|
config:
|
||||||
import:
|
import:
|
||||||
- classpath:s2-config.yaml
|
- classpath:s2-config.yaml
|
||||||
- classpath:langchain4j-config.yaml
|
- classpath:langchain4j-local.yaml
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- spring.dev.langchain4j.spring.LangChain4jAutoConfig
|
- spring.dev.langchain4j.spring.LangChain4jAutoConfig
|
||||||
@@ -15,5 +22,22 @@ spring:
|
|||||||
- spring.dev.langchain4j.azure.openai.spring.AutoConfig
|
- spring.dev.langchain4j.azure.openai.spring.AutoConfig
|
||||||
- spring.dev.langchain4j.azure.aisearch.spring.AutoConfig
|
- spring.dev.langchain4j.azure.aisearch.spring.AutoConfig
|
||||||
- spring.dev.langchain4j.anthropic.spring.AutoConfig
|
- spring.dev.langchain4j.anthropic.spring.AutoConfig
|
||||||
|
h2:
|
||||||
|
console:
|
||||||
|
path: /h2-console/semantic
|
||||||
|
enabled: true
|
||||||
|
datasource:
|
||||||
|
driver-class-name: org.h2.Driver
|
||||||
|
schema: classpath:db/schema-h2.sql
|
||||||
|
data: classpath:db/data-h2.sql
|
||||||
|
url: jdbc:h2:mem:semantic;DATABASE_TO_UPPER=false
|
||||||
|
username: root
|
||||||
|
password: semantic
|
||||||
|
|
||||||
mybatis:
|
mybatis:
|
||||||
mapper-locations=classpath:mappers/custom/*.xml,classpath*:/mappers/*.xml
|
mapper-locations=classpath:mappers/custom/*.xml,classpath*:/mappers/*.xml
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
dev.langchain4j: DEBUG
|
||||||
|
dev.ai4j.openai4j: DEBUG
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
langchain4j:
|
|
||||||
open-ai:
|
|
||||||
chat-model:
|
|
||||||
# Replace with your LLM configs
|
|
||||||
# Note: The default API key `demo` is provided by langchain4j community
|
|
||||||
# which limits 1000 tokens per request.
|
|
||||||
base-url: https://api.openai.com/v1
|
|
||||||
api-key: demo
|
|
||||||
model-name: gpt-3.5-turbo
|
|
||||||
temperature: 0.0
|
|
||||||
timeout: PT60S
|
|
||||||
in-memory:
|
|
||||||
embedding-model:
|
|
||||||
model-name: bge-small-zh
|
|
||||||
embedding-store:
|
|
||||||
persist-path: /tmp
|
|
||||||
# ollama:
|
|
||||||
# chat-model:
|
|
||||||
# base-url: http://localhost:11434
|
|
||||||
# api-key: demo
|
|
||||||
# model-name: qwen:0.5b
|
|
||||||
# temperature: 0.0
|
|
||||||
# timeout: PT60S
|
|
||||||
|
|
||||||
# chroma:
|
|
||||||
# embedding-store:
|
|
||||||
# baseUrl: http://0.0.0.0:8000
|
|
||||||
# timeout: 120s
|
|
||||||
|
|
||||||
# milvus:
|
|
||||||
# embedding-store:
|
|
||||||
# host: localhost
|
|
||||||
# port: 2379
|
|
||||||
# uri: http://0.0.0.0:19530
|
|
||||||
# token: demo
|
|
||||||
# dimension: 512
|
|
||||||
# timeout: 120s
|
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
langchain4j:
|
||||||
|
# Replace `open_ai` with ollama/zhipu/azure/dashscope as needed.
|
||||||
|
# Note:
|
||||||
|
# 1. `open_ai` is commonly used to connect to cloud-based models;
|
||||||
|
# 2. `ollama` is commonly used to connect to local models.
|
||||||
|
open-ai:
|
||||||
|
chat-model:
|
||||||
|
# It is recommended to replace with your API key in production.
|
||||||
|
# Note: The default API key `demo` is provided by langchain4j community
|
||||||
|
# which limits 1000 tokens per request.
|
||||||
|
base-url: ${OPENAI_API_BASE:https://api.openai.com/v1}
|
||||||
|
api-key: ${OPENAI_API_KEY:demo}
|
||||||
|
model-name: ${OPENAI_MODEL_NAME:gpt-3.5-turbo}
|
||||||
|
temperature: ${OPENAI_TEMPERATURE:0.0}
|
||||||
|
timeout: ${OPENAI_TIMEOUT:PT60S}
|
||||||
|
|
||||||
|
# embedding-model:
|
||||||
|
# base-url: https://api.openai.com/v1
|
||||||
|
# api-key: demo
|
||||||
|
# model-name: text-embedding-3-small
|
||||||
|
# timeout: PT60S
|
||||||
|
|
||||||
|
in-memory:
|
||||||
|
embedding-model:
|
||||||
|
model-name: bge-small-zh
|
||||||
|
|
||||||
|
embedding-store:
|
||||||
|
persist-path: /tmp
|
||||||
|
|
||||||
|
# chroma:
|
||||||
|
# embedding-store:
|
||||||
|
# baseUrl: http://0.0.0.0:8000
|
||||||
|
# timeout: 120s
|
||||||
|
|
||||||
|
# milvus:
|
||||||
|
# embedding-store:
|
||||||
|
# host: localhost
|
||||||
|
# port: 2379
|
||||||
|
# uri: http://0.0.0.0:19530
|
||||||
|
# token: demo
|
||||||
|
# dimension: 512
|
||||||
|
# timeout: 120s
|
||||||
Reference in New Issue
Block a user