mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-03-13 20:53:42 +08:00
@@ -42,7 +42,7 @@ public class VectorStoreServiceImpl implements VectorStoreService {
|
|||||||
|
|
||||||
private final ConfigService configService;
|
private final ConfigService configService;
|
||||||
|
|
||||||
private EmbeddingStore<TextSegment> embeddingStore;
|
// private EmbeddingStore<TextSegment> embeddingStore;
|
||||||
private WeaviateClient client;
|
private WeaviateClient client;
|
||||||
|
|
||||||
|
|
||||||
@@ -82,14 +82,14 @@ public class VectorStoreServiceImpl implements VectorStoreService {
|
|||||||
log.info("Schema 创建成功: {}", className);
|
log.info("Schema 创建成功: {}", className);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
embeddingStore = WeaviateEmbeddingStore.builder()
|
// embeddingStore = WeaviateEmbeddingStore.builder()
|
||||||
.scheme(protocol)
|
// .scheme(protocol)
|
||||||
.host(host)
|
// .host(host)
|
||||||
.objectClass(className)
|
// .objectClass(className)
|
||||||
.scheme(protocol)
|
// .scheme(protocol)
|
||||||
.avoidDups(true)
|
// .avoidDups(true)
|
||||||
.consistencyLevel("ALL")
|
// .consistencyLevel("ALL")
|
||||||
.build();
|
// .build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -148,7 +148,7 @@ public class VectorStoreServiceImpl implements VectorStoreService {
|
|||||||
String graphQLQuery = String.format(
|
String graphQLQuery = String.format(
|
||||||
"{\n" +
|
"{\n" +
|
||||||
" Get {\n" +
|
" Get {\n" +
|
||||||
" %s(nearVector: {vector: [%s], certainty: %f} limit: %d) {\n" +
|
" %s(nearVector: {vector: [%s]} limit: %d) {\n" +
|
||||||
" text\n" +
|
" text\n" +
|
||||||
" fid\n" +
|
" fid\n" +
|
||||||
" kid\n" +
|
" kid\n" +
|
||||||
|
|||||||
Reference in New Issue
Block a user