Documentation
¶
Index ¶
- func IsExcluded(relPath string, filters []string) bool
- func LoadAttachmentFolderPath(vaultPath string) string
- func LoadExcludedPaths(vaultPath string) []string
- func RunProgress(totalFiles int, progressCh <-chan ProgressUpdate)
- type Embedder
- type FailedFile
- type ObsidianAppConfig
- type Pipeline
- type ProgressUpdate
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsExcluded ¶
IsExcluded checks if the relative path matches any ignore filters.
func LoadAttachmentFolderPath ¶ added in v2.13.0
LoadAttachmentFolderPath returns the Obsidian attachment folder configured in .obsidian/app.json, or "" when the file is absent, unreadable, or the setting is unset.
func LoadExcludedPaths ¶
LoadExcludedPaths reads the userIgnoreFilters and attachmentFolderPath from .obsidian/app.json. Returns nil if the file is absent or unreadable.
func RunProgress ¶
func RunProgress(totalFiles int, progressCh <-chan ProgressUpdate)
RunProgress logs ingestion progress: a debug event per file (quiet at the default info level) plus an info-level summary every 10 percent, so long runs keep the user informed without per-file noise.
Types ¶
type Embedder ¶
type Embedder interface {
Embed(ctx context.Context, text string) ([]float32, error)
// Model identifies the embedding model so content hashes can be salted.
Model() string
}
Embedder abstracts vector embedding so the pipeline can be tested with mocks.
type FailedFile ¶ added in v2.10.0
FailedFile records a file that failed during ingestion along with the failure reason.
type ObsidianAppConfig ¶
type ObsidianAppConfig struct {
UserIgnoreFilters []string `json:"userIgnoreFilters"`
AttachmentFolderPath string `json:"attachmentFolderPath"`
}
ObsidianAppConfig represents relevant fields from .obsidian/app.json.
type Pipeline ¶
type Pipeline struct {
MinChunkWords int // minimum word count to keep a chunk (filters junk)
ChunkSize int // maximum runes per chunk fed to Parse
ChunkOverlap int // overlap runes between sub-chunks when a section is split
MaxEmbedTokens int // max tokens for embed text (model sequence length)
RespectExclude bool
SkipAttachments bool
EnablePDF bool
LLMModel string
LLMContextWindow int
// contains filtered or unexported fields
}
Pipeline orchestrates the ingestion of markdown files into the ChromaDB store.
func NewPipeline ¶
NewPipeline creates an ingestion pipeline with the given number of concurrent workers. Set ChunkSize, ChunkOverlap, and MinChunkWords on the returned Pipeline before calling Run.
func (*Pipeline) FailedFiles ¶ added in v2.10.0
func (p *Pipeline) FailedFiles() []FailedFile
FailedFiles returns a copy of all file ingestion failures recorded during the run.
type ProgressUpdate ¶
ProgressUpdate represents a status update during file processing.
type Store ¶ added in v2.13.0
type Store interface {
BatchIngest(ctx context.Context, data []store.BatchIngestData, staleSlugs []string) error
GetNoteMetadata(ctx context.Context) (map[string]store.NoteMeta, error)
}
Store abstracts the vector-store methods the pipeline uses so it can be tested with fakes.