embed

package
v0.7.19 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 10 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 FetchAndCacheNewEmbeddings added in v0.7.14

func FetchAndCacheNewEmbeddings(t *tzap.Tzap, uncachedEmbeddings types.Embeddings) error

func GetCachedEmbeddings added in v0.7.14

func GetCachedEmbeddings(embeddings types.Embeddings) types.Embeddings

func GetDrift

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

func GetEmbeddingsFromFile added in v0.7.13

func GetEmbeddingsFromFile() (types.Embeddings, error)

func GetQuery

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

func GetUncachedEmbeddings added in v0.7.14

func GetUncachedEmbeddings(embeddings types.Embeddings) types.Embeddings

func LazyPrepareEmbeddingsFromFiles added in v0.7.14

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

func PrepareEmbeddingsFromFiles added in v0.7.14

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

func ProcessFile

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

func ProcessFileOffsets

func ProcessFileOffsets(t *tzap.Tzap, file string, 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, step int, chunkStart int, lineStart int, fileTokens int) (types.Vector, error)

func RemoveOldEmbeddings

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

func SaveEmbeddingToFile added in v0.7.14

func SaveEmbeddingToFile(e types.Embeddings)

func SaveQueryAsJSON

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

func SaveVectorsToFile added in v0.7.14

func SaveVectorsToFile(e types.Embeddings, filePath string) error

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