embed

package
v0.7.12 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchEmbeddings

func BatchEmbeddings(e types.Embeddings) error

func BuildQuery

func BuildQuery(queryFilters []types.QueryFilter) types.QueryRequest

func CreateQueryFilters

func CreateQueryFilters(embeddings [][]float32) []types.QueryFilter

func CreateQueryJSON

func CreateQueryJSON(t *tzap.Tzap, filename string, input string) error

func GetDrift

func GetDrift(t *tzap.Tzap, nowEmbeddings types.Embeddings) ([]string, error)

func GetEmbeddings

func GetEmbeddings(t *tzap.Tzap, dir string) (types.Embeddings, error)

func GetGoFilesInDir

func GetGoFilesInDir(dir string) []string

func GetQuery

func GetQuery(t *tzap.Tzap, input string) (types.QueryRequest, error)

func ProcessDirectory

func ProcessDirectory(t *tzap.Tzap, dir string)

func ProcessEmbeddings

func ProcessEmbeddings(t *tzap.Tzap, embeddings types.Embeddings) error

func ProcessFile

func ProcessFile(filename string, t *tzap.Tzap) (int, int, string, error)

func ProcessFileOffsets

func ProcessFileOffsets(t *tzap.Tzap, file, content string, fileTokens int) (types.Embeddings, error)

func ProcessFiles

func ProcessFiles(t *tzap.Tzap, files []string) (types.Embeddings, int, int)

func ProcessOffset

func ProcessOffset(t *tzap.Tzap, filename, content string, start int, end int, fileTokens int) (types.Vector, error)

func RemoveOldEmbeddings

func RemoveOldEmbeddings(t *tzap.Tzap, deleteIds []string) error

func SaveBatchToFile

func SaveBatchToFile(batch []types.Vector, batchNumber int) error

func SaveQueryAsJSON

func SaveQueryAsJSON(query types.QueryRequest, filename string) error

func SplitCachedUncachedEmbeddings

func SplitCachedUncachedEmbeddings(embeddings types.Embeddings) ([]types.Vector, []types.Vector)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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