Versions in this module Expand all Collapse all v0 v0.1.8 Nov 11, 2026 v0.1.7 Nov 10, 2026 v0.1.6 Nov 2, 2026 v0.1.5 Oct 31, 2026 v0.1.4 Oct 31, 2026 Changes in this version type Client + func (c *Client) EmbedBackground(ctx context.Context, inputs []string) ([][]float32, error) v0.1.3 Oct 28, 2026 v0.1.2 Oct 28, 2026 v0.1.1 Oct 28, 2026 v0.1.0 Oct 27, 2026 Changes in this version + const ChunkOverlap + const ChunkTokens + const DefaultTimeout + const JobKind + func Activate(ctx context.Context, db *sql.DB, space *Space) (bool, error) + func Blob(v []float32) []byte + func Chunk(text string) []string + func CleanOrphans(ctx context.Context, db *sql.DB) (int, error) + func CountPending(ctx context.Context, db *sql.DB, space *Space) (pending, total int, err error) + func DisabledHandler(context.Context, string) error + func DocText(title, body, files string) string + func Enqueue(ctx context.Context, x jobs.Execer) error + func EstimateTokens(s string) int + func StoreChunks(ctx context.Context, db *sql.DB, space *Space, items []Embedded, ...) error + type Client struct + APIKey string + Dimensions int + HTTP *http.Client + Model string + URL string + func (c *Client) Describe(ctx context.Context, queryPrefix string) (ServiceInfo, error) + func (c *Client) Embed(ctx context.Context, inputs []string) ([][]float32, error) + type Config struct + APIKey string + BatchSize int + Dimensions int + MinSimilarity float64 + Model string + QueryPrefix string + QueryTimeout time.Duration + SearchMinSimilarity float64 + URL string + type Embedded struct + ChunkNo int + DocID int64 + ProjectID string + Text string + Vector []float32 + type Hit struct + ChunkText string + DocID int64 + Similarity float64 + func KNN(ctx context.Context, db *sql.DB, space *Space, vector []float32, ...) ([]Hit, error) + type PendingDoc struct + DocID int64 + ProjectID string + Text string + func PendingDocs(ctx context.Context, db *sql.DB, space *Space, limit int) ([]PendingDoc, error) + type Service struct + func New(db *sql.DB, cfg Config) *Service + func (s *Service) Handler() jobs.Handler + func (s *Service) MinSimilarities() (inject, searchFloor float64) + func (s *Service) SemanticSearch(ctx context.Context, query string, projectIDs []string, k int) ([]search.SemanticHit, error) + func (s *Service) Similar(ctx context.Context, query string, projectIDs []string, k int) ([]Hit, error) + func (s *Service) Start(ctx context.Context) + func (s *Service) Status(ctx context.Context) Status + func (s *Service) Sweep(ctx context.Context, maxDocs int) (bool, error) + func (s *Service) Thresholds() Thresholds + type ServiceInfo struct + Architecture string + Dimensions int + FType string + MaxTokens int + Model string + Pooling string + QueryPrefix string + WeightTypes string + func (i ServiceInfo) Fingerprint() string + type Space struct + Dimensions int + Fingerprint string + ID int64 + Model string + Status string + VecTable string + func ActiveSpace(ctx context.Context, db *sql.DB) (*Space, error) + func EnsureSpace(ctx context.Context, db *sql.DB, info ServiceInfo) (*Space, error) + type SpaceInfo struct + Dimensions int + Docs int + Fingerprint string + Model string + Pending int + type Status struct + Active *SpaceInfo + BreakerUntil *time.Time + Building *SpaceInfo + Enabled bool + LastError string + LastErrorAt *time.Time + Service *ServiceInfo + Thresholds *Thresholds + URL string + type Thresholds struct + Inject float64 + SearchFloor float64 + Source string + func ThresholdsFor(model string, inject, searchFloor float64) Thresholds