[fix][launcher]Change default vector dimension to 512.

This commit is contained in:
jerryjzhang
2024-12-01 22:53:56 +08:00
parent 83cfae609e
commit b3b1498af7
2 changed files with 16 additions and 4 deletions

View File

@@ -38,13 +38,13 @@ public class EmbeddingStoreParameterConfig extends ParameterConfig {
new Parameter("s2.embedding.store.timeout", "60", "超时时间(秒)", "", "number", MODULE_NAME); new Parameter("s2.embedding.store.timeout", "60", "超时时间(秒)", "", "number", MODULE_NAME);
public static final Parameter EMBEDDING_STORE_DIMENSION = public static final Parameter EMBEDDING_STORE_DIMENSION =
new Parameter("s2.embedding.store.dimension", "", "", "", "number", MODULE_NAME, null, new Parameter("s2.embedding.store.dimension", "", "向量维", "", "number", MODULE_NAME, null,
getDimensionDependency()); getDimensionDependency());
public static final Parameter EMBEDDING_STORE_DATABASE_NAME = public static final Parameter EMBEDDING_STORE_DATABASE_NAME =
new Parameter("s2.embedding.store.databaseName", "", "DatabaseName", "", "string", new Parameter("s2.embedding.store.databaseName", "", "DatabaseName", "", "string",
MODULE_NAME, null, getDatabaseNameDependency()); MODULE_NAME, null, getDatabaseNameDependency());
public static final Parameter EMBEDDING_STORE_POST = new Parameter("s2.embedding.store.post", public static final Parameter EMBEDDING_STORE_POST = new Parameter("s2.embedding.store.port",
"", "端口", "", "number", MODULE_NAME, null, getPostDependency()); "", "端口", "", "number", MODULE_NAME, null, getPostDependency());
public static final Parameter EMBEDDING_STORE_USER = new Parameter("s2.embedding.store.user", public static final Parameter EMBEDDING_STORE_USER = new Parameter("s2.embedding.store.user",
@@ -118,7 +118,7 @@ public class EmbeddingStoreParameterConfig extends ParameterConfig {
Lists.newArrayList(EmbeddingStoreType.MILVUS.name(), Lists.newArrayList(EmbeddingStoreType.MILVUS.name(),
EmbeddingStoreType.PGVECTOR.name()), EmbeddingStoreType.PGVECTOR.name()),
ImmutableMap.of(EmbeddingStoreType.MILVUS.name(), "384", ImmutableMap.of(EmbeddingStoreType.MILVUS.name(), "384",
EmbeddingStoreType.PGVECTOR.name(), "768")); EmbeddingStoreType.PGVECTOR.name(), "512"));
} }
private static List<Parameter.Dependency> getDatabaseNameDependency() { private static List<Parameter.Dependency> getDatabaseNameDependency() {

View File

@@ -11,4 +11,16 @@ spring:
username: postgres username: postgres
password: postgres password: postgres
schema-locations: classpath:db/schema-postgres.sql,classpath:db/schema-postgres-demo.sql schema-locations: classpath:db/schema-postgres.sql,classpath:db/schema-postgres-demo.sql
data-locations: classpath:db/data-postgres.sql,classpath:db/data-postgres-demo.sql data-locations: classpath:db/data-postgres.sql,classpath:db/data-postgres-demo.sql
#s2:
# embedding:
# store:
# provider: PGVECTOR
# base:
# url: 127.0.0.1
# port: 5432
# databaseName: postgres
# user: postgres
# password: postgres
# dimension: 512