Documentation ¶
Index ¶
- Constants
- type BotConfig
- type Chat
- type Handler
- func (h *Handler) AddAdmin(id int64) error
- func (h *Handler) CreateChannelConfig(channel Chat) error
- func (h *Handler) GetAllChannelsConfig() ([]Chat, error)
- func (h *Handler) GetBotConfig() (BotConfig, error)
- func (h *Handler) GetChannelConfig(id int64) (Chat, error)
- func (h *Handler) GetMaxTokens() (GoogleMaxTokens int, OAIMaxTokens int)
- func (h *Handler) UpdateChannelConfig(channel Chat) error
- func (h *Handler) UpdateMaxTokens(maxTokens int) error
Constants ¶
View Source
const ( ChatTypeGroup = "group" ChatTypePrivate = "private" ChatTypeSupergroup = "supergroup" ChatTypeChannel = "channel" DefaultQuestionPrompt = "" /* 509-byte string literal not displayed */ DefaultInterferencePrompt = "" /* 469-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chat ¶
type Chat struct { gorm.Model ID int64 `gorm:"primaryKey"` Type string `gorm:"type:varchar(20)"` ChatName string `gorm:"type:varchar(255)"` QuestionPrompt string `gorm:"type:text"` RandomInterferencePrompt string `gorm:"type:text"` EmotionsEnable bool `gorm:"type:bool"` DeletePreviewMessages bool `gorm:"type:bool"` AgroLevel int `gorm:"type:int"` // chance in percent of random interference AgroCooldown int `gorm:"type:int"` // cooldown in minutes between random interference BilledTo time.Time `gorm:"type:timestamp"` AIModel string `gorm:"type:text"` }
func GetDefaultChat ¶
func GetDefaultChat() Chat
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) CreateChannelConfig ¶
func (*Handler) GetAllChannelsConfig ¶
func (*Handler) GetBotConfig ¶
func (*Handler) GetMaxTokens ¶
func (*Handler) UpdateChannelConfig ¶
func (*Handler) UpdateMaxTokens ¶
Click to show internal directories.
Click to hide internal directories.