embeddings

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package embeddings provides a vector embedding interface with implementations for OpenAI, Ollama, and Cohere providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedder

type Embedder interface {
	GenerateEmbedding(ctx context.Context, input *Input) (*Embedding, error)
}

Embedder generates vector embeddings for text.

type Embedding

type Embedding struct {
	GeneratedAt time.Time
	SourceText  string
	Model       string
	Provider    string
	Vector      []float32
	Dimensions  int
}

Embedding is the result of embedding a single piece of content. It carries provenance alongside the vector so that re-embedding and ETL pipelines can be driven from the stored result alone.

type Input

type Input struct {
	// Content is the text to embed.
	Content string

	// Model optionally overrides the provider's configured DefaultModel.
	// Leave empty to use the default from the provider's Config.
	Model string
}

Input is the content to be embedded.

Directories

Path Synopsis
Package mock provides mock implementations of the embeddings package's interfaces.
Package mock provides mock implementations of the embeddings package's interfaces.

Jump to

Keyboard shortcuts

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