fakeembedder

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fakeembedder provides a fake implementation of genkit.Embedder for testing purposes. The caller must register the values that the fake embedder should return for each document. Asking for the values of an unregistered document panics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedder

type Embedder struct {
	// contains filtered or unexported fields
}

Embedder is a fake implementation of an Embedder.

func New

func New() *Embedder

New returns a new fake embedder.

func (*Embedder) Embed

func (e *Embedder) Embed(ctx context.Context, req *ai.EmbedRequest) (*ai.EmbedResponse, error)

func (*Embedder) Register

func (e *Embedder) Register(d *ai.Document, vals []float32)

Register records the value to return for a Document.

Jump to

Keyboard shortcuts

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