engine

package
v0.0.0-...-8df8562 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddVector

func AddVector(id int64, vec []float32)

func AnswerQuery

func AnswerQuery(query string) string

func AnswerQueryWrapper

func AnswerQueryWrapper(query string) string

func Chunk

func Chunk(text string) []string

func ExtractTextFromPDF

func ExtractTextFromPDF(path string) string

func GenerateAnswer

func GenerateAnswer(query string, contexts []string) string

func GenerateEmbedding

func GenerateEmbedding(text string) []float32

func GetChunkByID

func GetChunkByID(id int64) (string, error)

func InitDB

func InitDB()

func InitVectorStore

func InitVectorStore()

func ProcessText

func ProcessText(docName, text string)

func ProcessTextWrapper

func ProcessTextWrapper(docName, text string)

func SaveChunk

func SaveChunk(docName, chunkText string) (int64, error)

func SearchVector

func SearchVector(query []float32, topK int) []int64

Types

type VectorStore

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

Jump to

Keyboard shortcuts

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