cmd

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountToken

func CountToken(messages []openai.ChatCompletionMessage, model string) (int, error)

func Execute

func Execute()

Types

type GPT

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

func NewGPT

func NewGPT() *GPT

func (*GPT) ResetUser

func (gpt *GPT) ResetUser(userID int64)

func (*GPT) SendMessage

func (gpt *GPT) SendMessage(userID int64, msg string, answerChan chan<- string) (bool, error)

type SongResponse

type SongResponse struct {
	Title string `json:"title"`
}

type User

type User struct {
	TelegramID     int64
	LastActiveTime time.Time
	HistoryMessage []openai.ChatCompletionMessage
	LatestMessage  tgbotapi.Message
}

type UserState

type UserState struct {
	TelegramID     int64
	LastActiveTime time.Time
	HistoryMessage []openai.ChatCompletionMessage
}

Jump to

Keyboard shortcuts

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