chat

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrChatSessionIsNotExist  = errors.New("chat session does not exist")
	ErrChatSessionNameInvalid = fmt.Errorf("chat session name does not match the regex %s", sessionNameRegex)
	ErrChatSessionNameTooLong = fmt.Errorf("chat session name is greater than %d", sessionNameMaxLength)
)

Functions

func DeleteSession

func DeleteSession(sessionName string) error

func GetSession

func GetSession(sessionName string) ([]openai.ChatCompletionMessage, error)

func ListSessions

func ListSessions() ([]string, error)

func SaveSession

func SaveSession(sessionName string, messages []openai.ChatCompletionMessage) error

func SessionExists

func SessionExists(sessionName string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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