mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-16 13:23:42 +00:00
refactor(vector-store): 优化Milvus向量存储策略实现
重构Milvus向量存储策略,引入连接缓存机制减少重复创建连接的开销 将vectorModelName重命名为vectorStoreName以更准确表达用途 移除默认配置值,改为必须显式配置 优化代码结构,减少重复代码
This commit is contained in:
@@ -17,7 +17,7 @@ public class VectorStoreProperties {
|
||||
/**
|
||||
* 向量库类型
|
||||
*/
|
||||
private String type = "weaviate";
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* Weaviate配置
|
||||
@@ -34,17 +34,17 @@ public class VectorStoreProperties {
|
||||
/**
|
||||
* 协议
|
||||
*/
|
||||
private String protocol = "http";
|
||||
private String protocol;
|
||||
|
||||
/**
|
||||
* 主机地址
|
||||
*/
|
||||
private String host = "localhost:8080";
|
||||
private String host;
|
||||
|
||||
/**
|
||||
* 类名
|
||||
*/
|
||||
private String classname = "Document";
|
||||
private String classname;
|
||||
}
|
||||
|
||||
@Data
|
||||
@@ -52,11 +52,11 @@ public class VectorStoreProperties {
|
||||
/**
|
||||
* 连接URL
|
||||
*/
|
||||
private String url = "http://localhost:19530";
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 集合名称
|
||||
*/
|
||||
private String collectionname = "knowledge_base";
|
||||
private String collectionname;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user