feat: RAG分块策略增强
This commit is contained in:
@@ -51,6 +51,15 @@
|
||||
<artifactId>easy-agents-bom</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.easyagents</groupId>
|
||||
<artifactId>easy-agents-rag-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.easyagents</groupId>
|
||||
<artifactId>easy-agents-rag-ingestion</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.easyagents.spring.boot.rag.ingestion;
|
||||
|
||||
import com.easyagents.rag.ingestion.DefaultRagIngestionService;
|
||||
import com.easyagents.rag.ingestion.RagIngestionService;
|
||||
import com.easyagents.rag.ingestion.analysis.DocumentStructureAnalyzer;
|
||||
import com.easyagents.rag.ingestion.chunk.RagSplitStrategyRegistry;
|
||||
import com.easyagents.rag.ingestion.recommend.SplitStrategyRecommender;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@ConditionalOnClass(RagIngestionService.class)
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class RagIngestionAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public DocumentStructureAnalyzer documentStructureAnalyzer() {
|
||||
return new DocumentStructureAnalyzer();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public SplitStrategyRecommender splitStrategyRecommender() {
|
||||
return new SplitStrategyRecommender();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public RagSplitStrategyRegistry ragSplitStrategyRegistry() {
|
||||
return new RagSplitStrategyRegistry();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public RagIngestionService ragIngestionService(DocumentStructureAnalyzer documentStructureAnalyzer,
|
||||
SplitStrategyRecommender splitStrategyRecommender,
|
||||
RagSplitStrategyRegistry ragSplitStrategyRegistry) {
|
||||
return new DefaultRagIngestionService(documentStructureAnalyzer, splitStrategyRecommender, ragSplitStrategyRegistry);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.easyagents.spring.boot.chatModel.chatglm.ChatglmAutoConfiguration,\
|
||||
com.easyagents.spring.boot.chatModel.openai.OpenAIAutoConfiguration,\
|
||||
com.easyagents.spring.boot.chatModel.qwen.QwenAutoConfiguration,\
|
||||
com.easyagents.spring.boot.chatModel.spark.SparkAutoConfiguration,\
|
||||
com.easyagents.spring.boot.llm.openai.OpenAIAutoConfiguration,\
|
||||
com.easyagents.spring.boot.llm.qwen.QwenAutoConfiguration,\
|
||||
com.easyagents.spring.boot.store.aliyun.AliyunAutoConfiguration,\
|
||||
com.easyagents.spring.boot.store.qcloud.QCloudStoreAutoConfiguration,\
|
||||
com.easyagents.spring.boot.chatModel.ollama.OllamaAutoConfiguration,\
|
||||
com.easyagents.spring.boot.chatModel.deepseek.DeepSeekAutoConfiguration,\
|
||||
com.easyagents.spring.boot.store.chroma.ChromaAutoConfiguration
|
||||
com.easyagents.spring.boot.llm.ollama.OllamaAutoConfiguration,\
|
||||
com.easyagents.spring.boot.llm.deepseek.DeepSeekAutoConfiguration,\
|
||||
com.easyagents.spring.boot.store.chroma.ChromaAutoConfiguration,\
|
||||
com.easyagents.spring.boot.store.elasticsearch.ElasticSearchAutoConfiguration,\
|
||||
com.easyagents.spring.boot.store.opensearch.OpenSearchAutoConfiguration,\
|
||||
com.easyagents.spring.boot.rag.ingestion.RagIngestionAutoConfiguration
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
com.easyagents.spring.boot.chatModel.chatglm.ChatglmAutoConfiguration
|
||||
com.easyagents.spring.boot.chatModel.openai.OpenAIAutoConfiguration
|
||||
com.easyagents.spring.boot.chatModel.qwen.QwenAutoConfiguration
|
||||
com.easyagents.spring.boot.chatModel.spark.SparkAutoConfiguration
|
||||
com.easyagents.spring.boot.llm.openai.OpenAIAutoConfiguration
|
||||
com.easyagents.spring.boot.llm.qwen.QwenAutoConfiguration
|
||||
com.easyagents.spring.boot.store.aliyun.AliyunAutoConfiguration
|
||||
com.easyagents.spring.boot.store.qcloud.QCloudStoreAutoConfiguration
|
||||
com.easyagents.spring.boot.chatModel.ollama.OllamaAutoConfiguration
|
||||
com.easyagents.spring.boot.llm.ollama.OllamaAutoConfiguration
|
||||
com.easyagents.spring.boot.llm.deepseek.DeepSeekAutoConfiguration
|
||||
com.easyagents.spring.boot.store.chroma.ChromaAutoConfiguration
|
||||
com.easyagents.spring.boot.store.elasticsearch.ElasticSearchAutoConfiguration
|
||||
com.easyagents.spring.boot.store.opensearch.OpenSearchAutoConfiguration
|
||||
com.easyagents.spring.boot.rag.ingestion.RagIngestionAutoConfiguration
|
||||
|
||||
Reference in New Issue
Block a user