mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-01 22:13:43 +08:00
增加知识库配置属性
This commit is contained in:
@@ -81,7 +81,7 @@ public class KnowledgeController extends BaseController {
|
||||
List<Message> messages = chatRequest.getMessages();
|
||||
String content = messages.get(messages.size() - 1).getContent().toString();
|
||||
List<String> nearestList;
|
||||
List<Double> queryVector = embeddingService.getQueryVector(content);
|
||||
List<Double> queryVector = embeddingService.getQueryVector(content, chatRequest.getKid());
|
||||
nearestList = vectorStore.nearest(queryVector,chatRequest.getKid());
|
||||
for (String prompt : nearestList) {
|
||||
Message sysMessage = Message.builder().content(prompt).role(Message.Role.USER).build();
|
||||
|
||||
@@ -27,7 +27,7 @@ spring:
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://43.139.70.230:3306/ruoyi-ai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||
username: ruoyi-ai
|
||||
password: ruoyi-ai
|
||||
password: eCaZ278N62k6fhYj
|
||||
|
||||
hikari:
|
||||
# 最大连接池数量
|
||||
|
||||
@@ -310,11 +310,6 @@ wx:
|
||||
|
||||
# 企业微信应用
|
||||
wechat:
|
||||
# 是否使用微信 true/false
|
||||
enable: true
|
||||
# 生成的登录二维码路径 默认与项目同级
|
||||
qrPath: "./"
|
||||
# 企业微信应用
|
||||
cp:
|
||||
corpId:
|
||||
appConfigs:
|
||||
@@ -323,28 +318,5 @@ wechat:
|
||||
token: ''
|
||||
aesKey: ''
|
||||
|
||||
# 知识库配置
|
||||
chain:
|
||||
split:
|
||||
chunk:
|
||||
endspliter: "<STOP>"
|
||||
# 分块文本大小
|
||||
size: 200
|
||||
overlay: 30
|
||||
qaspliter: "###"
|
||||
# 知识库中检索的条数
|
||||
limits: 5
|
||||
vector:
|
||||
model: 'text-embedding-3-small'
|
||||
store:
|
||||
type: weaviate
|
||||
weaviate:
|
||||
protocol: http
|
||||
host: 127.0.0.1:6038
|
||||
classname: LocalKnowledge
|
||||
milvus:
|
||||
host: 127.0.0.1
|
||||
port: 19530
|
||||
dimension: 1536
|
||||
collection: LocalKnowledge
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user