rag

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VectorDbClient

type VectorDbClient interface {
	AddDocument(ctx context.Context, classname, id string, document models.Document) error
	UpdateDocument(ctx context.Context, classname, id string, document models.Document) error
	QueryDocuments(ctx context.Context, classname string, vector []float32, limit int) ([]models.Document, error)
	DeleteDocument(ctx context.Context, classname, id string) error
	CreateSchema(ctx context.Context, classname interface{}) error
	GetSchema(ctx context.Context, classname string) (interface{}, error)
	GetSchemaClassNames(ctx context.Context) ([]string, error)
	DeleteSchema(ctx context.Context, classname string) error
	AddDocuments(ctx context.Context, classname string, documents []models.Document) error
	DeleteDocuments(ctx context.Context, classname string, ids []string) error
	QueryDocumentsWithFilter(ctx context.Context, classname string, vector []float32, limit int, filter map[string]interface{}) ([]models.Document, error)
}

AICompanion defines the interface for interacting with AI models.

func NewSQLiteVectorDb

func NewSQLiteVectorDb(dbpath string, normalize bool) (VectorDbClient, error)

NewSQLiteVectorDb creates a new SQLite vector database client.

func NewWeaviateClient

func NewWeaviateClient(endpoint, apiKey string) (VectorDbClient, error)

NewWeaviateClient creates a new Weaviate vector database client.

Jump to

Keyboard shortcuts

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