Versions in this module Expand all Collapse all v1 v1.0.0 Jan 8, 2026 Changes in this version + var ErrConnectionFailed = errors.New("failed to connect to Milvus") + var ErrEmbeddingFailed = errors.New("embedding generation failed") + var ErrEmptyRecords = errors.New("no records provided for insertion") + var ErrEmptyTexts = errors.New("no texts provided for embedding") + var ErrInsertFailed = errors.New("failed to insert records") + var ErrInvalidDimension = errors.New("invalid vector dimension") + var ErrMissingAPIKey = errors.New("OPENAI_API_KEY environment variable not set") + var ErrMissingMetadata = errors.New("required metadata fields missing") + var ErrSearchFailed = errors.New("failed to search vectors") + func IndexEpisodes(ctx context.Context, episodes []EpisodeSummary, embedder Embedder, ...) error + type ContextChunk struct + Authors []string + CommitCount int + EndDate time.Time + EpisodeID string + FileCount int + Metadata map[string]interface{} + Score float32 + StartDate time.Time + Text string + type Embedder interface + Embed func(ctx context.Context, texts []string) ([]EmbeddingRecord, error) + type EmbeddingRecord struct + Embedding []float32 + Index int + Model string + Text string + type EpisodeRecord struct + Authors []string + CommitCount int + Embedding []float32 + EndDate time.Time + EpisodeID string + FileCount int + StartDate time.Time + Text string + type EpisodeSummary struct + Authors []string + CommitCount int + EndDate time.Time + EpisodeID string + FileCount int + StartDate time.Time + Summary string + Title string + func BuildEpisodeSummary(episode *cluster.Episode) EpisodeSummary + type IndexOptions struct + BatchSize int + ForceReindex bool + SkipExisting bool + func DefaultIndexOptions() IndexOptions + type MilvusConfig struct + Address string + CollectionName string + Dimension int + EfConstruction int + IndexType string + M int + MetricType string + func DefaultMilvusConfig() MilvusConfig + type MilvusStore struct + func NewMilvusStore(ctx context.Context, config MilvusConfig) (*MilvusStore, error) + func (m *MilvusStore) Close() error + func (m *MilvusStore) Delete(ctx context.Context, episodeIDs []string) error + func (m *MilvusStore) Flush(ctx context.Context) error + func (m *MilvusStore) GetStats(ctx context.Context) (map[string]interface{}, error) + func (m *MilvusStore) Insert(ctx context.Context, episodes []EpisodeRecord) error + func (m *MilvusStore) Query(ctx context.Context, episodeIDs []string) (map[string]bool, error) + func (m *MilvusStore) Search(ctx context.Context, queryVector []float32, topK int, opts *SearchOptions) ([]ContextChunk, error) + type OpenAIEmbedder struct + Dimension int + Model string + func NewOpenAIEmbedder(model string, dimension int) (*OpenAIEmbedder, error) + func (e *OpenAIEmbedder) Embed(ctx context.Context, texts []string) ([]EmbeddingRecord, error) + type Retriever struct + func NewRetriever(embedder Embedder, vectorStore VectorStore) (*Retriever, error) + func (r *Retriever) RetrieveContextForEpisode(ctx context.Context, episodeID string, topK int, opts *SearchOptions) ([]ContextChunk, error) + func (r *Retriever) RetrieveContextForQuery(ctx context.Context, query string, topK int, opts *SearchOptions) ([]ContextChunk, error) + func (r *Retriever) RetrieveContextForQueryWithFilters(ctx context.Context, query string, topK int, episodeIDs []string, ...) ([]ContextChunk, error) + func (r *Retriever) RetrieveMultipleEpisodes(ctx context.Context, episodeIDs []string, topK int, opts *SearchOptions) (map[string][]ContextChunk, error) + type SearchOptions struct + EpisodeIDs []string + Metadata map[string]interface{} + Repository string + type VectorStore interface + Close func() error + Delete func(ctx context.Context, episodeIDs []string) error + Flush func(ctx context.Context) error + GetStats func(ctx context.Context) (map[string]interface{}, error) + Insert func(ctx context.Context, episodes []EpisodeRecord) error + Query func(ctx context.Context, episodeIDs []string) (map[string]bool, error) + Search func(ctx context.Context, queryVector []float32, topK int, opts *SearchOptions) ([]ContextChunk, error)