index

package
v0.0.0-...-1f01b20 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	ID string

	Title    string
	Content  string
	Location string

	Metadata map[string]string

	Embedding []float32
}

type Embedder

type Embedder = provider.Embedder

type ListOptions

type ListOptions struct {
}

type Provider

type Provider interface {
	List(ctx context.Context, options *ListOptions) ([]Document, error)

	Index(ctx context.Context, documents ...Document) error
	Delete(ctx context.Context, ids ...string) error

	Query(ctx context.Context, query string, options *QueryOptions) ([]Result, error)
}

type QueryOptions

type QueryOptions struct {
	Limit    *int
	Distance *float32

	Filters map[string]string
}

type Result

type Result struct {
	Document
	Distance float32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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