Documentation ¶
Overview ¶
Package localvec is a local vector database for development and testing. The database is stored in a file in the local file system. Production code should use a real vector database.
Index ¶
- func DefineIndexerAndRetriever(name string, cfg Config) (ai.Indexer, ai.Retriever, error)
- func Indexer(name string) ai.Indexer
- func Init() error
- func IsDefinedIndexer(name string) bool
- func IsDefinedRetriever(name string) bool
- func Retriever(name string) ai.Retriever
- type Config
- type RetrieverOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefineIndexerAndRetriever ¶
DefineIndexerAndRetriever defines an Indexer and Retriever that share the same underlying storage. The name uniquely identifies the the Indexer and Retriever in the registry.
func IsDefinedIndexer ¶ added in v0.1.0
IsDefinedIndexer reports whether the named Indexer is defined by this plugin.
func IsDefinedRetriever ¶ added in v0.1.0
IsDefinedRetriever reports whether the named Retriever is defined by this plugin.
Types ¶
type RetrieverOptions ¶
type RetrieverOptions struct {
K int `json:"k,omitempty"` // number of entries to return
}
RetrieverOptions may be passed in the Options field of ai.RetrieverRequest to pass options to the retriever. The Options field should be either nil or a value of type *RetrieverOptions.