Versions in this module Expand all Collapse all v0 v0.1.0 Apr 16, 2026 Changes in this version + const CircuitClosed + const CircuitHalfOpen + const CircuitOpen + const HookStageChunking + const HookStageEmbed + const HookStageGenerate + const HookStageSearch + const LogLevelDebug + const LogLevelError + const LogLevelInfo + const LogLevelWarn + var DefaultHybridConfig = domain.DefaultHybridConfig + var ErrCircuitOpen = resilience.ErrCircuitOpen + var ErrDeleteNotSupported = errors.New("vector store does not support DeleteByParentID") + var ErrEmbeddingDimensionMismatch = domain.ErrEmbeddingDimensionMismatch + var ErrEmptyDocument = errors.New("empty document") + var ErrEmptyDocumentID = errors.New("document ID must not be empty") + var ErrEmptyQuery = errors.New("empty query") + var ErrFiltersNotSupported = errors.New("filters not supported") + var ErrHybridNotSupported = errors.New("vector store does not support hybrid search") + var ErrInvalidChunkerConfig = errors.New("invalid chunker config") + var ErrInvalidEmbedderConfig = errors.New("invalid embedder config") + var ErrInvalidLLMConfig = errors.New("invalid llm config") + var ErrInvalidTopK = errors.New("invalid topK") + var ErrInvalidVectorStoreConfig = errors.New("invalid vector store config") + var ErrStreamingNotSupported = errors.New("LLM provider does not support streaming") + var IsRetryable = resilience.IsRetryable + var WrapNonRetryable = resilience.WrapNonRetryable + var WrapRetryable = resilience.WrapRetryable + func ChromaCollectionExists(ctx context.Context, opts ChromaDBOptions) (bool, error) + func CollectionExists(ctx context.Context, opts QdrantOptions) (bool, error) + func CreateChromaCollection(ctx context.Context, opts ChromaDBOptions) error + func CreateCollection(ctx context.Context, opts QdrantOptions) error + func CreateWeaviateCollection(ctx context.Context, opts WeaviateOptions) error + func DeleteChromaCollection(ctx context.Context, opts ChromaDBOptions) error + func DeleteCollection(ctx context.Context, opts QdrantOptions) error + func DeleteWeaviateCollection(ctx context.Context, opts WeaviateOptions) error + func MigratePGVector(ctx context.Context, db *sql.DB, opts PGVectorMigrateOptions) error + func SetupPGVector(ctx context.Context, db *sql.DB, opts PGVectorOptions) error + func WeaviateCollectionExists(ctx context.Context, opts WeaviateOptions) (bool, error) + type AnthropicLLMOptions struct + APIKey string + AnthropicVersion string + BaseURL string + HTTPClient *http.Client + MaxTokens *int + Model string + Temperature *float64 + Timeout time.Duration + type BasicChunkerOptions struct + ChunkSize int + MaxChunks int + Overlap int + type CacheOptions struct + Logger Logger + MaxSize int + Redis RedisCacheOptions + type CachedEmbedder struct + func NewCachedEmbedder(e Embedder, opts CacheOptions) (*CachedEmbedder, error) + func (c *CachedEmbedder) Embed(ctx context.Context, text string) ([]float64, error) + func (c *CachedEmbedder) Stats() EmbedCacheStats + type ChromaDBOptions struct + BaseURL string + Collection string + Dimension int + Timeout time.Duration + func (o ChromaDBOptions) Validate() error + type Chunk = domain.Chunk + type Chunker = domain.Chunker + func NewBasicChunker(opts BasicChunkerOptions) Chunker + type CircuitBreakerStats = resilience.Stats + type CircuitState = resilience.CircuitState + type Document = domain.Document + type DocumentStore = domain.DocumentStore + type EmbedCacheStats = cache.Stats + type Embedder = domain.Embedder + func NewOllamaEmbedder(opts OllamaEmbedderOptions) Embedder + func NewOpenAICompatibleEmbedder(opts OpenAICompatibleEmbedderOptions) Embedder + type HookStage = domain.HookStage + type Hooks = domain.Hooks + type HybridConfig = domain.HybridConfig + type HybridSearcher = domain.HybridSearcher + type IndexBatchError = domain.IndexBatchError + type IndexBatchResult = domain.IndexBatchResult + type InlineCitation = domain.InlineCitation + type LLMProvider = domain.LLMProvider + func NewAnthropicLLM(opts AnthropicLLMOptions) LLMProvider + func NewOllamaLLM(opts OllamaLLMOptions) LLMProvider + func NewOpenAICompatibleLLM(opts OpenAICompatibleLLMOptions) LLMProvider + type LogField = domain.LogField + type LogLevel = domain.LogLevel + type Logger = domain.Logger + type MetadataFilter = domain.MetadataFilter + type OllamaEmbedderOptions struct + APIKey string + BaseURL string + HTTPClient *http.Client + Model string + Timeout time.Duration + type OllamaLLMOptions struct + APIKey string + BaseURL string + HTTPClient *http.Client + MaxTokens *int + Model string + Temperature *float64 + Timeout time.Duration + type OpenAICompatibleEmbedderOptions struct + APIKey string + BaseURL string + HTTPClient *http.Client + Model string + Timeout time.Duration + type OpenAICompatibleLLMOptions struct + APIKey string + BaseURL string + HTTPClient *http.Client + MaxOutputTokens *int + Model string + Temperature *float64 + Timeout time.Duration + type PGVectorMigrateOptions struct + DDLTimeout time.Duration + type PGVectorOptions struct + CreateExtension bool + EmbeddingDimension int + IndexMethod string + Lists int + TableName string + type PGVectorRuntimeOptions struct + DeleteTimeout time.Duration + MaxContentBytes int + MaxParentIDs int + MaxTopK int + SearchTimeout time.Duration + UpsertTimeout time.Duration + type PGVectorStoreOptions struct + Runtime PGVectorRuntimeOptions + type ParentIDFilter = domain.ParentIDFilter + type Pipeline struct + func NewPipeline(store VectorStore, llm LLMProvider, embedder Embedder) *Pipeline + func NewPipelineWithChunker(store VectorStore, llm LLMProvider, embedder Embedder, chunker Chunker) *Pipeline + func NewPipelineWithOptions(store VectorStore, llm LLMProvider, embedder Embedder, opts PipelineOptions) *Pipeline + func (p *Pipeline) Answer(ctx context.Context, question string) (string, error) + func (p *Pipeline) DeleteDocument(ctx context.Context, docID string) error + func (p *Pipeline) Index(ctx context.Context, docs []Document) error + func (p *Pipeline) IndexBatch(ctx context.Context, docs []Document, batchSize int) (*IndexBatchResult, error) + func (p *Pipeline) Query(ctx context.Context, question string) (RetrievalResult, error) + func (p *Pipeline) Retrieve(ctx context.Context, question string, topK int) (RetrievalResult, error) + func (p *Pipeline) Search(question string) *SearchBuilder + func (p *Pipeline) UpdateDocument(ctx context.Context, doc Document) error + type PipelineOptions struct + Chunker Chunker + DedupSourcesByParentID bool + DefaultTopK int + Hooks Hooks + IndexBatchRateLimit int + IndexConcurrency int + MMRCandidatePool int + MMREnabled bool + MMRLambda float64 + MaxContextChars int + MaxContextChunks int + Reranker Reranker + SystemPrompt string + type QdrantOptions struct + Collection string + Dimension int + Timeout time.Duration + URL string + func (o QdrantOptions) Validate() error + type RedisCacheClient interface + GetBytes func(ctx context.Context, key string) ([]byte, error) + SetBytes func(ctx context.Context, key string, value []byte, ttl time.Duration) error + type RedisCacheOptions struct + Client RedisCacheClient + KeyPrefix string + TTL time.Duration + type Reranker = domain.Reranker + type RetrievalResult = domain.RetrievalResult + type RetryEmbedder struct + func NewRetryEmbedder(e Embedder, opts RetryOptions) *RetryEmbedder + type RetryLLMProvider struct + func NewRetryLLMProvider(l LLMProvider, opts RetryOptions) *RetryLLMProvider + type RetryOptions struct + BaseDelay time.Duration + CBThreshold int + CBTimeout time.Duration + JitterFactor float64 + Logger Logger + MaxDelay time.Duration + MaxRetries int + Multiplier float64 + type SearchBuilder struct + func (b *SearchBuilder) Answer(ctx context.Context) (string, error) + func (b *SearchBuilder) Cite(ctx context.Context) (string, RetrievalResult, error) + func (b *SearchBuilder) Filter(f MetadataFilter) *SearchBuilder + func (b *SearchBuilder) HyDE() *SearchBuilder + func (b *SearchBuilder) Hybrid(cfg HybridConfig) *SearchBuilder + func (b *SearchBuilder) InlineCite(ctx context.Context) (string, RetrievalResult, []InlineCitation, error) + func (b *SearchBuilder) MultiQuery(n int) *SearchBuilder + func (b *SearchBuilder) ParentIDs(ids ...string) *SearchBuilder + func (b *SearchBuilder) Retrieve(ctx context.Context) (RetrievalResult, error) + func (b *SearchBuilder) Stream(ctx context.Context) (<-chan string, error) + func (b *SearchBuilder) StreamCite(ctx context.Context) (<-chan string, RetrievalResult, []InlineCitation, error) + func (b *SearchBuilder) StreamSources(ctx context.Context) (<-chan string, RetrievalResult, error) + func (b *SearchBuilder) TopK(n int) *SearchBuilder + type StageEndEvent = domain.StageEndEvent + type StageStartEvent = domain.StageStartEvent + type StreamingLLMProvider = domain.StreamingLLMProvider + type VectorStore = domain.VectorStore + func NewChromaDBStore(opts ChromaDBOptions) (VectorStore, error) + func NewInMemoryStore() VectorStore + func NewPGVectorStore(db *sql.DB, opts PGVectorOptions) VectorStore + func NewPGVectorStoreWithOptions(db *sql.DB, opts PGVectorStoreOptions) VectorStore + func NewPGVectorStoreWithRuntimeOptions(db *sql.DB, opts PGVectorOptions, runtime PGVectorRuntimeOptions) VectorStore + func NewQdrantStore(opts QdrantOptions) (VectorStore, error) + func NewWeaviateStore(opts WeaviateOptions) (VectorStore, error) + type VectorStoreWithFilters = domain.VectorStoreWithFilters + type WeaviateOptions struct + APIKey string + Collection string + Host string + Scheme string + Timeout time.Duration + func (o WeaviateOptions) Validate() error