sqlitecache

package
v0.0.0-...-c3fa2bf Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLiteCache

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

func NewSQLiteCache

func NewSQLiteCache(dbPath string) (*SQLiteCache, error)

func (*SQLiteCache) Close

func (c *SQLiteCache) Close() error

func (*SQLiteCache) GetEmbedding

func (c *SQLiteCache) GetEmbedding(ctx context.Context, modelConfig string, input string) ([]float32, error)

func (*SQLiteCache) GetResponse

func (c *SQLiteCache) GetResponse(ctx context.Context, req llm.InferRequest) (string, error)

func (*SQLiteCache) GetStats

func (c *SQLiteCache) GetStats() cache.CacheStats

func (*SQLiteCache) SetEmbedding

func (c *SQLiteCache) SetEmbedding(ctx context.Context, modelConfig string, input string, embedding []float32) error

func (*SQLiteCache) SetResponse

func (c *SQLiteCache) SetResponse(ctx context.Context, req llm.InferRequest, response string) error

Jump to

Keyboard shortcuts

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