cache

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNoCache added in v0.1.4

func IsNoCache(ctx context.Context) bool

func WithNoCache added in v0.1.4

func WithNoCache(ctx context.Context) context.Context

Types

type Client

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

func New

func New(opts ...Options) (*Client, error)

func (*Client) CacheDir added in v0.3.0

func (c *Client) CacheDir() string

func (*Client) Get

func (c *Client) Get(key string) ([]byte, bool, error)

func (*Client) Store

func (c *Client) Store(key string, content []byte) error

type Options

type Options struct {
	DisableCache bool   `usage:"Disable caching of LLM API responses"`
	CacheDir     string `usage:"Directory to store cache (default: $XDG_CACHE_HOME/gptscript)"`
}

func Complete added in v0.2.0

func Complete(opts ...Options) (result Options)

Jump to

Keyboard shortcuts

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