cache

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 3

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(ctx context.Context, key, out any) (bool, error)

func (*Client) Store

func (c *Client) Store(ctx context.Context, key, value any) 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