Versions in this module Expand all Collapse all v0 v0.1.0 Apr 25, 2026 v0.0.2 Apr 22, 2026 Changes in this version + var ErrRateLimit = errors.New("openai: rate limit exceeded (HTTP 429)") + func CosineSimilarity(a, b []float32) float64 + func EntityText(e memory.Entity) string + type Config struct + OllamaModel string + OllamaURL string + OpenAIKey string + OpenAIModel string + func ConfigFromEnv() Config + type DocEmbedding struct + ContentHash string + DocID string + Vector []float32 + type DocResult struct + DocID string + Path string + Repo string + Score float64 + Snippet string + type DocStore interface + ListDocs func(repoName string) ([]memory.DocRecord, error) + type EmbeddingProvider interface + Embed func(ctx context.Context, texts []string) ([][]float32, error) + ModelKey func() string + func NewOllamaProvider(baseURL, model string) EmbeddingProvider + func NewOpenAIProvider(apiKey, model string) EmbeddingProvider + func NewOpenAIProviderWithURL(apiKey, model, baseURL string) EmbeddingProvider + func NewProvider(cfg Config) EmbeddingProvider + type EntityEmbedding struct + EntityName string + ObsHash string + Vector []float32 + type EntityOpener interface + OpenNodes func(names []string) (memory.KnowledgeGraph, error) + type EntityResult struct + EntityType string + Name string + Observations []string + Score float64 + type GraphReader interface + ReadGraph func() (memory.KnowledgeGraph, error) + type Indexer struct + func NewIndexer(provider EmbeddingProvider, store *VectorStore, docs DocStore, ...) *Indexer + func (idx *Indexer) IndexDocs(ctx context.Context, repoFullName string) + func (idx *Indexer) IndexEntities(ctx context.Context, names []string) + func (idx *Indexer) ScheduleEntities(names []string) + type SemanticSearcher struct + func NewSemanticSearcher(provider EmbeddingProvider, store *VectorStore, indexer *Indexer, ...) *SemanticSearcher + func (ss *SemanticSearcher) Enabled() bool + func (ss *SemanticSearcher) IndexDocs(ctx context.Context, repo string) + func (ss *SemanticSearcher) ScheduleIndexEntities(names []string) + func (ss *SemanticSearcher) SearchDocs(ctx context.Context, query, repo string, topK int) ([]DocResult, int, error) + func (ss *SemanticSearcher) SearchEntities(ctx context.Context, query string, topK int) ([]EntityResult, int, error) + type VectorStore struct + func NewVectorStore(db *gorm.DB) (*VectorStore, error) + func (vs *VectorStore) DeleteDocByID(docID string) error + func (vs *VectorStore) DeleteEntityByName(entityName string) error + func (vs *VectorStore) LoadDocEmbeddings(modelKey string) ([]DocEmbedding, error) + func (vs *VectorStore) LoadEntityEmbeddings(modelKey string) ([]EntityEmbedding, error) + func (vs *VectorStore) UpsertDoc(docID, contentHash, modelKey string, vector []float32) error + func (vs *VectorStore) UpsertEntity(entityName, obsHash, modelKey string, vector []float32) error