openai

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(key string, wait time.Duration, maxTokens int) *Client

New returns a new Client.

func (*Client) Chat

func (c *Client) Chat(ctx context.Context, model, role string, mem memory.Memory) io.ReadWriter

Chat creates a new chat session.

Jump to

Keyboard shortcuts

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