gpt

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENV_API_KEY = "OPENAI_API_KEY"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GPTContext

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

func New

func New(apiKey, cacheDir string, logger *zerolog.Logger) (*GPTContext, error)

New function creates APIContext instance.

func (*GPTContext) CacheDir added in v0.3.0

func (gctx *GPTContext) CacheDir() string

CacheDir method returns cache directory.

func (*GPTContext) Client added in v0.3.0

func (gctx *GPTContext) Client() *openai.Client

Client method creates new openai.Client.

func (*GPTContext) Logger

func (gctx *GPTContext) Logger() *zerolog.Logger

Logger method returns logger.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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