Documentation
¶
Index ¶
- Variables
- type Bot
- type Config
- type MMBots
- func (m *MMBots) CheckUsageRestrictions(requestingUserID string, bot *Bot, channel *model.Channel) error
- func (m *MMBots) CheckUsageRestrictionsForUser(bot *Bot, requestingUserID string) error
- func (b *MMBots) EnsureBots(cfgBots []llm.BotConfig) error
- func (b *MMBots) GetAllBots() []*Bot
- func (b *MMBots) GetBotByID(botID string) *Bot
- func (b *MMBots) GetBotByUsername(botUsername string) *Bot
- func (b *MMBots) GetBotByUsernameOrFirst(botUsername string) *Bot
- func (b *MMBots) GetBotConfig(botUsername string) (llm.BotConfig, error)
- func (b *MMBots) GetBotForDMChannel(channel *model.Channel) *Bot
- func (b *MMBots) GetBotMentioned(text string) *Bot
- func (b *MMBots) GetTranscribe() Transcriber
- func (b *MMBots) IsAnyBot(userID string) bool
- func (b *MMBots) SetBotsForTesting(bots []*Bot)
- func (b *MMBots) UpdateBotsCache(cfgBots []llm.BotConfig) error
- type Transcriber
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUsageRestriction = errors.New("usage restriction")
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) LLM ¶
func (b *Bot) LLM() llm.LanguageModel
func (*Bot) SetLLMForTest ¶
func (b *Bot) SetLLMForTest(llm llm.LanguageModel)
type MMBots ¶
type MMBots struct {
// contains filtered or unexported fields
}
func New ¶
func New(mutexPluginAPI cluster.MutexPluginAPI, pluginAPI *pluginapi.Client, licenseChecker *enterprise.LicenseChecker, config Config, llmUpstreamHTTPClient *http.Client) *MMBots
func (*MMBots) CheckUsageRestrictions ¶
func (*MMBots) CheckUsageRestrictionsForUser ¶
func (*MMBots) GetBotByID ¶
GetBotByID retrieves the bot associated with the given bot ID
func (*MMBots) GetBotByUsername ¶
GetBotByUsername retrieves the bot associated with the given bot username
func (*MMBots) GetBotByUsernameOrFirst ¶
GetBotByUsernameOrFirst retrieves the bot associated with the given bot username or the first bot if not found
func (*MMBots) GetBotConfig ¶
func (*MMBots) GetBotForDMChannel ¶
GetBotForDMChannel returns the bot for the given DM channel.
func (*MMBots) GetBotMentioned ¶
GetBotMentioned returns the bot mentioned in the text, if any.
func (*MMBots) GetTranscribe ¶
func (b *MMBots) GetTranscribe() Transcriber
TODO: This really doesn't belong here. Figure out where to put this.
func (*MMBots) SetBotsForTesting ¶
SetBotsForTesting sets bots directly for testing purposes only
Click to show internal directories.
Click to hide internal directories.