Documentation
¶
Index ¶
- type SQLiteCache
- func (c *SQLiteCache) Close() error
- func (c *SQLiteCache) GetEmbedding(ctx context.Context, modelConfig string, input string) ([]float32, error)
- func (c *SQLiteCache) GetResponse(ctx context.Context, req llm.InferRequest) (string, error)
- func (c *SQLiteCache) GetStats() cache.CacheStats
- func (c *SQLiteCache) SetEmbedding(ctx context.Context, modelConfig string, input string, embedding []float32) error
- func (c *SQLiteCache) SetResponse(ctx context.Context, req llm.InferRequest, response string) error
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 (*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 (*SQLiteCache) SetResponse ¶
func (c *SQLiteCache) SetResponse(ctx context.Context, req llm.InferRequest, response string) error
Click to show internal directories.
Click to hide internal directories.