embed

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package embed handles embedding generation for repository chunks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunEmbedPipeline

func RunEmbedPipeline(ctx context.Context, opts EmbedOptions) <-chan EmbedEvent

RunEmbedPipeline embeds all un-embedded chunks. Skips repos where embedded_hash == pushed_at_hash. Events are sent to the returned channel.

Types

type EmbedEvent

type EmbedEvent struct {
	Type           string // "batch", "repo_skip", "error", "done"
	RepoFullName   string // for repo_skip
	BatchIndex     int
	BatchTotal     int
	ChunksEmbedded int
	ChunksSkipped  int
	ChunksErrored  int
	TotalChunks    int
	Errors         []string // error messages from the current batch
}

EmbedEvent represents a progress event from the embedding pipeline.

type EmbedOptions

type EmbedOptions struct {
	IncludeFileTree   bool
	BatchSize         int // default 20, max 100
	DB                *sql.DB
	EmbeddingProvider provider.EmbeddingProvider
}

EmbedOptions configures the embedding pipeline.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL