AI智能工牌的门店管理, 销售管理 , 项目管理, 客户管理, 设备管理, 录音管理, 视频管理 ,代码骨架

This commit is contained in:
spllzh
2025-08-08 17:10:37 +08:00
parent bb031770be
commit 3e8ba9f6f1
40 changed files with 2701 additions and 12 deletions

View File

@@ -88,7 +88,7 @@ public class EnbedingModelConfig {
// @Bean("myEmbeddingStoreInRedis") 不要打开,否则每次都会调用 阿里云的向量化模型 消耗token
// @Primary
public EmbeddingStore embeddingStoreInRedis() throws IOException {
public EmbeddingStore embeddingStoreInRedis(EmbeddingStore redisEmbeddingStore) throws IOException {
//1 , 加载知识库文档进 内存
List<Document> documents1 = ClassPathDocumentLoader.loadDocuments("knowledge\\pdf",new ApachePdfBoxDocumentParser());
// List<Document> documents2 = ClassPathDocumentLoader.loadDocuments("knowledge");
@@ -107,9 +107,10 @@ public class EnbedingModelConfig {
}
@Bean
public ContentRetriever contentRetriever(){
public ContentRetriever contentRetriever(@Qualifier("myEmbeddingStoreInMemory")EmbeddingStore store){
EmbeddingStoreContentRetriever contentRetriever = EmbeddingStoreContentRetriever.builder()
.embeddingStore(redisEmbeddingStore)
// .embeddingStore(redisEmbeddingStore)
.embeddingStore( redisEmbeddingStore)
.embeddingModel(embeddingModel)
.minScore(0.5)//相似度
.maxResults(3) //最多返回3条