engine

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChromemDB

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

func NewChromemDBCollection

func NewChromemDBCollection(collection, path string, openaiClient *openai.Client, embeddingsModel string) (*ChromemDB, error)

func (*ChromemDB) Count

func (c *ChromemDB) Count() int

func (*ChromemDB) Delete added in v0.3.0

func (c *ChromemDB) Delete(where map[string]string, whereDocuments map[string]string, ids ...string) error

func (*ChromemDB) GetByID added in v0.3.0

func (c *ChromemDB) GetByID(id string) (types.Result, error)

func (*ChromemDB) GetEmbeddingDimensions added in v0.4.1

func (c *ChromemDB) GetEmbeddingDimensions() (int, error)

func (*ChromemDB) Reset

func (c *ChromemDB) Reset() error

func (*ChromemDB) Search

func (c *ChromemDB) Search(s string, similarEntries int) ([]types.Result, error)

func (*ChromemDB) Store

func (c *ChromemDB) Store(s string, metadata map[string]string) (Result, error)

func (*ChromemDB) StoreDocuments added in v0.4.0

func (c *ChromemDB) StoreDocuments(s []string, metadata map[string]string) ([]Result, error)

type LocalAIRAGDB

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

func NewLocalAIRAGDB

func NewLocalAIRAGDB(storeClient *localai.StoreClient, openaiClient *openai.Client, embeddingsModel string) *LocalAIRAGDB

func (*LocalAIRAGDB) Count

func (db *LocalAIRAGDB) Count() int

func (*LocalAIRAGDB) Delete added in v0.3.0

func (db *LocalAIRAGDB) Delete(where map[string]string, whereDocuments map[string]string, ids ...string) error

func (*LocalAIRAGDB) GetByID added in v0.3.0

func (db *LocalAIRAGDB) GetByID(id string) (types.Result, error)

func (*LocalAIRAGDB) GetEmbeddingDimensions added in v0.4.1

func (db *LocalAIRAGDB) GetEmbeddingDimensions() (int, error)

func (*LocalAIRAGDB) Reset

func (db *LocalAIRAGDB) Reset() error

func (*LocalAIRAGDB) Search

func (db *LocalAIRAGDB) Search(s string, similarEntries int) ([]types.Result, error)

func (*LocalAIRAGDB) Store

func (db *LocalAIRAGDB) Store(s string, metadata map[string]string) (Result, error)

func (*LocalAIRAGDB) StoreDocuments added in v0.4.0

func (db *LocalAIRAGDB) StoreDocuments(s []string, metadata map[string]string) ([]Result, error)

type Result added in v0.3.0

type Result struct {
	ID string `json:"id"`
}

Directories

Path Synopsis
TODO: this is a duplicate of LocalAI/core/store/client.go
TODO: this is a duplicate of LocalAI/core/store/client.go

Jump to

Keyboard shortcuts

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