caches

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashMessages

func HashMessages(salt string, inputs []jpf.Message) string

func NewFile

func NewFile(filename string) (jpf.ModelResponseCache, error)

NewFile creates an in-memory cache that persists to the given filename. On creation, it loads the cache from the file (if it exists). Whenever SetCachedResponse is called, the entire cache is saved back to the file.

func NewRAM

func NewRAM() jpf.ModelResponseCache

NewRAM creates an in-memory implementation of ModelResponseCache. It stores model responses in memory using a hash of the input messages as a key.

func NewSQL

func NewSQL(ctx context.Context, db *sql.DB) (jpf.ModelResponseCache, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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