Documentation
¶
Index ¶
- func Execute()
- func HandleHelpCommand(c tele.Context) error
- type BotConfig
- type ChatGPTService
- func (g *ChatGPTService) HandleENCommand(c tele.Context) error
- func (g *ChatGPTService) HandleJPCommand(c tele.Context) error
- func (g *ChatGPTService) HandleNewChat(c tele.Context) error
- func (g *ChatGPTService) HandlePolishCommand(c tele.Context) error
- func (g *ChatGPTService) HandleResetCommand(c tele.Context) error
- func (g *ChatGPTService) HandleSetCommand(c tele.Context) error
- func (g *ChatGPTService) HandleTCCommand(c tele.Context) error
- func (g *ChatGPTService) HandleTextReply(c tele.Context) error
- type ImageService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleHelpCommand ¶ added in v0.1.1
Types ¶
type BotConfig ¶ added in v0.1.1
type BotConfig struct {
// Telegram bot token
TelegramBotToken string `env:"TELEGRAM_BOT_TOKEN" required:"true"`
// OpenAI API key
OpenAIAPIKey string `env:"OPENAI_API_KEY" required:"true"`
// whitelist (chat ID)
BotWhitelist []int64 `env:"BOT_WHITELIST"`
// enable the /image command
EnableImageCommand bool `env:"ENABLE_IMAGE_COMMAND"`
}
type ChatGPTService ¶ added in v0.1.1
type ChatGPTService struct {
// contains filtered or unexported fields
}
func NewChatGPTService ¶ added in v0.1.1
func NewChatGPTService(key string) *ChatGPTService
func (*ChatGPTService) HandleENCommand ¶ added in v0.1.8
func (g *ChatGPTService) HandleENCommand(c tele.Context) error
func (*ChatGPTService) HandleJPCommand ¶ added in v0.1.8
func (g *ChatGPTService) HandleJPCommand(c tele.Context) error
func (*ChatGPTService) HandleNewChat ¶ added in v0.1.1
func (g *ChatGPTService) HandleNewChat(c tele.Context) error
func (*ChatGPTService) HandlePolishCommand ¶ added in v0.3.0
func (g *ChatGPTService) HandlePolishCommand(c tele.Context) error
func (*ChatGPTService) HandleResetCommand ¶ added in v0.1.8
func (g *ChatGPTService) HandleResetCommand(c tele.Context) error
func (*ChatGPTService) HandleSetCommand ¶ added in v0.1.1
func (g *ChatGPTService) HandleSetCommand(c tele.Context) error
func (*ChatGPTService) HandleTCCommand ¶ added in v0.1.1
func (g *ChatGPTService) HandleTCCommand(c tele.Context) error
func (*ChatGPTService) HandleTextReply ¶ added in v0.1.1
func (g *ChatGPTService) HandleTextReply(c tele.Context) error
type ImageService ¶ added in v0.1.1
type ImageService struct {
// contains filtered or unexported fields
}
func NewImageService ¶ added in v0.1.1
func NewImageService(key string) *ImageService
func (*ImageService) HandleImageCommand ¶ added in v0.1.1
func (s *ImageService) HandleImageCommand(c tele.Context) error
Click to show internal directories.
Click to hide internal directories.