Versions in this module Expand all Collapse all v1 v1.31.0 Mar 11, 2026 v1.30.1 Mar 11, 2026 v1.30.0 Mar 9, 2026 Changes in this version + func BuildShouldIgnore(buildCtx BuildContext, strategyParams map[string]any) func(path string) bool + func CreateEmbedder(embedModel provider.Provider, batchSize, maxConcurrency int) *embed.Embedder + func EmitEvent(events chan<- types.Event, event types.Event, strategyName string) + func GetParamPtr[T any](params map[string]any, key string) *T + func GetParam[T any](params map[string]any, key string, defaultValue T) T + func MergeDocPaths(sharedDocs, strategyDocs []string, parentDir string) []string + func ResolveDatabasePath(dbCfg latest.RAGDatabaseConfig, parentDir, defaultName string) (string, error) + func ResolveModelConfig(ref string, models map[string]latest.ModelConfig) (latest.ModelConfig, error) + type BM25Strategy struct + func (s *BM25Strategy) CheckAndReindexChangedFiles(ctx context.Context, docPaths []string, chunking ChunkingConfig) error + func (s *BM25Strategy) Close() error + func (s *BM25Strategy) Initialize(ctx context.Context, docPaths []string, chunking ChunkingConfig) error + func (s *BM25Strategy) Query(ctx context.Context, query string, numResults int, threshold float64) ([]database.SearchResult, error) + func (s *BM25Strategy) StartFileWatcher(ctx context.Context, docPaths []string, chunking ChunkingConfig) error + type BuildContext struct + Env environment.Provider + Models map[string]latest.ModelConfig + ModelsGateway string + ParentDir string + RAGName string + RespectVCS bool + SharedDocs []string + type ChunkingConfig struct + CodeAware bool + Overlap int + RespectWordBoundaries bool + Size int + func ParseChunkingConfig(cfg latest.RAGStrategyConfig) ChunkingConfig + type Config struct + Chunking ChunkingConfig + Docs []string + Limit int + Name string + Strategy Strategy + Threshold float64 + func BuildStrategy(ctx context.Context, cfg latest.RAGStrategyConfig, buildCtx BuildContext, ...) (*Config, error) + func NewBM25FromConfig(_ context.Context, cfg latest.RAGStrategyConfig, buildCtx BuildContext, ...) (*Config, error) + func NewChunkedEmbeddingsFromConfig(ctx context.Context, cfg latest.RAGStrategyConfig, buildCtx BuildContext, ...) (*Config, error) + func NewSemanticEmbeddingsFromConfig(ctx context.Context, cfg latest.RAGStrategyConfig, buildCtx BuildContext, ...) (*Config, error) + type DefaultEmbeddingInputBuilder struct + func (d DefaultEmbeddingInputBuilder) BuildEmbeddingInput(_ context.Context, _ string, ch chunk.Chunk) (string, error) + type EmbeddingConfig struct + ModelID string + ModelsStore *modelsdev.Store + Provider provider.Provider + func CreateEmbeddingProvider(ctx context.Context, modelName string, buildCtx BuildContext) (*EmbeddingConfig, error) + type EmbeddingInputBuilder interface + BuildEmbeddingInput func(ctx context.Context, sourcePath string, ch chunk.Chunk) (string, error) + type Strategy interface + CheckAndReindexChangedFiles func(ctx context.Context, docPaths []string, chunking ChunkingConfig) error + Close func() error + Initialize func(ctx context.Context, docPaths []string, chunking ChunkingConfig) error + Query func(ctx context.Context, query string, numResults int, threshold float64) ([]database.SearchResult, error) + StartFileWatcher func(ctx context.Context, docPaths []string, chunking ChunkingConfig) error + type VectorSearchResultData struct + Embedding []float64 + EmbeddingInput string + Similarity float64 + type VectorStore struct + func NewVectorStore(cfg VectorStoreConfig) *VectorStore + func (s *VectorStore) CheckAndReindexChangedFiles(ctx context.Context, docPaths []string, chunking ChunkingConfig) error + func (s *VectorStore) Close() error + func (s *VectorStore) GetIndexingUsage() (tokens int64, cost float64) + func (s *VectorStore) Initialize(ctx context.Context, docPaths []string, chunking ChunkingConfig) error + func (s *VectorStore) Query(ctx context.Context, query string, numResults int, threshold float64) ([]database.SearchResult, error) + func (s *VectorStore) RecordUsage(tokens int64, cost float64) + func (s *VectorStore) SetEmbeddingInputBuilder(builder EmbeddingInputBuilder) + func (s *VectorStore) StartFileWatcher(ctx context.Context, docPaths []string, chunking ChunkingConfig) error + type VectorStoreConfig struct + Chunking ChunkingConfig + Database vectorStoreDB + Embedder *embed.Embedder + EmbeddingConcurrency int + Events chan<- types.Event + FileIndexConcurrency int + ModelID string + ModelsStore modelStore + Name string + ShouldIgnore func(path string) bool + SimilarityMetric string