将文档处理部分注释掉,防止每次启动都对文档进行处理
This commit is contained in:
parent
269993853e
commit
11b0a86902
@ -39,13 +39,13 @@ public class RagConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
VectorStore vectorStore(@Qualifier("ollamaEmbeddingModel") EmbeddingModel embeddingModel) {
|
VectorStore vectorStore(@Qualifier("ollamaEmbeddingModel") EmbeddingModel embeddingModel) {
|
||||||
SimpleVectorStore simpleVectorStore = SimpleVectorStore.builder(embeddingModel).build();
|
SimpleVectorStore simpleVectorStore = SimpleVectorStore.builder(embeddingModel).build();
|
||||||
// 加载文档
|
// // 加载文档
|
||||||
List<Document> documentList = documentLoaderUtils.loadMarkdowns();
|
// List<Document> documentList = documentLoaderUtils.loadMarkdowns();
|
||||||
// 自主切分文档
|
// // 自主切分文档
|
||||||
List<Document> splitDocuments = myTokenTextSplitter.splitCustomized(documentList);
|
// List<Document> splitDocuments = myTokenTextSplitter.splitCustomized(documentList);
|
||||||
// 自动补充关键词元信息
|
// // 自动补充关键词元信息
|
||||||
List<Document> enrichedDocuments = myKeywordEnricher.enrichDocuments(documentList);
|
// List<Document> enrichedDocuments = myKeywordEnricher.enrichDocuments(documentList);
|
||||||
simpleVectorStore.add(enrichedDocuments);
|
// simpleVectorStore.add(enrichedDocuments);
|
||||||
return simpleVectorStore;
|
return simpleVectorStore;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user