index

package
v0.0.11-alpha1 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

View Source
var (
	ErrInternal = "internal index error"
)

Functions

func DeepCopyMetadata added in v0.0.10

func DeepCopyMetadata(metadata types.Meta) types.Meta

Types

type Embedder

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

type SearchResponse

type SearchResponse struct {
	ID       string
	Document document.Document
	Score    float64
}

type SearchResponses added in v0.0.5

type SearchResponses []SearchResponse

func FilterSearchResponses added in v0.0.10

func FilterSearchResponses(searchResponses SearchResponses, topK int) SearchResponses

func (SearchResponses) ToDocuments added in v0.0.5

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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