pkg

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const EmbeddingDimensions = 128
View Source
const EmbeddingModel = "text-embedding-3-small"

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedder

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

func NewEmbedder

func NewEmbedder(f string) (*Embedder, error)

func (*Embedder) Close

func (e *Embedder) Close()

func (*Embedder) IndexDocument

func (e *Embedder) IndexDocument(ctx context.Context, title string, body string, modifiedAt time.Time) error

func (*Embedder) IndexDocuments

func (e *Embedder) IndexDocuments(filenames []string) error

func (*Embedder) IndexHelpSystem

func (e *Embedder) IndexHelpSystem(ctx context.Context, helpSystem *help.HelpSystem) error

func (*Embedder) Init

func (e *Embedder) Init() error

func (*Embedder) Search

func (e *Embedder) Search(ctx context.Context, question string) ([]SearchResult, error)

func (*Embedder) VSSVersion

func (e *Embedder) VSSVersion() string

type SearchResult

type SearchResult struct {
	ID       int
	Distance float64
	Title    string
	Body     string
}

Jump to

Keyboard shortcuts

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