diff --git a/ChatGPT/README.md b/ChatGPT/README.md index a0307d9..0968fd1 100644 --- a/ChatGPT/README.md +++ b/ChatGPT/README.md @@ -11,7 +11,7 @@ Model: ``` @config plugins.chatgpt.model gpt-4o-mini ``` -^^ Use this config to set the language model. Current recommendation: gpt-40-mini +^^ Use this config to set the language model. Current recommendation: gpt-4o-mini History: ``` diff --git a/ChatGPT/config.py b/ChatGPT/config.py index d46cb6f..056e1c8 100644 --- a/ChatGPT/config.py +++ b/ChatGPT/config.py @@ -54,6 +54,16 @@ ChatGPT = conf.registerPlugin("ChatGPT") # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(ChatGPT, 'someConfigVariableName', # registry.Boolean(False, _("""Help for someConfigVariableName."""))) + +conf.registerChannelValue( + ChatGPT, + "enabled", + registry.Boolean( + True, + _("""Set False to disable the plugin, True to enable."""), + ), +) + conf.registerGlobalValue( ChatGPT, "api_key", diff --git a/ChatGPT/plugin.py b/ChatGPT/plugin.py index ce291be..1f36f3d 100644 --- a/ChatGPT/plugin.py +++ b/ChatGPT/plugin.py @@ -53,6 +53,8 @@ class ChatGPT(callbacks.Plugin): channel = msg.channel if not irc.isChannel(channel): channel = msg.nick + if not self.registryValue("enabled", msg.channel): + return if self.registryValue("nick_include", msg.channel): text = "%s: %s" % (msg.nick, text) self.history.setdefault(channel, None) diff --git a/Gemini/README.md b/Gemini/README.md index 4ad7e5f..89294a2 100644 --- a/Gemini/README.md +++ b/Gemini/README.md @@ -21,7 +21,7 @@ system prompt: ``` @chat ``` -^^ Command to send text to the chatgpt API +^^ Command to send text to the Gemini API ``` @messageparser add "(?i)(.*BOT_NICK_HERE.*)" "chat $1" diff --git a/Gemini/config.py b/Gemini/config.py index d69a16a..994b881 100644 --- a/Gemini/config.py +++ b/Gemini/config.py @@ -55,6 +55,15 @@ Gemini = conf.registerPlugin("Gemini") # conf.registerGlobalValue(Gemini, 'someConfigVariableName', # registry.Boolean(False, _("""Help for someConfigVariableName."""))) +conf.registerChannelValue( + Gemini, + "enabled", + registry.Boolean( + True, + _("""Set False to disable the plugin, True to enable."""), + ), +) + conf.registerChannelValue( Gemini, "api_key", diff --git a/Gemini/plugin.py b/Gemini/plugin.py index 451da56..80c3aec 100644 --- a/Gemini/plugin.py +++ b/Gemini/plugin.py @@ -53,6 +53,8 @@ class Gemini(callbacks.Plugin): channel = msg.channel if not irc.isChannel(channel): channel = msg.nick + if not self.registryValue("enabled", msg.channel): + return genai.configure(api_key=self.registryValue("api_key", msg.channel)) prompt = self.registryValue("prompt", msg.channel).replace("$botnick", irc.nick) max_tokens = self.registryValue("max_tokens", msg.channel) diff --git a/SpiffyTitles/README.md b/SpiffyTitles/README.md index 03bccad..8f49a7e 100644 --- a/SpiffyTitles/README.md +++ b/SpiffyTitles/README.md @@ -1,3 +1,5 @@ +Spiffytitles is no longer supported... By me... Please feel free to fork! + Highly customizable and fully-featured link title snarfer with many URL handlers. Forked from https://github.com/butterscotchstallion/limnoria-plugins/tree/master/SpiffyTitles