embed

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActiveModelID        = "Qdrant/bge-base-en-v1.5-onnx-Q"
	ActiveModelRevision  = "738cad1c108e2f23649db9e44b2eab988626493b"
	ActiveModelDimension = 768
)
View Source
const (
	ONNXRuntimeVersion = "1.25.1"
)

Variables

This section is empty.

Functions

func EnsureVerifiedActiveModel

func EnsureVerifiedActiveModel(cacheDir string, showPrepareProgress bool) error

Types

type BGEEmbedder

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

func NewBGEEmbedder

func NewBGEEmbedder(cacheDir string, showPrepareProgress bool) (*BGEEmbedder, error)

func (*BGEEmbedder) Close

func (e *BGEEmbedder) Close() error

func (*BGEEmbedder) PassageEmbed

func (e *BGEEmbedder) PassageEmbed(text string) ([]float32, error)

func (*BGEEmbedder) QueryEmbed

func (e *BGEEmbedder) QueryEmbed(text string) ([]float32, error)

type Embedder

type Embedder interface {
	PassageEmbed(text string) ([]float32, error)
	QueryEmbed(text string) ([]float32, error)
	Close() error
}

type ModelIdentity

type ModelIdentity struct {
	ModelID        string `json:"model_id"`
	ModelRevision  string `json:"model_revision"`
	ManifestSHA256 string `json:"manifest_sha256"`
	Dimension      int    `json:"dimension"`
}

func ActiveModelIdentityValue

func ActiveModelIdentityValue() ModelIdentity

type ModelStatus

type ModelStatus struct {
	ModelIdentity
	Verified bool `json:"verified"`
}

func ActiveModelStatus

func ActiveModelStatus(cacheDir string) ModelStatus

Jump to

Keyboard shortcuts

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