embed

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedder

type Embedder interface {
	Embed(ctx context.Context, model string, text string) ([]float32, error)
	Health(ctx context.Context, model string) error
}

func NewEmbedder

func NewEmbedder(s Settings, secrets map[string]string) (Embedder, error)

NewEmbedder creates a new embedder.

type EmbedderType

type EmbedderType string
const (
	EmbedderOpenAI           EmbedderType = "openai"
	EmbedderGrafanaVectorAPI EmbedderType = "grafana/vectorapi"
)

type Settings

type Settings struct {
	Type EmbedderType `json:"type"`

	OpenAI                   openAISettings
	GrafanaVectorAPISettings grafanaVectorAPISettings `json:"grafanaVectorAPI"`
}

Jump to

Keyboard shortcuts

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