Documentation ¶
Index ¶
- type App
- type Command
- type CommandHandler
- type GPTHandler
- type HandleContext
- type Handler
- type OpenAI
- func (o *OpenAI) AddClient(key string) error
- func (o *OpenAI) AllClient() []string
- func (o *OpenAI) CreateChatCompletionStream(history []*openai.ChatCompletionMessage) (*openai.ChatCompletionStream, error)
- func (o *OpenAI) GetRandClient() *openai.Client
- func (o *OpenAI) RemoveClient(key string) error
- func (o *OpenAI) RestoreClients() error
- type Session
- type StartCommand
- type TokenCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandHandler ¶
func NewCommandHandler ¶
func NewCommandHandler(api *bot.BotAPI) *CommandHandler
func (*CommandHandler) AddCommand ¶
func (h *CommandHandler) AddCommand(command Command)
func (*CommandHandler) Handle ¶
func (h *CommandHandler) Handle(update *bot.Update, ctx *HandleContext) error
type GPTHandler ¶
type GPTHandler struct { }
func NewChatHandler ¶
func NewChatHandler() *GPTHandler
func (*GPTHandler) Handle ¶
func (h *GPTHandler) Handle(update *bot.Update, ctx *HandleContext) error
type HandleContext ¶
type HandleContext struct {
// contains filtered or unexported fields
}
type OpenAI ¶
type OpenAI struct {
// contains filtered or unexported fields
}
func (*OpenAI) CreateChatCompletionStream ¶
func (*OpenAI) GetRandClient ¶
func (o *OpenAI) GetRandClient() *openai.Client
func (*OpenAI) RemoveClient ¶
func (*OpenAI) RestoreClients ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) ClearHistory ¶
func (s *Session) ClearHistory()
func (*Session) RestoreHistory ¶
func (*Session) SaveHistory ¶
type StartCommand ¶
type StartCommand struct { }
func NewStartCommand ¶
func NewStartCommand() *StartCommand
func (*StartCommand) Handle ¶
func (s *StartCommand) Handle(update *bot.Update, ctx *HandleContext) error
type TokenCommand ¶
type TokenCommand struct { }
func NewTokenCommand ¶
func NewTokenCommand() *TokenCommand
func (*TokenCommand) Handle ¶
func (s *TokenCommand) Handle(update *bot.Update, ctx *HandleContext) error
Click to show internal directories.
Click to hide internal directories.