mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-25 20:41:21 -05:00
Merge branch 'oddluck:master' into master
This commit is contained in:
commit
af11a35d0c
@ -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:
|
||||
```
|
||||
|
@ -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",
|
||||
|
@ -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)
|
||||
|
@ -21,7 +21,7 @@ system prompt:
|
||||
```
|
||||
@chat <text>
|
||||
```
|
||||
^^ Command to send text to the chatgpt API
|
||||
^^ Command to send text to the Gemini API
|
||||
|
||||
```
|
||||
@messageparser add "(?i)(.*BOT_NICK_HERE.*)" "chat $1"
|
||||
|
@ -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",
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user