feat: MilvusVectorStore add username and password config

This commit is contained in:
Michael Yang 2024-05-31 09:46:11 +08:00
parent 70c88dc7c3
commit 8e972713de
2 changed files with 20 additions and 1 deletions

View File

@ -57,6 +57,8 @@ public class MilvusVectorStore extends DocumentStore {
.uri(config.getUri())
.dbName(config.getDatabaseName())
.token(config.getToken())
.username(config.getUsername())
.password(config.getPassword())
.build();
this.client = new MilvusClientV2(connectConfig);

View File

@ -24,8 +24,9 @@ public class MilvusVectorStoreConfig implements Serializable {
private String uri;
private String token;
private String databaseName = "default";
private String username;
private String password;
private String defaultCollectionName;
private boolean autoCreateCollection = true;
public MilvusVectorStoreConfig() {
@ -70,4 +71,20 @@ public class MilvusVectorStoreConfig implements Serializable {
public void setAutoCreateCollection(boolean autoCreateCollection) {
this.autoCreateCollection = autoCreateCollection;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}