index

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultKeyID      = "id"
	DefaultKeyContent = "content"
)

Variables

View Source
var (
	ErrInternal = errors.New("internal index error")
)

Functions

func DeepCopyMetadata added in v0.0.10

func DeepCopyMetadata(metadata types.Meta) types.Meta

Types

type Data added in v0.0.11

type Data struct {
	ID       string
	Values   []float64
	Metadata types.Meta
}

type Embedder

type Embedder interface {
	Embed(ctx context.Context, texts []string) ([]embedder.Embedding, error)
}

type SearchResult added in v0.0.11

type SearchResult struct {
	Data
	Score float64
}

func (*SearchResult) Content added in v0.0.11

func (s *SearchResult) Content() string

type SearchResults added in v0.0.11

type SearchResults []SearchResult

func (SearchResults) ToDocuments added in v0.0.11

func (s SearchResults) ToDocuments() []document.Document

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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