vectordb

package
v0.3.71 Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DriverChromemGo = "chromem-go"
)

Variables

This section is empty.

Functions

func New

func New(driver string, args ...interface{}) (response vectordb_commons.IVectorDB, err error)

New initializes and returns an implementation of IVectorDB based on the specified driver and its arguments.

func SortAsc

func SortAsc(data []map[string]interface{}, field string)

func SortDesc

func SortDesc(data []map[string]interface{}, field string)

func WrapContent

func WrapContent(doc interface{}, options ...interface{}) (response []*vectordb_commons.DBResult, err error)

func WrapText

func WrapText(text string, splitter string, metadata map[string]string) (response []*vectordb_commons.DBResult)

func WrapTextToFile

func WrapTextToFile(text string, splitter string, metadata map[string]string) (filename string, err error)

Types

type VectorDBOptions

type VectorDBOptions struct {
	Name              string `json:"name"` // vector-id
	Path              string `json:"path"`
	Compress          bool   `json:"compress"`
	LLMEmbeddingModel string `json:"llm-embedding-model"`
	LLMDriver         string `json:"llm-driver"`
	LLMBaseUrl        string `json:"llm-base-url"`
}

func (*VectorDBOptions) Map

func (instance *VectorDBOptions) Map() (response map[string]interface{})

func (*VectorDBOptions) String

func (instance *VectorDBOptions) String() string

Jump to

Keyboard shortcuts

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