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.
Click to show internal directories.
Click to hide internal directories.