Files
Losita 9902ca3563 Version: 0.9.65.dev.260503
后端:
1. 阶段 1.5/1.6
收口 llm-service / rag-service,统一模型出口与检索基础设施入口,清退 backend/infra/llm 与 backend/infra/rag 旧实现;
2. 同步更新相关调用链与微服务迁移计划文档
2026-05-03 23:21:03 +08:00

24 lines
780 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package rag
import (
"github.com/LoveLosita/smartflow/backend/services/rag/chunk"
"github.com/LoveLosita/smartflow/backend/services/rag/core"
"github.com/LoveLosita/smartflow/backend/services/rag/embed"
"github.com/LoveLosita/smartflow/backend/services/rag/rerank"
"github.com/LoveLosita/smartflow/backend/services/rag/store"
)
// NewDefaultPipeline 构造默认可运行的 RAG Pipeline。
//
// 当前策略:
// 1. 默认使用本地 MockEmbedder + InMemoryStore保证零外部依赖可运行
// 2. 后续切 Milvus / Eino 时仅替换依赖,不改业务调用方式。
func NewDefaultPipeline() *core.Pipeline {
return core.NewPipeline(
chunk.NewTextChunker(),
embed.NewMockEmbedder(16),
store.NewInMemoryVectorStore(),
rerank.NewNoopReranker(),
)
}