Documentation
¶
Index ¶
- func AnalyzeRepository(ctx context.Context, repo string, token ...string) ([]cluster.Episode, error)
- func AnalyzeRepositoryWithConfig(ctx context.Context, repo string, config cluster.GroupingConfig, ...) ([]cluster.Episode, error)
- type RAGConfig
- type RAGPipeline
- func (p *RAGPipeline) Close() error
- func (p *RAGPipeline) GenerateEpisodeNarrativeRAG(ctx context.Context, episode *cluster.Episode) (*narrative.Narrative, error)
- func (p *RAGPipeline) GenerateMultipleNarrativesRAG(ctx context.Context, episodes []cluster.Episode) ([]*narrative.Narrative, error)
- func (p *RAGPipeline) GenerateProjectNarrativeRAG(ctx context.Context, query string, episodes []cluster.Episode) (*narrative.Narrative, error)
- func (p *RAGPipeline) IndexEpisodes(ctx context.Context, episodes []cluster.Episode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyzeRepository ¶
func AnalyzeRepository(ctx context.Context, repo string, token ...string) ([]cluster.Episode, error)
AnalyzeRepository analyzes a Git repository and returns grouped episodes The repo parameter can be either a local path or a remote URL Uses default grouping configuration Token is automatically loaded from GITHUB_TOKEN environment variable if not provided
func AnalyzeRepositoryWithConfig ¶
func AnalyzeRepositoryWithConfig(ctx context.Context, repo string, config cluster.GroupingConfig, token ...string) ([]cluster.Episode, error)
AnalyzeRepositoryWithConfig analyzes a repository with custom grouping configuration Token is automatically loaded from GITHUB_TOKEN environment variable if not provided
Types ¶
type RAGConfig ¶
type RAGConfig struct {
// TopK is the number of similar episodes to retrieve as context
TopK int
// MaxContextSize is the maximum number of context chunks to include in the prompt
MaxContextSize int
// ReindexOnDemand forces re-indexing of episodes before retrieval
ReindexOnDemand bool
// EmbedderModel is the model to use for embeddings (e.g., "text-embedding-3-large")
EmbedderModel string
// EmbedderDimension is the vector dimension for embeddings
EmbedderDimension int
// LLMConfig holds the LLM configuration for narrative generation
LLMConfig narrative.LLMConfig
// MilvusConfig holds the Milvus vector store configuration
MilvusConfig rag.MilvusConfig
}
RAGConfig holds configuration for the RAG-based narrative generation pipeline.
func DefaultRAGConfig ¶
func DefaultRAGConfig() RAGConfig
DefaultRAGConfig returns sensible defaults for the RAG pipeline.
type RAGPipeline ¶
type RAGPipeline struct {
// contains filtered or unexported fields
}
RAGPipeline orchestrates end-to-end RAG-based narrative generation.
func NewRAGPipeline ¶
func NewRAGPipeline(ctx context.Context, config RAGConfig) (*RAGPipeline, error)
NewRAGPipeline creates a new RAG pipeline with the given configuration.
func (*RAGPipeline) Close ¶
func (p *RAGPipeline) Close() error
Close releases resources held by the RAG pipeline.
func (*RAGPipeline) GenerateEpisodeNarrativeRAG ¶
func (p *RAGPipeline) GenerateEpisodeNarrativeRAG( ctx context.Context, episode *cluster.Episode, ) (*narrative.Narrative, error)
GenerateEpisodeNarrativeRAG generates a narrative for a specific episode using RAG. The pipeline: retrieval -> prompt assembly -> LLM generation -> Narrative
func (*RAGPipeline) GenerateMultipleNarrativesRAG ¶
func (p *RAGPipeline) GenerateMultipleNarrativesRAG( ctx context.Context, episodes []cluster.Episode, ) ([]*narrative.Narrative, error)
GenerateMultipleNarrativesRAG generates narratives for multiple episodes efficiently.
func (*RAGPipeline) GenerateProjectNarrativeRAG ¶
func (p *RAGPipeline) GenerateProjectNarrativeRAG( ctx context.Context, query string, episodes []cluster.Episode, ) (*narrative.Narrative, error)
GenerateProjectNarrativeRAG generates a project-level narrative using RAG. This retrieves relevant episodes across the entire repository to create a high-level summary.
func (*RAGPipeline) IndexEpisodes ¶
IndexEpisodes indexes episode summaries into the vector store. This should be called before generating narratives to ensure episodes are searchable.